Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorHolger Lindemann <hli@debian7.lx-system.de>
Thu, 16 Jan 2014 14:29:37 +0000 (15:29 +0100)
committerHolger Lindemann <hli@debian7.lx-system.de>
Thu, 16 Jan 2014 14:29:37 +0000 (15:29 +0100)
318 files changed:
SL/AM.pm
SL/AP.pm
SL/AR.pm
SL/Auth.pm
SL/BackgroundJob/CreatePeriodicInvoices.pm
SL/CA.pm
SL/CP.pm
SL/CT.pm
SL/Common.pm
SL/Controller/Admin.pm
SL/Controller/BackgroundJob.pm
SL/Controller/CsvImport.pm
SL/Controller/CsvImport/Base.pm
SL/Controller/CsvImport/BaseMulti.pm [new file with mode: 0644]
SL/Controller/CsvImport/CustomerVendor.pm
SL/Controller/CsvImport/Helper/Consistency.pm [new file with mode: 0644]
SL/Controller/CsvImport/Order.pm [new file with mode: 0644]
SL/Controller/CsvImport/Part.pm
SL/Controller/CustomerVendor.pm
SL/Controller/DeliveryPlan.pm
SL/Controller/DeliveryTerm.pm [new file with mode: 0644]
SL/Controller/FinancialControllingReport.pm [new file with mode: 0644]
SL/Controller/FinancialOverview.pm [new file with mode: 0644]
SL/Controller/Helper/GetModels/Sorted.pm
SL/Controller/Helper/ParseFilter.pm
SL/Controller/Inventory.pm
SL/Controller/Project.pm
SL/Controller/ProjectType.pm [new file with mode: 0644]
SL/DATEV.pm
SL/DB/Buchungsgruppe.pm
SL/DB/CsvImportProfile.pm
SL/DB/CustomVariable.pm
SL/DB/DeliveryTerm.pm [new file with mode: 0644]
SL/DB/FollowUp.pm
SL/DB/Helper/ALL.pm
SL/DB/Helper/Filtered.pm
SL/DB/Helper/FlattenToForm.pm
SL/DB/Helper/Mappings.pm
SL/DB/Helper/PriceTaxCalculator.pm
SL/DB/Helper/TransNumberGenerator.pm
SL/DB/Invoice.pm
SL/DB/Manager/BackgroundJobHistory.pm
SL/DB/Manager/DeliveryTerm.pm [new file with mode: 0644]
SL/DB/Manager/Employee.pm
SL/DB/Manager/Order.pm
SL/DB/Manager/Project.pm
SL/DB/Manager/ProjectType.pm [new file with mode: 0644]
SL/DB/MetaSetup/CsvImportReport.pm
SL/DB/MetaSetup/Customer.pm
SL/DB/MetaSetup/Default.pm
SL/DB/MetaSetup/DeliveryOrder.pm
SL/DB/MetaSetup/DeliveryTerm.pm [new file with mode: 0644]
SL/DB/MetaSetup/Employee.pm
SL/DB/MetaSetup/FollowUp.pm
SL/DB/MetaSetup/GLTransaction.pm
SL/DB/MetaSetup/Invoice.pm
SL/DB/MetaSetup/Order.pm
SL/DB/MetaSetup/Project.pm
SL/DB/MetaSetup/ProjectType.pm [new file with mode: 0644]
SL/DB/MetaSetup/PurchaseInvoice.pm
SL/DB/MetaSetup/SepaExportItem.pm
SL/DB/MetaSetup/Vendor.pm
SL/DB/Note.pm
SL/DB/Project.pm
SL/DB/ProjectType.pm [new file with mode: 0644]
SL/DB/Shipto.pm
SL/DN.pm
SL/DO.pm
SL/Form.pm
SL/GL.pm
SL/Helper/Csv.pm
SL/Helper/Csv/Dispatcher.pm
SL/IC.pm
SL/IR.pm
SL/IS.pm
SL/InstallationCheck.pm
SL/LXDebug.pm
SL/Layout/MenuLeft.pm
SL/OE.pm
SL/Presenter/Part.pm
SL/Presenter/Record.pm
SL/SEPA.pm
SL/SEPA/XML.pm
SL/Template/Plugin/L.pm
SL/Template/XML.pm
SL/USTVA.pm
SL/WH.pm
bin/mozilla/ap.pl
bin/mozilla/arap.pl
bin/mozilla/ca.pl
bin/mozilla/common.pl
bin/mozilla/cp.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
bin/mozilla/rp.pl
bin/mozilla/sepa.pl
bin/mozilla/ustva.pl
css/icons16.css
css/icons24.css
css/icons32.css
css/kivitendo/bwa.css [new file with mode: 0644]
css/kivitendo/ustva.css [new file with mode: 0644]
doc/UPGRADE
doc/changelog
doc/dokumentation.xml
doc/html/ch03s02.html
doc/html/ch04.html
doc/html/index.html
doc/kivitendo-Dokumentation.pdf
doc/release_management.txt
image/icons/16x16/AR--Reports--Invoices, Credit Notes & AR Transactions.png [new file with mode: 0644]
image/icons/16x16/AR--Reports--Invoices.png [deleted file]
image/maps/icons16.png
image/maps/icons24.png
image/maps/icons32.png
js/common.js
js/jquery.checkall.js
js/kivi.CustomerVendor.js
js/kivi.SalesPurchase.js [new file with mode: 0644]
js/kivi.js
js/locale/de.js
js/parts_language_selection.js [deleted file]
locale/de/all
locale/en/all
menus/erp.ini
modules/override/PDF/Table.pm
scripts/image_maps.pl
scripts/installation_check.pl
scripts/locales.pl
scripts/rose_auto_create_model.pl
sql/Austria-chart.sql [deleted file]
sql/Germany-DATEV-SKR04EU-chart.sql
sql/Pg-upgrade2-auth/delivery_plan_rights.pl [new file with mode: 0644]
sql/Pg-upgrade2/add_customer_mandator_id.sql [new file with mode: 0644]
sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql [new file with mode: 0644]
sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql [new file with mode: 0644]
sql/Pg-upgrade2/custom_variables_delete_via_trigger.pl [new file with mode: 0644]
sql/Pg-upgrade2/custom_variables_delete_via_trigger_2.pl [new file with mode: 0644]
sql/Pg-upgrade2/defaults_feature2.pl [new file with mode: 0644]
sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed.sql [new file with mode: 0644]
sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion.pl [new file with mode: 0644]
sql/Pg-upgrade2/delete_translations_on_delivery_term_delete.sql [new file with mode: 0644]
sql/Pg-upgrade2/delete_translations_on_payment_term_delete.sql [new file with mode: 0644]
sql/Pg-upgrade2/delete_translations_on_tax_delete.sql [new file with mode: 0644]
sql/Pg-upgrade2/delivery_terms.sql [new file with mode: 0644]
sql/Pg-upgrade2/employee_drop_columns.sql [new file with mode: 0644]
sql/Pg-upgrade2/fix_datepaid_for_sepa_transfers.sql [new file with mode: 0644]
sql/Pg-upgrade2/gl_add_employee_foreign_key.sql [new file with mode: 0644]
sql/Pg-upgrade2/project_types.sql [new file with mode: 0644]
t/controllers/helpers/parse_filter.t
t/helper/csv.t
t/rdbo_consistency.t
templates/print/French/balance_sheet.html [deleted file]
templates/print/French/bin_list.html [deleted file]
templates/print/French/bwa.html [deleted file]
templates/print/French/check.tex [deleted file]
templates/print/French/income_statement.html [deleted file]
templates/print/French/invoice.html [deleted file]
templates/print/French/invoice.tex [deleted file]
templates/print/French/purchase_order.html [deleted file]
templates/print/French/purchase_order.tex [deleted file]
templates/print/French/receipt.tex [deleted file]
templates/print/French/sales_order.html [deleted file]
templates/print/French/sales_order.tex [deleted file]
templates/print/French/statement.html [deleted file]
templates/print/French/statement.tex [deleted file]
templates/print/French/taxbird.txb [deleted file]
templates/print/French/ustva-2012.tex [deleted file]
templates/print/French/ustva.html [deleted file]
templates/print/French/ustva.tex [deleted file]
templates/print/French/winston.xml [deleted file]
templates/print/RB/balance_sheet.html [deleted file]
templates/print/RB/bwa.html [deleted file]
templates/print/RB/deutsch.tex
templates/print/RB/english.tex
templates/print/RB/income_statement.html [deleted file]
templates/print/RB/invoice.tex
templates/print/RB/purchase_delivery_order.tex
templates/print/RB/purchase_order.tex
templates/print/RB/request_quotation.tex
templates/print/RB/sales_delivery_order.tex
templates/print/RB/sales_order.tex
templates/print/RB/sales_quotation.tex
templates/print/RB/taxbird.txb [deleted file]
templates/print/RB/ustva-2004.tex [deleted file]
templates/print/RB/ustva-2005.tex [deleted file]
templates/print/RB/ustva-2006.tex [deleted file]
templates/print/RB/ustva-2007.tex [deleted file]
templates/print/RB/ustva-2008.tex [deleted file]
templates/print/RB/ustva-2012.tex [deleted file]
templates/print/RB/ustva.html [deleted file]
templates/print/RB/ustva.tex [deleted file]
templates/print/RB/winston.xml [deleted file]
templates/print/Service/balance_sheet.html [deleted file]
templates/print/Service/bin_list.html [deleted file]
templates/print/Service/bwa.html [deleted file]
templates/print/Service/check.tex [deleted file]
templates/print/Service/income_statement.html [deleted file]
templates/print/Service/invoice.html [deleted file]
templates/print/Service/invoice.tex [deleted file]
templates/print/Service/purchase_order.html [deleted file]
templates/print/Service/purchase_order.tex [deleted file]
templates/print/Service/receipt.tex [deleted file]
templates/print/Service/sales_order.html [deleted file]
templates/print/Service/sales_order.tex [deleted file]
templates/print/Service/statement.html [deleted file]
templates/print/Service/statement.tex [deleted file]
templates/print/Service/taxbird.txb [deleted file]
templates/print/Service/ustva-2012.tex [deleted file]
templates/print/Service/ustva.html [deleted file]
templates/print/Service/ustva.tex [deleted file]
templates/print/Service/winston.xml [deleted file]
templates/print/Standard/balance_sheet.html [deleted file]
templates/print/Standard/bwa.html [deleted file]
templates/print/Standard/credit_note.tex
templates/print/Standard/income_statement.html [deleted file]
templates/print/Standard/invoice.tex
templates/print/Standard/mahnung.tex
templates/print/Standard/mahnung_invoice.tex
templates/print/Standard/proforma.tex
templates/print/Standard/purchase_order.tex
templates/print/Standard/request_quotation.tex
templates/print/Standard/sales_delivery_order.tex
templates/print/Standard/sales_order.tex
templates/print/Standard/sales_quotation.tex
templates/print/Standard/taxbird.txb [deleted file]
templates/print/Standard/ustva-2012.tex [deleted file]
templates/print/Standard/ustva.html [deleted file]
templates/print/Standard/ustva.tex [deleted file]
templates/print/Standard/winston.xml [deleted file]
templates/print/Standard/zahlungserinnerung.tex
templates/print/f-tex/balance_sheet.html [deleted file]
templates/print/f-tex/bwa.html [deleted file]
templates/print/f-tex/income_statement.html [deleted file]
templates/print/f-tex/taxbird.txb [deleted file]
templates/print/f-tex/ustva-2012.tex [deleted file]
templates/print/f-tex/ustva.html [deleted file]
templates/print/f-tex/ustva.tex [deleted file]
templates/print/f-tex/winston.xml [deleted file]
templates/webpages/admin/edit_user.html
templates/webpages/am/edit_price_factor.html
templates/webpages/am/edit_tax.html
templates/webpages/am/edit_units.html
templates/webpages/am/list_price_factors.html
templates/webpages/am/list_warehouses.html
templates/webpages/ap/form_footer.html
templates/webpages/ca/list.html
templates/webpages/client_config/_features.html
templates/webpages/client_config/form.html
templates/webpages/common/select_warehouse_bin.html
templates/webpages/common/show_vc_details.html
templates/webpages/csv_import/_form_orders.html [new file with mode: 0644]
templates/webpages/csv_import/form.html
templates/webpages/csv_import/report.html
templates/webpages/ct/_contact.html [deleted file]
templates/webpages/ct/_shipto.html [deleted file]
templates/webpages/ct/ajax_autocomplete.html [deleted file]
templates/webpages/ct/form_footer.html [deleted file]
templates/webpages/ct/form_header.html [deleted file]
templates/webpages/ct/get_delivery.html [deleted file]
templates/webpages/ct/list_names_bottom.html
templates/webpages/ct/testpage.html [deleted file]
templates/webpages/custom_variable_config/list.html
templates/webpages/customer_vendor/form.html
templates/webpages/customer_vendor/tabs/bank.html [new file with mode: 0644]
templates/webpages/customer_vendor/tabs/billing.html
templates/webpages/customer_vendor/tabs/shipto.html
templates/webpages/customer_vendor/tabs/vcnotes.html
templates/webpages/dbupgrade/default_bin_parts.html
templates/webpages/delivery_term/form.html [new file with mode: 0755]
templates/webpages/delivery_term/list.html [new file with mode: 0644]
templates/webpages/do/form_footer.html
templates/webpages/do/form_header.html
templates/webpages/do/search.html
templates/webpages/do/stock_out_form.html
templates/webpages/dunning/show_dunning_bottom.html
templates/webpages/financial_controlling_report/_filter.html [new file with mode: 0644]
templates/webpages/financial_controlling_report/report_bottom.html [new file with mode: 0644]
templates/webpages/financial_controlling_report/report_top.html [new file with mode: 0644]
templates/webpages/financial_overview/report_top.html [new file with mode: 0644]
templates/webpages/generic/new_item.html
templates/webpages/generic/set_longdescription.html
templates/webpages/gl/form_header.html
templates/webpages/gl/update_tax_accounts.html
templates/webpages/ic/form_footer.html
templates/webpages/ic/form_header.html
templates/webpages/ic/generate_report_top.html [new file with mode: 0644]
templates/webpages/ic/parts_language_selection.html [deleted file]
templates/webpages/ic/tabs/_edit_translations.html [new file with mode: 0644]
templates/webpages/ir/form_footer.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_footer.html
templates/webpages/is/form_header.html
templates/webpages/layout/javascript_setup.js
templates/webpages/oe/form_footer.html
templates/webpages/oe/form_header.html
templates/webpages/oe/sales_order.html
templates/webpages/oe/search.html
templates/webpages/part/part_picker_search.html
templates/webpages/payment_term/list.html
templates/webpages/project/form.html
templates/webpages/project/search.html
templates/webpages/project_type/form.html [new file with mode: 0755]
templates/webpages/project_type/list.html [new file with mode: 0644]
templates/webpages/rp/balance_sheet.html
templates/webpages/rp/bwa.html [new file with mode: 0644]
templates/webpages/rp/income_statement.html [new file with mode: 0644]
templates/webpages/sepa/bank_transfer_add.html
templates/webpages/sepa/bank_transfer_create.html
templates/webpages/sepa/bank_transfer_edit.html
templates/webpages/ustva/ustva.html [new file with mode: 0644]

index 3fdf175..8b2d7b2 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -1643,7 +1643,7 @@ sub save_tax {
   $chart_categories .= 'E' if $form->{expense};
   $chart_categories .= 'C' if $form->{costs};
 
-  my @values = ($form->{taxkey}, $form->{taxdescription}, $form->{rate}, $form->{chart_id}, $form->{chart_id}, $chart_categories);
+  my @values = ($form->{taxkey}, $form->{taxdescription}, $form->{rate}, conv_i($form->{chart_id}), conv_i($form->{chart_id}), $chart_categories);
   if ($form->{id} ne "") {
     $query = qq|UPDATE tax SET
                   taxkey         = ?,
@@ -1670,7 +1670,7 @@ sub save_tax {
   }
   push(@values, $form->{id});
   do_query($form, $dbh, $query, @values);
-  
+
   foreach my $language_id (keys %{ $form->{translations} }) {
     GenericTranslations->save('dbh'              => $dbh,
                               'translation_type' => 'SL::DB::Tax/taxdescription',
index 9215ab7..eabf471 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -163,32 +163,24 @@ sub post_transaction {
       do_query($form, $dbh, $query, $form->{id});
 
     } else {
-      my $uid = rand() . time;
-
-      $uid .= $form->{login};
-
-      $uid = substr($uid, 2, 75);
 
+      ($form->{id}) = selectrow_query($form, $dbh, qq|SELECT nextval('glid')|);
       $query =
-        qq|INSERT INTO ap (invnumber, employee_id,currency_id) | .
-        qq|VALUES (?, (SELECT e.id FROM employee e WHERE e.login = ?),
+        qq|INSERT INTO ap (id, invnumber, employee_id,currency_id) | .
+        qq|VALUES (?, ?, (SELECT e.id FROM employee e WHERE e.login = ?),
                       (SELECT id FROM currencies WHERE name = ?) )|;
-      do_query($form, $dbh, $query, $uid, $form->{login}, $form->{currency});
+      do_query($form, $dbh, $query, $form->{id}, $form->{invnumber}, $form->{login}, $form->{currency});
 
-      $query = qq|SELECT a.id FROM ap a
-                  WHERE a.invnumber = ?|;
-      ($form->{id}) = selectrow_query($form, $dbh, $query, $uid);
     }
 
-    $form->{invnumber} = $form->{id} unless $form->{invnumber};
-
     $query = qq|UPDATE ap SET
-                invnumber = ?, transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
+                transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
                 amount = ?, duedate = ?, paid = ?, netamount = ?,
                 currency_id = (SELECT id FROM currencies WHERE name = ?), notes = ?, department_id = ?, storno = ?, storno_id = ?,
                 globalproject_id = ?, direct_debit = ?
                WHERE id = ?|;
-    @values = ($form->{invnumber}, conv_date($form->{transdate}),
+    @values = (conv_date($form->{transdate}),
                   $form->{ordnumber}, conv_i($form->{vendor_id}),
                   $form->{taxincluded} ? 't' : 'f', $form->{invtotal},
                   conv_date($form->{duedate}), $form->{invpaid},
@@ -703,7 +695,7 @@ sub setup_form {
   my ($self, $form, $for_post_payments) = @_;
 
   my ($exchangerate, $i, $j, $k, $key, $akey, $ref, $index, $taxamount, $totalamount, $totaltax, $totalwithholding, $withholdingrate,
-      $taxincluded, $tax, $diff);
+      $tax, $diff);
 
   # forex
   $form->{forex} = $form->{exchangerate};
@@ -807,7 +799,6 @@ sub setup_form {
     }
   }
 
-  $form->{taxincluded}  = $taxincluded if ($form->{id});
   $form->{paidaccounts} = 1            if not defined $form->{paidaccounts};
 
   if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {
index adffeb6..3da550d 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -40,6 +40,7 @@ use SL::DBUtils;
 use SL::IO;
 use SL::MoreCommon;
 use SL::DB::Default;
+use SL::TransNumber;
 
 use strict;
 
@@ -136,7 +137,10 @@ sub post_transaction {
       ($form->{id}) = selectrow_query($form, $dbh, $query);
       $query = qq|INSERT INTO ar (id, invnumber, employee_id, currency_id) VALUES (?, 'dummy', ?, (SELECT id FROM currencies WHERE name=?))|;
       do_query($form, $dbh, $query, $form->{id}, $form->{employee_id}, $form->{currency});
-      $form->{invnumber} = $form->update_defaults($myconfig, "invnumber", $dbh) unless $form->{invnumber};
+      if (!$form->{invnumber}) {
+        my $trans_number   = SL::TransNumber->new(type => 'invoice', dbh => $dbh, number => $form->{partnumber}, id => $form->{id});
+        $form->{invnumber} = $trans_number->create_unique;
+      }
     }
   }
 
@@ -509,8 +513,8 @@ sub ar_transactions {
     qq|LEFT JOIN employee e ON (a.employee_id = e.id) | .
     qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | .
     qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| .
-    qq|LEFT JOIN tax_zones tz ON (tz.id = c.taxzone_id)| .
-    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)| .
+    qq|LEFT JOIN tax_zones tz ON (tz.id = a.taxzone_id)| .
+    qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)| .
     qq|LEFT JOIN business b ON (b.id = c.business_id)| .
     qq|LEFT JOIN department d ON (d.id = a.department_id)|;
 
@@ -638,7 +642,7 @@ sub setup_form {
   my ($self, $form, $for_post_payments) = @_;
 
   my ($exchangerate, $akey, $j, $k, $index, $taxamount, $totaltax, $taxrate, $diff, $totalwithholding, $withholdingrate,
-      $totalamount, $taxincluded, $tax);
+      $totalamount, $tax);
 
   # forex
   $form->{forex} = $form->{exchangerate};
@@ -722,7 +726,6 @@ sub setup_form {
     }
   }
 
-  $form->{taxincluded}  = $taxincluded if ($form->{id});
   $form->{paidaccounts} = 1            if not defined $form->{paidaccounts};
 
   if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {
@@ -801,4 +804,3 @@ sub storno {
 
 
 1;
-
index 59542d6..13044e7 100644 (file)
@@ -1067,6 +1067,7 @@ sub all_rights_full {
     ["sales_all_edit",                 $locale->text("View/edit all employees sales documents")],
     ["edit_prices",                    $locale->text("Edit prices and discount (if not used, textfield is ONLY set readonly)")],
     ["show_ar_transactions",           $locale->text("Show AR transactions as part of AR invoice report")],
+    ["delivery_plan",                  $locale->text("Show delivery plan")],
     ["--ap",                           $locale->text("AP")],
     ["request_quotation_edit",         $locale->text("Create and edit RFQs")],
     ["purchase_order_edit",            $locale->text("Create and edit purchase orders")],
index 0817ae6..fa5d649 100644 (file)
@@ -142,6 +142,18 @@ sub _create_periodic_invoice {
 
     $invoice->post(ar_id => $config->ar_chart_id) || die;
 
+    # like $form->add_shipto, but we don't need to check for a manual exception,
+    # because we can already assume this (otherwise no shipto_id from order)
+    if ($order->shipto_id) {
+
+      my $shipto_oe = SL::DB::Manager::Shipto->find_by(shipto_id => $order->shipto_id);
+      my $shipto_ar = $shipto_oe->clone_and_reset;
+
+      $shipto_ar->module('AR');            # alter module OE -> AR
+      $shipto_ar->trans_id($invoice->id);  # alter trans_id -> new id from invoice
+      $shipto_ar->save;
+    }
+
     $order->link_to_record($invoice);
 
     SL::DB::PeriodicInvoice->new(config_id         => $config->id,
index ef6e9c3..983f9bd 100644 (file)
--- a/SL/CA.pm
+++ b/SL/CA.pm
@@ -1,4 +1,4 @@
-  #=====================================================================
+#=====================================================================
 # LX-Office ERP
 # Copyright (C) 2004
 # Based on SQL-Ledger Version 2.1.9
@@ -366,8 +366,8 @@ sub all_transactions {
   }
 
   my $sort = grep({ $form->{sort} eq $_ } qw(transdate reference description)) ? $form->{sort} : 'transdate';
-
-  $query .= qq|ORDER BY $sort|;
+  my $sort2 = ($sort eq 'reference')?'transdate':'reference';
+  $query .= qq|ORDER BY $sort , $sort2 |;
   my $sth = prepare_execute_query($form, $dbh, $query, @values);
 
   #get detail information for each transaction
index 29ac35a..e2b9f48 100644 (file)
--- a/SL/CP.pm
+++ b/SL/CP.pm
@@ -148,15 +148,22 @@ sub get_openinvoices {
   my $buysell = $form->{vc} eq 'customer' ? "buy" : "sell";
   my $arap = $form->{arap} eq "ar" ? "ar" : "ap";
 
+  my @values = (conv_i($form->{"${vc}_id"}), "$form->{currency}");
+  my $whereinvoice = '';
+  if ($::form->{invnumber}) {
+    $whereinvoice = ' AND a.invnumber LIKE ? ';
+    push @values, $::form->{invnumber};
+  }
+
   my $query =
      qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, cu.name AS curr | .
      qq|FROM $arap a | .
      qq|LEFT JOIN currencies cu ON (cu.id=a.currency_id)| .
      qq|WHERE (a.${vc}_id = ?) AND cu.name = ? AND NOT (a.amount = a.paid)| .
+     $whereinvoice .
      qq|ORDER BY a.id|;
-  my $sth = prepare_execute_query($form, $dbh, $query,
-                                  conv_i($form->{"${vc}_id"}),
-                                  "$form->{currency}");
+
+  my $sth = prepare_execute_query($form, $dbh, $query, @values);
 
   $form->{PR} = [];
   while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
index cae50f0..fa1f914 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
 
 package CT;
 
-use Data::Dumper;
-
 use SL::Common;
 use SL::CVar;
 use SL::DBUtils;
-use SL::DB::Default;
-use SL::FU;
-use SL::Notes;
-use SL::TransNumber;
 
 use strict;
 
-sub get_tuple {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-
-  my $cv = $form->{db} eq "customer" ? "customer" : "vendor";
-
-  my $dbh   = $form->dbconnect($myconfig);
-  my $query =
-    qq|SELECT ct.*, b.id AS business, cp.* | .
-    qq|FROM $cv ct | .
-    qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
-    qq|LEFT JOIN contacts cp ON (ct.id = cp.cp_cv_id) | .
-    qq|WHERE (ct.id = ?) | .
-    qq|ORDER BY cp.cp_id LIMIT 1|;
-  my $sth = prepare_execute_query($form, $dbh, $query, $form->{id});
-
-  my $ref = $sth->fetchrow_hashref("NAME_lc");
-
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-  $sth->finish;
-
-  #get name of currency instead of id:
-  $query = qq|SELECT name AS curr FROM currencies WHERE id=?|;
-  ($form->{curr}) = selectrow_query($form, $dbh, $query, conv_i($form->{currency_id}));
-
-  if ( $form->{salesman_id} ) {
-    my $query =
-      qq|SELECT ct.name AS salesman | .
-      qq|FROM $cv ct | .
-      qq|WHERE ct.id = ?|;
-    ($form->{salesman}) =
-      selectrow_query($form, $dbh, $query, $form->{salesman_id});
-  }
-
-  my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login});
-  $query =
-    qq|SELECT n.*, n.itime::DATE AS created_on,
-         e.name AS created_by_name, e.login AS created_by_login
-       FROM notes n
-       LEFT JOIN employee e ON (n.created_by = e.id)
-       WHERE (n.trans_id = ?) AND (n.trans_module = 'ct')|;
-  $form->{NOTES} = selectall_hashref_query($form, $dbh, $query, conv_i($form->{id}));
-
-  $query =
-    qq|SELECT fu.follow_up_date, fu.done AS follow_up_done, e.name AS created_for_name, e.name AS created_for_login
-       FROM follow_ups fu
-       LEFT JOIN employee e ON (fu.created_for_user = e.id)
-       WHERE (fu.note_id = ?)
-         AND NOT COALESCE(fu.done, FALSE)
-         AND (   (fu.created_by = ?)
-              OR (fu.created_by IN (SELECT DISTINCT what FROM follow_up_access WHERE who = ?)))|;
-  $sth = prepare_query($form, $dbh, $query);
-
-  foreach my $note (@{ $form->{NOTES} }) {
-    do_statement($form, $sth, $query, conv_i($note->{id}), conv_i($note->{created_by}), conv_i($employee_id));
-    $ref = $sth->fetchrow_hashref();
-
-    map { $note->{$_} = $ref->{$_} } keys %{ $ref } if ($ref);
-  }
-
-  $sth->finish();
-
-  if ($form->{edit_note_id}) {
-    $query =
-      qq|SELECT n.id AS NOTE_id, n.subject AS NOTE_subject, n.body AS NOTE_body,
-           fu.id AS FU_id, fu.follow_up_date AS FU_date, fu.done AS FU_done, fu.created_for_user AS FU_created_for_user
-         FROM notes n
-         LEFT JOIN follow_ups fu ON ((n.id = fu.note_id) AND NOT COALESCE(fu.done, FALSE))
-         WHERE n.id = ?|;
-    $ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{edit_note_id}));
-
-    if ($ref) {
-      foreach my $key (keys %{ $ref }) {
-        my $new_key       =  $key;
-        $new_key          =~ s/^([^_]+)/\U$1\E/;
-        $form->{$new_key} =  $ref->{$key};
-      }
-    }
-  }
-
-  # check if it is orphaned
-  my $arap      = ( $form->{db} eq 'customer' ) ? "ar" : "ap";
-  my $num_args  = 2;
-  my $makemodel = '';
-  if ($form->{db} eq 'vendor') {
-    $makemodel = qq| UNION SELECT 1 FROM makemodel mm WHERE mm.make = ?|;
-    $num_args++;
-  }
-
-  $query =
-    qq|SELECT a.id | .
-    qq|FROM $arap a | .
-    qq|JOIN $cv ct ON (a.${cv}_id = ct.id) | .
-    qq|WHERE ct.id = ? | .
-    qq|UNION | .
-    qq|SELECT a.id | .
-    qq|FROM oe a | .
-    qq|JOIN $cv ct ON (a.${cv}_id = ct.id) | .
-    qq|WHERE ct.id = ?|
-    . $makemodel;
-  my ($dummy) = selectrow_query($form, $dbh, $query, (conv_i($form->{id})) x $num_args);
-
-  $form->{status} = "orphaned" unless ($dummy);
-
-  $dbh->disconnect;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub populate_drop_down_boxes {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form, $provided_dbh) = @_;
-  my $query;
-
-  my $dbh = $provided_dbh ? $provided_dbh : $form->dbconnect($myconfig);
-
-  # get business types
-  $query = qq|SELECT id, description FROM business ORDER BY id|;
-  $form->{all_business} = selectall_hashref_query($form, $dbh, $query);
-
-  # get shipto address
-  $query =
-    qq|SELECT shipto_id, shiptoname, shiptodepartment_1, shiptostreet, shiptocity
-       FROM shipto
-       WHERE (trans_id = ?) AND (module = 'CT')|;
-  $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $form->{id});
-
-  # get contacts
-  $query  = qq|SELECT cp_id, cp_name, cp_givenname FROM contacts WHERE cp_cv_id = ? ORDER BY cp_name|;
-  $form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $form->{id});
-
-  # get languages
-  $query = qq|SELECT id, description FROM language ORDER BY id|;
-  $form->{languages} = selectall_hashref_query($form, $dbh, $query);
-
-  # get payment terms
-  $query = qq|SELECT id, description FROM payment_terms ORDER BY sortkey|;
-  $form->{payment_terms} = selectall_hashref_query($form, $dbh, $query);
-
-  $dbh->disconnect() unless ($provided_dbh);
-
-  $main::lxdebug->leave_sub();
-}
-
-sub query_titles_and_greetings {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-  my ( %tmp,  $ref, $query );
-
-  my $dbh = $form->dbconnect($myconfig);
-
-  $query =
-    qq|SELECT DISTINCT(greeting) | .
-    qq|FROM customer | .
-    qq|WHERE greeting ~ '[a-zA-Z]' | .
-    qq|UNION | .
-    qq|SELECT DISTINCT(greeting) | .
-    qq|FROM vendor | .
-    qq|WHERE greeting ~ '[a-zA-Z]' | .
-    qq|ORDER BY greeting|;
-
-  map({ $tmp{$_} = 1; } selectall_array_query($form, $dbh, $query));
-  $form->{COMPANY_GREETINGS} = [ sort(keys(%tmp)) ];
-
-  $query =
-    qq|SELECT DISTINCT(cp_title) | .
-    qq|FROM contacts | .
-    qq|WHERE cp_title ~ '[a-zA-Z]'|;
-  $form->{TITLES} = [ selectall_array_query($form, $dbh, $query) ];
-
-  $query =
-    qq|SELECT DISTINCT(cp_abteilung) | .
-    qq|FROM contacts | .
-    qq|WHERE cp_abteilung ~ '[a-zA-Z]'|;
-  $form->{DEPARTMENT} = [ selectall_array_query($form, $dbh, $query) ];
-
-  $dbh->disconnect();
-  $main::lxdebug->leave_sub();
-}
-
-sub save_customer {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-
-  # set pricegroup to default
-  $form->{klass} = 0 unless ($form->{klass});
-
-  # connect to database
-  my $dbh = $form->get_standard_dbh;
-
-  map( {
-    $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
-    if ( $form->{"selected_cp_${_}"} );
-       } qw(title greeting abteilung) );
-  $form->{"greeting"} = $form->{"selected_company_greeting"}
-  if ( $form->{"selected_company_greeting"} );
-
-  # assign value discount, terms, creditlimit
-  $form->{discount} = $form->parse_amount( $myconfig, $form->{discount} );
-  $form->{discount} /= 100;
-  $form->{creditlimit} = $form->parse_amount( $myconfig, $form->{creditlimit} );
-
-  my ( $query, $sth, $f_id );
-
-  if ( $form->{id} ) {
-    $query = qq|SELECT id FROM customer WHERE customernumber = ?|;
-    ($f_id) = selectrow_query($form, $dbh, $query, $form->{customernumber});
-
-    if (($f_id ne $form->{id}) && ($f_id ne "")) {
-      $main::lxdebug->leave_sub();
-      return 3;
-    }
-
-  } else {
-    my $customernumber      = SL::TransNumber->new(type        => 'customer',
-                                                   dbh         => $dbh,
-                                                   number      => $form->{customernumber},
-                                                   business_id => $form->{business},
-                                                   save        => 1);
-    $form->{customernumber} = $customernumber->create_unique unless $customernumber->is_unique;
-
-    $query = qq|SELECT nextval('id')|;
-    ($form->{id}) = selectrow_query($form, $dbh, $query);
-
-    $query = qq|INSERT INTO customer (id, name, currency_id) VALUES (?, '', (SELECT currency_id FROM defaults))|;
-    do_query($form, $dbh, $query, $form->{id});
-  }
-
-  $query = qq|UPDATE customer SET | .
-    qq|customernumber = ?, | .
-    qq|name = ?, | .
-    qq|greeting = ?, | .
-    qq|department_1 = ?, | .
-    qq|department_2 = ?, | .
-    qq|street = ?, | .
-    qq|zipcode = ?, | .
-    qq|city = ?, | .
-    qq|country = ?, | .
-    qq|homepage = ?, | .
-    qq|contact = ?, | .
-    qq|phone = ?, | .
-    qq|fax = ?, | .
-    qq|email = ?, | .
-    qq|cc = ?, | .
-    qq|bcc = ?, | .
-    qq|notes = ?, | .
-    qq|discount = ?, | .
-    qq|creditlimit = ?, | .
-    qq|terms = ?, | .
-    qq|business_id = ?, | .
-    qq|taxnumber = ?, | .
-    qq|language = ?, | .
-    qq|account_number = ?, | .
-    qq|bank_code = ?, | .
-    qq|bank = ?, | .
-    qq|iban = ?, | .
-    qq|bic = ?, | .
-    qq|obsolete = ?, | .
-    qq|direct_debit = ?, | .
-    qq|ustid = ?, | .
-    qq|username = ?, | .
-    qq|salesman_id = ?, | .
-    qq|language_id = ?, | .
-    qq|payment_id = ?, | .
-    qq|taxzone_id = ?, | .
-    qq|user_password = ?, | .
-    qq|c_vendor_id = ?, | .
-    qq|klass = ?, | .
-    qq|currency_id = (SELECT id FROM currencies WHERE name = ?), | .
-    qq|taxincluded_checked = ? | .
-    qq|WHERE id = ?|;
-  my @values = (
-    $form->{customernumber},
-    $form->{name},
-    $form->{greeting},
-    $form->{department_1},
-    $form->{department_2},
-    $form->{street},
-    $form->{zipcode},
-    $form->{city},
-    $form->{country},
-    $form->{homepage},
-    $form->{contact},
-    $form->{phone},
-    $form->{fax},
-    $form->{email},
-    $form->{cc},
-    $form->{bcc},
-    $form->{notes},
-    $form->{discount},
-    $form->{creditlimit},
-    conv_i($form->{terms}),
-    conv_i($form->{business}),
-    $form->{taxnumber},
-    $form->{language},
-    $form->{account_number},
-    $form->{bank_code},
-    $form->{bank},
-    $form->{iban},
-    $form->{bic},
-    $form->{obsolete} ? 't' : 'f',
-    $form->{direct_debit} ? 't' : 'f',
-    $form->{ustid},
-    $form->{username},
-    conv_i($form->{salesman_id}),
-    conv_i($form->{language_id}),
-    conv_i($form->{payment_id}),
-    conv_i($form->{taxzone_id}, 0),
-    $form->{user_password},
-    $form->{c_vendor_id},
-    conv_i($form->{klass}),
-    $form->{currency},
-    $form->{taxincluded_checked} ne '' ? $form->{taxincluded_checked} : undef,
-    $form->{id}
-    );
-  do_query( $form, $dbh, $query, @values );
-
-  $form->{cp_id} = $self->_save_contact($form, $dbh);
-
-  # add shipto
-  $form->add_shipto( $dbh, $form->{id}, "CT" );
-
-  $self->_save_note('dbh' => $dbh);
-  $self->_delete_selected_notes('dbh' => $dbh);
-
-  CVar->save_custom_variables('dbh'       => $dbh,
-                              'module'    => 'CT',
-                              'trans_id'  => $form->{id},
-                              'variables' => $form,
-                              'always_valid' => 1);
-  if ($form->{cp_id}) {
-    CVar->save_custom_variables('dbh'       => $dbh,
-                                'module'    => 'Contacts',
-                                'trans_id'  => $form->{cp_id},
-                                'variables' => $form,
-                                'name_prefix'  => 'cp',
-                                'always_valid' => 1);
-  }
-
-  my $rc = $dbh->commit();
-
-  $main::lxdebug->leave_sub();
-  return $rc;
-}
-
-sub save_vendor {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-
-  $form->{taxzone_id} *= 1;
-  # connect to database
-  my $dbh = $form->get_standard_dbh;
-
-  map( {
-    $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
-    if ( $form->{"selected_cp_${_}"} );
-       } qw(title greeting abteilung) );
-  $form->{"greeting"} = $form->{"selected_company_greeting"}
-  if ( $form->{"selected_company_greeting"} );
-
-  $form->{discount} = $form->parse_amount( $myconfig, $form->{discount} );
-  $form->{discount} /= 100;
-  $form->{creditlimit} = $form->parse_amount( $myconfig, $form->{creditlimit} );
-
-  my $query;
-
-  if (!$form->{id}) {
-    $query = qq|SELECT nextval('id')|;
-    ($form->{id}) = selectrow_query($form, $dbh, $query);
-
-    $query = qq|INSERT INTO vendor (id, name, currency_id) VALUES (?, '', (SELECT currency_id FROM defaults))|;
-    do_query($form, $dbh, $query, $form->{id});
-
-    my $vendornumber      = SL::TransNumber->new(type   => 'vendor',
-                                                 dbh    => $dbh,
-                                                 number => $form->{vendornumber},
-                                                 save   => 1);
-    $form->{vendornumber} = $vendornumber->create_unique unless $vendornumber->is_unique;
-  }
-
-  $query =
-    qq|UPDATE vendor SET | .
-    qq|  vendornumber = ?, | .
-    qq|  name = ?, | .
-    qq|  greeting = ?, | .
-    qq|  department_1 = ?, | .
-    qq|  department_2 = ?, | .
-    qq|  street = ?, | .
-    qq|  zipcode = ?, | .
-    qq|  city = ?, | .
-    qq|  country = ?, | .
-    qq|  homepage = ?, | .
-    qq|  contact = ?, | .
-    qq|  phone = ?, | .
-    qq|  fax = ?, | .
-    qq|  email = ?, | .
-    qq|  cc = ?, | .
-    qq|  bcc = ?, | .
-    qq|  notes = ?, | .
-    qq|  terms = ?, | .
-    qq|  discount = ?, | .
-    qq|  creditlimit = ?, | .
-    qq|  business_id = ?, | .
-    qq|  taxnumber = ?, | .
-    qq|  language = ?, | .
-    qq|  account_number = ?, | .
-    qq|  bank_code = ?, | .
-    qq|  bank = ?, | .
-    qq|  iban = ?, | .
-    qq|  bic = ?, | .
-    qq|  obsolete = ?, | .
-    qq|  direct_debit = ?, | .
-    qq|  ustid = ?, | .
-    qq|  payment_id = ?, | .
-    qq|  taxzone_id = ?, | .
-    qq|  language_id = ?, | .
-    qq|  username = ?, | .
-    qq|  user_password = ?, | .
-    qq|  v_customer_id = ?, | .
-    qq|  currency_id = (SELECT id FROM currencies WHERE name = ?) | .
-    qq|WHERE id = ?|;
-  my @values = (
-    $form->{vendornumber},
-    $form->{name},
-    $form->{greeting},
-    $form->{department_1},
-    $form->{department_2},
-    $form->{street},
-    $form->{zipcode},
-    $form->{city},
-    $form->{country},
-    $form->{homepage},
-    $form->{contact},
-    $form->{phone},
-    $form->{fax},
-    $form->{email},
-    $form->{cc},
-    $form->{bcc},
-    $form->{notes},
-    conv_i($form->{terms}),
-    $form->{discount},
-    $form->{creditlimit},
-    conv_i($form->{business}),
-    $form->{taxnumber},
-    $form->{language},
-    $form->{account_number},
-    $form->{bank_code},
-    $form->{bank},
-    $form->{iban},
-    $form->{bic},
-    $form->{obsolete} ? 't' : 'f',
-    $form->{direct_debit} ? 't' : 'f',
-    $form->{ustid},
-    conv_i($form->{payment_id}),
-    conv_i($form->{taxzone_id}, 0),
-    conv_i( $form->{language_id}),
-    $form->{username},
-    $form->{user_password},
-    $form->{v_customer_id},
-    $form->{currency},
-    $form->{id}
-    );
-  do_query($form, $dbh, $query, @values);
-
-  $form->{cp_id} = $self->_save_contact($form, $dbh);
-
-  # add shipto
-  $form->add_shipto( $dbh, $form->{id}, "CT" );
-
-  $self->_save_note('dbh' => $dbh);
-  $self->_delete_selected_notes('dbh' => $dbh);
-
-  CVar->save_custom_variables('dbh'       => $dbh,
-                              'module'    => 'CT',
-                              'trans_id'  => $form->{id},
-                              'variables' => $form,
-                              'always_valid' => 1);
-  if ($form->{cp_id}) {
-    CVar->save_custom_variables('dbh'       => $dbh,
-                                'module'    => 'Contacts',
-                                'trans_id'  => $form->{cp_id},
-                                'variables' => $form,
-                                'name_prefix'  => 'cp',
-                                'always_valid' => 1);
-  }
-
-  my $rc = $dbh->commit();
-
-  $main::lxdebug->leave_sub();
-  return $rc;
-}
-
-sub _save_contact {
-  my ($self, $form, $dbh) = @_;
-
-  return undef unless $form->{cp_id} || $form->{cp_name} || $form->{cp_givenname};
-
-  my @columns = qw(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 cp_gender
-                   cp_street cp_zipcode cp_city cp_position);
-  my @values  = map(
-    {
-      if ( $_ eq 'cp_gender' ) {
-        $form->{$_} eq 'f' ? 'f' : 'm';
-      } elsif ( $_ eq 'cp_birthday' && $form->{cp_birthday} eq '' ) {
-        undef;
-      } else {
-        $form->{$_};
-      }
-    }
-    @columns
-  );
-
-  my ($query, $cp_id);
-  if ($form->{cp_id}) {
-    $query = qq|UPDATE contacts SET | . join(', ', map { "${_} = ?" } @columns) . qq| WHERE cp_id = ?|;
-    push @values, $form->{cp_id};
-    $cp_id = $form->{cp_id};
-
-  } else {
-    ($cp_id) = selectrow_query($form, $dbh, qq|SELECT nextval('id')|);
-
-    $query = qq|INSERT INTO contacts (| . join(', ', @columns, 'cp_cv_id', 'cp_id') . qq|) VALUES (| . join(', ', ('?') x (2 + scalar @columns)) . qq|)|;
-    push @values, $form->{id}, $cp_id;
-  }
-
-  do_query($form, $dbh, $query, @values);
-
-  return $cp_id;
-}
-
-sub delete {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  # delete vendor
-  my $cv = $form->{db} eq "customer" ? "customer" : "vendor";
-  my $query = qq|DELETE FROM $cv WHERE id = ?|;
-  do_query($form, $dbh, $query, $form->{id});
-
-  $dbh->disconnect;
-
-  $main::lxdebug->leave_sub();
-}
-
 sub search {
   $main::lxdebug->enter_sub();
 
@@ -851,198 +292,6 @@ sub get_contact {
   $main::lxdebug->leave_sub();
 }
 
-sub get_shipto {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-  my $dbh   = $form->dbconnect($myconfig);
-  my $query = qq|SELECT * FROM shipto WHERE shipto_id = ?|;
-  my $sth = prepare_execute_query($form, $dbh, $query, $form->{shipto_id});
-
-  my $ref = $sth->fetchrow_hashref("NAME_lc");
-
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-
-  $query = qq|SELECT COUNT(shipto_id) AS used FROM (
-    SELECT shipto_id FROM oe UNION
-    SELECT shipto_id FROM ar UNION
-    SELECT shipto_id FROM delivery_orders
-  ) AS stid WHERE shipto_id = ? OR ? = 0|;
-  ($form->{shiptoused}) = selectfirst_array_query($form, $dbh, $query, ($form->{shipto_id})x2);
-
-  $sth->finish;
-  $dbh->disconnect;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub get_delivery {
-  $main::lxdebug->enter_sub();
-
-  my ( $self, $myconfig, $form ) = @_;
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $arap = $form->{db} eq "vendor" ? "ap" : "ar";
-  my $db = $form->{db} eq "customer" ? "customer" : "vendor";
-  my $qty_sign = $form->{db} eq 'vendor' ? ' * -1 AS qty' : '';
-
-  my $where = " WHERE 1=1 ";
-  my @values;
-
-  if ($form->{shipto_id} && ($arap eq "ar")) {
-    $where .= "AND ${arap}.shipto_id = ?";
-    push(@values, $form->{shipto_id});
-  } else {
-    $where .= "AND ${arap}.${db}_id = ?";
-    push(@values, $form->{id});
-  }
-
-  if ($form->{from}) {
-    $where .= "AND ${arap}.transdate >= ?";
-    push(@values, conv_date($form->{from}));
-  }
-  if ($form->{to}) {
-    $where .= "AND ${arap}.transdate <= ?";
-    push(@values, conv_date($form->{to}));
-  }
-  my $query =
-    qq|SELECT s.shiptoname, i.qty $qty_sign, | .
-    qq|  ${arap}.id, ${arap}.transdate, ${arap}.invnumber, ${arap}.ordnumber, | .
-    qq|  i.description, i.unit, i.sellprice, | .
-    qq|  oe.id AS oe_id, invoice | .
-    qq|FROM $arap | .
-    qq|LEFT JOIN shipto s ON | .
-    ($arap eq "ar"
-     ? qq|(ar.shipto_id = s.shipto_id) |
-     : qq|(ap.id = s.trans_id) |) .
-    qq|LEFT JOIN invoice i ON (${arap}.id = i.trans_id) | .
-    qq|LEFT join parts p ON (p.id = i.parts_id) | .
-    qq|LEFT JOIN oe ON (oe.ordnumber = ${arap}.ordnumber AND NOT ${arap}.ordnumber = '') | .
-    $where .
-    qq|ORDER BY ${arap}.transdate DESC LIMIT 15|;
-
-  $form->{DELIVERY} = selectall_hashref_query($form, $dbh, $query, @values);
-
-  $dbh->disconnect;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub _save_note {
-  $main::lxdebug->enter_sub();
-
-  my $self   = shift;
-  my %params = @_;
-
-  my $form   = $main::form;
-
-  Common::check_params(\%params, 'dbh');
-
-  if (!$form->{NOTE_subject}) {
-    $main::lxdebug->leave_sub();
-    return;
-  }
-
-  my $dbh = $params{dbh};
-
-  my %follow_up;
-  my %note = (
-    'id'           => $form->{NOTE_id},
-    'subject'      => $form->{NOTE_subject},
-    'body'         => $form->{NOTE_body},
-    'trans_id'     => $form->{id},
-    'trans_module' => 'ct',
-  );
-
-  $note{id} = Notes->save(%note);
-
-  if ($form->{FU_date}) {
-    %follow_up = (
-      'id'               => $form->{FU_id},
-      'note_id'          => $note{id},
-      'follow_up_date'   => $form->{FU_date},
-      'created_for_user' => $form->{FU_created_for_user},
-      'done'             => $form->{FU_done} ? 1 : 0,
-      'subject'          => $form->{NOTE_subject},
-      'body'             => $form->{NOTE_body},
-      'LINKS'            => [
-        {
-          'trans_id'     => $form->{id},
-          'trans_type'   => $form->{db} eq 'customer' ? 'customer' : 'vendor',
-          'trans_info'   => $form->{name},
-        },
-      ],
-    );
-
-    $follow_up{id} = FU->save(%follow_up);
-
-  } elsif ($form->{FU_id}) {
-    do_query($form, $dbh, qq|DELETE FROM follow_up_links WHERE follow_up_id = ?|, conv_i($form->{FU_id}));
-    do_query($form, $dbh, qq|DELETE FROM follow_ups      WHERE id = ?|,           conv_i($form->{FU_id}));
-  }
-
-  delete @{$form}{grep { /^NOTE_|^FU_/ } keys %{ $form }};
-
-  $main::lxdebug->leave_sub();
-}
-
-sub _delete_selected_notes {
-  $main::lxdebug->enter_sub();
-
-  my $self   = shift;
-  my %params = @_;
-
-  Common::check_params(\%params, 'dbh');
-
-  my $form = $main::form;
-  my $dbh  = $params{dbh};
-
-  foreach my $i (1 .. $form->{NOTES_rowcount}) {
-    next unless ($form->{"NOTE_delete_$i"} && $form->{"NOTE_id_$i"});
-
-    Notes->delete('dbh' => $params{dbh},
-                  'id'  => $form->{"NOTE_id_$i"});
-  }
-
-  $main::lxdebug->leave_sub();
-}
-
-# TODO: remove in 2.7.0 stable
-sub delete_shipto {
-  $main::lxdebug->enter_sub();
-
-  my $self      = shift;
-  my $shipto_id = shift;
-
-  my $form      = $main::form;
-  my %myconfig  = %main::myconfig;
-  my $dbh       = $form->get_standard_dbh(\%myconfig);
-
-  do_query($form, $dbh, qq|UPDATE shipto SET trans_id = NULL WHERE shipto_id = ?|, $shipto_id);
-
-  $dbh->commit();
-
-  $main::lxdebug->leave_sub();
-}
-
-# TODO: remove in 2.7.0 stable
-sub delete_contact {
-  $main::lxdebug->enter_sub();
-
-  my $self      = shift;
-  my $cp_id     = shift;
-
-  my $form      = $main::form;
-  my %myconfig  = %main::myconfig;
-  my $dbh       = $form->get_standard_dbh(\%myconfig);
-
-  do_query($form, $dbh, qq|UPDATE contacts SET cp_cv_id = NULL WHERE cp_id = ?|, $cp_id);
-
-  $dbh->commit();
-
-  $main::lxdebug->leave_sub();
-}
-
 sub get_bank_info {
   $main::lxdebug->enter_sub();
 
@@ -1059,7 +308,8 @@ sub get_bank_info {
   my $table        = $params{vc} eq 'customer' ? 'customer' : 'vendor';
   my @ids          = ref $params{id} eq 'ARRAY' ? @{ $params{id} } : ($params{id});
   my $placeholders = join ", ", ('?') x scalar @ids;
-  my $query        = qq|SELECT id, name, account_number, bank, bank_code, iban, bic
+  my $c_mandate    = $params{vc} eq 'customer' ? ', mandator_id, mandate_date_of_signature' : '';
+  my $query        = qq|SELECT id, name, account_number, bank, bank_code, iban, bic ${c_mandate}
                         FROM ${table}
                         WHERE id IN (${placeholders})|;
 
@@ -1076,84 +326,6 @@ sub get_bank_info {
   return $result;
 }
 
-sub parse_excel_file {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $form) = @_;
-  my $locale = $main::locale;
-
-  my $defaults = SL::DB::Default->get;
-  $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
-  $form->{templates} = $defaults->templates;
-
-  $form->{formname}   = 'sales_quotation';
-  $form->{type}   = 'sales_quotation';
-  $form->{format} = 'excel';
-  $form->{media}  = 'screen';
-  $form->{quonumber} = 1;
-
-
-  # $form->{"notes"} will be overridden by the customer's/vendor's "notes" field. So save it here.
-  $form->{ $form->{"formname"} . "notes" } = $form->{"notes"};
-
-  my $inv                  = "quo";
-  my $due                  = "req";
-  $form->{"${inv}date"} = $form->{transdate};
-  $form->{label}        = $locale->text('Quotation');
-  my $numberfld            = "sqnumber";
-  my $order                = 1;
-
-  # assign number
-  $form->{what_done} = $form->{formname};
-
-  map({ delete($form->{$_}); } grep(/^cp_/, keys(%{ $form })));
-
-  my $output_dateformat = $myconfig->{"dateformat"};
-  my $output_numberformat = $myconfig->{"numberformat"};
-  my $output_longdates = 1;
-
-  # map login user variables
-  map { $form->{"login_$_"} = $myconfig->{$_} } ("name", "email", "fax", "tel", "company");
-
-  # format item dates
-  for my $field (qw(transdate_oe deliverydate_oe)) {
-    map {
-      $form->{$field}[$_] = $locale->date($myconfig, $form->{$field}[$_], 1);
-    } 0 .. $#{ $form->{$field} };
-  }
-
-  if ($form->{shipto_id}) {
-    $form->get_shipto($myconfig);
-  }
-
-  $form->{notes} =~ s/^\s+//g;
-
-  delete $form->{printer_command};
-
-  $form->get_employee_info($myconfig);
-
-  my ($cvar_date_fields, $cvar_number_fields) = CVar->get_field_format_list('module' => 'CT', 'prefix' => 'vc_');
-
-  if (scalar @{ $cvar_date_fields }) {
-    format_dates($output_dateformat, $output_longdates, @{ $cvar_date_fields });
-  }
-
-  while (my ($precision, $field_list) = each %{ $cvar_number_fields }) {
-    reformat_numbers($output_numberformat, $precision, @{ $field_list });
-  }
-
-  $form->{excel} = 1;
-  my $extension            = 'xls';
-
-  $form->{IN}         = "$form->{formname}.${extension}";
-
-  delete $form->{OUT};
-
-  $form->parse_template($myconfig);
-
-  $main::lxdebug->leave_sub();
-}
-
 sub search_contacts {
   $::lxdebug->enter_sub;
 
index d626025..82cadbf 100644 (file)
@@ -397,11 +397,13 @@ sub get_vc_details {
          vc.*,
          pt.description AS payment_terms,
          b.description AS business,
-         l.description AS language
+         l.description AS language,
+         dt.description AS delivery_terms
        FROM ${vc} vc
        LEFT JOIN payment_terms pt ON (vc.payment_id = pt.id)
        LEFT JOIN business b ON (vc.business_id = b.id)
        LEFT JOIN language l ON (vc.language_id = l.id)
+       LEFT JOIN delivery_terms dt ON (vc.delivery_term_id = dt.id)
        WHERE vc.id = ?|;
   my $ref = selectfirst_hashref_query($form, $dbh, $query, $vc_id);
 
@@ -645,7 +647,7 @@ sub copy_file_to_webdav_folder {
 
   my $timestamp =  get_current_formatted_time();
   my $new_file  =  File::Spec->catfile($form->{cwd}, $webdav_folder, $form->generate_attachment_filename());
-  $new_file     =~ s/\./$timestamp\./;
+  $new_file =~ s{(.*)\.}{$1$timestamp\.};
 
   if (!File::Copy::copy($current_file, $new_file)) {
     $::lxdebug->message(LXDebug::WARN(), "Copy file from $current_file to $new_file failed: $ERRNO");
index 2e55420..0481926 100644 (file)
@@ -129,6 +129,12 @@ sub action_edit_user {
   $self->edit_user_form(title => t8('Edit User'));
 }
 
+sub action_save_newuser {
+  my ($self) = @_;
+  $::form->{user}{clients} = 0;
+  $self->action_save_user();
+}
+
 sub action_save_user {
   my ($self) = @_;
   my $params = delete($::form->{user})          || { };
@@ -166,6 +172,10 @@ sub action_delete_user {
 
   my @clients = @{ $self->user->clients || [] };
 
+  # backup user metadata (email, name, etc)
+  my $user_config_values_ref = $self->user->config_values();
+  my $login =$self->user->login;
+
   if (!$self->user->delete) {
     flash('error', t8('The user could not be deleted.'));
     $self->edit_user_form(title => t8('Edit User'));
@@ -173,9 +183,15 @@ sub action_delete_user {
   }
 
   # Flag corresponding entries in 'employee' as deleted.
+  # and restore the most important user data in employee
+  # TODO try and catch the whole transaction {user->delete; update employee} {exception}
   foreach my $client (@clients) {
     my $dbh = $client->dbconnect(AutoCommit => 1) || next;
-    $dbh->do(qq|UPDATE employee SET deleted = TRUE WHERE login = ?|, undef, $self->user->login);
+    $dbh->do(qq|UPDATE employee SET deleted = TRUE, name = ?, deleted_email = ?,
+                deleted_tel = ?, deleted_fax = ?, deleted_signature = ? WHERE login = ?|,undef,
+              $user_config_values_ref->{name}, $user_config_values_ref->{email},
+              $user_config_values_ref->{tel}, $user_config_values_ref->{fax},
+              $user_config_values_ref->{signature}, $self->user->login);
     $dbh->disconnect;
   }
 
index 0ff7459..b688297 100644 (file)
@@ -167,6 +167,9 @@ sub init_models {
       last_run_at  => t8('Last run at'),
       next_run_at  => t8('Next run at'),
     },
+    query => [
+      package_name => [ SL::BackgroundJob::Base->get_known_job_classes ],
+    ],
   );
 }
 
index c3b9d99..50b5e4d 100644 (file)
@@ -15,6 +15,7 @@ use SL::Controller::CsvImport::CustomerVendor;
 use SL::Controller::CsvImport::Part;
 use SL::Controller::CsvImport::Shipto;
 use SL::Controller::CsvImport::Project;
+use SL::Controller::CsvImport::Order;
 use SL::BackgroundJob::CsvImport;
 use SL::System::TaskServer;
 
@@ -125,10 +126,21 @@ sub action_download_sample {
   my $file      = SL::SessionFile->new($file_name, mode => '>', encoding => $self->profile->get('charset'));
   my $csv       = Text::CSV_XS->new({ binary => 1, map { ( $_ => $self->profile->get($_) ) } qw(sep_char escape_char quote_char),});
 
-  $csv->print($file->fh, [ map { $_->{name}        } @{ $self->displayable_columns } ]);
-  $file->fh->print("\r\n");
-  $csv->print($file->fh, [ map { $_->{description} } @{ $self->displayable_columns } ]);
-  $file->fh->print("\r\n");
+  if ($self->worker->is_multiplexed) {
+    foreach my $p (@{ $self->worker->profile }) {
+      $csv->print($file->fh, [ map { $_->{name}        } @{ $self->displayable_columns->{$p->{row_ident}} } ]);
+      $file->fh->print("\r\n");
+    }
+    foreach my $p (@{ $self->worker->profile }) {
+      $csv->print($file->fh, [ map { $_->{description} } @{ $self->displayable_columns->{$p->{row_ident}} } ]);
+      $file->fh->print("\r\n");
+    }
+  } else {
+    $csv->print($file->fh, [ map { $_->{name}        } @{ $self->displayable_columns } ]);
+    $file->fh->print("\r\n");
+    $csv->print($file->fh, [ map { $_->{description} } @{ $self->displayable_columns } ]);
+    $file->fh->print("\r\n");
+  }
 
   $file->fh->close;
 
@@ -153,25 +165,35 @@ sub action_report {
   my $pages = {};
   $pages->{per_page}        = $::form->{per_page} || 20;
   $pages->{max}             = SL::DB::Helper::Paginated::ceil($num_rows, $pages->{per_page}) || 1;
-  $pages->{cur}             = $page < 1 ? 1
+  $pages->{page}             = $page < 1 ? 1
                             : $page > $pages->{max} ? $pages->{max}
                             : $page;
-  $pages->{common}          = [ grep { $_->{visible} } @{ SL::DB::Helper::Paginated::make_common_pages($pages->{cur}, $pages->{max}) } ];
+  $pages->{common}          = [ grep { $_->{visible} } @{ SL::DB::Helper::Paginated::make_common_pages($pages->{page}, $pages->{max}) } ];
 
+  $self->{report_numheaders} = $self->{report}->numheaders;
+  my $first_row_header = 0;
+  my $last_row_header  = $self->{report_numheaders} - 1;
+  my $first_row_data   = $pages->{per_page} * ($pages->{page}-1) + $self->{report_numheaders};
+  my $last_row_data    = min($pages->{per_page} * $pages->{page}, $num_rows) + $self->{report_numheaders} - 1;
   $self->{display_rows} = [
-    0,
-    $pages->{per_page} * ($pages->{cur}-1) + 1
+    $first_row_header
+      ..
+    $last_row_header,
+    $first_row_data
       ..
-    min($pages->{per_page} * $pages->{cur}, $num_rows)
+    $last_row_data
   ];
 
   my @query = (
     csv_import_report_id => $report_id,
     or => [
-      row => 0,
       and => [
-        row => { gt => $pages->{per_page} * ($pages->{cur}-1) },
-        row => { le => $pages->{per_page} * $pages->{cur} },
+        row => { ge => $first_row_header },
+        row => { le => $last_row_header },
+      ],
+      and => [
+        row => { ge => $first_row_data },
+        row => { le => $last_row_data },
       ]
     ]
   );
@@ -199,7 +221,7 @@ sub check_auth {
 sub check_type {
   my ($self) = @_;
 
-  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts projects);
+  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts projects orders);
   $self->type($::form->{profile}->{type});
 }
 
@@ -242,6 +264,7 @@ sub render_inputs {
             : $self->type eq 'contacts'          ? $::locale->text('CSV import: contacts')
             : $self->type eq 'parts'             ? $::locale->text('CSV import: parts and services')
             : $self->type eq 'projects'          ? $::locale->text('CSV import: projects')
+            : $self->type eq 'orders'            ? $::locale->text('CSV import: orders')
             : die;
 
   if ($self->{type} eq 'parts') {
@@ -363,6 +386,10 @@ sub profile_from_form {
     $::form->{settings}->{sellprice_adjustment} = $::form->parse_amount(\%::myconfig, $::form->{settings}->{sellprice_adjustment});
   }
 
+  if ($self->type eq 'orders') {
+    $::form->{settings}->{max_amount_diff} = $::form->parse_amount(\%::myconfig, $::form->{settings}->{max_amount_diff});
+  }
+
   delete $::form->{profile}->{id};
   $self->profile($existing_profile || SL::DB::CsvImportProfile->new(login => $::myconfig{login}));
   $self->profile->assign_attributes(%{ $::form->{profile} });
@@ -389,6 +416,16 @@ sub char_map {
 sub save_report {
   my ($self, $report_id) = @_;
 
+  if ($self->worker->is_multiplexed) {
+    return $self->save_report_multi($report_id);
+  } else {
+    return $self->save_report_single($report_id);
+  }
+}
+
+sub save_report_single {
+  my ($self, $report_id) = @_;
+
   $self->track_progress(phase => 'building report', progress => 0);
 
   my $clone_profile = $self->profile->clone_and_reset_deep;
@@ -400,6 +437,7 @@ sub save_report {
     type       => $self->type,
     file       => '',
     numrows    => scalar @{ $self->data },
+    numheaders => 1,
   );
 
   $report->save(cascade => 1) or die $report->db->error;
@@ -455,6 +493,98 @@ sub save_report {
   return $report->id;
 }
 
+sub save_report_multi {
+  my ($self, $report_id) = @_;
+
+  $self->track_progress(phase => 'building report', progress => 0);
+
+  my $clone_profile = $self->profile->clone_and_reset_deep;
+  $clone_profile->save; # weird bug. if this isn't saved before adding it to the report, it will default back to the last profile.
+
+  my $report = SL::DB::CsvImportReport->new(
+    session_id => $::auth->create_or_refresh_session,
+    profile    => $clone_profile,
+    type       => $self->type,
+    file       => '',
+    numrows    => scalar @{ $self->data },
+    numheaders => scalar @{ $self->worker->profile },
+  );
+
+  $report->save(cascade => 1) or die $report->db->error;
+
+  my $dbh = $::form->get_standard_dbh;
+  $dbh->begin_work;
+
+  my $query  = 'INSERT INTO csv_import_report_rows (csv_import_report_id, col, row, value) VALUES (?, ?, ?, ?)';
+  my $query2 = 'INSERT INTO csv_import_report_status (csv_import_report_id, row, type, value) VALUES (?, ?, ?, ?)';
+
+  my $sth = $dbh->prepare($query);
+  my $sth2 = $dbh->prepare($query2);
+
+  # save headers
+  my ($headers, $info_methods, $raw_methods, $methods);
+
+  for my $i (0 .. $#{ $self->worker->profile }) {
+    my $row_ident = $self->worker->profile->[$i]->{row_ident};
+
+    for my $i (0 .. $#{ $self->info_headers->{$row_ident}->{headers} }) {
+      next unless                            $self->info_headers->{$row_ident}->{used}->{ $self->info_headers->{$row_ident}->{methods}->[$i] };
+      push @{ $headers->{$row_ident} },      $self->info_headers->{$row_ident}->{headers}->[$i];
+      push @{ $info_methods->{$row_ident} }, $self->info_headers->{$row_ident}->{methods}->[$i];
+    }
+    for my $i (0 .. $#{ $self->headers->{$row_ident}->{headers} }) {
+      next unless                       $self->headers->{$row_ident}->{used}->{ $self->headers->{$row_ident}->{headers}->[$i] };
+      push @{ $headers->{$row_ident} }, $self->headers->{$row_ident}->{headers}->[$i];
+      push @{ $methods->{$row_ident} }, $self->headers->{$row_ident}->{methods}->[$i];
+    }
+
+    for my $i (0 .. $#{ $self->raw_data_headers->{$row_ident}->{headers} }) {
+    next unless                           $self->raw_data_headers->{$row_ident}->{used}->{ $self->raw_data_headers->{$row_ident}->{headers}->[$i] };
+    push @{ $headers->{$row_ident} },     $self->raw_data_headers->{$row_ident}->{headers}->[$i];
+    push @{ $raw_methods->{$row_ident} }, $self->raw_data_headers->{$row_ident}->{headers}->[$i];
+  }
+
+  }
+
+  for my $i (0 .. $#{ $self->worker->profile }) {
+    my $row_ident = $self->worker->profile->[$i]->{row_ident};
+    $sth->execute($report->id, $_, $i, $headers->{$row_ident}->[$_]) for 0 .. $#{ $headers->{$row_ident} };
+  }
+
+  # col offsets
+  my ($off1, $off2);
+  for my $i (0 .. $#{ $self->worker->profile }) {
+    my $row_ident = $self->worker->profile->[$i]->{row_ident};
+    my $n_info_methods = $info_methods->{$row_ident} ? scalar @{ $info_methods->{$row_ident} } : 0;
+    my $n_methods      = $methods->{$row_ident} ?      scalar @{ $methods->{$row_ident} }      : 0;
+
+    $off1->{$row_ident} = $n_info_methods;
+    $off2->{$row_ident} = $off1->{$row_ident} + $n_methods;
+  }
+
+  my $n_header_rows = scalar @{ $self->worker->profile };
+
+  for my $row (0 .. $#{ $self->data }) {
+    $self->track_progress(progress => $row / @{ $self->data } * 100) if $row % 1000 == 0;
+    my $data_row = $self->{data}[$row];
+    my $row_ident = $data_row->{raw_data}{datatype};
+
+    my $o1 = $off1->{$row_ident};
+    my $o2 = $off2->{$row_ident};
+
+    $sth->execute($report->id,       $_, $row + $n_header_rows, $data_row->{info_data}{ $info_methods->{$row_ident}->[$_] }) for 0 .. $#{ $info_methods->{$row_ident} };
+    $sth->execute($report->id, $o1 + $_, $row + $n_header_rows, $data_row->{object}->${ \ $methods->{$row_ident}->[$_] })    for 0 .. $#{ $methods->{$row_ident} };
+    $sth->execute($report->id, $o2 + $_, $row + $n_header_rows, $data_row->{raw_data}{ $raw_methods->{$row_ident}->[$_] })   for 0 .. $#{ $raw_methods->{$row_ident} };
+
+    $sth2->execute($report->id, $row + $n_header_rows, 'information', $_) for @{ $data_row->{information} || [] };
+    $sth2->execute($report->id, $row + $n_header_rows, 'errors', $_)      for @{ $data_row->{errors}      || [] };
+  }
+
+  $dbh->commit;
+
+  return $report->id;
+}
+
 sub csv_file_name {
   my ($self) = @_;
   return "csv-import-" . $self->type . ".csv";
@@ -474,6 +604,7 @@ sub init_worker {
        : $self->{type} eq 'addresses'         ? SL::Controller::CsvImport::Shipto->new(@args)
        : $self->{type} eq 'parts'             ? SL::Controller::CsvImport::Part->new(@args)
        : $self->{type} eq 'projects'          ? SL::Controller::CsvImport::Project->new(@args)
+       : $self->{type} eq 'orders'            ? SL::Controller::CsvImport::Order->new(@args)
        :                                        die "Program logic error";
 }
 
index b3b9368..9993975 100644 (file)
@@ -5,10 +5,10 @@ use strict;
 use List::MoreUtils qw(pairwise any);
 
 use SL::Helper::Csv;
-use SL::DB::Currency;
 use SL::DB::Customer;
 use SL::DB::Language;
 use SL::DB::PaymentTerm;
+use SL::DB::DeliveryTerm;
 use SL::DB::Vendor;
 use SL::DB::Contact;
 use SL::DB::History;
@@ -18,7 +18,7 @@ use parent qw(Rose::Object);
 use Rose::Object::MakeMethods::Generic
 (
  scalar                  => [ qw(controller file csv test_run save_with_cascade) ],
- 'scalar --get_set_init' => [ qw(profile displayable_columns existing_objects class manager_class cvar_columns all_cvar_configs all_languages payment_terms_by all_currencies default_currency_id all_vc vc_by) ],
+ 'scalar --get_set_init' => [ qw(profile displayable_columns existing_objects class manager_class cvar_columns all_cvar_configs all_languages payment_terms_by delivery_terms_by all_vc vc_by clone_methods) ],
 );
 
 sub run {
@@ -31,8 +31,7 @@ sub run {
   my $profile = $self->profile;
   $self->csv(SL::Helper::Csv->new(file                   => $self->file->file_name,
                                   encoding               => $self->controller->profile->get('charset'),
-                                  class                  => $self->class,
-                                  profile                => $profile,
+                                  profile                => [{ profile => $profile, class => $self->class }],
                                   ignore_unknown_columns => 1,
                                   strict_profile         => 1,
                                   case_insensitive_header => 1,
@@ -141,23 +140,18 @@ sub init_all_languages {
   return SL::DB::Manager::Language->get_all;
 }
 
-sub init_all_currencies {
+sub init_payment_terms_by {
   my ($self) = @_;
 
-  return SL::DB::Manager::Currency->get_all;
+  my $all_payment_terms = SL::DB::Manager::PaymentTerm->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_payment_terms } } ) } qw(id description) };
 }
 
-sub init_default_currency_id {
+sub init_delivery_terms_by {
   my ($self) = @_;
 
-  return SL::DB::Default->get->currency_id;
-}
-
-sub init_payment_terms_by {
-  my ($self) = @_;
-
-  my $all_payment_terms = SL::DB::Manager::PaymentTerm->get_all;
-  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_payment_terms } } ) } qw(id description) };
+  my $all_delivery_terms = SL::DB::Manager::DeliveryTerm->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_delivery_terms } } ) } qw(id description) };
 }
 
 sub init_all_vc {
@@ -167,6 +161,10 @@ sub init_all_vc {
            vendors   => SL::DB::Manager::Vendor->get_all };
 }
 
+sub init_clone_methods {
+  {}
+}
+
 sub force_allow_columns {
   return ();
 }
@@ -308,6 +306,8 @@ sub init_manager_class {
   $self->manager_class("SL::DB::Manager::" . $1);
 }
 
+sub is_multiplexed { 0 }
+
 sub check_objects {
 }
 
@@ -389,6 +389,38 @@ sub check_payment {
     }
 
     $object->payment_id($terms->id);
+
+    # register payment_id for method copying later
+    $self->clone_methods->{payment_id} = 1;
+  }
+
+  return 1;
+}
+
+sub check_delivery_term {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check whether or not delivery term ID is valid.
+  if ($object->delivery_term_id && !$self->delivery_terms_by->{id}->{ $object->delivery_term_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid delivery terms');
+    return 0;
+  }
+
+  # Map name to ID if given.
+  if (!$object->delivery_term_id && $entry->{raw_data}->{delivery_term}) {
+    my $terms = $self->delivery_terms_by->{description}->{ $entry->{raw_data}->{delivery_term} };
+
+    if (!$terms) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid delivery terms');
+      return 0;
+    }
+
+    $object->delivery_term_id($terms->id);
+
+    # register delivery_term_id for method copying later
+    $self->clone_methods->{delivery_term_id} = 1;
   }
 
   return 1;
@@ -413,7 +445,10 @@ sub save_objects {
 
     my $object = $entry->{object_to_save} || $entry->{object};
 
-    if ( !$object->save(cascade => !!$self->save_with_cascade()) ) {
+    my $ret;
+    if (!eval { $ret = $object->save(cascade => !!$self->save_with_cascade()); 1 }) {
+      push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $@);
+    } elsif ( !$ret ) {
       push @{ $entry->{errors} }, $::locale->text('Error when saving: #1', $entry->{object}->db->error);
     } else {
       $self->_save_history($object);
@@ -462,17 +497,22 @@ sub clean_fields {
 sub _save_history {
   my ($self, $object) = @_;
 
-  if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors)) {
+  if (any { $_ eq $self->controller->{type} } qw(parts customers_vendors orders)) {
     my $snumbers = $self->controller->{type} eq 'parts'             ? 'partnumber_' . $object->partnumber
                  : $self->controller->{type} eq 'customers_vendors' ?
                      ($self->table eq 'customer' ? 'customernumber_' . $object->customernumber : 'vendornumber_' . $object->vendornumber)
+                 : $self->controller->{type} eq 'orders'            ? 'ordnumber_' . $object->ordnumber
                  : '';
 
+    my $what_done = $self->controller->{type} eq 'orders' ? 'sales_order'
+                  : '';
+
     SL::DB::History->new(
       trans_id    => $object->id,
       snumbers    => $snumbers,
       employee_id => $self->controller->{employee_id},
       addition    => 'SAVED',
+      what_done   => $what_done,
     )->save();
   }
 }
diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm
new file mode 100644 (file)
index 0000000..d5010a2
--- /dev/null
@@ -0,0 +1,256 @@
+package SL::Controller::CsvImport::BaseMulti;
+
+use strict;
+
+use List::MoreUtils qw(pairwise);
+
+use SL::Helper::Csv;
+
+use parent qw(SL::Controller::CsvImport::Base);
+
+use Rose::Object::MakeMethods::Generic
+(
+'scalar --get_set_init' => [ qw(cvar_configs_by cvar_columns_by) ],
+);
+
+sub run {
+  my ($self, %params) = @_;
+
+  $self->test_run($params{test_run});
+
+  $self->controller->track_progress(phase => 'parsing csv', progress => 0);
+
+  my $profile = $self->profile;
+
+  $self->csv(SL::Helper::Csv->new(file                    => $self->file->file_name,
+                                  encoding                => $self->controller->profile->get('charset'),
+                                  profile                 => $profile,
+                                  ignore_unknown_columns  => 1,
+                                  strict_profile          => 1,
+                                  case_insensitive_header => 1,
+                                  map { ( $_ => $self->controller->profile->get($_) ) } qw(sep_char escape_char quote_char),
+                                 ));
+
+  $self->controller->track_progress(progress => 10);
+
+  my $old_numberformat      = $::myconfig{numberformat};
+  $::myconfig{numberformat} = $self->controller->profile->get('numberformat');
+
+  $self->csv->parse;
+
+  $self->controller->track_progress(progress => 50);
+
+  $self->controller->errors([ $self->csv->errors ]) if $self->csv->errors;
+
+  return if ( !$self->csv->header || $self->csv->errors );
+
+  my $headers;
+  my $i = 0;
+  foreach my $header (@{ $self->csv->header }) {
+
+    my $profile   = $self->csv->profile->[$i]->{profile};
+    my $row_ident = $self->csv->profile->[$i]->{row_ident};
+
+    my $h = { headers => [ grep { $profile->{$_} } @{ $header } ] };
+    $h->{methods} = [ map { $profile->{$_} } @{ $h->{headers} } ];
+    $h->{used}    = { map { ($_ => 1) }      @{ $h->{headers} } };
+
+    $headers->{$row_ident} = $h;
+    $i++;
+  }
+
+  $self->controller->headers($headers);
+
+  my $raw_data_headers;
+  my $info_headers;
+  foreach my $p (@{ $self->csv->profile }) {
+    $raw_data_headers->{ $p->{row_ident} } = { used => { }, headers => [ ] };
+    $info_headers->{ $p->{row_ident} }     = { used => { }, headers => [ ] };
+  }
+  $self->controller->raw_data_headers($raw_data_headers);
+  $self->controller->info_headers($info_headers);
+
+  my @objects  = $self->csv->get_objects;
+
+  $self->controller->track_progress(progress => 70);
+
+  my @raw_data = @{ $self->csv->get_data };
+
+  $self->controller->track_progress(progress => 80);
+
+  $self->controller->data([ pairwise { { object => $a, raw_data => $b, errors => [], information => [], info_data => {} } } @objects, @raw_data ]);
+
+  $self->controller->track_progress(progress => 90);
+
+  $self->check_objects;
+  if ( $self->controller->profile->get('duplicates', 'no_check') ne 'no_check' ) {
+    $self->check_std_duplicates();
+    $self->check_duplicates();
+  }
+  $self->fix_field_lengths;
+
+  $self->controller->track_progress(progress => 100);
+
+  $::myconfig{numberformat} = $old_numberformat;
+}
+
+sub add_columns {
+  my ($self, $row_ident, @columns) = @_;
+
+  my $h = $self->controller->headers->{$row_ident};
+
+  foreach my $column (grep { !$h->{used}->{$_} } @columns) {
+    $h->{used}->{$column} = 1;
+    push @{ $h->{methods} }, $column;
+    push @{ $h->{headers} }, $column;
+  }
+}
+
+sub add_info_columns {
+  my ($self, $row_ident, @columns) = @_;
+
+  my $h = $self->controller->info_headers->{$row_ident};
+
+  foreach my $column (grep { !$h->{used}->{ $_->{method} } } map { ref $_ eq 'HASH' ? $_ : { method => $_, header => $_ } } @columns) {
+    $h->{used}->{ $column->{method} } = 1;
+    push @{ $h->{methods} }, $column->{method};
+    push @{ $h->{headers} }, $column->{header};
+  }
+}
+
+sub add_raw_data_columns {
+  my ($self, $row_ident, @columns) = @_;
+
+  my $h = $self->controller->raw_data_headers->{$row_ident};
+
+  foreach my $column (grep { !$h->{used}->{$_} } @columns) {
+    $h->{used}->{$column} = 1;
+    push @{ $h->{headers} }, $column;
+  }
+}
+
+sub add_cvar_raw_data_columns {
+  my ($self) = @_;
+
+  foreach my $data (@{ $self->controller->data }) {
+    my $ri = $data->{raw_data}->{datatype};
+    map { $self->add_raw_data_columns($ri, $_) if exists $data->{raw_data}->{$_} } @{ $self->cvar_columns_by->{row_ident}->{$ri} };
+  }
+}
+
+sub init_cvar_configs_by {
+  # Must be overridden by derived specialized importer classes.
+  return {};
+}
+
+sub init_cvar_columns_by {
+  my ($self) = @_;
+
+  my $ccb;
+  foreach my $p (@{ $self->profile }) {
+    my $ri = $p->{row_ident};
+    $ccb->{row_ident}->{$ri} = [ map { "cvar_" . $_->name } (@{ $self->cvar_configs_by->{row_ident}->{$ri} }) ];
+  }
+    
+  return $ccb;
+}
+
+sub handle_cvars {
+  my ($self, $entry, %params) = @_;
+
+  my %type_to_column = ( text      => 'text_value',
+                         textfield => 'text_value',
+                         select    => 'text_value',
+                         date      => 'timestamp_value_as_date',
+                         timestamp => 'timestamp_value_as_date',
+                         number    => 'number_value_as_number',
+                         bool      => 'bool_value' );
+
+  $params{sub_module} ||= '';
+  my @cvars;
+  foreach my $config (@{ $self->cvar_configs_by->{row_ident}->{$entry->{raw_data}->{datatype}} }) {
+    next unless exists $entry->{raw_data}->{ "cvar_" . $config->name };
+    my $value  = $entry->{raw_data}->{ "cvar_" . $config->name };
+    my $column = $type_to_column{ $config->type } || die "Program logic error: unknown custom variable storage type";
+
+    push @cvars, SL::DB::CustomVariable->new(config_id => $config->id, $column => $value, sub_module => $params{sub_module});
+  }
+
+  $entry->{object}->custom_variables(\@cvars) if @cvars;
+}
+
+sub init_profile {
+  my ($self) = @_;
+
+  my @profile;
+  foreach my $class (@{ $self->class }) {
+    eval "require " . $class;
+
+    my %unwanted = map { ( $_ => 1 ) } (qw(itime mtime), map { $_->name } @{ $class->meta->primary_key_columns });
+    my %prof;
+    $prof{datatype} = '';
+    for my $col ($class->meta->columns) {
+      next if $unwanted{$col};
+
+      my $name = $col->isa('Rose::DB::Object::Metadata::Column::Numeric')   ? "$col\_as_number"
+          :      $col->isa('Rose::DB::Object::Metadata::Column::Date')      ? "$col\_as_date"
+          :      $col->isa('Rose::DB::Object::Metadata::Column::Timestamp') ? "$col\_as_date"
+          :                                                                   $col->name;
+
+      $prof{$col} = $name;
+    }
+
+    $prof{ 'cvar_' . $_->name } = '' for @{ $self->cvar_configs_by->{class}->{$class} };
+
+    $class =~ m/^SL::DB::(.+)/;
+    push @profile, {'profile' => \%prof, 'class' => $class, 'row_ident' => $::locale->text($1)};
+  }
+
+  \@profile;
+}
+
+sub add_displayable_columns {
+  my ($self, $row_ident, @columns) = @_;
+
+  my $dis_cols = $self->controller->displayable_columns || {};
+
+  my @cols       = @{ $dis_cols->{$row_ident} || [] };
+  my %ex_col_map = map { $_->{name} => $_ } @cols;
+
+  foreach my $column (@columns) {
+    if ($ex_col_map{ $column->{name} }) {
+      @{ $ex_col_map{ $column->{name} } }{ keys %{ $column } } = @{ $column }{ keys %{ $column } };
+    } else {
+      push @cols, $column;
+    }
+  }
+
+  my $by_name_datatype_first = sub { 'datatype' eq $a->{name} ? -1 :
+                                     'datatype' eq $b->{name} ?  1 :
+                                     $a->{name} cmp $b->{name} };
+  $dis_cols->{$row_ident} = [ sort $by_name_datatype_first @cols ];
+
+  $self->controller->displayable_columns($dis_cols);
+}
+
+sub setup_displayable_columns {
+  my ($self) = @_;
+
+  foreach my $p (@{ $self->profile }) {
+    $self->add_displayable_columns($p->{row_ident}, map { { name => $_ } } keys %{ $p->{profile} });
+  }
+}
+
+sub add_cvar_columns_to_displayable_columns {
+  my ($self, $row_ident) = @_;
+
+  $self->add_displayable_columns($row_ident,
+                                 map { { name        => 'cvar_' . $_->name,
+                                         description => $::locale->text('#1 (custom variable)', $_->description) } }
+                                     @{ $self->cvar_configs_by->{row_ident}->{$row_ident} });
+}
+
+sub is_multiplexed { 1 }
+
+1;
+
index 4796493..946df06 100644 (file)
@@ -3,6 +3,7 @@ package SL::Controller::CsvImport::CustomerVendor;
 use strict;
 
 use SL::Helper::Csv;
+use SL::Controller::CsvImport::Helper::Consistency;
 use SL::DB::Business;
 use SL::DB::CustomVariable;
 use SL::DB::CustomVariableConfig;
@@ -13,7 +14,7 @@ use parent qw(SL::Controller::CsvImport::Base);
 
 use Rose::Object::MakeMethods::Generic
 (
- 'scalar --get_set_init' => [ qw(table languages_by businesses_by currencies_by) ],
+ 'scalar --get_set_init' => [ qw(table languages_by businesses_by) ],
 );
 
 sub init_table {
@@ -44,12 +45,6 @@ sub init_languages_by {
   return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $self->all_languages } } ) } qw(id description article_code) };
 }
 
-sub init_currencies_by {
-  my ($self) = @_;
-
-  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $self->all_currencies } } ) } qw(id name) };
-}
-
 sub check_objects {
   my ($self) = @_;
 
@@ -71,7 +66,8 @@ sub check_objects {
     $self->check_language($entry);
     $self->check_business($entry);
     $self->check_payment($entry);
-    $self->check_currency($entry);
+    $self->check_delivery_term($entry);
+    $self->check_currency($entry, take_default => 1);
     $self->handle_cvars($entry);
 
     next if @{ $entry->{errors} };
@@ -93,7 +89,7 @@ sub check_objects {
       # Update existing customer/vendor records.
       $entry->{object_to_save} = $existing_vc;
 
-      $existing_vc->$_( $entry->{object}->$_ ) for @{ $methods };
+      $existing_vc->$_( $entry->{object}->$_ ) for @{ $methods }, keys %{ $self->clone_methods };
 
       push @{ $entry->{information} }, $::locale->text('Updating existing entry in database');
 
@@ -104,7 +100,7 @@ sub check_objects {
     $i++;
   }
 
-  $self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw(language business payment));
+  $self->add_columns(map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw(language business payment delivery_term));
   $self->add_cvar_raw_data_columns;
 }
 
@@ -157,38 +153,11 @@ sub check_language {
     }
 
     $object->language_id($language->id);
-  }
-
-  return 1;
-}
-
-sub check_currency {
-  my ($self, $entry) = @_;
-
-  my $object = $entry->{object};
 
-  # Check whether or not currency ID is valid.
-  if ($object->currency_id && !$self->currencies_by->{id}->{ $object->currency_id }) {
-    push @{ $entry->{errors} }, $::locale->text('Error: Invalid currency');
-    return 0;
+    # register language_id for method copying later
+    $self->clone_methods->{language_id} = 1;
   }
 
-  # Map name to ID if given.
-  if (!$object->currency_id && $entry->{raw_data}->{currency}) {
-    my $currency = $self->currencies_by->{name}->{  $entry->{raw_data}->{currency} };
-    if (!$currency) {
-      push @{ $entry->{errors} }, $::locale->text('Error: Invalid currency');
-      return 0;
-    }
-
-    $object->currency_id($currency->id);
-  }
-
-  # Set default currency if none was given.
-  $object->currency_id($self->default_currency_id) if !$object->currency_id;
-
-  $entry->{raw_data}->{currency_id} = $object->currency_id;
-
   return 1;
 }
 
@@ -213,6 +182,9 @@ sub check_business {
     }
 
     $object->business_id($business->id);
+
+    # register business_id for method copying later
+    $self->clone_methods->{business_id} = 1;
   }
 
   return 1;
@@ -266,7 +238,7 @@ sub init_profile {
   my ($self) = @_;
 
   my $profile = $self->SUPER::init_profile;
-  delete @{$profile}{qw(business datevexport language payment salesman salesman_id taxincluded terms)};
+  delete @{$profile}{qw(business datevexport language payment delivery_term salesman salesman_id taxincluded terms)};
 
   return $profile;
 }
@@ -295,6 +267,8 @@ sub setup_displayable_columns {
                                  { name => 'customernumber',    description => $::locale->text('Customer Number')                 },
                                  { name => 'department_1',      description => $::locale->text('Department 1')                    },
                                  { name => 'department_2',      description => $::locale->text('Department 2')                    },
+                                 { name => 'delivery_term_id',  description => $::locale->text('Delivery terms (database ID)')    },
+                                 { name => 'delivery_term',     description => $::locale->text('Delivery terms (name)')           },
                                  { name => 'direct_debit',      description => $::locale->text('direct debit')                    },
                                  { name => 'discount',          description => $::locale->text('Discount')                        },
                                  { name => 'email',             description => $::locale->text('E-mail')                          },
diff --git a/SL/Controller/CsvImport/Helper/Consistency.pm b/SL/Controller/CsvImport/Helper/Consistency.pm
new file mode 100644 (file)
index 0000000..bf1d4c0
--- /dev/null
@@ -0,0 +1,72 @@
+package SL::Controller::CsvImport::Helper::Consistency;
+
+use strict;
+
+use SL::DB::Default;
+use SL::DB::Currency;
+
+use SL::Helper::Csv::Error;
+
+use parent qw(Exporter);
+our @EXPORT = qw(check_currency);
+
+#
+# public functions
+#
+
+sub check_currency {
+  my ($self, $entry, %params) = @_;
+
+  my $object = $entry->{object};
+
+  # Check whether or not currency ID is valid.
+  if ($object->currency_id && ! _currencies_by($self)->{id}->{ $object->currency_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid currency');
+    return 0;
+  }
+
+  # Map name to ID if given.
+  if (!$object->currency_id && $entry->{raw_data}->{currency}) {
+    my $currency = _currencies_by($self)->{name}->{  $entry->{raw_data}->{currency} };
+    if (!$currency) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid currency');
+      return 0;
+    }
+
+    $object->currency_id($currency->id);
+
+    # register currency_id for method copying later
+    $self->clone_methods->{currency_id} = 1;
+  }
+
+  # Set default currency if none was given and take_default is true.
+  $object->currency_id(_default_currency_id($self)) if !$object->currency_id and $params{take_default};
+
+  $entry->{raw_data}->{currency_id} = $object->currency_id;
+
+  return 1;
+}
+
+#
+# private functions
+#
+
+sub _currencies_by {
+  my ($self) = @_;
+
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ _all_currencies($self) } } ) } qw(id name) };
+}
+
+sub _all_currencies {
+  my ($self) = @_;
+
+  return SL::DB::Manager::Currency->get_all;
+}
+
+sub _default_currency_id {
+  my ($self) = @_;
+
+  return SL::DB::Default->get->currency_id;
+}
+
+1;
diff --git a/SL/Controller/CsvImport/Order.pm b/SL/Controller/CsvImport/Order.pm
new file mode 100644 (file)
index 0000000..fe73019
--- /dev/null
@@ -0,0 +1,763 @@
+package SL::Controller::CsvImport::Order;
+
+
+use strict;
+
+use List::MoreUtils qw(any);
+
+use SL::Helper::Csv;
+use SL::Controller::CsvImport::Helper::Consistency;
+use SL::DB::Order;
+use SL::DB::OrderItem;
+use SL::DB::Part;
+use SL::DB::PaymentTerm;
+use SL::DB::Contact;
+use SL::DB::Department;
+use SL::DB::PriceFactor;
+use SL::DB::Pricegroup;
+use SL::DB::Project;
+use SL::DB::Shipto;
+use SL::DB::TaxZone;
+use SL::TransNumber;
+
+use parent qw(SL::Controller::CsvImport::BaseMulti);
+
+
+use Rose::Object::MakeMethods::Generic
+(
+ 'scalar --get_set_init' => [ qw(settings languages_by parts_by contacts_by departments_by projects_by ct_shiptos_by taxzones_by price_factors_by pricegroups_by) ],
+);
+
+
+sub init_class {
+  my ($self) = @_;
+  $self->class(['SL::DB::Order', 'SL::DB::OrderItem']);
+}
+
+
+sub init_settings {
+  my ($self) = @_;
+
+  return { map { ( $_ => $self->controller->profile->get($_) ) } qw(order_column item_column max_amount_diff) };
+}
+
+
+sub init_cvar_configs_by {
+  my ($self) = @_;
+
+  my $item_cvar_configs = SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'IC' ]);
+  $item_cvar_configs = [grep { $_->has_flag('editable') } @{ $item_cvar_configs }];
+
+  my $ccb;
+  $ccb->{class}->{'SL::DB::Order'}          = [];
+  $ccb->{class}->{'SL::DB::OrderItem'}      = $item_cvar_configs;
+  $ccb->{row_ident}->{$self->_order_column} = [];
+  $ccb->{row_ident}->{$self->_item_column}  = $item_cvar_configs;
+
+  return $ccb;
+}
+
+
+sub init_profile {
+  my ($self) = @_;
+
+  my $profile = $self->SUPER::init_profile;
+
+  # SUPER::init_profile sets row_ident to the translated class name
+  # overwrite it with the user specified settings
+  foreach my $p (@{ $profile }) {
+    if ($p->{class} eq 'SL::DB::Order') {
+      $p->{row_ident} = $self->_order_column;
+    }
+    if ($p->{class} eq 'SL::DB::OrderItem') {
+      $p->{row_ident} = $self->_item_column;
+    }
+  }
+
+  foreach my $p (@{ $profile }) {
+    my $prof = $p->{profile};
+    if ($p->{row_ident} eq $self->_order_column) {
+      # no need to handle
+      delete @{$prof}{qw(delivery_customer_id delivery_vendor_id proforma quotation amount netamount)};
+    }
+    if ($p->{row_ident} eq $self->_item_column) {
+      # no need to handle
+      delete @{$prof}{qw(trans_id)};
+    }
+  }
+
+  return $profile;
+}
+
+
+sub setup_displayable_columns {
+  my ($self) = @_;
+
+  $self->SUPER::setup_displayable_columns;
+
+  $self->add_displayable_columns($self->_order_column,
+                                 { name => 'datatype',                description => $self->_order_column . ' [1]'                            },
+                                 { name => 'closed',                  description => $::locale->text('Closed')                                },
+                                 { name => 'currency',                description => $::locale->text('Currency')                              },
+                                 { name => 'currency_id',             description => $::locale->text('Currency (database ID)')                },
+                                 { name => 'cusordnumber',            description => $::locale->text('Customer Order Number')                 },
+                                 { name => 'delivered',               description => $::locale->text('Delivered')                             },
+                                 { name => 'delivery_term_id',        description => $::locale->text('Delivery terms (database ID)')          },
+                                 { name => 'delivery_term',           description => $::locale->text('Delivery terms (name)')                 },
+                                 { name => 'employee_id',             description => $::locale->text('Employee (database ID)')                },
+                                 { name => 'intnotes',                description => $::locale->text('Internal Notes')                        },
+                                 { name => 'marge_percent',           description => $::locale->text('Margepercent')                          },
+                                 { name => 'marge_total',             description => $::locale->text('Margetotal')                            },
+                                 { name => 'notes',                   description => $::locale->text('Notes')                                 },
+                                 { name => 'ordnumber',               description => $::locale->text('Order Number')                          },
+                                 { name => 'quonumber',               description => $::locale->text('Quotation Number')                      },
+                                 { name => 'reqdate',                 description => $::locale->text('Reqdate')                               },
+                                 { name => 'salesman_id',             description => $::locale->text('Salesman (database ID)')                },
+                                 { name => 'shippingpoint',           description => $::locale->text('Shipping Point')                        },
+                                 { name => 'shipvia',                 description => $::locale->text('Ship via')                              },
+                                 { name => 'transaction_description', description => $::locale->text('Transaction description')               },
+                                 { name => 'transdate',               description => $::locale->text('Order Date')                            },
+                                 { name => 'verify_amount',           description => $::locale->text('Amount (for verification)') . ' [2]'    },
+                                 { name => 'verify_netamount',        description => $::locale->text('Net amount (for verification)') . ' [2]'},
+                                 { name => 'taxincluded',             description => $::locale->text('Tax Included')                          },
+                                 { name => 'customer',                description => $::locale->text('Customer (name)')                       },
+                                 { name => 'customernumber',          description => $::locale->text('Customer Number')                       },
+                                 { name => 'customer_id',             description => $::locale->text('Customer (database ID)')                },
+                                 { name => 'vendor',                  description => $::locale->text('Vendor (name)')                         },
+                                 { name => 'vendornumber',            description => $::locale->text('Vendor Number')                         },
+                                 { name => 'vendor_id',               description => $::locale->text('Vendor (database ID)')                  },
+                                 { name => 'language_id',             description => $::locale->text('Language (database ID)')                },
+                                 { name => 'language',                description => $::locale->text('Language (name)')                       },
+                                 { name => 'payment_id',              description => $::locale->text('Payment terms (database ID)')           },
+                                 { name => 'payment',                 description => $::locale->text('Payment terms (name)')                  },
+                                 { name => 'taxzone_id',              description => $::locale->text('Tax zone (database ID)')                },
+                                 { name => 'taxzone',                 description => $::locale->text('Tax zone (description)')                },
+                                 { name => 'cp_id',                   description => $::locale->text('Contact Person (database ID)')          },
+                                 { name => 'contact',                 description => $::locale->text('Contact Person (name)')                 },
+                                 { name => 'department_id',           description => $::locale->text('Department (database ID)')              },
+                                 { name => 'department',              description => $::locale->text('Department (description)')              },
+                                 { name => 'globalproject_id',        description => $::locale->text('Document Project (database ID)')        },
+                                 { name => 'globalprojectnumber',     description => $::locale->text('Document Project (number)')             },
+                                 { name => 'globalproject',           description => $::locale->text('Document Project (description)')        },
+                                 { name => 'shipto_id',               description => $::locale->text('Ship to (database ID)')                 },
+                                );
+
+  $self->add_cvar_columns_to_displayable_columns($self->_item_column);
+
+  $self->add_displayable_columns($self->_item_column,
+                                 { name => 'datatype',        description => $self->_item_column . ' [1]'                  },
+                                 { name => 'cusordnumber',    description => $::locale->text('Customer Order Number')      },
+                                 { name => 'description',     description => $::locale->text('Description')                },
+                                 { name => 'discount',        description => $::locale->text('Discount')                   },
+                                 { name => 'lastcost',        description => $::locale->text('Lastcost')                   },
+                                 { name => 'longdescription', description => $::locale->text('Long Description')           },
+                                 { name => 'marge_percent',   description => $::locale->text('Margepercent')               },
+                                 { name => 'marge_total',     description => $::locale->text('Margetotal')                 },
+                                 { name => 'ordnumber',       description => $::locale->text('Order Number')               },
+                                 { name => 'parts_id',        description => $::locale->text('Part (database ID)')         },
+                                 { name => 'partnumber',      description => $::locale->text('Part Number')                },
+                                 { name => 'project_id',      description => $::locale->text('Project (database ID)')      },
+                                 { name => 'projectnumber',   description => $::locale->text('Project (number)')           },
+                                 { name => 'project',         description => $::locale->text('Project (description)')      },
+                                 { name => 'price_factor_id', description => $::locale->text('Price factor (database ID)') },
+                                 { name => 'price_factor',    description => $::locale->text('Price factor (name)')        },
+                                 { name => 'pricegroup_id',   description => $::locale->text('Price group (database ID)')  },
+                                 { name => 'pricegroup',      description => $::locale->text('Price group (name)')         },
+                                 { name => 'qty',             description => $::locale->text('Quantity')                   },
+                                 { name => 'reqdate',         description => $::locale->text('Reqdate')                    },
+                                 { name => 'sellprice',       description => $::locale->text('Sellprice')                  },
+                                 { name => 'serialnumber',    description => $::locale->text('Serial No.')                 },
+                                 { name => 'subtotal',        description => $::locale->text('Subtotal')                   },
+                                 { name => 'unit',            description => $::locale->text('Unit')                       },
+                                );
+}
+
+
+sub init_languages_by {
+  my ($self) = @_;
+
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $self->all_languages } } ) } qw(id description article_code) };
+}
+
+sub init_parts_by {
+  my ($self) = @_;
+
+  my $all_parts = SL::DB::Manager::Part->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_parts } } ) } qw(id partnumber ean description) };
+}
+
+sub init_contacts_by {
+  my ($self) = @_;
+
+  my $all_contacts = SL::DB::Manager::Contact->get_all;
+
+  my $cby;
+  # by customer/vendor id  _and_  contact person id
+  $cby->{'cp_cv_id+cp_id'}   = { map { ( $_->cp_cv_id . '+' . $_->cp_id   => $_ ) } @{ $all_contacts } };
+  # by customer/vendor id  _and_  contact person name
+  $cby->{'cp_cv_id+cp_name'} = { map { ( $_->cp_cv_id . '+' . $_->cp_name => $_ ) } @{ $all_contacts } };
+
+  return $cby;
+}
+
+sub init_departments_by {
+  my ($self) = @_;
+
+  my $all_departments = SL::DB::Manager::Department->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_departments } } ) } qw(id description) };
+}
+
+sub init_projects_by {
+  my ($self) = @_;
+
+  my $all_projects = SL::DB::Manager::Project->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_projects } } ) } qw(id projectnumber description) };
+}
+
+sub init_ct_shiptos_by {
+  my ($self) = @_;
+
+  my $all_ct_shiptos = SL::DB::Manager::Shipto->get_all(query => [module => 'CT']);
+
+  my $sby;
+  # by trans_id  _and_  shipto_id
+  $sby->{'trans_id+shipto_id'} = { map { ( $_->trans_id . '+' . $_->shipto_id => $_ ) } @{ $all_ct_shiptos } };
+
+  return $sby;
+}
+
+sub init_taxzones_by {
+  my ($self) = @_;
+
+  my $all_taxzones = SL::DB::Manager::TaxZone->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_taxzones } } ) } qw(id description) };
+}
+
+sub init_price_factors_by {
+  my ($self) = @_;
+
+  my $all_price_factors = SL::DB::Manager::PriceFactor->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_price_factors } } ) } qw(id description) };
+}
+
+sub init_pricegroups_by {
+  my ($self) = @_;
+
+  my $all_pricegroups = SL::DB::Manager::Pricegroup->get_all;
+  return { map { my $col = $_; ( $col => { map { ( $_->$col => $_ ) } @{ $all_pricegroups } } ) } qw(id pricegroup) };
+}
+
+sub check_objects {
+  my ($self) = @_;
+
+  $self->controller->track_progress(phase => 'building data', progress => 0);
+
+  my $i = 0;
+  my $num_data = scalar @{ $self->controller->data };
+  foreach my $entry (@{ $self->controller->data }) {
+    $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
+
+    if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
+      $self->handle_order($entry);
+    } elsif ($entry->{raw_data}->{datatype} eq $self->_item_column && $entry->{object}->can('part')) {
+      $self->handle_item($entry);
+    }
+    $self->handle_cvars($entry, sub_module => 'orderitems');
+
+  } continue {
+    $i++;
+  }
+
+  $self->add_info_columns($self->_order_column,
+                          { header => $::locale->text('Customer/Vendor'), method => 'vc_name' });
+  # Todo: access via ->[0] ok? Better: search first order column and use this
+  $self->add_columns($self->_order_column,
+                     map { "${_}_id" } grep { exists $self->controller->data->[0]->{raw_data}->{$_} } qw(payment delivery_term language department globalproject taxzone cp currency));
+  $self->add_columns($self->_order_column, 'globalproject_id') if exists $self->controller->data->[0]->{raw_data}->{globalprojectnumber};
+  $self->add_columns($self->_order_column, 'cp_id')            if exists $self->controller->data->[0]->{raw_data}->{contact};
+
+  $self->add_info_columns($self->_item_column,
+                          { header => $::locale->text('Part Number'), method => 'partnumber' });
+  # Todo: access via ->[1] ok? Better: search first item column and use this
+  $self->add_columns($self->_item_column,
+                     map { "${_}_id" } grep { exists $self->controller->data->[1]->{raw_data}->{$_} } qw(project price_factor pricegroup));
+  $self->add_columns($self->_item_column, 'project_id') if exists $self->controller->data->[1]->{raw_data}->{projectnumber};
+
+  $self->add_cvar_raw_data_columns();
+
+  $self->add_items_to_order();
+  $self->handle_prices_and_taxes();
+
+
+  # If order has errors set error for orderitems as well
+  my $order_entry;
+  foreach my $entry (@{ $self->controller->data }) {
+    # Search first order
+    if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
+      $order_entry = $entry;
+    } elsif ( defined $order_entry
+              && $entry->{raw_data}->{datatype} eq $self->_item_column
+              && scalar @{ $order_entry->{errors} } > 0 ) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid order for this order item');
+    }
+  }
+
+}
+
+sub handle_order {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  my $vc_obj;
+  if (any { $entry->{raw_data}->{$_} } qw(customer customernumber customer_id)) {
+    $self->check_vc($entry, 'customer_id');
+    $vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id;
+  } elsif (any { $entry->{raw_data}->{$_} } qw(vendor vendornumber vendor_id)) {
+    $self->check_vc($entry, 'vendor_id');
+    $vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if $object->vendor_id;
+  } else {
+    push @{ $entry->{errors} }, $::locale->text('Error: Customer/vendor missing');
+  }
+
+  $self->check_contact($entry);
+  $self->check_language($entry);
+  $self->check_payment($entry);
+  $self->check_delivery_term($entry);
+  $self->check_department($entry);
+  $self->check_project($entry, global => 1);
+  $self->check_ct_shipto($entry);
+  $self->check_taxzone($entry);
+  $self->check_currency($entry, take_default => 0);
+
+  if ($vc_obj) {
+    # copy from customer if not given
+    foreach (qw(payment_id language_id taxzone_id currency_id)) {
+      $object->$_($vc_obj->$_) unless $object->$_;
+    }
+  }
+
+  $self->handle_salesman($entry);
+  $self->handle_employee($entry);
+}
+
+# ToDo: salesman by name
+sub handle_salesman {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+  my $vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id;
+  $vc_obj    = SL::DB::Vendor->new(id   => $object->vendor_id)->load   if (!$vc_obj && $object->vendor_id);
+
+  # salesman from customer/vendor or login if not given
+  if (!$object->salesman) {
+    if ($vc_obj && $vc_obj->salesman_id) {
+      $object->salesman(SL::DB::Manager::Employee->find_by(id => $vc_obj->salesman_id));
+    } else {
+      $object->salesman(SL::DB::Manager::Employee->find_by(login => $::myconfig{login}));
+    }
+  }
+}
+
+# ToDo: employee by name
+sub handle_employee {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # employee from login if not given
+  if (!$object->employee_id) {
+    $object->employee_id(SL::DB::Manager::Employee->find_by(login => $::myconfig{login})->id);
+  }
+}
+
+sub check_language {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check whether or not language ID is valid.
+  if ($object->language_id && !$self->languages_by->{id}->{ $object->language_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid language');
+    return 0;
+  }
+
+  # Map name to ID if given.
+  if (!$object->language_id && $entry->{raw_data}->{language}) {
+    my $language = $self->languages_by->{description}->{  $entry->{raw_data}->{language} }
+                || $self->languages_by->{article_code}->{ $entry->{raw_data}->{language} };
+
+    if (!$language) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid language');
+      return 0;
+    }
+
+    $object->language_id($language->id);
+  }
+
+  if ($object->language_id) {
+    $entry->{info_data}->{language} = $self->languages_by->{id}->{ $object->language_id }->description;
+  }
+
+  return 1;
+}
+
+sub handle_item {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+  return unless $self->check_part($entry);
+
+  my $part_obj = SL::DB::Part->new(id => $object->parts_id)->load;
+
+  # copy from part if not given
+  $object->description($part_obj->description) unless $object->description;
+  $object->longdescription($part_obj->notes)   unless $object->longdescription;
+  $object->unit($part_obj->unit)               unless $object->unit;
+  $object->sellprice($part_obj->sellprice)     unless defined $object->sellprice;
+  $object->lastcost($part_obj->lastcost)       unless defined $object->lastcost;
+
+  # set to 0 if not given
+  $object->discount(0) unless $object->discount;
+  $object->ship(0)     unless $object->ship;
+
+  $self->check_project($entry, global => 0);
+  $self->check_price_factor($entry);
+  $self->check_pricegroup($entry);
+}
+
+sub check_part {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check wether or non part ID is valid.
+  if ($object->parts_id && !$self->parts_by->{id}->{ $object->parts_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid part');
+    return 0;
+  }
+
+  # Map number to ID if given.
+  if (!$object->parts_id && $entry->{raw_data}->{partnumber}) {
+    my $part = $self->parts_by->{partnumber}->{ $entry->{raw_data}->{partnumber} };
+    if (!$part) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid part');
+      return 0;
+    }
+
+    $object->parts_id($part->id);
+  }
+
+  if ($object->parts_id) {
+    $entry->{info_data}->{partnumber} = $self->parts_by->{id}->{ $object->parts_id }->partnumber;
+  } else {
+    push @{ $entry->{errors} }, $::locale->text('Error: Part not found');
+    return 0;
+  }
+
+  return 1;
+}
+
+sub check_contact {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  my $cp_cv_id = $object->customer_id || $object->vendor_id;
+  return 0 unless $cp_cv_id;
+
+  # Check wether or not contact ID is valid.
+  if ($object->cp_id && !$self->contacts_by->{'cp_cv_id+cp_id'}->{ $cp_cv_id . '+' . $object->cp_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid contact');
+    return 0;
+  }
+
+  # Map name to ID if given.
+  if (!$object->cp_id && $entry->{raw_data}->{contact}) {
+    my $cp = $self->contacts_by->{'cp_cv_id+cp_name'}->{ $cp_cv_id . '+' . $entry->{raw_data}->{contact} };
+    if (!$cp) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid contact');
+      return 0;
+    }
+
+    $object->cp_id($cp->cp_id);
+  }
+
+  if ($object->cp_id) {
+    $entry->{info_data}->{contact} = $self->contacts_by->{'cp_cv_id+cp_id'}->{ $cp_cv_id . '+' . $object->cp_id }->cp_name;
+  }
+
+  return 1;
+}
+
+sub check_department {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check wether or not department ID is valid.
+  if ($object->department_id && !$self->departments_by->{id}->{ $object->department_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid department');
+    return 0;
+  }
+
+  # Map description to ID if given.
+  if (!$object->department_id && $entry->{raw_data}->{department}) {
+    my $dep = $self->departments_by->{description}->{ $entry->{raw_data}->{department} };
+    if (!$dep) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid department');
+      return 0;
+    }
+
+    $object->department_id($dep->id);
+  }
+
+  return 1;
+}
+
+sub check_project {
+  my ($self, $entry, %params) = @_;
+
+  my $id_column          = ($params{global} ? 'global' : '') . 'project_id';
+  my $number_column      = ($params{global} ? 'global' : '') . 'projectnumber';
+  my $description_column = ($params{global} ? 'global' : '') . 'project';
+
+  my $object = $entry->{object};
+
+  # Check wether or not projetc ID is valid.
+  if ($object->$id_column && !$self->projects_by->{id}->{ $object->$id_column }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid project');
+    return 0;
+  }
+
+  # Map number to ID if given.
+  if (!$object->$id_column && $entry->{raw_data}->{$number_column}) {
+    my $proj = $self->projects_by->{projectnumber}->{ $entry->{raw_data}->{$number_column} };
+    if (!$proj) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid project');
+      return 0;
+    }
+
+    $object->$id_column($proj->id);
+  }
+
+  # Map description to ID if given.
+  if (!$object->$id_column && $entry->{raw_data}->{$description_column}) {
+    my $proj = $self->projects_by->{description}->{ $entry->{raw_data}->{$description_column} };
+    if (!$proj) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid project');
+      return 0;
+    }
+
+    $object->$id_column($proj->id);
+  }
+
+  return 1;
+}
+
+sub check_ct_shipto {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  my $trans_id = $object->customer_id || $object->vendor_id;
+  return 0 unless $trans_id;
+
+  # Check wether or not shipto ID is valid.
+  if ($object->shipto_id && !$self->ct_shiptos_by->{'trans_id+shipto_id'}->{ $trans_id . '+' . $object->shipto_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid shipto');
+    return 0;
+  }
+
+  return 1;
+}
+
+sub check_taxzone {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check wether or not taxzone ID is valid.
+  if ($object->taxzone_id && !$self->taxzones_by->{id}->{ $object->taxzone_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid tax zone');
+    return 0;
+  }
+
+  # Map description to ID if given.
+  if (!$object->taxzone_id && $entry->{raw_data}->{taxzone}) {
+    my $taxzone = $self->taxzones_by->{description}->{ $entry->{raw_data}->{taxzone} };
+    if (!$taxzone) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid tax zone');
+      return 0;
+    }
+
+    $object->taxzone_id($taxzone->id);
+  }
+
+  return 1;
+}
+
+sub check_price_factor {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check wether or not price_factor ID is valid.
+  if ($object->price_factor_id && !$self->price_factors_by->{id}->{ $object->price_factor_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid price factor');
+    return 0;
+  }
+
+  # Map description to ID if given.
+  if (!$object->price_factor_id && $entry->{raw_data}->{price_factor}) {
+    my $price_factor = $self->price_factors_by->{description}->{ $entry->{raw_data}->{price_factor} };
+    if (!$price_factor) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid price factor');
+      return 0;
+    }
+
+    $object->price_factor_id($price_factor->id);
+  }
+
+  return 1;
+}
+
+sub check_pricegroup {
+  my ($self, $entry) = @_;
+
+  my $object = $entry->{object};
+
+  # Check wether or not pricegroup ID is valid.
+  if ($object->pricegroup_id && !$self->pricegroups_by->{id}->{ $object->pricegroup_id }) {
+    push @{ $entry->{errors} }, $::locale->text('Error: Invalid price group');
+    return 0;
+  }
+
+  # Map pricegroup to ID if given.
+  if (!$object->pricegroup_id && $entry->{raw_data}->{pricegroup}) {
+    my $pricegroup = $self->pricegroups_by->{pricegroup}->{ $entry->{raw_data}->{pricegroup} };
+    if (!$pricegroup) {
+      push @{ $entry->{errors} }, $::locale->text('Error: Invalid price group');
+      return 0;
+    }
+
+    $object->pricegroup_id($pricegroup->id);
+  }
+
+  return 1;
+}
+
+sub add_items_to_order {
+  my ($self) = @_;
+
+  # add orderitems to order
+  my $order_entry;
+  my @orderitems;
+  foreach my $entry (@{ $self->controller->data }) {
+    # search first order
+    if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
+
+      # new order entry: add collected orderitems to the previous one
+      if (defined $order_entry) {
+        $order_entry->{object}->orderitems(@orderitems);
+        @orderitems = ();
+      }
+
+      $order_entry = $entry;
+
+    } elsif ( defined $order_entry && $entry->{raw_data}->{datatype} eq $self->_item_column ) {
+      # collect orderitems to add to order (if they have no errors)
+      # ( add_orderitems does not work here if we want to call
+      #   calculate_prices_and_taxes afterwards ...
+      #   so collect orderitems and add them at once )
+      push @orderitems, $entry->{object} if (scalar @{ $entry->{errors} } == 0);
+    }
+  }
+  # add last collected orderitems to last order
+  $order_entry->{object}->orderitems(@orderitems) if $order_entry;
+}
+
+sub handle_prices_and_taxes() {
+  my ($self) = @_;
+
+  # calculate prices and taxes
+  foreach my $entry (@{ $self->controller->data }) {
+    next if @{ $entry->{errors} };
+
+    if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
+
+      $entry->{object}->calculate_prices_and_taxes;
+
+      $entry->{info_data}->{calc_amount}    = $entry->{object}->amount_as_number;
+      $entry->{info_data}->{calc_netamount} = $entry->{object}->netamount_as_number;
+    }
+  }
+
+  # If amounts are given, show calculated amounts as info and given amounts (verify_xxx).
+  # And throw an error if the differences are too big.
+  my @to_verify = ( { column      => 'amount',
+                      raw_column  => 'verify_amount',
+                      info_header => 'Calc. Amount',
+                      info_method => 'calc_amount',
+                      err_msg     => 'Amounts differ too much',
+                    },
+                    { column      => 'netamount',
+                      raw_column  => 'verify_netamount',
+                      info_header => 'Calc. Net amount',
+                      info_method => 'calc_netamount',
+                      err_msg     => 'Net amounts differ too much',
+                    } );
+
+  foreach my $tv (@to_verify) {
+    # Todo: access via ->[0] ok? Better: search first order column and use this
+    if (exists $self->controller->data->[0]->{raw_data}->{ $tv->{raw_column} }) {
+      $self->add_raw_data_columns($self->_order_column, $tv->{raw_column});
+      $self->add_info_columns($self->_order_column,
+                              { header => $::locale->text($tv->{info_header}), method => $tv->{info_method} });
+    }
+
+    # check differences
+    foreach my $entry (@{ $self->controller->data }) {
+      next if @{ $entry->{errors} };
+      if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
+        next if !$entry->{raw_data}->{ $tv->{raw_column} };
+        my $parsed_value = $::form->parse_amount(\%::myconfig, $entry->{raw_data}->{ $tv->{raw_column} });
+        if (abs($entry->{object}->${ \$tv->{column} } - $parsed_value) > $self->settings->{'max_amount_diff'}) {
+          push @{ $entry->{errors} }, $::locale->text($tv->{err_msg});
+        }
+      }
+    }
+  }
+
+}
+
+sub save_objects {
+  my ($self, %params) = @_;
+
+  # set order number and collect to save
+  my $objects_to_save;
+  foreach my $entry (@{ $self->controller->data }) {
+    next if $entry->{raw_data}->{datatype} ne $self->_order_column;
+    next if @{ $entry->{errors} };
+
+    if (!$entry->{object}->ordnumber) {
+      my $number = SL::TransNumber->new(type => 'sales_order',
+                                        save => 1);
+      $entry->{object}->ordnumber($number->create_unique());
+    }
+
+    push @{ $objects_to_save }, $entry;
+  }
+
+  $self->SUPER::save_objects(data => $objects_to_save);
+}
+
+sub _order_column {
+  $_[0]->settings->{'order_column'}
+}
+
+sub _item_column {
+  $_[0]->settings->{'item_column'}
+}
+
+1;
index 2ca1230..90d0b71 100644 (file)
@@ -234,14 +234,13 @@ sub check_existing {
 sub handle_prices {
   my ($self, $entry) = @_;
 
-  foreach my $column (qw(sellprice listprice lastcost)) {
-    next unless $self->controller->headers->{used}->{ $column };
-
+  foreach my $column (qw(sellprice)) {
+    my $object     = $entry->{object_to_save} || $entry->{object};
     my $adjustment = $self->settings->{sellprice_adjustment};
-    my $value      = $entry->{object}->$column;
+    my $value      = $object->$column;
 
     $value = $self->settings->{sellprice_adjustment_type} eq 'percent' ? $value * (100 + $adjustment) / 100 : $value + $adjustment;
-    $entry->{object}->$column($::form->round_amount($value, $self->settings->{sellprice_places}));
+    $object->$column($::form->round_amount($value, $self->settings->{sellprice_places}));
   }
 }
 
@@ -486,7 +485,7 @@ sub setup_displayable_columns {
                                  { name => 'not_discountable',   description => $::locale->text('Not Discountable')                                     },
                                  { name => 'notes',              description => $::locale->text('Notes')                                                },
                                  { name => 'obsolete',           description => $::locale->text('Obsolete')                                             },
-                                 { name => 'onhand',             description => $::locale->text('On Hand')                                              },
+                                 { name => 'onhand',             description => $::locale->text('On Hand') . ' [2]'                                     },
                                  { name => 'partnumber',         description => $::locale->text('Part Number')                                          },
                                  { name => 'partsgroup_id',      description => $::locale->text('Partsgroup (database ID)')                             },
                                  { name => 'partsgroup',         description => $::locale->text('Partsgroup (name)')                                    },
index da4b7c9..3b6db29 100644 (file)
@@ -6,6 +6,7 @@ use parent qw(SL::Controller::Base);
 use SL::JSON;
 use SL::DBUtils;
 use SL::Helper::Flash;
+use SL::Locale::String;
 
 use SL::DB::Customer;
 use SL::DB::Vendor;
@@ -28,7 +29,6 @@ __PACKAGE__->run_before(
     $::auth->assert('customer_vendor_edit');
   }
 );
-
 __PACKAGE__->run_before(
   '_instantiate_args',
   only => [
@@ -62,6 +62,9 @@ __PACKAGE__->run_before(
   ]
 );
 
+__PACKAGE__->run_before('normalize_name');
+
+
 sub action_add {
   my ($self) = @_;
 
@@ -147,6 +150,19 @@ sub _save {
       employee_id => SL::DB::Manager::Employee->current->id,
       addition => 'SAVED',
     )->save();
+
+    if ( $::form->{delete_notes} ) {
+      foreach my $note_id (@{ $::form->{delete_notes} }) {
+        my $note = SL::DB::Note->new(id => $note_id)->load();
+        if ( $note->follow_up ) {
+          if ( $note->follow_up->follow_up_link ) {
+            $note->follow_up->follow_up_link->delete(cascade => 'delete');
+          }
+          $note->follow_up->delete(cascade => 'delete');
+        }
+        $note->delete(cascade => 'delete');
+      }
+    }
   }) || die($db->error);
 
 }
@@ -154,27 +170,34 @@ sub _save {
 sub action_save {
   my ($self) = @_;
 
-  $self->_save();
+  if (!$self->{cv}->name) {
+    flash('error', t8('Customer missing!'));
+    $self->_pre_render();
+    $self->render(
+      'customer_vendor/form',
+      title => ($self->is_vendor() ? t8('Edit Vendor') : t8('Edit Customer')),
+      %{$self->{template_args}}
+    );
+  } else {
 
-  my @redirect_params = (
-    action => 'edit',
-    id     => $self->{cv}->id,
-    db     => ($self->is_vendor() ? 'vendor' : 'customer'),
-  );
+    $self->_save();
 
-  if ( $self->{contact}->cp_id ) {
-    push(@redirect_params, contact_id => $self->{contact}->cp_id);
-  }
+    my @redirect_params = (
+      action => 'edit',
+      id     => $self->{cv}->id,
+      db     => ($self->is_vendor() ? 'vendor' : 'customer'),
+    );
 
-  if ( $self->{shipto}->shipto_id ) {
-    push(@redirect_params, shipto_id => $self->{shipto}->shipto_id);
-  }
+    if ( $self->{contact}->cp_id ) {
+      push(@redirect_params, contact_id => $self->{contact}->cp_id);
+    }
 
-  if ( $self->{note}->id ) {
-    push(@redirect_params, note_id => $self->{note}->id);
-  }
+    if ( $self->{shipto}->shipto_id ) {
+      push(@redirect_params, shipto_id => $self->{shipto}->shipto_id);
+    }
 
-  $self->redirect_to(@redirect_params);
+    $self->redirect_to(@redirect_params);
+  }
 }
 
 sub action_save_and_close {
@@ -385,6 +408,8 @@ sub action_search_contact {
 sub action_get_delivery {
   my ($self) = @_;
 
+  $::auth->assert('sales_all_edit');
+
   my $dbh = $::form->get_standard_dbh();
 
   my ($arap, $db, $qty_sign);
@@ -398,21 +423,24 @@ sub action_get_delivery {
     $qty_sign = '';
   }
 
-  my $where = ' WHERE 1=1 ';
+  my $where = ' WHERE 1=1';
   my @values;
 
   if ( !$self->is_vendor() && $::form->{shipto_id} && $::form->{shipto_id} ne 'all' ) {
-    $where .= "AND ${arap}.shipto_id = ?";
+    $where .= " AND ${arap}.shipto_id = ?";
     push(@values, $::form->{shipto_id});
+  } else {
+    $where .= " AND ${arap}.${db}_id = ?";
+    push(@values, $::form->{id});
   }
 
   if ( $::form->{delivery_from} ) {
-    $where .= "AND ${arap}.transdate >= ?";
+    $where .= " AND ${arap}.transdate >= ?";
     push(@values, conv_date($::form->{delivery_from}));
   }
 
   if ( $::form->{delivery_to} ) {
-    $where .= "AND ${arap}.transdate <= ?";
+    $where .= " AND ${arap}.transdate <= ?";
     push(@values, conv_date($::form->{delivery_to}));
   }
 
@@ -626,17 +654,8 @@ sub _instantiate_args {
 
   if ( $::form->{note}->{id} ) {
     $self->{note} = SL::DB::Note->new(id => $::form->{note}->{id})->load();
-
-    $self->{note_followup_link} = SL::DB::Manager::FollowUpLink->get_all(
-      query => [
-        'follow_up.note_id' => $self->{note}->id,
-        trans_id => $self->{cv}->id,
-        trans_type => ($self->is_vendor() ? 'vendor' : 'customer'),
-      ],
-      with_objects => ['follow_up'],
-    )->[0];
-
-    $self->{note_followup} = $self->{note_followup_link}->follow_up;
+    $self->{note_followup} = $self->{note}->follow_up;
+    $self->{note_followup_link} = $self->{note_followup}->follow_up_link;
   } else {
     $self->{note} = SL::DB::Note->new();
     $self->{note_followup} = SL::DB::FollowUp->new();
@@ -691,17 +710,8 @@ sub _load_customer_vendor {
 
   if ( $::form->{note_id} ) {
     $self->{note} = SL::DB::Note->new(id => $::form->{note_id})->load();
-
-    $self->{note_followup_link} = SL::DB::Manager::FollowUpLink->get_all(
-      query => [
-        'follow_up.note_id' => $self->{note}->id,
-        trans_id => $self->{cv}->id,
-        trans_type => ($self->is_vendor() ? 'vendor' : 'customer'),
-      ],
-      with_objects => ['follow_up'],
-    )->[0];
-
-    $self->{note_followup} = $self->{note_followup_link}->follow_up;
+    $self->{note_followup} = $self->{note}->follow_up;
+    $self->{note_followup_link} = $self->{note_followup}->follow_up_link;
   } else {
     $self->{note} = SL::DB::Note->new();
     $self->{note_followup} = SL::DB::FollowUp->new();
@@ -816,6 +826,8 @@ sub _pre_render {
 
   $self->{all_payment_terms} = SL::DB::Manager::PaymentTerm->get_all();
 
+  $self->{all_delivery_terms} = SL::DB::Manager::DeliveryTerm->get_all();
+
   $self->{all_pricegroups} = SL::DB::Manager::Pricegroup->get_all();
 
   $query =
@@ -836,10 +848,32 @@ sub _pre_render {
   $self->{shiptos} = $self->{cv}->shipto;
   $self->{shiptos} ||= [];
 
+  $self->{notes} = SL::DB::Manager::Note->get_all(
+    query => [
+      trans_id => $self->{cv}->id,
+      trans_module => 'ct',
+    ],
+    with_objects => ['follow_up'],
+  );
+
   $self->{template_args} ||= {};
 
   $::request->{layout}->add_javascripts('autocomplete_customer.js');
   $::request->{layout}->add_javascripts('kivi.CustomerVendor.js');
 }
 
+sub normalize_name {
+  my ($self) = @_;
+
+  # check if feature is enabled (select normalize_vc_names from defaults)
+  return unless ($::instance_conf->get_normalize_vc_names);
+
+  return unless $self->{cv};
+  my $name = $self->{cv}->name;
+  $name =~ s/\s+$//;
+  $name =~ s/^\s+//;
+  $name =~ s/\s+/ /g;
+  $self->{cv}->name($name);
+}
+
 1;
index ee4a292..fc402fc 100644 (file)
@@ -11,10 +11,10 @@ use SL::Locale::String;
 
 use Rose::Object::MakeMethods::Generic (
   scalar => [ qw(db_args flat_filter) ],
-  'scalar --get_set_init' => [ qw(models) ],
+  'scalar --get_set_init' => [ qw(models all_edit_right) ],
 );
 
-__PACKAGE__->run_before(sub { $::auth->assert('sales_order_edit'); });
+__PACKAGE__->run_before(sub { $::auth->assert('delivery_plan'); });
 
 my %sort_columns = (
   reqdate           => t8('Reqdate'),
@@ -27,78 +27,6 @@ my %sort_columns = (
   customer          => t8('Customer'),
 );
 
-my $delivery_plan_query = [
-  'order.customer_id' => { gt => 0 },
-  'order.closed' => 0,
-  or => [ 'order.quotation' => 0, 'order.quotation' => undef ],
-
-  # filter by shipped_qty < qty, read from innermost to outermost
-  'id' => [ \"
-    -- 3. resolve the desired information about those
-    SELECT oi.id FROM (
-      -- 2. slice only part, orderitem and both quantities from it
-      SELECT parts_id, trans_id, qty, SUM(doi_qty) AS doi_qty FROM (
-        -- 1. join orderitems and deliverorder items via record_links.
-        --    also add customer data to filter for sales_orders
-        SELECT oi.parts_id, oi.trans_id, oi.id, oi.qty, doi.qty AS doi_qty
-        FROM orderitems oi, oe, record_links rl, delivery_order_items doi
-        WHERE
-          oe.id = oi.trans_id AND
-          oe.customer_id IS NOT NULL AND
-          (oe.quotation = 'f' OR oe.quotation IS NULL) AND
-          NOT oe.closed AND
-          rl.from_id = oe.id AND
-          rl.from_id = oi.trans_id AND
-          oe.id = oi.trans_id AND
-          rl.from_table = 'oe' AND
-          rl.to_table = 'delivery_orders' AND
-          rl.to_id = doi.delivery_order_id AND
-          oi.parts_id = doi.parts_id
-      ) tuples GROUP BY parts_id, trans_id, qty
-    ) partials
-    LEFT JOIN orderitems oi ON partials.parts_id = oi.parts_id AND partials.trans_id = oi.trans_id
-    WHERE oi.qty > doi_qty
-
-    UNION ALL
-
-    -- 4. since the join over record_links fails for sales_orders wihtout any delivery order
-    --    retrieve those without record_links at all
-    SELECT oi.id FROM orderitems oi, oe
-    WHERE
-      oe.id = oi.trans_id AND
-      oe.customer_id IS NOT NULL AND
-      (oe.quotation = 'f' OR oe.quotation IS NULL) AND
-      NOT oe.closed AND
-      oi.trans_id NOT IN (
-        SELECT from_id
-        FROM record_links rl
-        WHERE
-          rl.from_table ='oe' AND
-          rl.to_table = 'delivery_orders'
-      )
-
-    UNION ALL
-
-    -- 5. In case someone deleted a line of the delivery_order there will be a record_link (4 fails)
-    --    but there won't be a delivery_order_items to find (3 fails too). Search for orphaned orderitems this way
-    SELECT oi.id FROM orderitems AS oi, oe, record_links AS rl
-    WHERE
-      rl.from_table = 'oe' AND
-      rl.to_table = 'delivery_orders' AND
-
-      oi.trans_id = rl.from_id AND
-      oi.parts_id NOT IN (
-        SELECT doi.parts_id FROM delivery_order_items AS doi WHERE doi.delivery_order_id = rl.to_id
-      ) AND
-
-      oe.id = oi.trans_id AND
-
-      oe.customer_id IS NOT NULL AND
-      (oe.quotation = 'f' OR oe.quotation IS NULL) AND
-      NOT oe.closed
-  " ],
-];
-
 sub action_list {
   my ($self) = @_;
 
@@ -194,6 +122,106 @@ sub make_filter_summary {
   $self->{filter_summary} = join ', ', @filter_strings;
 }
 
+sub delivery_plan_query {
+  my $employee_id = SL::DB::Manager::Employee->current->id;
+  my $oe_owner = $_[0]->all_edit_right ? '' : " oe.eployee_id = $employee_id AND";
+  [
+  'order.customer_id' => { gt => 0 },
+  'order.closed' => 0,
+  or => [ 'order.quotation' => 0, 'order.quotation' => undef ],
+
+  # filter by shipped_qty < qty, read from innermost to outermost
+  'id' => [ \"
+    -- 3. resolve the desired information about those
+    SELECT oi.id FROM (
+      -- 2. slice only part, orderitem and both quantities from it
+      SELECT parts_id, trans_id, qty, SUM(doi_qty) AS doi_qty FROM (
+        -- 1. join orderitems and deliverorder items via record_links.
+        --    also add customer data to filter for sales_orders
+        SELECT oi.parts_id, oi.trans_id, oi.id, oi.qty, doi.qty AS doi_qty
+        FROM orderitems oi, oe, record_links rl, delivery_order_items doi
+        WHERE
+          oe.id = oi.trans_id AND
+          oe.customer_id IS NOT NULL AND
+          (oe.quotation = 'f' OR oe.quotation IS NULL) AND
+          NOT oe.closed AND
+          $oe_owner
+          rl.from_id = oe.id AND
+          rl.from_id = oi.trans_id AND
+          oe.id = oi.trans_id AND
+          rl.from_table = 'oe' AND
+          rl.to_table = 'delivery_orders' AND
+          rl.to_id = doi.delivery_order_id AND
+          oi.parts_id = doi.parts_id
+      ) tuples GROUP BY parts_id, trans_id, qty
+    ) partials
+    LEFT JOIN orderitems oi ON partials.parts_id = oi.parts_id AND partials.trans_id = oi.trans_id
+    WHERE oi.qty > doi_qty
+
+    UNION ALL
+
+    -- 4. since the join over record_links fails for sales_orders wihtout any delivery order
+    --    retrieve those without record_links at all
+    SELECT oi.id FROM orderitems oi, oe
+    WHERE
+      oe.id = oi.trans_id AND
+      oe.customer_id IS NOT NULL AND
+      (oe.quotation = 'f' OR oe.quotation IS NULL) AND
+      NOT oe.closed AND
+      $oe_owner
+      oi.trans_id NOT IN (
+        SELECT from_id
+        FROM record_links rl
+        WHERE
+          rl.from_table ='oe' AND
+          rl.to_table = 'delivery_orders'
+      )
+
+    UNION ALL
+
+    -- 5. now for the really nasty cases.
+    --    If someone partially delivered an order in several delivery orders,
+    --    there will be lots of record_links (4 doesn't catch those) but those
+    --    won't have matching part_ids in delivery_order_items, so 1-3 can't
+    --    find anything
+    --    In this case aggreg record_links - delivery_order - delivery_order_items
+    --    slice only oe.id, parts_id and sum of of qty
+    --    left join that onto orderitems to get matching qtys in doi while retaining
+    --    entrys without matches and then throw out those without record_links
+    --    TODO: join this and 1-3 into a general case
+                  -- need debug info? uncomment these:
+    SELECT oi.id  -- ,oi.trans_id, oi.parts_id, coalesce(sum, 0), agg.parts_id
+    FROM orderitems oi LEFT JOIN (
+      SELECT rl.from_id as oid, doi.parts_id, sum(doi.qty) FROM (
+        SELECT from_id, to_id
+        FROM record_links rl
+        LEFT JOIN oe ON oe.id = from_id
+        WHERE
+          rl.from_table = 'oe' AND
+          rl.to_table = 'delivery_orders' AND
+
+          oe.customer_id IS NOT NULL AND
+          $oe_owner
+          (oe.quotation = 'f' OR oe.quotation IS NULL) AND NOT oe.closed
+      ) rl
+      LEFT JOIN delivery_order_items doi ON (rl.to_id = doi.delivery_order_id)
+      GROUP BY rl.from_id, doi.parts_id
+    ) agg ON (agg.oid = oi.trans_id AND agg.parts_id = oi.parts_id)
+    LEFT JOIN oe ON oe.id = oi.trans_id
+    WHERE
+      EXISTS (
+        SELECT to_id
+        FROM record_links rl
+        WHERE oi.trans_id = rl.from_id AND rl.from_table = 'oe' AND rl.to_table = 'delivery_orders'
+      ) AND
+      coalesce(sum, 0) < oi.qty AND
+      oe.customer_id IS NOT NULL AND
+      $oe_owner
+      (oe.quotation = 'f' OR oe.quotation IS NULL) AND NOT oe.closed
+  " ],
+  ]
+}
+
 sub init_models {
   my ($self) = @_;
 
@@ -207,11 +235,15 @@ sub init_models {
       },
       %sort_columns,
     },
-    query        => $delivery_plan_query,
+    query        => $self->delivery_plan_query,
     with_objects => [ 'order', 'order.customer', 'part' ],
   );
 }
 
+sub init_all_edit_right {
+  $::auth->assert('sales_all_edit', 1)
+}
+
 sub link_to {
   my ($self, $object, %params) = @_;
 
diff --git a/SL/Controller/DeliveryTerm.pm b/SL/Controller/DeliveryTerm.pm
new file mode 100644 (file)
index 0000000..4810d21
--- /dev/null
@@ -0,0 +1,123 @@
+package SL::Controller::DeliveryTerm;
+
+use strict;
+
+use parent qw(SL::Controller::Base);
+
+use SL::DB::DeliveryTerm;
+use SL::DB::Language;
+use SL::Helper::Flash;
+
+use Rose::Object::MakeMethods::Generic
+(
+ scalar => [ qw(delivery_term languages) ],
+);
+
+__PACKAGE__->run_before('check_auth');
+__PACKAGE__->run_before('load_delivery_term', only => [ qw(edit update destroy) ]);
+__PACKAGE__->run_before('load_languages',     only => [ qw(new list edit create update) ]);
+
+
+#
+# actions
+#
+
+sub action_list {
+  my ($self) = @_;
+
+  $self->render('delivery_term/list',
+                title          => $::locale->text('Delivery terms'),
+                DELIVERY_TERMS => SL::DB::Manager::DeliveryTerm->get_all_sorted);
+}
+
+sub action_new {
+  my ($self) = @_;
+
+  $self->{delivery_term} = SL::DB::DeliveryTerm->new;
+  $self->render('delivery_term/form', title => $::locale->text('Create a new delivery term'));
+}
+
+sub action_edit {
+  my ($self) = @_;
+  $self->render('delivery_term/form', title => $::locale->text('Edit delivery term'));
+}
+
+sub action_create {
+  my ($self) = @_;
+
+  $self->{delivery_term} = SL::DB::DeliveryTerm->new;
+  $self->create_or_update;
+}
+
+sub action_update {
+  my ($self) = @_;
+  $self->create_or_update;
+}
+
+sub action_destroy {
+  my ($self) = @_;
+
+  if (eval { $self->{delivery_term}->delete; 1; }) {
+    flash_later('info',  $::locale->text('The delivery term has been deleted.'));
+  } else {
+    flash_later('error', $::locale->text('The delivery term is in use and cannot be deleted.'));
+  }
+
+  $self->redirect_to(action => 'list');
+}
+
+sub action_reorder {
+  my ($self) = @_;
+
+  SL::DB::DeliveryTerm->reorder_list(@{ $::form->{delivery_term_id} || [] });
+
+  $self->render(\'', { type => 'json' });     # ' make Emacs happy
+}
+
+#
+# filters
+#
+
+sub check_auth {
+  $::auth->assert('config');
+}
+
+#
+# helpers
+#
+
+sub create_or_update {
+  my $self   = shift;
+  my $is_new = !$self->{delivery_term}->id;
+  my $params = delete($::form->{delivery_term}) || { };
+
+  $self->{delivery_term}->assign_attributes(%{ $params });
+
+  my @errors = $self->{delivery_term}->validate;
+
+  if (@errors) {
+    flash('error', @errors);
+    $self->render('delivery_term/form', title => $is_new ? $::locale->text('Create a new delivery term') : $::locale->text('Edit delivery term'));
+    return;
+  }
+
+  $self->{delivery_term}->save;
+  foreach my $language (@{ $self->{languages} }) {
+    $self->{delivery_term}->save_attribute_translation('description_long', $language, $::form->{"translation_" . $language->id});
+  }
+
+  flash_later('info', $is_new ? $::locale->text('The delivery term has been created.') : $::locale->text('The delivery term has been saved.'));
+  $self->redirect_to(action => 'list');
+}
+
+sub load_delivery_term {
+  my ($self) = @_;
+  $self->{delivery_term} = SL::DB::DeliveryTerm->new(id => $::form->{id})->load;
+}
+
+sub load_languages {
+  my ($self) = @_;
+  $self->{languages} = SL::DB::Manager::Language->get_all_sorted;
+}
+
+1;
diff --git a/SL/Controller/FinancialControllingReport.pm b/SL/Controller/FinancialControllingReport.pm
new file mode 100644 (file)
index 0000000..bedc762
--- /dev/null
@@ -0,0 +1,249 @@
+package SL::Controller::FinancialControllingReport;
+
+use strict;
+use parent qw(SL::Controller::Base);
+
+use List::Util qw(sum);
+
+use SL::DB::Order;
+use SL::DB::ProjectType;
+use SL::Controller::Helper::GetModels;
+use SL::Controller::Helper::ReportGenerator;
+use SL::Locale::String;
+
+use Rose::Object::MakeMethods::Generic (
+  scalar => [ qw(project_types) ],
+  'scalar --get_set_init' => [ qw(models) ],
+);
+
+__PACKAGE__->run_before(sub { $::auth->assert('sales_order_edit'); });
+
+my %sort_columns = (
+  ordnumber               => t8('Order'),
+  customer                => t8('Customer'),
+  transaction_description => t8('Transaction description'),
+  globalprojectnumber     => t8('Project'),
+  globalproject_type      => t8('Project Type'),
+  netamount               => t8('Order amount'),
+);
+
+sub action_list {
+  my ($self) = @_;
+
+  $self->project_types(SL::DB::Manager::ProjectType->get_all_sorted);
+
+  $self->make_filter_summary;
+
+  $self->prepare_report;
+
+  $self->{orders} = $self->models->get;
+
+  $self->calculate_data;
+
+  $self->list_objects;
+}
+
+# private functions
+
+sub prepare_report {
+  my ($self)      = @_;
+
+  my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
+  $self->{report} = $report;
+
+  my @columns     = qw(customer globalprojectnumber globalproject_type ordnumber netamount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
+                       billable_amount billable_amount_p other_amount);
+  my @sortable    = qw(ordnumber transdate customer netamount globalprojectnumber globalproject_type);
+  $self->{number_columns} = [ qw(netamount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
+
+  my %column_defs           = (
+    netamount               => {                                                                                         },
+    billed_amount           => { text     => $::locale->text('Billed amount')                                            },
+    billed_amount_p         => { text     => $::locale->text('%')                                                        },
+    delivered_amount        => { text     => $::locale->text('Delivered amount')                                         },
+    delivered_amount_p      => { text     => $::locale->text('%')                                                        },
+    paid_amount             => { text     => $::locale->text('Paid amount')                                              },
+    paid_amount_p           => { text     => $::locale->text('%')                                                        },
+    billable_amount         => { text     => $::locale->text('Billable amount')                                          },
+    billable_amount_p       => { text     => $::locale->text('%')                                                        },
+    other_amount            => { text     => $::locale->text('Billed extra expenses')                                    },
+    ordnumber               => { obj_link => sub { $self->link_to($_[0])                                              }  },
+    customer                => {      sub => sub { $_[0]->customer->name                                              },
+                                 obj_link => sub { $self->link_to($_[0]->customer)                                    }  },
+    globalprojectnumber     => {      sub => sub { $_[0]->globalproject_id ? $_[0]->globalproject->projectnumber : '' },
+                                 obj_link => sub { $self->link_to($_[0]->globalproject)                               }  },
+    globalproject_type      => { text     => $::locale->text('Project type'),
+                                 sub      => sub { $_[0]->globalproject_id ? $_[0]->globalproject->project_type->description : '' }  },
+  );
+
+  map { $column_defs{$_}->{text} ||= $::locale->text( $self->models->get_sort_spec->{$_}->{title} ) } keys %column_defs;
+  map { $column_defs{$_}->{align} = 'right' } @{ $self->{number_columns} };
+
+  $report->set_options(
+    std_column_visibility => 1,
+    controller_class      => 'FinancialControllingReport',
+    output_format         => 'HTML',
+    top_info_text         => $::locale->text('Financial controlling report for open sales orders'),
+    title                 => $::locale->text('Financial Controlling Report'),
+    allow_pdf_export      => 1,
+    allow_csv_export      => 1,
+  );
+  $report->set_columns(%column_defs);
+  $report->set_column_order(@columns);
+  $report->set_export_options(qw(list filter));
+  $report->set_options_from_form;
+  $self->models->disable_plugin('paginated') if $report->{options}{output_format} =~ /^(pdf|csv)$/i;
+  $self->models->finalize;
+  $self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
+  $report->set_options(
+    raw_top_info_text     => $self->render('financial_controlling_report/report_top',    { output => 0 }),
+    raw_bottom_info_text  => $self->render('financial_controlling_report/report_bottom', { output => 0 }, models => $self->models),
+  );
+}
+
+sub calculate_data {
+  my ($self) = @_;
+
+  foreach my $order (@{ $self->{orders} }) {
+    my @delivery_orders = @{ $order->linked_records(direction => 'to', to => 'DeliveryOrder', via => 'Order', query => [ '!customer_id' => undef ]) };
+    my @invoices        = @{ $order->linked_records(direction => 'to', to => 'Invoice',       via => [ 'Order', 'DeliveryOrder' ])                  };
+
+    @invoices = (
+      grep({ !$_->storno_id } @invoices),
+      map({ @{ $_->storno_invoices } } grep { $_->storno && !$_->storno_id } @invoices),
+    );
+
+    $order->{delivered_amount}  = sum map { $self->sum_relevant_items(order => $order, other => $_, by_order => 1)    } @delivery_orders;
+    $order->{billed_amount}     = sum map { $self->sum_relevant_items(order => $order, other => $_)                   } @invoices;
+    $order->{paid_amount}       = sum map { $_->paid * $_->netamount / (($_->amount * 1) || ($_->netamount * 1) || 1) } @invoices;
+    my $billed_amount           = sum map { $_->netamount                                                             } @invoices;
+    $order->{other_amount}      = $billed_amount             - $order->{billed_amount};
+    $order->{billable_amount}   = $order->{delivered_amount} - $order->{billed_amount};
+
+    foreach (qw(delivered billed paid billable)) {
+      $order->{"${_}_amount_p"} = $order->netamount * 1 ? $order->{"${_}_amount"} * 100 / $order->netamount : undef;
+    }
+  }
+}
+
+sub sum_items {
+  my ($self, %params) = @_;
+
+  my %vals;
+
+  foreach my $item (@{ $params{obj}->items }) {
+    my $key  = $item->parts_id;
+    $key    .= ':' . $item->serialnumber if $item->serialnumber;
+
+    $vals{$key}            ||= { parts_id => $item->parts_id, serialnumber => $item->serialnumber, amount => 0, base_qty => 0 };
+    $vals{$key}->{amount}   += $item->qty * $item->sellprice * (1 - $item->discount) / (($item->price_factor * 1) || 1);
+    $vals{$key}->{base_qty} += $item->qty * $item->unit_obj->base_factor;
+  }
+
+  return \%vals;
+}
+
+sub sum_relevant_items {
+  my ($self, %params) = @_;
+
+  $params{order}->{amounts_by_parts_id} ||= $self->sum_items(obj => $params{order});
+  my $sums                                = $self->sum_items(obj => $params{other});
+  my $total                               = 0;
+
+  foreach my $item (grep { $params{order}->{amounts_by_parts_id}->{ $_->{parts_id} } } values %{ $sums }) {
+    my $key = $item->{parts_id};
+
+    if ($params{by_order}) {
+      $key           .= ':' . $item->{serialnumber};
+      my $order_item  = $params{order}->{amounts_by_parts_id}->{ $key } || $params{order}->{amounts_by_parts_id}->{ $item->{parts_id} };
+
+      if ($order_item && $order_item->{base_qty}) {
+        $total += $order_item->{amount} * $item->{base_qty} / $order_item->{base_qty};
+        next;
+      }
+    }
+
+    $total += $item->{amount};
+  }
+
+  return $total;
+}
+
+sub list_objects {
+  my ($self)      = @_;
+  my $modify_data = sub {
+    my ($data) = @_;
+    map { $data->{$_}->{data} = defined $data->{$_}->{data} ? int($data->{$_}->{data}) : ''  } grep {  m/_p$/ } @{ $self->{number_columns} };
+    map { $data->{$_}->{data} = $::form->format_amount(\%::myconfig, $data->{$_}->{data}, 2) } grep { !m/_p$/ } @{ $self->{number_columns} };
+  };
+
+  return $self->report_generator_list_objects(report => $self->{report}, objects => $self->{orders}, data_callback => $modify_data);
+}
+
+sub make_filter_summary {
+  my ($self) = @_;
+
+  my $filter = $::form->{filter} || {};
+  my @filter_strings;
+
+  my @filters = (
+    [ $filter->{"ordnumber:substr::ilike"},                $::locale->text('Number')                                          ],
+    [ $filter->{"transdate:date::ge"},                     $::locale->text('Order Date') . " " . $::locale->text('From Date') ],
+    [ $filter->{"transdate:date::le"},                     $::locale->text('Order Date') . " " . $::locale->text('To Date')   ],
+    [ $filter->{customer}{"name:substr::ilike"},           $::locale->text('Customer')                                        ],
+    [ $filter->{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number')                                 ],
+  );
+
+  $self->{filter_summary} = join ', ', @filter_strings;
+}
+
+sub init_models {
+  my ($self) = @_;
+
+  SL::Controller::Helper::GetModels->new(
+    controller   => $self,
+    model        => 'Order',
+    sorted       => {
+      _default     => {
+        by           => 'globalprojectnumber',
+        dir          => 1,
+      },
+      %sort_columns,
+    },
+    query => [
+      SL::DB::Manager::Order->type_filter('sales_order'),
+      '!closed' => 1,
+      or        => [
+        globalproject_id => undef,
+        and              => [
+          'globalproject.active' => 1,
+          'globalproject.valid'  => 1,
+        ]],
+    ],
+    with_objects => [ 'customer', 'globalproject', 'globalproject.project_type' ],
+  );
+}
+
+sub link_to {
+  my ($self, $object, %params) = @_;
+
+  return unless $object;
+  my $action = $params{action} || 'edit';
+
+  if ($object->isa('SL::DB::Order')) {
+    my $type = $object->type;
+    my $id   = $object->id;
+
+    return "oe.pl?action=$action&type=$type&vc=customer&id=$id";
+  }
+  if ($object->isa('SL::DB::Customer')) {
+    my $id     = $object->id;
+    return "ct.pl?action=$action&id=$id&db=customer";
+  }
+  if ($object->isa('SL::DB::Project')) {
+    my $id     = $object->id;
+    return "controller.pl?action=Project/$action&id=$id";
+  }
+}
+
+1;
diff --git a/SL/Controller/FinancialOverview.pm b/SL/Controller/FinancialOverview.pm
new file mode 100644 (file)
index 0000000..38d2fc6
--- /dev/null
@@ -0,0 +1,165 @@
+package SL::Controller::FinancialOverview;
+
+use strict;
+use parent qw(SL::Controller::Base);
+
+use List::MoreUtils qw(none);
+
+use SL::DB::Invoice;
+use SL::DB::Order;
+use SL::DB::PurchaseInvoice;
+use SL::Controller::Helper::ReportGenerator;
+use SL::Locale::String;
+
+use Rose::Object::MakeMethods::Generic (
+  scalar => [ qw(report number_columns year current_year types objects data subtotals_per_quarter) ],
+);
+
+__PACKAGE__->run_before(sub { $::auth->assert('report'); });
+
+sub action_list {
+  my ($self) = @_;
+
+  $self->subtotals_per_quarter($::form->{subtotals_per_quarter});
+
+  $self->get_objects;
+  $self->calculate_data;
+  $self->prepare_report;
+  $self->list_data;
+}
+
+# private functions
+
+sub prepare_report {
+  my ($self)      = @_;
+
+  $self->report(SL::ReportGenerator->new(\%::myconfig, $::form));
+
+  my @columns = qw(year quarter month sales_quotations sales_orders sales_invoices requests_for_quotation purchase_orders purchase_invoices);
+
+  $self->number_columns([ grep { !m/^(?:month|year|quarter)$/ } @columns ]);
+
+  my %column_defs          = (
+    month                  => { text => t8('Month')                  },
+    year                   => { text => t8('Year')                   },
+    quarter                => { text => t8('Quarter')                },
+    sales_quotations       => { text => t8('Sales Quotations')       },
+    sales_orders           => { text => t8('Sales Orders')           },
+    sales_invoices         => { text => t8('Invoices')               },
+    requests_for_quotation => { text => t8('Requests for Quotation') },
+    purchase_orders        => { text => t8('Purchase Orders')        },
+    purchase_invoices      => { text => t8('Purchase Invoices')      },
+  );
+
+  map { $column_defs{$_}->{align} = 'right' } @columns;
+
+  $self->report->set_options(
+    std_column_visibility => 1,
+    controller_class      => 'FinancialOverview',
+    output_format         => 'HTML',
+    raw_top_info_text     => $self->render('financial_overview/report_top', { output => 0 }, YEARS_TO_LIST => [ reverse(2000..$self->current_year) ]),
+    title                 => t8('Financial overview for #1', $self->year),
+    allow_pdf_export      => 1,
+    allow_csv_export      => 1,
+  );
+  $self->report->set_columns(%column_defs);
+  $self->report->set_column_order(@columns);
+  $self->report->set_export_options(qw(list year subtotals_per_quarter));
+  $self->report->set_options_from_form;
+}
+
+sub get_objects {
+  my ($self) = @_;
+
+  $self->current_year(DateTime->today->year);
+  $self->year($::form->{year} || DateTime->today->year);
+
+  my $start       = DateTime->new(year => $self->year, month => 1, day => 1);
+  my $end         = DateTime->new(year => $self->year, month => 12, day => 31);
+
+  my @date_filter = (and => [ transdate => { ge => $start }, transdate => { le => $end } ]);
+
+  $self->objects({
+    sales_quotations       => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('sales_quotation')   ]]),
+    sales_orders           => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('sales_order')       ]]),
+    requests_for_quotation => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('request_quotation') ]]),
+    purchase_orders        => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('purchase_order')    ]]),
+    sales_invoices         => SL::DB::Manager::Invoice->get_all(        where => \@date_filter),
+    purchase_invoices      => SL::DB::Manager::PurchaseInvoice->get_all(where => \@date_filter),
+  });
+}
+
+sub calculate_data {
+  my ($self) = @_;
+
+  $self->types([ qw(sales_quotations sales_orders sales_invoices requests_for_quotation purchase_orders purchase_invoices) ]);
+
+  my %data  = (
+    year    => [ ($self->year) x 12                   ],
+    month   => [ (1..12)                              ],
+    quarter => [ (1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4) ],
+    map {
+      $_ => {
+        months   => [ (0) x 12 ],
+        quarters => [ (0) x  4 ],
+        year     => 0,
+      }
+    } @{ $self->types },
+  );
+
+  foreach my $type (keys %{ $self->objects }) {
+    foreach my $object (@{ $self->objects->{ $type } }) {
+      my $month                              = $object->transdate->month - 1;
+      my $tdata                              = $data{$type};
+
+      $tdata->{months}->[$month]            += $object->netamount;
+      $tdata->{quarters}->[int($month / 3)] += $object->netamount;
+      $tdata->{year}                        += $object->netamount;
+    }
+  }
+
+  $self->data(\%data);
+}
+
+sub list_data {
+  my ($self)           = @_;
+
+  my @visible_columns  = $self->report->get_visible_columns;
+  my @type_columns     = @{ $self->types };
+  my @non_type_columns = grep { my $c = $_; none { $c eq $_ } @type_columns } @visible_columns;
+
+  for my $month (1..12) {
+    my %data  = (
+      map({ ($_ => { data => $self->data->{$_}->[$month - 1]                                                    }) } @non_type_columns),
+      map({ ($_ => { data => $::form->format_amount(\%::myconfig, $self->data->{$_}->{months}->[$month - 1], 2) }) } @type_columns    ),
+    );
+
+    $self->report->add_data(\%data);
+
+    if ($self->subtotals_per_quarter && (($month % 3) == 0)) {
+      my %subtotal =  (
+        year       => { data => $self->year },
+        month      => { data => $::locale->text('Total') },
+        map { ($_ => { data => $::form->format_amount(\%::myconfig, $self->data->{$_}->{quarters}->[int(($month - 1) / 3)], 2) }) } @type_columns,
+      );
+
+      $subtotal{$_}->{class} = 'listsubtotal' for @visible_columns;
+
+      $self->report->add_data(\%subtotal);
+    }
+  }
+
+  my %data  =  (
+    year    => { data => $self->year },
+    quarter => { data => $::locale->text('Total') },
+    map { ($_ => { data => $::form->format_amount(\%::myconfig, $self->data->{$_}->{year}, 2) }) } @type_columns,
+  );
+
+  $data{$_}->{class} = 'listtotal' for @visible_columns;
+
+  $self->report->add_data(\%data);
+
+  return $self->report->generate_with_headers;
+}
+
+1;
index 216215e..3b03e04 100644 (file)
@@ -76,6 +76,12 @@ sub finalize {
   my %sort_params     = $self->read_params;
   my $sort_spec       = $self->specs->{ $sort_params{sort_by} };
 
+  if (!$sort_spec) {
+    no warnings 'once';
+    $::lxdebug->show_backtrace(1);
+    die "Unknown sort spec '$sort_params{sort_by}'";
+  }
+
   $params{sort_by}    = "SL::DB::Manager::$sort_spec->{model}"->make_sort_string(sort_by => $sort_spec->{model_column}, sort_dir => $sort_params{sort_dir});
 
   %params;
index afe9b7b..9b5eb51 100644 (file)
@@ -101,16 +101,31 @@ sub _parse_filter {
   my @result;
   for (my $i = 0; $i < scalar @$flattened; $i += 2) {
     my ($key, $value) = ($flattened->[$i], $flattened->[$i+1]);
+    my ($type, $op)   = $key =~ m{:(.+)::(.+)};
 
     ($key, $value) = _apply_all($key, $value, qr/\b:(\w+)/,  { %filters, %{ $params{filters} || {} } });
     ($key, $value) = _apply_all($key, $value, qr/\b::(\w+)/, { %methods, %{ $params{methods} || {} } });
     ($key, $value) = _dispatch_custom_filters($params{class}, $with_objects, $key, $value) if $params{class};
+    ($key, $value) = _apply_value_filters($key, $value, $type, $op);
 
     push @result, $key, $value if defined $key;
   }
   return \@result;
 }
 
+sub _apply_value_filters {
+  my ($key, $value, $type, $op) = @_;
+
+  return ($key, $value) unless $key && $value && $type && $op && (ref($value) eq 'HASH');
+
+  if (($type eq 'date') && ($op eq 'le')) {
+    my $date     = delete $value->{le};
+    $value->{lt} = $date->add(days => 1);
+  }
+
+  return ($key, $value);
+}
+
 sub _dispatch_custom_filters {
   my ($class, $with_objects, $key, $value) = @_;
 
index 3f406ee..0a41f0b 100644 (file)
@@ -44,28 +44,35 @@ sub action_stock_in {
 sub action_stock {
   my ($self) = @_;
 
-  # do stock
-  WH->transfer({
-    parts         => $self->part,
-    dst_bin       => $self->bin,
-    dst_wh        => $self->warehouse,
-    qty           => $::form->parse_amount(\%::myconfig, $::form->{qty}),
-    unit          => $self->unit,
-    transfer_type => 'stock',
-    chargenumber  => $::form->{chargenumber},
-    ean           => $::form->{ean},
-    comment       => $::form->{comment},
-  });
-
-  if ($::form->{write_default_bin}) {
-    $self->part->load;   # onhand is calculated in between. don't mess that up
-    $self->part->bin($self->bin);
-    $self->part->warehouse($self->warehouse);
-    $self->part->save;
+  my $qty = $::form->parse_amount(\%::myconfig, $::form->{qty});
+  if (!$qty) {
+    flash_later('error', t8('Cannot stock without amount'));
+  } elsif ($qty < 0) {
+    flash_later('error', t8('Cannot stock negative amounts'));
+  } else {
+    # do stock
+    WH->transfer({
+      parts         => $self->part,
+      dst_bin       => $self->bin,
+      dst_wh        => $self->warehouse,
+      qty           => $qty,
+      unit          => $self->unit,
+      transfer_type => 'stock',
+      chargenumber  => $::form->{chargenumber},
+      ean           => $::form->{ean},
+      comment       => $::form->{comment},
+    });
+
+    if ($::form->{write_default_bin}) {
+      $self->part->load;   # onhand is calculated in between. don't mess that up
+      $self->part->bin($self->bin);
+      $self->part->warehouse($self->warehouse);
+      $self->part->save;
+    }
+
+    flash_later('info', t8('Transfer successful'));
   }
 
-  flash_later('info', t8('Transfer successful'));
-
   # redirect
   $self->redirect_to(
     action       => 'stock_in',
index a5793b8..e47b06e 100644 (file)
@@ -16,6 +16,7 @@ use SL::DB::Invoice;
 use SL::DB::Order;
 use SL::DB::Project;
 use SL::DB::PurchaseInvoice;
+use SL::DB::ProjectType;
 use SL::Helper::Flash;
 use SL::Locale::String;
 
@@ -26,7 +27,7 @@ use Rose::Object::MakeMethods::Generic
 );
 
 __PACKAGE__->run_before('check_auth');
-__PACKAGE__->run_before('load_project', only => [ qw(edit update destroy) ]);
+__PACKAGE__->run_before('load_project',       only => [ qw(edit update destroy) ]);
 
 #
 # actions
@@ -37,7 +38,8 @@ sub action_search {
 
   my %params;
 
-  $params{CUSTOM_VARIABLES} = CVar->get_configs(module => 'Projects');
+  $params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
+  $params{CUSTOM_VARIABLES}  = CVar->get_configs(module => 'Projects');
   ($params{CUSTOM_VARIABLES_FILTER_CODE}, $params{CUSTOM_VARIABLES_INCLUSION_CODE})
     = CVar->render_search_options(variables      => $params{CUSTOM_VARIABLES},
                                   include_prefix => 'l_',
@@ -121,8 +123,16 @@ sub check_auth {
 sub display_form {
   my ($self, %params) = @_;
 
-  $params{ALL_CUSTOMERS}    = SL::DB::Manager::Customer->get_all_sorted(where => [ or => [ obsolete => 0, obsolete => undef, id => $self->project->customer_id ]]);
-  $params{CUSTOM_VARIABLES} = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id);
+  $params{ALL_CUSTOMERS}     = SL::DB::Manager::Customer->get_all_sorted(where => [ or => [ obsolete => 0, obsolete => undef, id => $self->project->customer_id ]]);
+  $params{ALL_PROJECT_TYPES} = SL::DB::Manager::ProjectType->get_all_sorted;
+  $params{CUSTOM_VARIABLES}  = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id);
+
+  if ($params{keep_cvars}) {
+    for my $cvar (@{ $params{CUSTOM_VARIABLES} }) {
+      $cvar->{value} = $::form->{"cvar_$cvar->{name}"} if $::form->{"cvar_$cvar->{name}"};
+    }
+  }
+
   CVar->render_inputs(variables => $params{CUSTOM_VARIABLES}) if @{ $params{CUSTOM_VARIABLES} };
 
   $self->render('project/form', %params);
@@ -141,7 +151,8 @@ sub create_or_update {
   if (@errors) {
     flash('error', @errors);
     $self->display_form(title    => $is_new ? $::locale->text('Create a new project') : $::locale->text('Edit project'),
-                        callback => $::form->{callback});
+                        callback => $::form->{callback},
+                        keep_cvars => 1);
     return;
   }
 
@@ -171,7 +182,7 @@ sub setup_db_args_from_filter {
   $self->{filter} = {};
   my %args = parse_filter(
     $self->_pre_parse_filter($::form->{filter}, $self->{filter}),
-    with_objects => [ 'customer' ],
+    with_objects => [ 'customer', 'project_type' ],
     launder_to   => $self->{filter},
   );
 
@@ -186,13 +197,13 @@ sub prepare_report {
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
-  my @columns     = qw(projectnumber description customer active valid type);
-  my @sortable    = qw(projectnumber description customer              type);
+  my @columns     = qw(projectnumber description customer active valid project_type);
+  my @sortable    = qw(projectnumber description customer              project_type);
 
   my %column_defs = (
     projectnumber => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
     description   => { obj_link => sub { $self->url_for(action => 'edit', id => $_[0]->id, callback => $callback) } },
-    type          => { },
+    project_type  => { sub  => sub { $_[0]->project_type->description } },
     customer      => { sub  => sub { $_[0]->customer ? $_[0]->customer->name     : '' } },
     active        => { sub  => sub { $_[0]->active   ? $::locale->text('Active') : $::locale->text('Inactive') },
                        text => $::locale->text('Active') },
@@ -235,7 +246,7 @@ sub init_models {
       customer      => t8('Customer'),
       description   => t8('Description'),
       projectnumber => t8('Project Number'),
-      type          => t8('Type'),
+      project_type  => t8('Project Type'),
     },
     with_objects => [ 'customer' ],
   );
diff --git a/SL/Controller/ProjectType.pm b/SL/Controller/ProjectType.pm
new file mode 100644 (file)
index 0000000..e986924
--- /dev/null
@@ -0,0 +1,112 @@
+package SL::Controller::ProjectType;
+
+use strict;
+
+use parent qw(SL::Controller::Base);
+
+use SL::DB::ProjectType;
+use SL::Helper::Flash;
+
+use Rose::Object::MakeMethods::Generic
+(
+ scalar => [ qw(project_type) ],
+);
+
+__PACKAGE__->run_before('check_auth');
+__PACKAGE__->run_before('load_project_type', only => [ qw(edit update destroy) ]);
+
+#
+# actions
+#
+
+sub action_list {
+  my ($self) = @_;
+
+  $self->render('project_type/list',
+                title         => $::locale->text('Project Types'),
+                PROJECT_TYPES => SL::DB::Manager::ProjectType->get_all_sorted);
+}
+
+sub action_new {
+  my ($self) = @_;
+
+  $self->{project_type} = SL::DB::ProjectType->new;
+  $self->render('project_type/form', title => $::locale->text('Create a new project type'));
+}
+
+sub action_edit {
+  my ($self) = @_;
+  $self->render('project_type/form', title => $::locale->text('Edit project type'));
+}
+
+sub action_create {
+  my ($self) = @_;
+
+  $self->{project_type} = SL::DB::ProjectType->new;
+  $self->create_or_update;
+}
+
+sub action_update {
+  my ($self) = @_;
+  $self->create_or_update;
+}
+
+sub action_destroy {
+  my ($self) = @_;
+
+  if (eval { $self->{project_type}->delete; 1; }) {
+    flash_later('info',  $::locale->text('The project type has been deleted.'));
+  } else {
+    flash_later('error', $::locale->text('The project type is in use and cannot be deleted.'));
+  }
+
+  $self->redirect_to(action => 'list');
+}
+
+sub action_reorder {
+  my ($self) = @_;
+
+  SL::DB::ProjectType->reorder_list(@{ $::form->{project_type_id} || [] });
+
+  $self->render(\'', { type => 'json' });
+}
+
+#
+# filters
+#
+
+sub check_auth {
+  $::auth->assert('config');
+}
+
+#
+# helpers
+#
+
+sub create_or_update {
+  my $self   = shift;
+  my $is_new = !$self->{project_type}->id;
+  my $params = delete($::form->{project_type}) || { };
+
+  $self->{project_type}->assign_attributes(%{ $params });
+
+  my @errors = $self->{project_type}->validate;
+
+  if (@errors) {
+    flash('error', @errors);
+    $self->render('project_type/form', title => $is_new ? $::locale->text('Create a new project type') : $::locale->text('Edit project type'));
+    return;
+  }
+
+  $self->{project_type}->save;
+
+  flash_later('info', $is_new ? $::locale->text('The project type has been created.') : $::locale->text('The project type has been saved.'));
+  $self->redirect_to(action => 'list');
+}
+
+sub load_project_type {
+  my ($self) = @_;
+  $self->{project_type} = SL::DB::ProjectType->new(id => $::form->{id})->load;
+}
+
+1;
index 0aec848..e79c080 100644 (file)
@@ -366,7 +366,7 @@ sub _get_transactions {
   my $query    =
     qq|SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey,
          ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate,
-         ct.name,
+         ct.name, ct.ustid,
          c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
          ar.invoice,
          t.rate AS taxrate
@@ -384,7 +384,7 @@ sub _get_transactions {
 
        SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey,
          ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate,
-         ct.name,
+         ct.name,ct.ustid,
          c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
          ap.invoice,
          t.rate AS taxrate
@@ -402,7 +402,7 @@ sub _get_transactions {
 
        SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey,
          gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, NULL as deliverydate,
-         gl.description AS name,
+         gl.description AS name, NULL as ustid,
          c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
          FALSE AS invoice,
          t.rate AS taxrate
@@ -810,6 +810,7 @@ sub kne_buchungsexport {
       my $datevautomatik = 0;
       my $taxkey         = 0;
       my $charttax       = 0;
+      my $ustid          ="";
       my ($haben, $soll);
       my $iconv          = $::locale->{iconv_utf8};
       my %umlaute = ($iconv->convert('ä') => 'ae',
@@ -844,7 +845,6 @@ sub kne_buchungsexport {
           $soll = $i;
         }
       }
-
       # Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern
       foreach my $umlaut (keys(%umlaute)) {
         $transaction->[$haben]->{'invnumber'} =~ s/${umlaut}/${umlaute{$umlaut}}/g;
@@ -872,6 +872,9 @@ sub kne_buchungsexport {
         if ($transaction->[$haben]->{'name'} ne "") {
           $buchungstext = "\x1E" . $transaction->[$haben]->{'name'} . "\x1C";
         }
+        if ($transaction->[$haben]->{'ustid'} ne "") {
+          $ustid = "\xBA" . $transaction->[$haben]->{'ustid'} . "\x1C";
+        }
         if ($transaction->[$haben]->{'duedate'} ne "") {
           $belegfeld2 = "\xBE" . &datetofour($transaction->[$haben]->{'duedate'}, 1) . "\x1C";
         }
@@ -903,6 +906,7 @@ sub kne_buchungsexport {
       $kne_file->add_block($datum);
       $kne_file->add_block($konto);
       $kne_file->add_block($buchungstext);
+      $kne_file->add_block($ustid);
       $kne_file->add_block($waehrung . "\x79");
     }
 
index 1045ac1..5f4d831 100644 (file)
@@ -9,7 +9,7 @@ __PACKAGE__->meta->add_relationship(
   inventory_account => {
     type          => 'many to one',
     class         => 'SL::DB::Chart',
-    column_map    => { income_accno_id_0 => 'id' },
+    column_map    => { inventory_accno_id => 'id' },
   },
   income_account_0 => {
     type         => 'many to one',
index 21dd484..1902a51 100644 (file)
@@ -54,6 +54,11 @@ sub set_defaults {
                          default_buchungsgruppe    => ($bugru ? $bugru->id : undef),
                          apply_buchungsgruppe      => 'all',
                         );
+  } elsif ($self->type eq 'orders') {
+    $self->_set_defaults(order_column    => $::locale->text('Order'),
+                         item_column     => $::locale->text('OrderItem'),
+                         max_amount_diff => 0.02,
+                        );
   } else {
     $self->_set_defaults(table => 'customer');
   }
index 144acef..6073925 100644 (file)
@@ -43,6 +43,40 @@ sub value {
   goto &text_value; # text, textfield, date and select
 }
 
+sub value_as_text {
+  my $self = $_[0];
+  my $type = $self->config->type;
+
+  die 'not an accessor' if @_ > 1;
+
+  if ($type eq 'boolean') {
+    return $self->bool_value ? $::locale->text('Yes') : $::locale->text('No');
+  } elsif ($type eq 'timestamp') {
+    return $::locale->reformat_date( { dateformat => 'yy-mm-dd' }, $self->timestamp_value->ymd, $::myconfig{dateformat});
+  } elsif ($type eq 'number') {
+    return $::form->format_amount(\%::myconfig, $self->number_value, $self->config->processed_options->{PRECISION});
+  } elsif ( $type eq 'customer' ) {
+    require SL::DB::Customer;
+
+    my $id = int($self->number_value);
+    my $customer =  $id ? SL::DB::Customer->new(id => $id)->load() : 0;
+    return $customer ? $customer->name : '';
+  } elsif ( $type eq 'vendor' ) {
+    require SL::DB::Vendor;
+
+    my $id = int($self->number_value);
+    return $id ? SL::DB::Vendor->new(id => $id)->load() : 0;
+  } elsif ( $type eq 'part' ) {
+    require SL::DB::Part;
+
+    my $id = int($self->number_value);
+    my $vendor = $id ? SL::DB::Part->new(id => $id)->load() : 0;
+    return $vendor ? $vendor->name : '';
+  }
+
+  goto &text_value; # text, textfield, date and select
+}
+
 sub is_valid {
   my ($self) = @_;
 
diff --git a/SL/DB/DeliveryTerm.pm b/SL/DB/DeliveryTerm.pm
new file mode 100644 (file)
index 0000000..a6ee350
--- /dev/null
@@ -0,0 +1,22 @@
+package SL::DB::DeliveryTerm;
+
+use strict;
+
+use SL::DB::MetaSetup::DeliveryTerm;
+use SL::DB::Manager::DeliveryTerm;
+use SL::DB::Helper::ActsAsList;
+use SL::DB::Helper::TranslatedAttributes;
+
+__PACKAGE__->meta->initialize;
+
+sub validate {
+  my ($self) = @_;
+
+  my @errors;
+  push @errors, $::locale->text('The description is missing.')      if !$self->description;
+  push @errors, $::locale->text('The long description is missing.') if !$self->description_long;
+
+  return @errors;
+}
+
+1;
index 734ebed..b7121b2 100644 (file)
@@ -7,6 +7,14 @@ use strict;
 
 use SL::DB::MetaSetup::FollowUp;
 
+__PACKAGE__->meta->add_relationships(
+  follow_up_link => {
+    type         => 'one to one',
+    class        => 'SL::DB::FollowUpLink',
+    column_map   => { id => 'follow_up_id' },
+  },
+);
+
 __PACKAGE__->meta->initialize;
 
 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
index 325a96c..498583f 100644 (file)
@@ -36,6 +36,7 @@ use SL::DB::Default;
 use SL::DB::DeliveryOrder;
 use SL::DB::DeliveryOrderItem;
 use SL::DB::DeliveryOrderItemsStock;
+use SL::DB::DeliveryTerm;
 use SL::DB::Department;
 use SL::DB::Draft;
 use SL::DB::Dunning;
@@ -69,6 +70,7 @@ use SL::DB::Pricegroup;
 use SL::DB::Price;
 use SL::DB::Printer;
 use SL::DB::Project;
+use SL::DB::ProjectType;
 use SL::DB::PurchaseInvoice;
 use SL::DB::RecordLink;
 use SL::DB::SchemaInfo;
index 15e0985..e95c01f 100644 (file)
@@ -14,7 +14,7 @@ sub filter {
 
   my $filters = _get_filters($class);
 
-  return ($key, $value) unless $filters->{$key};
+  return ($prefix . $key, $value) unless $filters->{$key};
 
   return $filters->{$key}->($key, $value, $prefix);
 }
index 9515259..105cf02 100644 (file)
@@ -17,7 +17,7 @@ sub flatten_to_form {
   _copy($self, $form, '', '', 0, qw(id type taxzone_id ordnumber quonumber invnumber donumber cusordnumber taxincluded shippingpoint shipvia notes intnotes cp_id
                                     employee_id salesman_id closed department_id language_id payment_id delivery_customer_id delivery_vendor_id shipto_id proforma
                                     globalproject_id delivered transaction_description container_type accepted_by_customer invoice terms storno storno_id dunning_config_id
-                                    orddate quodate reqdate gldate duedate deliverydate datepaid transdate));
+                                    orddate quodate reqdate gldate duedate deliverydate datepaid transdate delivery_term_id));
   $form->{currency} = $form->{curr} = $self->currency_id ? $self->currency->name || '' : '';
 
   if (_has($self, 'transdate')) {
index e8dfb56..633a067 100644 (file)
@@ -120,6 +120,7 @@ my %kivitendo_package_names = (
   delivery_orders                => 'delivery_order',
   delivery_order_items           => 'delivery_order_item',
   delivery_order_items_stock     => 'delivery_order_items_stock',
+  delivery_terms                 => 'delivery_term',
   department                     => 'department',
   drafts                         => 'draft',
   dunning                        => 'dunning',
@@ -150,6 +151,7 @@ my %kivitendo_package_names = (
   pricegroup                     => 'pricegroup',
   printers                       => 'printer',
   project                        => 'project',
+  project_types                  => 'ProjectType',
   record_links                   => 'record_link',
   sepa_export                    => 'sepa_export',
   sepa_export_items              => 'sepa_export_item',
index af56646..2478292 100644 (file)
@@ -124,6 +124,7 @@ sub _calculate_item {
   my $chart = $item->part->get_chart(type => $data->{is_sales} ? 'income' : 'expense', taxzone => $self->taxzone_id);
   $data->{amounts}->{ $chart->id }           ||= { taxkey => $taxkey->taxkey_id, tax_id => $taxkey->tax_id, amount => 0 };
   $data->{amounts}->{ $chart->id }->{amount}  += $linetotal;
+  $data->{amounts}->{ $chart->id }->{amount}  -= $tax_amount if $self->taxincluded;
 
   push @{ $data->{assembly_items} }, [];
   if ($item->part->is_assembly) {
index a6f4e2e..9684677 100644 (file)
@@ -22,18 +22,18 @@ sub parts_scoping {
   SL::DB::Manager::Part->type_filter($_[0]);
 }
 
-my %specs = ( ar                      => { number_column => 'invnumber',                                                                        fill_holes_in_range => 1 },
-              sales_quotation         => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,                          },
-              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,                          },
-              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,                          },
-              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,                          },
-              sales_delivery_order    => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping, fill_holes_in_range => 1 },
-              purchase_delivery_order => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping, fill_holes_in_range => 1 },
-              customer                => { number_column => 'customernumber', number_range_column => 'customernumber',                                                   },
-              vendor                  => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                                                     },
-              part                    => { number_column => 'partnumber',     number_range_column => 'articlenumber',  scoping => \&parts_scoping                        },
-              service                 => { number_column => 'partnumber',     number_range_column => 'servicenumber',  scoping => \&parts_scoping                        },
-              assembly                => { number_column => 'partnumber',     number_range_column => 'assemblynumber', scoping => \&parts_scoping                        },
+my %specs = ( ar                      => { number_column => 'invnumber',                                                                           },
+              sales_quotation         => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,    },
+              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,    },
+              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,    },
+              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,    },
+              sales_delivery_order    => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping,    },
+              purchase_delivery_order => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping,    },
+              customer                => { number_column => 'customernumber', number_range_column => 'customernumber',                             },
+              vendor                  => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                               },
+              part                    => { number_column => 'partnumber',     number_range_column => 'articlenumber',  scoping => \&parts_scoping, },
+              service                 => { number_column => 'partnumber',     number_range_column => 'servicenumber',  scoping => \&parts_scoping, },
+              assembly                => { number_column => 'partnumber',     number_range_column => 'assemblynumber', scoping => \&parts_scoping, },
             );
 
 sub get_next_trans_number {
@@ -46,26 +46,47 @@ sub get_next_trans_number {
   my $number              = $self->$number_column;
   my $number_range_column = $spec->{number_range_column} || $number_column;
   my $scoping_conditions  = $spec->{scoping};
-  my $fill_holes_in_range = $spec->{fill_holes_in_range};
+  my $fill_holes_in_range = !$spec->{keep_holes_in_range};
 
   return $number if $self->id && $number;
 
-  my %conditions     = $scoping_conditions ? ( query => [ $scoping_conditions->($spec_type) ] ) : ();
-  my @numbers        = map { $_->$number_column } @{ $self->_get_manager_class->get_all(%conditions) };
-  my %numbers_in_use = map { ( $_ => 1 )        } @numbers;
-
   require SL::DB::Default;
-  my $defaults       = SL::DB::Default->get;
-  $number_range_column = 'articlenumber' if $number_range_column eq 'assemblynumber' and length($defaults->$number_range_column) < 1;
-  my $sequence       = SL::PrefixedNumber->new(number => ($defaults->$number_range_column || 1));
+  require SL::DB::Business;
+
+  my %conditions            = ( query => [ $scoping_conditions ? $scoping_conditions->($spec_type) : () ] );
+  my %conditions_for_in_use = ( query => [ $scoping_conditions ? $scoping_conditions->($spec_type) : () ] );
+
+  my $business;
+  if ($spec_type =~ m{^(?:customer|vendor)$}) {
+    $business = $self->business_id ? SL::DB::Business->new(id => $self->business_id)->load : $self->business;
+    if ($business && (($business->customernumberinit // '') ne '')) {
+      $number_range_column = 'customernumberinit';
+      push @{ $conditions{query} }, ( business_id => $business->id );
+
+    } else {
+      undef $business;
+      push @{ $conditions{query} }, ( business_id => undef );
+
+    }
+  }
+
+  my %numbers_in_use = map { ( $_->$number_column => 1 ) } @{ $self->_get_manager_class->get_all(%conditions_for_in_use) };
+
+  my $range_table    = $business ? $business : SL::DB::Default->get;
+  my $start_number   = $range_table->$number_range_column;
+  $start_number      = $range_table->articlenumber if ($number_range_column eq 'assemblynumber') && (length($start_number) < 1);
+  my $sequence       = SL::PrefixedNumber->new(number => $start_number // 0);
 
-  $sequence->set_to_max(@numbers) if !$fill_holes_in_range;
+  if (!$fill_holes_in_range) {
+    my @numbers = map { $_->$number_column } @{ $self->_get_manager_class->get_all(%conditions) };
+    $sequence->set_to_max(@numbers) ;
+  }
 
   my $new_number = $sequence->get_next;
   $new_number    = $sequence->get_next while $numbers_in_use{$new_number};
 
-  $defaults->update_attributes($number_range_column => $new_number) if $params{update_defaults};
-  $self->$number_column($new_number)                                if $params{update_record};
+  $range_table->update_attributes($number_range_column => $new_number) if $params{update_defaults};
+  $self->$number_column($new_number)                                   if $params{update_record};
 
   return $new_number;
 }
@@ -118,8 +139,7 @@ prefix, if present, will be kept intact.
 Now the number itself is increased as often as neccessary to create a
 unique one by comparing the generated numbers with the existing ones
 retrieved in the first step. In this step gaps in the assigned numbers
-are filled for some tables (e.g. invoices) but not for others
-(e.g. sales orders).
+are filled for all currently supported tables.
 
 After creating the unique record number this function can update
 C<$self> and the C<defaults> table if requested. This is controlled
index 3842af6..72844b4 100644 (file)
@@ -7,6 +7,7 @@ use strict;
 
 use Carp;
 use List::Util qw(first);
+use List::MoreUtils qw(pairwise);
 
 use SL::DB::MetaSetup::Invoice;
 use SL::DB::Manager::Invoice;
@@ -15,6 +16,7 @@ use SL::DB::Helper::LinkedRecords;
 use SL::DB::Helper::PriceTaxCalculator;
 use SL::DB::Helper::PriceUpdater;
 use SL::DB::Helper::TransNumberGenerator;
+use SL::DB::CustomVariable;
 
 __PACKAGE__->meta->add_relationship(
   invoiceitems => {
@@ -117,7 +119,7 @@ sub new_from {
 
   my %args = ( map({ ( $_ => $source->$_ ) } qw(customer_id taxincluded shippingpoint shipvia notes intnotes salesman_id cusordnumber ordnumber quonumber
                                                 department_id cp_id language_id payment_id delivery_customer_id delivery_vendor_id taxzone_id shipto_id
-                                                globalproject_id transaction_description currency_id)),
+                                                globalproject_id transaction_description currency_id delivery_term_id)),
                transdate   => DateTime->today_local,
                gldate      => DateTime->today_local,
                duedate     => DateTime->today_local->add(days => $terms * 1),
@@ -147,6 +149,14 @@ sub new_from {
                             fxsellprice  => $source_item->sellprice,);
   } @{ $source->items_sorted };
 
+  my $i = 0;
+  foreach my $item (@items) {
+    my $source_cvars = $source->items_sorted->[$i]->cvars_by_config;
+    my $target_cvars = $item->cvars_by_config;
+    pairwise { $a->value($b->value) } @{ $target_cvars }, @{ $source_cvars };
+    $i++;
+  }
+
   $invoice->invoiceitems(\@items);
 
   return $invoice;
index 4f1ddd3..5d7b0d0 100644 (file)
@@ -13,7 +13,7 @@ sub object_class { 'SL::DB::BackgroundJobHistory' }
 __PACKAGE__->make_manager_methods;
 
 sub _sort_spec {
-  return ( default => [ 'run_at', 1 ],
+  return ( default => [ 'run_at', 0 ],
            columns => { SIMPLE => 'ALL' } );
 }
 
diff --git a/SL/DB/Manager/DeliveryTerm.pm b/SL/DB/Manager/DeliveryTerm.pm
new file mode 100644 (file)
index 0000000..6ac2f0a
--- /dev/null
@@ -0,0 +1,21 @@
+package SL::DB::Manager::DeliveryTerm;
+
+use strict;
+
+use SL::DB::Helper::Manager;
+use base qw(SL::DB::Helper::Manager);
+
+use SL::DB::Helper::Sorted;
+
+sub object_class { 'SL::DB::DeliveryTerm' }
+
+__PACKAGE__->make_manager_methods;
+
+sub _sort_spec {
+  return ( default => [ 'sortkey', 1 ],
+           columns => { SIMPLE => 'ALL',
+                        map { ( $_ => "lower(delivery_terms.${_})" ) } qw(description description_long),
+                      });
+}
+
+1;
index b4ebf14..8acd7da 100644 (file)
@@ -26,7 +26,6 @@ sub update_entries_for_authorized_users {
 
     $employee->update_attributes(
       name      => $user_config->{name},
-      workphone => $user_config->{tel},
       deleted   => 0,
     );
   }
index 69aa266..e03386d 100644 (file)
@@ -38,6 +38,13 @@ sub _sort_spec {
       customer                => 'customer.name',
       vendor                  => 'vendor.name',
       globalprojectnumber     => 'lower(globalproject.projectnumber)',
+
+      # Bug in Rose::DB::Object: the next should be
+      # "globalproject.project_type.description". This workaround will
+      # only work if no other table with "project_type" is visible in
+      # the current query
+      globalproject_type      => 'lower(project_type.description)',
+
       map { ( $_ => "lower(oe.$_)" ) } qw(ordnumber quonumber cusordnumber shippingpoint shipvia notes intnotes transaction_description),
     });
 }
index 6c5563f..f6ff127 100644 (file)
@@ -43,10 +43,11 @@ our @tables_with_project_id_cols = qw(acc_trans ap ar delivery_order_items deliv
 
 sub _sort_spec {
   return (
-    default    => [ 'projectnumber', 1 ],
-    columns    => {
-      SIMPLE   => 'ALL',
-      customer => 'customer.name',
+    default        => [ 'projectnumber', 1 ],
+    columns        => {
+      SIMPLE       => 'ALL',
+      customer     => 'customer.name',
+      project_type => 'project_type.description',
     });
 }
 
diff --git a/SL/DB/Manager/ProjectType.pm b/SL/DB/Manager/ProjectType.pm
new file mode 100644 (file)
index 0000000..3fa990f
--- /dev/null
@@ -0,0 +1,51 @@
+package SL::DB::Manager::ProjectType;
+
+use strict;
+
+use parent qw(SL::DB::Helper::Manager);
+
+use SL::DB::Helper::Paginated;
+use SL::DB::Helper::Sorted;
+
+sub object_class { 'SL::DB::ProjectType' }
+
+__PACKAGE__->make_manager_methods;
+
+sub _sort_spec {
+  return (
+    default       => [ 'position', 1 ],
+    columns       => {
+      SIMPLE      => 'ALL',
+      description => 'lower(project_types.description)',
+    });
+}
+
+1;
+__END__
+
+=pod
+
+=encoding utf8
+
+=head1 NAME
+
+SL::DB::Manager::ProjectType - Manager for models for the 'project_types' table
+
+=head1 SYNOPSIS
+
+This is a standard Rose::DB::Manager based model manager and can be
+used as such.
+
+=head1 FUNCTIONS
+
+None yet.
+
+=head1 BUGS
+
+Nothing here yet.
+
+=head1 AUTHOR
+
+Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
+
+=cut
index 9b2fc39..3a8433c 100644 (file)
@@ -11,6 +11,7 @@ __PACKAGE__->meta->table('csv_import_reports');
 __PACKAGE__->meta->columns(
   file       => { type => 'text', not_null => 1 },
   id         => { type => 'serial', not_null => 1 },
+  numheaders => { type => 'integer', not_null => 1 },
   numrows    => { type => 'integer', not_null => 1 },
   profile_id => { type => 'integer', not_null => 1 },
   session_id => { type => 'text', not_null => 1 },
index 1752d2a..0f523a4 100644 (file)
@@ -9,51 +9,55 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('customer');
 
 __PACKAGE__->meta->columns(
-  account_number      => { type => 'text' },
-  bank                => { type => 'text' },
-  bank_code           => { type => 'text' },
-  bcc                 => { type => 'text' },
-  bic                 => { type => 'varchar', length => 100 },
-  business_id         => { type => 'integer' },
-  c_vendor_id         => { type => 'text' },
-  cc                  => { type => 'text' },
-  city                => { type => 'varchar', length => 75 },
-  contact             => { type => 'text' },
-  country             => { type => 'varchar', length => 75 },
-  creditlimit         => { type => 'numeric', default => '0', precision => 5, scale => 15 },
-  currency_id         => { type => 'integer', not_null => 1 },
-  customernumber      => { type => 'text' },
-  department_1        => { type => 'varchar', length => 75 },
-  department_2        => { type => 'varchar', length => 75 },
-  direct_debit        => { type => 'boolean', default => 'false' },
-  discount            => { type => 'float', precision => 4 },
-  email               => { type => 'text' },
-  fax                 => { type => 'varchar', length => 30 },
-  greeting            => { type => 'text' },
-  homepage            => { type => 'text' },
-  iban                => { type => 'varchar', length => 100 },
-  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
-  itime               => { type => 'timestamp', default => 'now()' },
-  klass               => { type => 'integer', default => '0' },
-  language            => { type => 'varchar', length => 5 },
-  language_id         => { type => 'integer' },
-  mtime               => { type => 'timestamp' },
-  name                => { type => 'text', not_null => 1 },
-  notes               => { type => 'text' },
-  obsolete            => { type => 'boolean', default => 'false' },
-  payment_id          => { type => 'integer' },
-  phone               => { type => 'text' },
-  salesman_id         => { type => 'integer' },
-  street              => { type => 'varchar', length => 75 },
-  taxincluded         => { type => 'boolean' },
-  taxincluded_checked => { type => 'boolean' },
-  taxnumber           => { type => 'text' },
-  taxzone_id          => { type => 'integer', default => '0', not_null => 1 },
-  terms               => { type => 'integer', default => '0' },
-  user_password       => { type => 'text' },
-  username            => { type => 'varchar', length => 50 },
-  ustid               => { type => 'text' },
-  zipcode             => { type => 'varchar', length => 10 },
+  account_number            => { type => 'text' },
+  bank                      => { type => 'text' },
+  bank_code                 => { type => 'text' },
+  bcc                       => { type => 'text' },
+  bic                       => { type => 'varchar', length => 100 },
+  business_id               => { type => 'integer' },
+  c_vendor_id               => { type => 'text' },
+  cc                        => { type => 'text' },
+  city                      => { type => 'varchar', length => 75 },
+  contact                   => { type => 'text' },
+  country                   => { type => 'varchar', length => 75 },
+  creditlimit               => { type => 'numeric', default => '0', precision => 5, scale => 15 },
+  currency_id               => { type => 'integer', not_null => 1 },
+  customernumber            => { type => 'text' },
+  delivery_term_id          => { type => 'integer' },
+  department_1              => { type => 'varchar', length => 75 },
+  department_2              => { type => 'varchar', length => 75 },
+  depositor                 => { type => 'text' },
+  direct_debit              => { type => 'boolean', default => 'false' },
+  discount                  => { type => 'float', precision => 4 },
+  email                     => { type => 'text' },
+  fax                       => { type => 'varchar', length => 30 },
+  greeting                  => { type => 'text' },
+  homepage                  => { type => 'text' },
+  iban                      => { type => 'varchar', length => 100 },
+  id                        => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime                     => { type => 'timestamp', default => 'now()' },
+  klass                     => { type => 'integer', default => '0' },
+  language                  => { type => 'varchar', length => 5 },
+  language_id               => { type => 'integer' },
+  mandate_date_of_signature => { type => 'date' },
+  mandator_id               => { type => 'text' },
+  mtime                     => { type => 'timestamp' },
+  name                      => { type => 'text', not_null => 1 },
+  notes                     => { type => 'text' },
+  obsolete                  => { type => 'boolean', default => 'false' },
+  payment_id                => { type => 'integer' },
+  phone                     => { type => 'text' },
+  salesman_id               => { type => 'integer' },
+  street                    => { type => 'varchar', length => 75 },
+  taxincluded               => { type => 'boolean' },
+  taxincluded_checked       => { type => 'boolean' },
+  taxnumber                 => { type => 'text' },
+  taxzone_id                => { type => 'integer', default => '0', not_null => 1 },
+  terms                     => { type => 'integer', default => '0' },
+  user_password             => { type => 'text' },
+  username                  => { type => 'varchar', length => 50 },
+  ustid                     => { type => 'text' },
+  zipcode                   => { type => 'varchar', length => 10 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -71,6 +75,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { currency_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   language_obj => {
     class       => 'SL::DB::Language',
     key_columns => { language_id => 'id' },
index f6e5ffc..4855128 100644 (file)
@@ -55,6 +55,8 @@ __PACKAGE__->meta->columns(
   language_id                             => { type => 'integer' },
   max_future_booking_interval             => { type => 'integer', default => 360 },
   mtime                                   => { type => 'timestamp' },
+  normalize_part_descriptions             => { type => 'boolean', default => 'true' },
+  normalize_vc_names                      => { type => 'boolean', default => 'true' },
   parts_image_css                         => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
   parts_listing_image                     => { type => 'boolean', default => 'true' },
   parts_show_image                        => { type => 'boolean', default => 'true' },
index 92d45ae..a1efe9a 100644 (file)
@@ -15,6 +15,7 @@ __PACKAGE__->meta->columns(
   cusordnumber            => { type => 'text' },
   customer_id             => { type => 'integer' },
   delivered               => { type => 'boolean', default => 'false' },
+  delivery_term_id        => { type => 'integer' },
   department_id           => { type => 'integer' },
   donumber                => { type => 'text', not_null => 1 },
   employee_id             => { type => 'integer' },
@@ -61,6 +62,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { customer_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   department => {
     class       => 'SL::DB::Department',
     key_columns => { department_id => 'id' },
diff --git a/SL/DB/MetaSetup/DeliveryTerm.pm b/SL/DB/MetaSetup/DeliveryTerm.pm
new file mode 100644 (file)
index 0000000..672aba1
--- /dev/null
@@ -0,0 +1,25 @@
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::DeliveryTerm;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->table('delivery_terms');
+
+__PACKAGE__->meta->columns(
+  description      => { type => 'text' },
+  description_long => { type => 'text' },
+  id               => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime            => { type => 'timestamp', default => 'now()' },
+  mtime            => { type => 'timestamp' },
+  sortkey          => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+1;
+;
index b79d078..6cdc930 100644 (file)
@@ -9,22 +9,19 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('employee');
 
 __PACKAGE__->meta->columns(
-  addr1     => { type => 'text' },
-  addr2     => { type => 'text' },
-  addr3     => { type => 'text' },
-  addr4     => { type => 'text' },
-  deleted   => { type => 'boolean', default => 'false' },
-  enddate   => { type => 'date' },
-  homephone => { type => 'text' },
-  id        => { type => 'integer', not_null => 1, sequence => 'id' },
-  itime     => { type => 'timestamp', default => 'now()' },
-  login     => { type => 'text' },
-  mtime     => { type => 'timestamp' },
-  name      => { type => 'text' },
-  notes     => { type => 'text' },
-  sales     => { type => 'boolean', default => 'true' },
-  startdate => { type => 'date', default => 'now' },
-  workphone => { type => 'text' },
+  deleted           => { type => 'boolean', default => 'false' },
+  deleted_email     => { type => 'text' },
+  deleted_fax       => { type => 'text' },
+  deleted_signature => { type => 'text' },
+  deleted_tel       => { type => 'text' },
+  enddate           => { type => 'date' },
+  id                => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime             => { type => 'timestamp', default => 'now()' },
+  login             => { type => 'text' },
+  mtime             => { type => 'timestamp' },
+  name              => { type => 'text' },
+  sales             => { type => 'boolean', default => 'true' },
+  startdate         => { type => 'date', default => 'now' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
index fc46151..bda14ec 100644 (file)
@@ -24,14 +24,14 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 __PACKAGE__->meta->allow_inline_column_values(1);
 
 __PACKAGE__->meta->foreign_keys(
-  employee => {
+  created_for => {
     class       => 'SL::DB::Employee',
-    key_columns => { created_by => 'id' },
+    key_columns => { created_for_user => 'id' },
   },
 
-  employee_obj => {
+  employee => {
     class       => 'SL::DB::Employee',
-    key_columns => { created_for_user => 'id' },
+    key_columns => { created_by => 'id' },
   },
 
   note => {
index 33f7121..14f386a 100644 (file)
@@ -37,6 +37,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { department_id => 'id' },
   },
 
+  employee => {
+    class       => 'SL::DB::Employee',
+    key_columns => { employee_id => 'id' },
+  },
+
   storno_obj => {
     class       => 'SL::DB::GLTransaction',
     key_columns => { storno_id => 'id' },
index eedecb4..1a8d1f0 100644 (file)
@@ -16,6 +16,7 @@ __PACKAGE__->meta->columns(
   customer_id               => { type => 'integer' },
   datepaid                  => { type => 'date' },
   delivery_customer_id      => { type => 'integer' },
+  delivery_term_id          => { type => 'integer' },
   delivery_vendor_id        => { type => 'integer' },
   deliverydate              => { type => 'date' },
   department_id             => { type => 'integer' },
@@ -78,6 +79,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { customer_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   department => {
     class       => 'SL::DB::Department',
     key_columns => { department_id => 'id' },
index 249ea62..3e4a310 100644 (file)
@@ -17,6 +17,7 @@ __PACKAGE__->meta->columns(
   customer_id             => { type => 'integer' },
   delivered               => { type => 'boolean', default => 'false' },
   delivery_customer_id    => { type => 'integer' },
+  delivery_term_id        => { type => 'integer' },
   delivery_vendor_id      => { type => 'integer' },
   department_id           => { type => 'integer' },
   employee_id             => { type => 'integer' },
@@ -72,6 +73,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { delivery_customer_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   delivery_vendor => {
     class       => 'SL::DB::Vendor',
     key_columns => { delivery_vendor_id => 'id' },
index 4805568..5131535 100644 (file)
@@ -9,15 +9,15 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('project');
 
 __PACKAGE__->meta->columns(
-  active        => { type => 'boolean', default => 'true' },
-  customer_id   => { type => 'integer' },
-  description   => { type => 'text' },
-  id            => { type => 'integer', not_null => 1, sequence => 'id' },
-  itime         => { type => 'timestamp', default => 'now()' },
-  mtime         => { type => 'timestamp' },
-  projectnumber => { type => 'text' },
-  type          => { type => 'text' },
-  valid         => { type => 'boolean', default => 'true' },
+  active          => { type => 'boolean', default => 'true' },
+  customer_id     => { type => 'integer' },
+  description     => { type => 'text' },
+  id              => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime           => { type => 'timestamp', default => 'now()' },
+  mtime           => { type => 'timestamp' },
+  project_type_id => { type => 'integer', not_null => 1 },
+  projectnumber   => { type => 'text' },
+  valid           => { type => 'boolean', default => 'true' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -31,6 +31,11 @@ __PACKAGE__->meta->foreign_keys(
     class       => 'SL::DB::Customer',
     key_columns => { customer_id => 'id' },
   },
+
+  project_type => {
+    class       => 'SL::DB::ProjectType',
+    key_columns => { project_type_id => 'id' },
+  },
 );
 
 1;
diff --git a/SL/DB/MetaSetup/ProjectType.pm b/SL/DB/MetaSetup/ProjectType.pm
new file mode 100644 (file)
index 0000000..3d452cc
--- /dev/null
@@ -0,0 +1,20 @@
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::ProjectType;
+
+use strict;
+
+use base qw(SL::DB::Object);
+
+__PACKAGE__->meta->table('project_types');
+
+__PACKAGE__->meta->columns(
+  description => { type => 'text' },
+  id          => { type => 'serial', not_null => 1 },
+  position    => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+1;
+;
index 4b89dca..5aa2785 100644 (file)
@@ -13,6 +13,7 @@ __PACKAGE__->meta->columns(
   cp_id                   => { type => 'integer' },
   currency_id             => { type => 'integer', not_null => 1 },
   datepaid                => { type => 'date' },
+  delivery_term_id        => { type => 'integer' },
   deliverydate            => { type => 'date' },
   department_id           => { type => 'integer' },
   direct_debit            => { type => 'boolean', default => 'false' },
@@ -61,6 +62,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { currency_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   department => {
     class       => 'SL::DB::Department',
     key_columns => { department_id => 'id' },
index 08dd06e..f2b325d 100644 (file)
@@ -9,21 +9,25 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('sepa_export_items');
 
 __PACKAGE__->meta->columns(
-  amount                   => { type => 'numeric', precision => 5, scale => 25 },
-  ap_id                    => { type => 'integer' },
-  ar_id                    => { type => 'integer' },
-  chart_id                 => { type => 'integer', not_null => 1 },
-  end_to_end_id            => { type => 'varchar', length => 35 },
-  executed                 => { type => 'boolean', default => 'false' },
-  execution_date           => { type => 'date' },
-  id                       => { type => 'integer', not_null => 1, sequence => 'id' },
-  our_bic                  => { type => 'varchar', length => 100 },
-  our_iban                 => { type => 'varchar', length => 100 },
-  reference                => { type => 'varchar', length => 35 },
-  requested_execution_date => { type => 'date' },
-  sepa_export_id           => { type => 'integer', not_null => 1 },
-  vc_bic                   => { type => 'varchar', length => 100 },
-  vc_iban                  => { type => 'varchar', length => 100 },
+  amount                       => { type => 'numeric', precision => 5, scale => 25 },
+  ap_id                        => { type => 'integer' },
+  ar_id                        => { type => 'integer' },
+  chart_id                     => { type => 'integer', not_null => 1 },
+  end_to_end_id                => { type => 'varchar', length => 35 },
+  executed                     => { type => 'boolean', default => 'false' },
+  execution_date               => { type => 'date' },
+  id                           => { type => 'integer', not_null => 1, sequence => 'id' },
+  our_bic                      => { type => 'varchar', length => 100 },
+  our_depositor                => { type => 'text' },
+  our_iban                     => { type => 'varchar', length => 100 },
+  reference                    => { type => 'varchar', length => 35 },
+  requested_execution_date     => { type => 'date' },
+  sepa_export_id               => { type => 'integer', not_null => 1 },
+  vc_bic                       => { type => 'varchar', length => 100 },
+  vc_depositor                 => { type => 'text' },
+  vc_iban                      => { type => 'varchar', length => 100 },
+  vc_mandate_date_of_signature => { type => 'date' },
+  vc_mandator_id               => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
index 1a691ff..0493aa3 100644 (file)
@@ -9,49 +9,51 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('vendor');
 
 __PACKAGE__->meta->columns(
-  account_number => { type => 'varchar', length => 15 },
-  bank           => { type => 'text' },
-  bank_code      => { type => 'varchar', length => 10 },
-  bcc            => { type => 'text' },
-  bic            => { type => 'varchar', length => 100 },
-  business_id    => { type => 'integer' },
-  cc             => { type => 'text' },
-  city           => { type => 'varchar', length => 75 },
-  contact        => { type => 'varchar', length => 75 },
-  country        => { type => 'varchar', length => 75 },
-  creditlimit    => { type => 'numeric', precision => 5, scale => 15 },
-  currency_id    => { type => 'integer', not_null => 1 },
-  department_1   => { type => 'varchar', length => 75 },
-  department_2   => { type => 'varchar', length => 75 },
-  direct_debit   => { type => 'boolean', default => 'false' },
-  discount       => { type => 'float', precision => 4 },
-  email          => { type => 'text' },
-  fax            => { type => 'varchar', length => 30 },
-  greeting       => { type => 'text' },
-  homepage       => { type => 'text' },
-  iban           => { type => 'varchar', length => 100 },
-  id             => { type => 'integer', not_null => 1, sequence => 'id' },
-  itime          => { type => 'timestamp', default => 'now()' },
-  language       => { type => 'varchar', length => 5 },
-  language_id    => { type => 'integer' },
-  mtime          => { type => 'timestamp' },
-  name           => { type => 'varchar', length => 75, not_null => 1 },
-  notes          => { type => 'text' },
-  obsolete       => { type => 'boolean', default => 'false' },
-  payment_id     => { type => 'integer' },
-  phone          => { type => 'text' },
-  salesman_id    => { type => 'integer' },
-  street         => { type => 'varchar', length => 75 },
-  taxincluded    => { type => 'boolean' },
-  taxnumber      => { type => 'text' },
-  taxzone_id     => { type => 'integer', default => '0', not_null => 1 },
-  terms          => { type => 'integer', default => '0' },
-  user_password  => { type => 'varchar', length => 12 },
-  username       => { type => 'varchar', length => 50 },
-  ustid          => { type => 'varchar', length => 14 },
-  v_customer_id  => { type => 'text' },
-  vendornumber   => { type => 'text' },
-  zipcode        => { type => 'varchar', length => 10 },
+  account_number   => { type => 'varchar', length => 15 },
+  bank             => { type => 'text' },
+  bank_code        => { type => 'varchar', length => 10 },
+  bcc              => { type => 'text' },
+  bic              => { type => 'varchar', length => 100 },
+  business_id      => { type => 'integer' },
+  cc               => { type => 'text' },
+  city             => { type => 'varchar', length => 75 },
+  contact          => { type => 'varchar', length => 75 },
+  country          => { type => 'varchar', length => 75 },
+  creditlimit      => { type => 'numeric', precision => 5, scale => 15 },
+  currency_id      => { type => 'integer', not_null => 1 },
+  delivery_term_id => { type => 'integer' },
+  department_1     => { type => 'varchar', length => 75 },
+  department_2     => { type => 'varchar', length => 75 },
+  depositor        => { type => 'text' },
+  direct_debit     => { type => 'boolean', default => 'false' },
+  discount         => { type => 'float', precision => 4 },
+  email            => { type => 'text' },
+  fax              => { type => 'varchar', length => 30 },
+  greeting         => { type => 'text' },
+  homepage         => { type => 'text' },
+  iban             => { type => 'varchar', length => 100 },
+  id               => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime            => { type => 'timestamp', default => 'now()' },
+  language         => { type => 'varchar', length => 5 },
+  language_id      => { type => 'integer' },
+  mtime            => { type => 'timestamp' },
+  name             => { type => 'varchar', length => 75, not_null => 1 },
+  notes            => { type => 'text' },
+  obsolete         => { type => 'boolean', default => 'false' },
+  payment_id       => { type => 'integer' },
+  phone            => { type => 'text' },
+  salesman_id      => { type => 'integer' },
+  street           => { type => 'varchar', length => 75 },
+  taxincluded      => { type => 'boolean' },
+  taxnumber        => { type => 'text' },
+  taxzone_id       => { type => 'integer', default => '0', not_null => 1 },
+  terms            => { type => 'integer', default => '0' },
+  user_password    => { type => 'varchar', length => 12 },
+  username         => { type => 'varchar', length => 50 },
+  ustid            => { type => 'varchar', length => 14 },
+  v_customer_id    => { type => 'text' },
+  vendornumber     => { type => 'text' },
+  zipcode          => { type => 'varchar', length => 10 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -69,6 +71,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { currency_id => 'id' },
   },
 
+  delivery_term => {
+    class       => 'SL::DB::DeliveryTerm',
+    key_columns => { delivery_term_id => 'id' },
+  },
+
   language_obj => {
     class       => 'SL::DB::Language',
     key_columns => { language_id => 'id' },
index 441a273..c539d6a 100644 (file)
@@ -7,17 +7,19 @@ use strict;
 
 use SL::DB::MetaSetup::Note;
 
-__PACKAGE__->meta->initialize;
-
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
 
 __PACKAGE__->meta->add_relationships(
-  followup => {
+  follow_up => {
     type         => 'one to one',
     class        => 'SL::DB::FollowUp',
-    column_map   => { id => 'id' },
+    column_map   => { id => 'note_id' },
   },
 );
 
+__PACKAGE__->meta->initialize;
+
+# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
+__PACKAGE__->meta->make_manager_class;
+
+
 1;
index ba6f12f..73390d8 100644 (file)
@@ -8,7 +8,7 @@ use SL::DB::MetaSetup::Project;
 use SL::DB::Manager::Project;
 
 use SL::DB::Helper::CustomVariables(
-  module      => 'Project',
+  module      => 'Projects',
   cvars_alias => 1,
 );
 
diff --git a/SL/DB/ProjectType.pm b/SL/DB/ProjectType.pm
new file mode 100644 (file)
index 0000000..6fec148
--- /dev/null
@@ -0,0 +1,29 @@
+package SL::DB::ProjectType;
+
+use strict;
+
+use SL::DB::MetaSetup::ProjectType;
+use SL::DB::Manager::ProjectType;
+
+use SL::DB::Helper::ActsAsList;
+
+__PACKAGE__->meta->add_relationship(
+  projects => {
+    type         => 'many to one',
+    class        => 'SL::DB::Project',
+    column_map   => { id => 'project_type_id' },
+  },
+);
+
+__PACKAGE__->meta->initialize;
+
+sub validate {
+  my ($self) = @_;
+
+  my @errors;
+  push @errors, $::locale->text('The description is missing.') if !$self->description;
+
+  return @errors;
+}
+
+1;
index 8795a1b..1b174c0 100644 (file)
@@ -3,6 +3,7 @@ package SL::DB::Shipto;
 use strict;
 
 use SL::DB::MetaSetup::Shipto;
+use Rose::DB::Object::Helpers qw(clone_and_reset clone);
 
 our @SHIPTO_VARIABLES = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
                            shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2);
index b64e48c..38174f9 100644 (file)
--- a/SL/DN.pm
+++ b/SL/DN.pm
@@ -44,6 +44,7 @@ use SL::MoreCommon;
 use SL::Template;
 use SL::DB::Printer;
 use SL::DB::Language;
+use SL::TransNumber;
 
 use strict;
 
@@ -205,6 +206,7 @@ sub create_invoice_for_fees {
 
   my ($ar_id) = selectrow_query($form, $dbh, qq|SELECT nextval('glid')|);
   my $curr = $form->get_default_currency($myconfig);
+  my $trans_number = SL::TransNumber->new(type => 'invoice', dbh => $dbh);
 
   $query =
     qq|INSERT INTO ar (id,          invnumber, transdate, gldate, customer_id,
@@ -235,7 +237,7 @@ sub create_invoice_for_fees {
          (SELECT id FROM employee WHERE login = ?)
        )|;
   @values = ($ar_id,            # id
-             $form->update_defaults($myconfig, 'invnumber', $dbh), # invnumber
+             $trans_number->create_unique, # invnumber
              $dunning_id,       # customer_id
              $amount,
              $amount,
@@ -246,19 +248,21 @@ sub create_invoice_for_fees {
   do_query($form, $dbh, $query, @values);
 
   $query =
-    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey)
-       VALUES (?, ?, ?, current_date, current_date, 0)|;
+    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, taxkey, tax_id, chart_link)
+       VALUES (?, ?, ?, current_date, current_date, 0,
+               (SELECT id   FROM tax   WHERE (taxkey = 0) AND (rate = 0)),
+               (SELECT link FROM chart WHERE id = ?))|;
   $sth = prepare_query($form, $dbh, $query);
 
-  @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining);
+  @values = ($ar_id, conv_i($form->{AR_amount_fee}), $fee_remaining, conv_i($form->{AR_amount_fee}));
   do_statement($form, $sth, $query, @values);
 
   if ($interest_remaining) {
-    @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining);
+    @values = ($ar_id, conv_i($form->{AR_amount_interest}), $interest_remaining, conv_i($form->{AR_amount_interest}));
     do_statement($form, $sth, $query, @values);
   }
 
-  @values = ($ar_id, conv_i($form->{AR}), -1 * $amount);
+  @values = ($ar_id, conv_i($form->{AR}), -1 * $amount, conv_i($form->{AR}));
   do_statement($form, $sth, $query, @values);
 
   $sth->finish();
@@ -327,12 +331,13 @@ sub save_dunning {
 
   $form->{DUNNING_PDFS_EMAIL} = [];
 
+  $form->{dunning_id} = $dunning_id;
+
   $self->create_invoice_for_fees($myconfig, $form, $dbh, $dunning_id);
 
   $self->print_invoice_for_fees($myconfig, $form, $dunning_id, $dbh);
   $self->print_dunning($myconfig, $form, $dunning_id, $dbh);
 
-  $form->{dunning_id} = $dunning_id;
 
   if ($send_email) {
     $self->send_email($myconfig, $form, $dunning_id, $dbh);
@@ -751,6 +756,16 @@ sub print_dunning {
 
   $dunning_id =~ s|[^\d]||g;
 
+  my ($language_tc, $output_numberformat, $output_dateformat, $output_longdates);
+  if ($form->{"language_id"}) {
+    ($language_tc, $output_numberformat, $output_dateformat, $output_longdates) =
+      AM->get_language_details($myconfig, $form, $form->{language_id});
+  } else {
+    $output_dateformat = $myconfig->{dateformat};
+    $output_numberformat = $myconfig->{numberformat};
+    $output_longdates = 1;
+  }
+
   my $query =
     qq|SELECT
          da.fee, da.interest,
@@ -837,6 +852,17 @@ sub print_dunning {
   $form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2);
   $form->{total_amount}      = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2);
 
+  $::form->format_dates($output_dateformat, $output_longdates,
+    qw(dn_dunning_date dn_dunning_duedate dn_transdate dn_duedate
+          dunning_date    dunning_duedate    transdate    duedate)
+  );
+  $::form->reformat_numbers($output_numberformat, 2, qw(
+    dn_amount dn_netamount dn_paid dn_open_amount dn_fee dn_interest dn_linetotal
+       amount    netamount    paid    open_amount    fee    interest    linetotal
+    total_interest total_open_interest total_amount total_open_amount
+  ));
+  $::form->reformat_numbers($output_numberformat, undef, qw(interest_rate));
+
   $self->set_customer_cvars($myconfig, $form);
   $self->set_template_options($myconfig, $form);
 
index 7d3a5e6..31b01c4 100644 (file)
--- a/SL/DO.pm
+++ b/SL/DO.pm
@@ -44,6 +44,7 @@ use SL::DB::Status;
 use SL::DBUtils;
 use SL::RecordLinks;
 use SL::IC;
+use SL::TransNumber;
 
 use strict;
 
@@ -63,7 +64,7 @@ sub transactions {
   my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
 
   my $query =
-    qq|SELECT dord.id, dord.donumber, dord.ordnumber,
+    qq|SELECT dord.id, dord.donumber, dord.ordnumber, dord.cusordnumber,
          dord.transdate, dord.reqdate,
          ct.${vc}number, ct.name, dord.${vc}_id, dord.globalproject_id,
          dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
@@ -145,6 +146,16 @@ sub transactions {
     push @values, conv_date($form->{transdateto});
   }
 
+  if($form->{reqdatefrom}) {
+    push @where,  qq|dord.reqdate >= ?|;
+    push @values, conv_date($form->{reqdatefrom});
+  }
+
+  if($form->{reqdateto}) {
+    push @where,  qq|dord.reqdate <= ?|;
+    push @values, conv_date($form->{reqdateto});
+  }
+
   if (@where) {
     $query .= " WHERE " . join(" AND ", map { "($_)" } @where);
   }
@@ -214,7 +225,8 @@ sub save {
   my $ic_cvar_configs = CVar->get_configs(module => 'IC',
                                           dbh    => $dbh);
 
-  $form->{donumber}    = $form->update_defaults($myconfig, $form->{type} eq 'sales_delivery_order' ? 'sdonumber' : 'pdonumber', $dbh) unless $form->{donumber};
+  my $trans_number     = SL::TransNumber->new(type => $form->{type}, dbh => $dbh, number => $form->{donumber}, id => $form->{id});
+  $form->{donumber}  ||= $trans_number->create_unique;
   $form->{employee_id} = (split /--/, $form->{employee})[1] if !$form->{employee_id};
   $form->get_employee($dbh) unless ($form->{employee_id});
 
@@ -357,7 +369,8 @@ sub save {
          shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
          delivered = ?, department_id = ?, language_id = ?, shipto_id = ?,
          globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
-         is_sales = ?, taxzone_id = ?, taxincluded = ?, terms = ?, currency_id = (SELECT id FROM currencies WHERE name = ?)
+         is_sales = ?, taxzone_id = ?, taxincluded = ?, terms = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
+         delivery_term_id = ?
        WHERE id = ?|;
 
   @values = ($form->{donumber}, $form->{ordnumber},
@@ -372,6 +385,7 @@ sub save {
              $form->{transaction_description},
              $form->{type} =~ /^sales/ ? 't' : 'f',
              conv_i($form->{taxzone_id}), $form->{taxincluded} ? 't' : 'f', conv_i($form->{terms}), $form->{currency},
+             conv_i($form->{delivery_term_id}),
              conv_i($form->{id}));
   do_query($form, $dbh, $query, @values);
 
@@ -403,7 +417,9 @@ sub save {
   my $rc = $dbh->commit();
 
   $form->{saved_donumber} = $form->{donumber};
-
+  $form->{saved_ordnumber} = $form->{ordnumber};
+  $form->{saved_cusordnumber} = $form->{cusordnumber};
+  
   Common::webdav_folder($form);
 
   $main::lxdebug->leave_sub();
@@ -582,7 +598,8 @@ sub retrieve {
          d.description AS department, dord.language_id,
          dord.shipto_id,
          dord.globalproject_id, dord.delivered, dord.transaction_description,
-         dord.taxzone_id, dord.taxincluded, dord.terms, (SELECT cu.name FROM currencies cu WHERE cu.id=dord.currency_id) AS currency
+         dord.taxzone_id, dord.taxincluded, dord.terms, (SELECT cu.name FROM currencies cu WHERE cu.id=dord.currency_id) AS currency,
+         dord.delivery_term_id
        FROM delivery_orders dord
        JOIN ${vc} cv ON (dord.${vc}_id = cv.id)
        LEFT JOIN employee e ON (dord.employee_id = e.id)
@@ -591,6 +608,9 @@ sub retrieve {
   $sth = prepare_execute_query($form, $dbh, $query, @do_ids);
 
   delete $form->{"${vc}_id"};
+  my $pos = 0;
+  $form->{ordnumber_array} = ' ';
+  $form->{cusordnumber_array} = ' ';
   while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
     if ($form->{"${vc}_id"} && ($ref->{"${vc}_id"} != $form->{"${vc}_id"})) {
       $sth->finish();
@@ -601,12 +621,26 @@ sub retrieve {
 
     map { $form->{$_} = $ref->{$_} } keys %$ref if ($ref);
     $form->{donumber_array} .= $form->{donumber} . ' ';
+    $pos = index($form->{ordnumber_array},' ' . $form->{ordnumber} . ' ');
+    if ($pos == -1) {
+      $form->{ordnumber_array} .= $form->{ordnumber} . ' ';
+    }
+    $pos = index($form->{cusordnumber_array},' ' . $form->{cusordnumber} . ' ');
+    if ($pos == -1) {
+      $form->{cusordnumber_array} .= $form->{cusordnumber} . ' ';
+    }
   }
   $sth->finish();
 
   $form->{donumber_array} =~ s/\s*$//g;
+  $form->{ordnumber_array} =~ s/ //;
+  $form->{ordnumber_array} =~ s/\s*$//g;
+  $form->{cusordnumber_array} =~ s/ //;
+  $form->{cusordnumber_array} =~ s/\s*$//g;
 
   $form->{saved_donumber} = $form->{donumber};
+  $form->{saved_ordnumber} = $form->{ordnumber};
+  $form->{saved_cusordnumber} = $form->{cusordnumber};
 
   # if not given, fill transdate with current_date
   $form->{transdate} = $form->current_date($myconfig) unless $form->{transdate};
@@ -712,8 +746,10 @@ sub order_details {
   my @partsgroup = ();
   my $partsgroup;
   my $position = 0;
+  my $subtotal_header = 0;
+  my $subposition = 0;
 
-  my (@project_ids, %projectnumbers, %projectdescriptions);
+  my (@project_ids);
 
   push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
 
@@ -727,21 +763,21 @@ sub order_details {
     push(@project_ids, $form->{"project_id_$i"}) if ($form->{"project_id_$i"});
   }
 
+  my $projects = [];
+  my %projects_by_id;
   if (@project_ids) {
-    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
-      join(", ", map("?", @project_ids)) . ")";
-    $sth = prepare_execute_query($form, $dbh, $query, @project_ids);
-    while (my $ref = $sth->fetchrow_hashref()) {
-      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
-      $projectdescriptions{$ref->{id}} = $ref->{description};
-    }
-    $sth->finish();
+    $projects = SL::DB::Manager::Project->get_all(query => [ id => \@project_ids ]);
+    %projects_by_id = map { $_->id => $_ } @$projects;
   }
 
-  $form->{"globalprojectnumber"} =
-    $projectnumbers{$form->{"globalproject_id"}};
-  $form->{"globalprojectdescription"} =
-      $projectdescriptions{$form->{"globalproject_id"}};
+  if ($projects_by_id{$form->{"globalproject_id"}}) {
+    $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber;
+    $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description;
+
+    for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) {
+      $form->{"project_cvar_" . $_->config->name} = $_->value_as_text;
+    }
+  }
 
   my $q_pg     = qq|SELECT p.partnumber, p.description, p.unit, a.qty, pg.partsgroup
                     FROM assembly a
@@ -760,6 +796,7 @@ sub order_details {
   my $num_si   = 0;
 
   my $ic_cvar_configs = CVar->get_configs(module => 'IC');
+  my $project_cvar_configs = CVar->get_configs(module => 'Projects');
 
   $form->{TEMPLATE_ARRAYS} = { };
   IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
@@ -773,6 +810,7 @@ sub order_details {
   map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays);
 
   push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
+  push @arrays, map { "project_cvar_$_->{name}" } @{ $project_cvar_configs };
 
   $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS');
   my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
@@ -784,8 +822,6 @@ sub order_details {
 
     next if (!$form->{"id_$i"});
 
-    $position++;
-
     if ($item->[1] ne $sameitem) {
       push(@{ $form->{description} }, qq|$item->[1]|);
       $sameitem = $item->[1];
@@ -796,8 +832,22 @@ sub order_details {
     $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$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++;
+    }
 
     my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || { 'factor' => 1 };
+    my $project = $projects_by_id{$form->{"project_id_$i"}} || SL::DB::Project->new;
 
     push @{ $form->{TEMPLATE_ARRAYS}{runningnumber} },   $position;
     push @{ $form->{TEMPLATE_ARRAYS}{number} },          $form->{"partnumber_$i"};
@@ -809,9 +859,12 @@ sub order_details {
     push @{ $form->{TEMPLATE_ARRAYS}{partnotes} },       $form->{"partnotes_$i"};
     push @{ $form->{TEMPLATE_ARRAYS}{serialnumber} },    $form->{"serialnumber_$i"};
     push @{ $form->{TEMPLATE_ARRAYS}{reqdate} },         $form->{"reqdate_$i"};
-    push @{ $form->{TEMPLATE_ARRAYS}{projectnumber} },   $projectnumbers{$form->{"project_id_$i"}};
-    push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} },
-      $projectdescriptions{$form->{"project_id_$i"}};
+    push @{ $form->{TEMPLATE_ARRAYS}{projectnumber} },   $project->projectnumber;
+    push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} }, $project->description;
+
+    if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) {
+      $subtotal_header     = 0;
+    }
 
     my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
     $totalweight += $lineweight;
@@ -871,6 +924,8 @@ sub order_details {
     push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
       CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
         for @{ $ic_cvar_configs };
+
+    push @{ $form->{TEMPLATE_ARRAYS}->{"project_cvar_" . $_->config->name} }, $_->value_as_text for @{ $project->cvars_by_config };
   }
 
   $form->{totalweight}       = $form->format_amount($myconfig, $totalweight, 3);
@@ -881,6 +936,9 @@ sub order_details {
   $h_pg->finish();
   $h_bin_wh->finish();
 
+  $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef);
+  $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};
+
   $form->{username} = $myconfig->{name};
 
   $main::lxdebug->leave_sub();
index 04ac43c..a11b7ad 100644 (file)
@@ -1032,6 +1032,12 @@ sub parse_template {
   $self->{"myconfig_${_}"} = $myconfig->{$_} for grep { $_ ne 'dbpasswd' } keys %{ $myconfig };
   $self->{$_}              = $defaults->$_   for qw(co_ustid);
   $self->{"myconfig_${_}"} = $defaults->$_   for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber);
+  $self->{AUTH}            = $::auth;
+  $self->{INSTANCE_CONF}   = $::instance_conf;
+  $self->{LOCALE}          = $::locale;
+  $self->{LXCONFIG}        = $::lx_office_conf;
+  $self->{LXDEBUG}         = $::lxdebug;
+  $self->{MYCONFIG}        = \%::myconfig;
 
   $self->{copies} = 1 if (($self->{copies} *= 1) <= 0);
 
@@ -1920,17 +1926,24 @@ sub get_employee_data {
   my $myconfig = \%main::myconfig;
   my $dbh      = $params{dbh} || $self->get_standard_dbh($myconfig);
 
-  my ($login)  = selectrow_query($self, $dbh, qq|SELECT login FROM employee WHERE id = ?|, conv_i($params{id}));
+  my ($login, $deleted)  = selectrow_query($self, $dbh, qq|SELECT login,deleted FROM employee WHERE id = ?|, conv_i($params{id}));
 
   if ($login) {
-    my $user = User->new(login => $login);
-    $self->{$params{prefix} . "_${_}"}    = $user->{$_}   for qw(email fax name signature tel);
-    $self->{$params{prefix} . "_${_}"}    = $defaults->$_ for qw(address businessnumber co_ustid company duns taxnumber);
-
+    # login already fetched and still the same client (mandant) | same for both cases (delete|!delete)
     $self->{$params{prefix} . '_login'}   = $login;
-    $self->{$params{prefix} . '_name'}  ||= $login;
-  }
+    $self->{$params{prefix} . "_${_}"}    = $defaults->$_ for qw(address businessnumber co_ustid company duns taxnumber);
 
+    if (!$deleted) {
+      # get employee data from auth.user_config
+      my $user = User->new(login => $login);
+      $self->{$params{prefix} . "_${_}"} = $user->{$_} for qw(email fax name signature tel);
+    } else {
+      # get saved employee data from employee
+      my $employee = SL::DB::Manager::Employee->find_by(id => conv_i($params{id}));
+      $self->{$params{prefix} . "_${_}"} = $employee->{"deleted_$_"} for qw(email fax signature tel);
+      $self->{$params{prefix} . "_name"} = $employee->name;
+    }
+ }
   $main::lxdebug->leave_sub();
 }
 
@@ -2095,10 +2108,10 @@ sub _get_taxcharts {
   if (ref $params eq 'HASH') {
     $key = $params->{key} if ($params->{key});
     if ($params->{module} eq 'AR') {
-      push @where, 'taxkey NOT IN (8, 9, 18, 19)';
+      push @where, 'chart_categories ~ \'[ACILQ]\'';
 
     } elsif ($params->{module} eq 'AP') {
-      push @where, 'taxkey NOT IN (1, 2, 3, 12, 13)';
+      push @where, 'chart_categories ~ \'[ACELQ]\'';
     }
 
   } elsif ($params) {
@@ -2131,10 +2144,22 @@ sub _get_taxzones {
 sub _get_employees {
   $main::lxdebug->enter_sub();
 
-  my ($self, $dbh, $default_key, $key) = @_;
+  my ($self, $dbh, $params) = @_;
+
+  my $deleted = 0;
+
+  my $key;
+  if (ref $params eq 'HASH') {
+    $key     = $params->{key};
+    $deleted = $params->{deleted};
+
+  } else {
+    $key = $params;
+  }
 
-  $key = $default_key unless ($key);
-  $self->{$key} = selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee ORDER BY lower(name)|);
+  $key     ||= "all_employees";
+  my $filter = $deleted ? '' : 'WHERE NOT COALESCE(deleted, FALSE)';
+  $self->{$key} = selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee $filter ORDER BY lower(name)|);
 
   $main::lxdebug->leave_sub();
 }
@@ -2374,7 +2399,7 @@ sub get_lists {
   }
 
   if ($params{"employees"}) {
-    $self->_get_employees($dbh, "all_employees", $params{"employees"});
+    $self->_get_employees($dbh, $params{"employees"});
   }
 
   if ($params{"salesmen"}) {
@@ -3155,81 +3180,6 @@ sub get_history {
   return 0;
 }
 
-sub update_defaults {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $fld, $provided_dbh) = @_;
-
-  my $dbh;
-  if ($provided_dbh) {
-    $dbh = $provided_dbh;
-  } else {
-    $dbh = $self->dbconnect_noauto($myconfig);
-  }
-  my $query = qq|SELECT $fld FROM defaults FOR UPDATE|;
-  my $sth   = $dbh->prepare($query);
-
-  $sth->execute || $self->dberror($query);
-  my ($var) = $sth->fetchrow_array;
-  $sth->finish;
-
-  $var   = 0 if !defined($var) || ($var eq '');
-  $var   = SL::PrefixedNumber->new(number => $var)->get_next;
-  $query = qq|UPDATE defaults SET $fld = ?|;
-  do_query($self, $dbh, $query, $var);
-
-  if (!$provided_dbh) {
-    $dbh->commit;
-    $dbh->disconnect;
-  }
-
-  $main::lxdebug->leave_sub();
-
-  return $var;
-}
-
-sub update_business {
-  $main::lxdebug->enter_sub();
-
-  my ($self, $myconfig, $business_id, $provided_dbh) = @_;
-
-  my $dbh;
-  if ($provided_dbh) {
-    $dbh = $provided_dbh;
-  } else {
-    $dbh = $self->dbconnect_noauto($myconfig);
-  }
-  my $query =
-    qq|SELECT customernumberinit FROM business
-       WHERE id = ? FOR UPDATE|;
-  my ($var) = selectrow_query($self, $dbh, $query, $business_id);
-
-  return undef unless $var;
-
-  if ($var =~ m/\d+$/) {
-    my $new_var  = (substr $var, $-[0]) * 1 + 1;
-    my $len_diff = length($var) - $-[0] - length($new_var);
-    $var         = substr($var, 0, $-[0]) . ($len_diff > 0 ? '0' x $len_diff : '') . $new_var;
-
-  } else {
-    $var = $var . '1';
-  }
-
-  $query = qq|UPDATE business
-              SET customernumberinit = ?
-              WHERE id = ?|;
-  do_query($self, $dbh, $query, $var, $business_id);
-
-  if (!$provided_dbh) {
-    $dbh->commit;
-    $dbh->disconnect;
-  }
-
-  $main::lxdebug->leave_sub();
-
-  return $var;
-}
-
 sub get_partsgroup {
   $main::lxdebug->enter_sub();
 
@@ -3447,6 +3397,16 @@ sub prepare_for_printing {
     $self->reformat_numbers($output_numberformat, $precision, @{ $field_list });
   }
 
+  $self->{template_meta} = {
+    formname  => $self->{formname},
+    language  => SL::DB::Manager::Language->find_by_or_create(id => $self->{language_id} || undef),
+    format    => $self->{format},
+    media     => $self->{media},
+    extension => $extension,
+    printer   => SL::DB::Manager::Printer->find_by_or_create(id => $self->{printer_id} || undef),
+    today     => DateTime->today,
+  };
+
   return $self;
 }
 
@@ -3566,18 +3526,6 @@ Points of interest for a beginner are:
 
 =head1 SPECIAL FUNCTIONS
 
-=head2 C<update_business> PARAMS
-
-PARAMS (not named):
- \%config,     - config hashref
- $business_id, - business id
- $dbh          - optional database handle
-
-handles business (thats customer/vendor types) sequences.
-
-special behaviour for empty strings in customerinitnumber field:
-will in this case not increase the value, and return undef.
-
 =head2 C<redirect_header> $url
 
 Generates a HTTP redirection header for the new C<$url>. Constructs an
index 594d57c..f97e2b2 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -789,23 +789,26 @@ sub get_chart_balances {
 }
 
 sub get_tax_dropdown {
+  my ($self, $accno) = @_;
+
   my $myconfig = \%main::myconfig;
   my $form = $main::form;
 
   my $dbh = $form->get_standard_dbh($myconfig);
 
   my $query = qq|SELECT category FROM chart WHERE accno = ?|;
-  my ($category) = selectrow_query($form, $dbh, $query, $form->{accno});
+  my ($category) = selectrow_query($form, $dbh, $query, $accno);
 
   $query = qq|SELECT * FROM tax WHERE chart_categories like '%$category%' order by taxkey, rate|;
 
   my $sth = prepare_execute_query($form, $dbh, $query);
 
-  $form->{TAX_ACCOUNTS} = [];
+  my @tax_accounts = ();
   while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
-    push(@{ $form->{TAX_ACCOUNTS} }, $ref);
+    push(@tax_accounts, $ref);
   }
 
+  return @tax_accounts;
 }
 
 1;
index 3f4eaaa..2730502 100644 (file)
@@ -7,11 +7,12 @@ use version 0.77;
 use Carp;
 use IO::File;
 use Params::Validate qw(:all);
+use List::MoreUtils qw(all pairwise);
 use Text::CSV_XS;
 use Rose::Object::MakeMethods::Generic scalar => [ qw(
-  file encoding sep_char quote_char escape_char header profile class
-  numberformat dateformat ignore_unknown_columns strict_profile _io _csv
-  _objects _parsed _data _errors all_cvar_configs case_insensitive_header
+  file encoding sep_char quote_char escape_char header profile
+  numberformat dateformat ignore_unknown_columns strict_profile is_multiplexed
+  _row_header _io _csv _objects _parsed _data _errors all_cvar_configs case_insensitive_header
 ) ];
 
 use SL::Helper::Csv::Dispatcher;
@@ -26,10 +27,9 @@ sub new {
     quote_char             => { default => '"' },
     escape_char            => { default => '"' },
     header                 => { type    => ARRAYREF, optional => 1 },
-    profile                => { type    => HASHREF,  optional => 1 },
+    profile                => { type    => ARRAYREF, optional => 1 },
     file                   => 1,
     encoding               => 0,
-    class                  => 0,
     numberformat           => 0,
     dateformat             => 0,
     ignore_unknown_columns => 0,
@@ -57,6 +57,7 @@ sub parse {
   my ($self, %params) = @_;
 
   $self->_open_file;
+  return if ! $self->_check_multiplexed;
   return if ! $self->_check_header;
   return if ! $self->dispatcher->parse_profile;
   return if ! $self->_parse_data;
@@ -71,7 +72,6 @@ sub get_data {
 
 sub get_objects {
   my ($self, %params) = @_;
-  croak 'no class given'   unless $self->class;
   croak 'must parse first' unless $self->_parsed;
 
   $self->_make_objects unless $self->_objects;
@@ -99,29 +99,95 @@ sub _open_file {
   return $self->_io;
 }
 
-sub _check_header {
+# check, if data is multiplexed and if all nessesary infos are given
+sub _check_multiplexed {
   my ($self, %params) = @_;
-  my $header = $self->header;
 
-  if (! $header) {
-    $header = $self->_csv->getline($self->_io);
+  $self->is_multiplexed(0);
+
+  # If more than one profile is given, it is multiplexed.
+  if ($self->profile) {
+    my @profile = @{ $self->profile };
+    if (scalar @profile > 1) {
+      # Each profile needs a class and a row_ident
+      my $info_ok = all { defined $_->{class} && defined $_->{row_ident} } @profile;
+      $self->_push_error([
+        0,
+        "missing class or row_ident in one of the profiles for multiplexed data",
+        0,
+        0]) unless $info_ok;
+
+      # If header is given, there need to be a header for each profile
+      # and no empty headers.
+      if ($info_ok && $self->header) {
+        my @header = @{ $self->header };
+        my $t_ok = scalar @profile == scalar @header;
+        $self->_push_error([
+          0,
+          "number of headers and number of profiles must be the same for multiplexed data",
+          0,
+          0]) unless $t_ok;
+        $info_ok = $info_ok && $t_ok;
+
+        $t_ok = all { scalar @$_ > 0} @header;
+        $self->_push_error([
+          0,
+          "no empty headers are allowed for multiplexed data",
+          0,
+          0]) unless $t_ok;
+        $info_ok = $info_ok && $t_ok;
+      }
+      $self->is_multiplexed($info_ok);
+      return $info_ok;
+    }
+  }
+
+  # ok, if not multiplexed
+  return 1;
+}
 
-    $self->_push_error([
-      $self->_csv->error_input,
-      $self->_csv->error_diag,
-      0,
-    ]) unless $header;
+sub _check_header {
+  my ($self, %params) = @_;
+  my $header;
+
+  $header = $self->header;
+  if (!$header) {
+    my $n_header = ($self->is_multiplexed)? scalar @{ $self->profile } : 1;
+    foreach my $p_num (0..$n_header - 1) {
+      my $h = $self->_csv->getline($self->_io);
+
+      $self->_push_error([
+        $self->_csv->error_input,
+        $self->_csv->error_diag,
+        0,
+      ]) unless $h;
+
+      if ($self->is_multiplexed) {
+        push @{ $header }, $h;
+      } else {
+        $header = $h;
+      }
+    }
   }
 
   # Special case: utf8 BOM.
   # certain software (namely MS Office and notepad.exe insist on prefixing
   # data with a discouraged but valid byte order mark
   # if not removed, the first header field will not be recognized
-  if ($header && $header->[0] && $self->encoding =~ /utf-?8/i) {
-    $header->[0] =~ s/^\x{FEFF}//;
+  if ($header) {
+    my $h = ($self->is_multiplexed)? $header->[0] : $header;
+
+    if ($h && $h->[0] && $self->encoding =~ /utf-?8/i) {
+      $h->[0] =~ s/^\x{FEFF}//;
+    }
   }
 
-  return unless $header;
+  # check, if all header fields are parsed well
+  if ($self->is_multiplexed) {
+    return unless $header && all { $_ } @$header;
+  } else {
+    return unless $header;
+  }
 
   # Special case: human stupidity
   # people insist that case sensitivity doesn't exist and try to enter all
@@ -130,12 +196,19 @@ sub _check_header {
   # mopst likely meant that field, so rewrite the header
   if ($self->case_insensitive_header) {
     die 'case_insensitive_header is only possible with profile' unless $self->profile;
-    my @names = (
-      keys %{ $self->profile || {} },
-    );
-    for my $name (@names) {
-      for my $i (0..$#$header) {
-        $header->[$i] = $name if lc $header->[$i] eq lc $name;
+    if ($header) {
+      my $h_aref = ($self->is_multiplexed)? $header : [ $header ];
+      my $p_num  = 0;
+      foreach my $h (@{ $h_aref }) {
+        my @names = (
+          keys %{ $self->profile->[$p_num]->{profile} || {} },
+        );
+        for my $name (@names) {
+          for my $i (0..$#$h) {
+            $h->[$i] = $name if lc $h->[$i] eq lc $name;
+          }
+        }
+        $p_num++;
       }
     }
   }
@@ -147,13 +220,12 @@ sub _parse_data {
   my ($self, %params) = @_;
   my (@data, @errors);
 
-  $self->_csv->column_names(@{ $self->header });
-
   while (1) {
     my $row = $self->_csv->getline($self->_io);
     if ($row) {
+      my $header = $self->_header_by_row($row);
       my %hr;
-      @hr{@{ $self->header }} = @$row;
+      @hr{@{ $header }} = @$row;
       push @data, \%hr;
     } else {
       last if $self->_csv->eof;
@@ -180,6 +252,21 @@ sub _parse_data {
   return ! @errors;
 }
 
+sub _header_by_row {
+  my ($self, $row) = @_;
+
+  # initialize lookup hash if not already done
+  if ($self->is_multiplexed && ! defined $self->_row_header ) {
+    $self->_row_header({ pairwise { no warnings 'once'; $a->{row_ident} => $b } @{ $self->profile }, @{ $self->header } });
+  }
+
+  if ($self->is_multiplexed) {
+    return $self->_row_header->{$row->[0]}
+  } else {
+    return $self->header;
+  }
+}
+
 sub _encode_layer {
   ':encoding(' . $_[0]->encoding . ')';
 }
@@ -188,13 +275,11 @@ sub _make_objects {
   my ($self, %params) = @_;
   my @objs;
 
-  eval "require " . $self->class;
   local $::myconfig{numberformat} = $self->numberformat if $self->numberformat;
   local $::myconfig{dateformat}   = $self->dateformat   if $self->dateformat;
 
   for my $line (@{ $self->_data }) {
-    my $tmp_obj = $self->class->new;
-    $self->dispatcher->dispatch($tmp_obj, $line);
+    my $tmp_obj = $self->dispatcher->dispatch($line);
     push @objs, $tmp_obj;
   }
 
@@ -247,9 +332,9 @@ SL::Helper::Csv - take care of csv file uploads
     sep_char    => ',',     # default ';'
     quote_char  => '\'',    # default '"'
     escape_char => '"',     # default '"'
-    header      => [qw(id text sellprice word)], # see later
-    profile     => { sellprice => 'sellprice_as_number' },
-    class       => 'SL::DB::CsvLine',   # if present, map lines to this
+    header      => [ qw(id text sellprice word) ], # see later
+    profile     => [ { profile => { sellprice => 'sellprice_as_number'},
+                       class   => 'SL::DB::Part' } ],
   );
 
   my $status  = $csv->parse;
@@ -290,6 +375,13 @@ unique, other data needs to be connected to existing data sets. This will not
 happen here. You will receive a plain mapping of the data into the class tree,
 nothing more.
 
+=item Multiplex data
+
+This module can handle multiplexed data of different class types. In that case
+multiple profiles with classes and row identifiers must be given. Multiple
+headers may also be given or read from csv data. Data must contain the row
+identifier in the first column and it's field name must be 'datatype'.
+
 =back
 
 =head1 METHODS
@@ -343,16 +435,38 @@ guessing. Know what your data is. Defaults to utf-8.
 
 Same as in L<Text::CSV>
 
-=item C<header> \@FIELDS
+=item C<header> \@HEADERS
+
+If given, it contains an ARRAY of the header fields for not multiplexed data.
+Or an ARRAYREF for each different class type for multiplexed data. These
+ARRAYREFS are the header fields which are an array of columns. In this case
+the first lines are not used as a header. Empty header fields will be ignored
+in objects.
 
-Can be an array of columns, in this case the first line is not used as a
-header. Empty header fields will be ignored in objects.
+If not given, headers are taken from the first n lines of data, where n is the
+number of different class types.
 
-=item C<profile> \%ACCESSORS
+In case of multiplexed data the first column must be named 'datatype'. This
+name must be given in the header.
 
-May be used to map header fields to custom accessors. Example:
+Examples:
 
-  { listprice => listprice_as_number }
+  classic data of one type:
+  [ 'name', 'street', 'zipcode', 'city' ]
+
+  multiplexed data with two different types
+  [ [ 'datatype', 'ordernumber', 'customer', 'transdate' ],
+    [ 'datatype', 'partnumber', 'qty', 'sellprice' ] ]
+
+=item C<profile> [{profile => \%ACCESSORS, class => class, row_ident => ri},]
+
+This is an ARRAYREF to HASHREFs which may contain the keys C<profile>, C<class>
+and C<row_ident>.
+
+The C<profile> is a HASHREF which may be used to map header fields to custom
+accessors. Example:
+
+  [ {profile => { listprice => listprice_as_number }} ]
 
 In this case C<listprice_as_number> will be used to read in values from the
 C<listprice> column.
@@ -360,7 +474,7 @@ C<listprice> column.
 In case of a One-To-One relationsship these can also be set over
 relationsships by sparating the steps with a dot (C<.>). This will work:
 
-  { customer => 'customer.name' }
+  [ {profile => { customer => 'customer.name' }} ]
 
 And will result in something like this:
 
@@ -379,11 +493,25 @@ If the path in a profile entry is empty, the field will be subjected to
 C<strict_profile> and C<case_insensitive_header> checking, will be parsed into
 C<get_data>, but will not be attempted to be dispatched into objects.
 
-=item C<class>
-
-If present, the line will be handed to the new sub of this class,
+If C<class> is present, the line will be handed to the new sub of this class,
 and the return value used instead of the line itself.
 
+C<row_ident> is a string to recognize the right profile and class for each data
+line in multiplexed data. It must match the value in the column 'dataype' for
+each class.
+
+In case of multiplexed data, C<class> and C<row_ident> must be given.
+Example:
+  [ {
+      class     => 'SL::DB::Order',
+      row_ident => 'O'
+    },
+    {
+      class     => 'SL::DB::OrderItem',
+      row_ident => 'I',
+      profile   => {sellprice => sellprice_as_number}
+    } ]
+
 =item C<ignore_unknown_columns>
 
 If set, the import will ignore unkown header columns. Useful for lazy imports,
@@ -442,18 +570,20 @@ Encoding errors are not dealt with properly.
 Dispatch to child objects, like this:
 
  $csv = SL::Helper::Csv->new(
-   file  => ...
-   class => SL::DB::Part,
-   profile => [
-     makemodel => {
-       make_1  => make,
-       model_1 => model,
-     },
-     makemodel => {
-       make_2  => make,
-       model_2 => model,
-     },
-   ]
+   file    => ...
+   profile => [ {
+     profile => [
+       makemodel => {
+         make_1  => make,
+         model_1 => model,
+       },
+       makemodel => {
+         make_2  => make,
+         model_2 => model,
+       },
+     ],
+     class   => SL::DB::Part,
+   } ]
  );
 
 =head1 AUTHOR
index add444b..3a725b5 100644 (file)
@@ -5,8 +5,9 @@ use strict;
 use Data::Dumper;
 use Carp;
 use Scalar::Util qw(weaken);
+use List::MoreUtils qw(all pairwise);
 use Rose::Object::MakeMethods::Generic scalar => [ qw(
-  _specs _errors
+  _specs _row_class _row_spec _errors
 ) ];
 
 use SL::Helper::Csv::Error;
@@ -22,13 +23,53 @@ sub new {
 }
 
 sub dispatch {
-  my ($self, $obj, $line) = @_;
+  my ($self, $line) = @_;
 
-  for my $spec (@{ $self->_specs }) {
+  my $class = $self->_class_by_line($line);
+  croak 'no class given' unless $class;
+
+  eval "require " . $class;
+  my $obj = $class->new;
+
+  my $specs = $self->_specs_by_line($line);
+  for my $spec (@{ $specs }) {
     $self->apply($obj, $spec, $line->{$spec->{key}});
   }
+
+  return $obj;
+}
+
+sub _class_by_line {
+  my ($self, $line) = @_;
+
+  # initialize lookup hash if not already done
+  if ($self->_csv->is_multiplexed && ! defined $self->_row_class ) {
+    $self->_row_class({ map { $_->{row_ident} => $_->{class} } @{ $self->_csv->profile } });
+  }
+
+  if ($self->_csv->is_multiplexed) {
+    return $self->_row_class->{$line->{datatype}};
+  } else {
+    return $self->_csv->profile->[0]->{class};
+  }
 }
 
+sub _specs_by_line {
+  my ($self, $line) = @_;
+
+  # initialize lookup hash if not already done
+  if ($self->_csv->is_multiplexed && ! defined $self->_row_spec ) {
+    $self->_row_spec({ pairwise { no warnings 'once'; $a->{row_ident} => $b } @{ $self->_csv->profile }, @{ $self->_specs } });
+  }
+
+  if ($self->_csv->is_multiplexed) {
+    return $self->_row_spec->{$line->{datatype}};
+  } else {
+    return $self->_specs->[0];
+  }
+}
+
+
 sub apply {
   my ($self, $obj, $spec, $value) = @_;
   return unless $value;
@@ -65,41 +106,62 @@ sub is_known {
 sub parse_profile {
   my ($self, %params) = @_;
 
-  my $header  = $self->_csv->header;
-  my $profile = $self->_csv->profile;
+  my @specs;
+
+  my $csv_profile = $self->_csv->profile;
+  my $h_aref = ($self->_csv->is_multiplexed)? $self->_csv->header : [ $self->_csv->header ];
+  my $i = 0;
+  foreach my $header (@{ $h_aref }) {
+    my $spec = $self->_parse_profile(profile => $csv_profile->[$i]->{profile},
+                                     class   => $csv_profile->[$i]->{class},
+                                     header  => $header);
+    push @specs, $spec;
+    $i++;
+  }
+
+  $self->_specs(\@specs);
+
+  $self->_csv->_push_error($self->errors);
+
+  return ! $self->errors;
+}
+
+sub _parse_profile {
+  my ($self, %params) = @_;
+
+  my $profile = $params{profile};
+  my $class   = $params{class};
+  my $header  = $params{header};
+
   my @specs;
 
   for my $col (@$header) {
     next unless $col;
     if ($self->_csv->strict_profile) {
       if (exists $profile->{$col}) {
-        push @specs, $self->make_spec($col, $profile->{$col});
+        push @specs, $self->make_spec($col, $profile->{$col}, $class);
       } else {
         $self->unknown_column($col, undef);
       }
     } else {
       if (exists $profile->{$col}) {
-        push @specs, $self->make_spec($col, $profile->{$col});
+        push @specs, $self->make_spec($col, $profile->{$col}, $class);
       } else {
-        push @specs, $self->make_spec($col, $col);
+        push @specs, $self->make_spec($col, $col, $class);
       }
     }
   }
 
-  $self->_specs(\@specs);
-  $self->_csv->_push_error($self->errors);
-  return ! $self->errors;
+  return \@specs;
 }
 
 sub make_spec {
-  my ($self, $col, $path) = @_;
+  my ($self, $col, $path, $cur_class) = @_;
 
   my $spec = { key => $col, steps => [] };
 
   return unless $path;
 
-  my $cur_class = $self->_csv->class;
-
   return unless $cur_class;
 
   for my $step_index ( split /\.(?!\d)/, $path ) {
index b99ec2a..649ad2f 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -146,15 +146,10 @@ SQL
   }
 
   # get translations
-  $form->{language_values} = "";
   $query = qq|SELECT language_id, translation, longdescription
               FROM translation
               WHERE parts_id = ?|;
-  my $trq = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));
-  while (my $tr = $trq->fetchrow_hashref("NAME_lc")) {
-    $form->{language_values} .= "---+++---" . join('--++--', @{$tr}{qw(language_id translation longdescription)});
-  }
-  $trq->finish;
+  $form->{translations} = selectall_hashref_query($form, $dbh, $query, conv_i($form->{id}));
 
   # is it an orphan
   my @referencing_tables = qw(invoice orderitems inventory);
@@ -329,6 +324,8 @@ sub save {
     $subq_expense = "NULL";
   }
 
+  normalize_text_blocks();
+
   $query =
     qq|UPDATE parts SET
          partnumber = ?,
@@ -401,16 +398,17 @@ sub save {
   # delete translation records
   do_query($form, $dbh, qq|DELETE FROM translation WHERE parts_id = ?|, conv_i($form->{id}));
 
-  if ($form->{language_values} ne "") {
-    foreach my $item (split(/---\+\+\+---/, $form->{language_values})) {
-      my ($language_id, $translation, $longdescription) = split(/--\+\+--/, $item);
-      if ($translation ne "") {
-        $query = qq|INSERT into translation (parts_id, language_id, translation, longdescription)
-                    VALUES ( ?, ?, ?, ? )|;
-        @values = (conv_i($form->{id}), conv_i($language_id), $translation, $longdescription);
-        do_query($form, $dbh, $query, @values);
-      }
+  my @translations = grep { $_->{language_id} && $_->{translation} } @{ $form->{translations} || [] };
+  if (@translations) {
+    $query = qq|INSERT into translation (parts_id, language_id, translation, longdescription)
+                VALUES ( ?, ?, ?, ? )|;
+    $sth   = $dbh->prepare($query);
+
+    foreach my $translation (@translations) {
+      do_statement($form, $sth, $query, conv_i($form->{id}), conv_i($translation->{language_id}), $translation->{translation}, $translation->{longdescription});
     }
+
+    $sth->finish();
   }
 
   # delete price records
@@ -457,6 +455,22 @@ sub save {
 
   # add assembly records
   if ($form->{item} eq 'assembly') {
+    # check additional assembly row
+    my $i = $form->{assembly_rows};
+    # if last row is not empty add them
+    if ($form->{"partnumber_$i"} ne "") {
+      $query = qq|SELECT id FROM parts WHERE partnumber = ?|;
+      my ($partid) = selectrow_query($form, $dbh, $query,$form->{"partnumber_$i"} );
+      if ( $partid ) {
+        $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+        $form->{"id_$i"} = $partid;
+        $form->{"bom_$i"} = 0;
+        $form->{assembly_rows}++;
+      }
+      else {
+        $::form->error($::locale->text("uncorrect partnumber ").$form->{"partnumber_$i"});
+      }
+    }
 
     for my $i (1 .. $form->{assembly_rows}) {
       $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
@@ -469,7 +483,6 @@ sub save {
         do_query($form, $dbh, $query, @values);
       }
     }
-
     my @a = localtime;
     $a[5] += 1900;
     $a[4]++;
@@ -1686,5 +1699,24 @@ sub prepare_parts_for_printing {
   $main::lxdebug->leave_sub();
 }
 
+sub normalize_text_blocks {
+  $main::lxdebug->enter_sub();
+
+  my $self     = shift;
+  my %params   = @_;
+
+  my $form     = $params{form}     || $main::form;
+
+  # check if feature is enabled (select normalize_part_descriptions from defaults)
+  return unless ($::instance_conf->get_normalize_part_descriptions);
+
+  foreach (qw(description notes)) {
+    $form->{$_} =~ s/\s+$//s;
+    $form->{$_} =~ s/^\s+//s;
+    $form->{$_} =~ s/ {2,}/ /g;
+  }
+   $main::lxdebug->leave_sub();
+}
+
 
 1;
index 36f105e..e5e02f5 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -210,7 +210,7 @@ sub post_invoice {
 
       # update parts table by setting lastcost to current price, don't allow negative values by using abs
       $query = qq|UPDATE parts SET lastcost = ? WHERE id = ?|;
-      @values = (abs($form->{"sellprice_$i"} / $basefactor), conv_i($form->{"id_$i"}));
+      @values = (abs($fxsellprice * $form->{exchangerate} / $basefactor), conv_i($form->{"id_$i"}));
       do_query($form, $dbh, $query, @values);
 
       # check if we sold the item already and
@@ -686,7 +686,7 @@ sub post_invoice {
                 netamount    = ?, paid        = ?, duedate       = ?,
                 invoice      = ?, taxzone_id  = ?, notes         = ?, taxincluded = ?,
                 intnotes     = ?, storno_id   = ?, storno        = ?,
-                cp_id        = ?, employee_id = ?, department_id = ?,
+                cp_id        = ?, employee_id = ?, department_id = ?, delivery_term_id = ?,
                 globalproject_id = ?, direct_debit = ?
               WHERE id = ?|;
   @values = (
@@ -695,7 +695,7 @@ sub post_invoice {
                 $netamount,                  $form->{paid},      conv_date($form->{duedate}),
             '1',                             $taxzone_id,                  $form->{notes},          $form->{taxincluded} ? 't' : 'f',
                 $form->{intnotes},           conv_i($form->{storno_id}),     $form->{storno}      ? 't' : 'f',
-         conv_i($form->{cp_id}),      conv_i($form->{employee_id}), conv_i($form->{department_id}),
+         conv_i($form->{cp_id}),      conv_i($form->{employee_id}), conv_i($form->{department_id}), conv_i($form->{delivery_term_id}),
          conv_i($form->{globalproject_id}),
                 $form->{direct_debit} ? 't' : 'f',
          conv_i($form->{id})
@@ -941,7 +941,8 @@ sub retrieve_invoice {
   $query = qq|SELECT cp_id, invnumber, transdate AS invdate, duedate,
                 orddate, quodate, globalproject_id,
                 ordnumber, quonumber, paid, taxincluded, notes, taxzone_id, storno, gldate,
-                intnotes, (SELECT cu.name FROM currencies cu WHERE cu.id=ap.currency_id) AS currency, direct_debit
+                intnotes, (SELECT cu.name FROM currencies cu WHERE cu.id=ap.currency_id) AS currency, direct_debit,
+                delivery_term_id
               FROM ap
               WHERE id = ?|;
   $ref = selectfirst_hashref_query($form, $dbh, $query, conv_i($form->{id}));
@@ -1087,7 +1088,7 @@ sub get_vendor {
     qq|SELECT
          v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount,
          v.creditlimit, v.terms, v.notes AS intnotes,
-         v.email, v.cc, v.bcc, v.language_id, v.payment_id,
+         v.email, v.cc, v.bcc, v.language_id, v.payment_id, v.delivery_term_id,
          v.street, v.zipcode, v.city, v.country, v.taxzone_id, cu.name AS curr, v.direct_debit,
          $duedate + COALESCE(pt.terms_netto, 0) AS duedate,
          b.description AS business
index cfaf730..9470f1a 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -50,6 +50,7 @@ use SL::IO;
 use SL::TransNumber;
 use SL::DB::Default;
 use SL::DB::Tax;
+use SL::TransNumber;
 use Data::Dumper;
 
 use strict;
@@ -68,7 +69,7 @@ sub invoice_details {
   my $query = qq|SELECT date | . conv_dateq($form->{duedate}) . qq| - date | . conv_dateq($form->{invdate}) . qq| AS terms|;
   ($form->{terms}) = selectrow_query($form, $dbh, $query);
 
-  my (@project_ids, %projectnumbers, %projectdescriptions);
+  my (@project_ids);
   $form->{TEMPLATE_ARRAYS} = {};
 
   push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
@@ -92,23 +93,21 @@ sub invoice_details {
     push(@project_ids, $form->{"project_id_$i"}) if ($form->{"project_id_$i"});
   }
 
+  my $projects = [];
+  my %projects_by_id;
   if (@project_ids) {
-    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
-      join(", ", map({ "?" } @project_ids)) . ")";
-    $sth = $dbh->prepare($query);
-    $sth->execute(@project_ids) ||
-      $form->dberror($query . " (" . join(", ", @project_ids) . ")");
-    while (my $ref = $sth->fetchrow_hashref()) {
-      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
-      $projectdescriptions{$ref->{id}} = $ref->{description};
-    }
-    $sth->finish();
+    $projects = SL::DB::Manager::Project->get_all(query => [ id => \@project_ids ]);
+    %projects_by_id = map { $_->id => $_ } @$projects;
   }
 
-  $form->{"globalprojectnumber"} =
-    $projectnumbers{$form->{"globalproject_id"}};
-  $form->{"globalprojectdescription"} =
-    $projectdescriptions{$form->{"globalproject_id"}};
+  if ($projects_by_id{$form->{"globalproject_id"}}) {
+    $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber;
+    $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description;
+
+    for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) {
+      $form->{"project_cvar_" . $_->config->name} = $_->value_as_text;
+    }
+  }
 
   my $tax = 0;
   my $item;
@@ -146,6 +145,7 @@ sub invoice_details {
   IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
 
   my $ic_cvar_configs = CVar->get_configs(module => 'IC');
+  my $project_cvar_configs = CVar->get_configs(module => 'Projects');
 
   my @arrays =
     qw(runningnumber number description longdescription qty ship unit bin
@@ -156,6 +156,7 @@ sub invoice_details {
        price_factor price_factor_name partsgroup weight lineweight);
 
   push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
+  push @arrays, map { "project_cvar_$_->{name}" } @{ $project_cvar_configs };
 
   my @tax_arrays = qw(taxbase tax taxdescription taxrate taxnumber);
 
@@ -277,8 +278,10 @@ sub invoice_details {
       push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} },       $form->format_amount($myconfig, $nodiscount_linetotal, 2);
       push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} }, $nodiscount_linetotal;
 
-      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $projectnumbers{$form->{"project_id_$i"}});
-      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $projectdescriptions{$form->{"project_id_$i"}});
+      my $project = $projects_by_id{$form->{"project_id_$i"}} || SL::DB::Project->new;
+
+      push @{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $project->projectnumber;
+      push @{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $project->description;
 
       my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
       $totalweight += $lineweight;
@@ -370,6 +373,8 @@ sub invoice_details {
       push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
         CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
           for @{ $ic_cvar_configs };
+
+      push @{ $form->{TEMPLATE_ARRAYS}->{"project_cvar_" . $_->config->name} }, $_->value_as_text for @{ $project->cvars_by_config };
     }
   }
 
@@ -429,6 +434,9 @@ sub invoice_details {
 
   $form->set_payment_options($myconfig, $form->{invdate});
 
+  $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef);
+  $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};
+
   $form->{username} = $myconfig->{name};
 
   $main::lxdebug->leave_sub();
@@ -575,9 +583,8 @@ sub post_invoice {
       do_query($form, $dbh, $query, $form->{"id"}, $form->{"id"}, $form->{currency});
 
       if (!$form->{invnumber}) {
-        $form->{invnumber} =
-          $form->update_defaults($myconfig, $form->{type} eq "credit_note" ?
-                                 "cnnumber" : "invnumber", $dbh);
+        my $trans_number   = SL::TransNumber->new(type => $form->{type}, dbh => $dbh, number => $form->{invnumber}, id => $form->{id});
+        $form->{invnumber} = $trans_number->create_unique;
       }
     }
   }
@@ -1104,7 +1111,8 @@ sub post_invoice {
                 cp_id       = ?, marge_total   = ?, marge_percent = ?,
                 globalproject_id               = ?, delivery_customer_id             = ?,
                 transaction_description        = ?, delivery_vendor_id               = ?,
-                donumber    = ?, invnumber_for_credit_note = ?,        direct_debit  = ?
+                donumber    = ?, invnumber_for_credit_note = ?,        direct_debit  = ?,
+                delivery_term_id = ?
               WHERE id = ?|;
   @values = (          $form->{"invnumber"},           $form->{"ordnumber"},             $form->{"quonumber"},          $form->{"cusordnumber"},
              conv_date($form->{"invdate"}),  conv_date($form->{"orddate"}),    conv_date($form->{"quodate"}),    conv_i($form->{"customer_id"}),
@@ -1118,6 +1126,7 @@ sub post_invoice {
                 conv_i($form->{"globalproject_id"}),                              conv_i($form->{"delivery_customer_id"}),
                        $form->{transaction_description},                          conv_i($form->{"delivery_vendor_id"}),
                        $form->{"donumber"}, $form->{"invnumber_for_credit_note"},        $form->{direct_debit} ? 't' : 'f',
+                conv_i($form->{delivery_term_id}),
                 conv_i($form->{"id"}));
   do_query($form, $dbh, $query, @values);
 
@@ -1593,7 +1602,7 @@ sub retrieve_invoice {
            a.employee_id, a.salesman_id, a.payment_id,
            a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type,
            a.transaction_description, a.donumber, a.invnumber_for_credit_note,
-           a.marge_total, a.marge_percent, a.direct_debit,
+           a.marge_total, a.marge_percent, a.direct_debit, a.delivery_term_id,
            e.name AS employee
          FROM ar a
          LEFT JOIN employee e ON (e.id = a.employee_id)
@@ -1763,7 +1772,7 @@ sub get_customer {
   $query =
     qq|SELECT
          c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit, c.terms,
-         c.email, c.cc, c.bcc, c.language_id, c.payment_id,
+         c.email, c.cc, c.bcc, c.language_id, c.payment_id, c.delivery_term_id,
          c.street, c.zipcode, c.city, c.country,
          c.notes AS intnotes, c.klass as customer_klass, c.taxzone_id, c.salesman_id, cu.name AS curr,
          c.taxincluded_checked, c.direct_debit,
index bfbc1c6..947be97 100644 (file)
@@ -56,7 +56,9 @@ BEGIN {
 );
 
 @developer_modules = (
+  { name => "DBIx::Log4perl",                      url => "http://search.cpan.org/~mjevans/", },
   { name => "Devel::REPL",                         url => "http://search.cpan.org/~doy/",       debian => 'libdevel-repl-perl' },
+  { name => "Log::Log4perl",                       url => "http://search.cpan.org/~mschilli/",  debian => 'liblog-log4perl-perl' },
   { name => "LWP::Simple",                         url => "http://search.cpan.org/~gaas/",      debian => 'libwww-perl', dist_name => 'libwww-perl' },
   { name => "Moose::Role",                         url => "http://search.cpan.org/~doy/",       debian => 'libmoose-role-perl' },
   { name => "Perl::Tags",                          url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' },
index d32f458..80b41f9 100644 (file)
@@ -129,10 +129,10 @@ sub show_backtrace {
 
   return 1 unless ($force || ($global_level & BACKTRACE_ON_ERROR));
 
-  $self->message(BACKTRACE_ON_ERROR, "Starting full caller dump:");
+  $self->message(0, "Starting full caller dump:");
   my $level = 0;
   while (my ($dummy, $filename, $line, $subroutine) = caller $level) {
-    $self->message(BACKTRACE_ON_ERROR, "  ${subroutine} from ${filename}:${line}");
+    $self->message(0, "  ${subroutine} from ${filename}:${line}");
     $level++;
   }
 
index 9a47d29..f2e8a05 100644 (file)
@@ -51,7 +51,7 @@ sub section_menu {
     my $menuitem   = $menu->{$item};
     my $olabel     = apply { s/.*--// } $item;
     my $ml         = apply { s/--.*// } $item;
-    my $icon_class = apply { y/ /-/   } $item;
+    my $icon_class = apply { $_ =lc $_; s/[^a-z0-9_-]/-/g } $item;
     my $spacer     = "s" . (0 + $item =~ s/--/--/g);
 
     next if $level && $item ne "$level--$olabel";
index 12cbb8a..3d92746 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -46,6 +46,7 @@ use SL::DB::Status;
 use SL::DB::Tax;
 use SL::DBUtils;
 use SL::IC;
+use SL::TransNumber;
 
 use strict;
 
@@ -88,7 +89,8 @@ sub transactions {
     qq|  ex.$rate AS exchangerate, | .
     qq|  pr.projectnumber AS globalprojectnumber, | .
     qq|  e.name AS employee, s.name AS salesman, | .
-    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id  | .
+    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id,  | .
+    qq|  tz.description AS taxzone | .
     $periodic_invoices_columns .
     qq|FROM oe o | .
     qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | .
@@ -97,6 +99,7 @@ sub transactions {
     qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | .
     qq|  AND ex.transdate = o.transdate) | .
     qq|LEFT JOIN project pr ON (o.globalproject_id = pr.id) | .
+    qq|LEFT JOIN tax_zones tz ON (o.taxzone_id = tz.id) | .
     qq|$periodic_invoices_joins | .
     qq|WHERE (o.quotation = ?) |;
   push(@values, $quotation);
@@ -192,6 +195,16 @@ SQL
     push(@values, conv_date($form->{reqdateto}));
   }
 
+  if ($form->{shippingpoint}) {
+    $query .= qq| AND o.shippingpoint ILIKE ?|;
+    push(@values, '%' . $form->{shippingpoint} . '%');
+  }
+
+  if ($form->{taxzone_id} ne '') { # taxzone_id could be 0
+    $query .= qq| AND tz.id = ?|;
+    push(@values, $form->{taxzone_id});
+  }
+
   if ($form->{transaction_description}) {
     $query .= qq| AND o.transaction_description ILIKE ?|;
     push(@values, '%' . $form->{transaction_description} . '%');
@@ -214,7 +227,9 @@ SQL
     "employee"                => "e.name",
     "salesman"                => "s.name",
     "shipvia"                 => "o.shipvia",
-    "transaction_description" => "o.transaction_description"
+    "transaction_description" => "o.transaction_description",
+    "shippingpoint"           => "o.shippingpoint",
+    "taxzone"                 => "tz.description",
   );
   if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) {
     $sortorder = $allowed_sort_columns{$form->{sort}} . " ${sortdir}";
@@ -300,6 +315,10 @@ sub save {
 
   my $ml = ($form->{type} eq 'sales_order') ? 1 : -1;
 
+  my $number_field         = $form->{type} =~ m{order} ? 'ordnumber' : 'quonumber';
+  my $trans_number         = SL::TransNumber->new(type => $form->{type}, dbh => $dbh, number => $form->{$number_field}, id => $form->{id});
+  $form->{$number_field} ||= $trans_number->create_unique;
+
   if ($form->{id}) {
     $query = qq|DELETE FROM custom_variables
                 WHERE (config_id IN (SELECT id FROM custom_variable_configs WHERE module = 'IC'))
@@ -504,7 +523,7 @@ sub save {
          customer_id = ?, amount = ?, netamount = ?, reqdate = ?, taxincluded = ?,
          shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, currency_id = (SELECT id FROM currencies WHERE name=?), closed = ?,
          delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?,
-         taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?,
+         taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?,delivery_term_id = ?,
          globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, marge_total = ?, marge_percent = ?
        WHERE id = ?|;
 
@@ -521,6 +540,7 @@ sub save {
              conv_i($form->{shipto_id}), conv_i($form->{payment_id}),
              conv_i($form->{delivery_vendor_id}),
              conv_i($form->{delivery_customer_id}),
+             conv_i($form->{delivery_term_id}),
              conv_i($form->{globalproject_id}), conv_i($form->{employee_id}),
              conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
              $form->{transaction_description},
@@ -754,7 +774,7 @@ sub retrieve {
            o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber,
            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,
-           o.globalproject_id, o.delivered, o.transaction_description
+           o.globalproject_id, o.delivered, o.transaction_description, o.delivery_term_id
          FROM oe o
          JOIN ${vc} cv ON (o.${vc}_id = cv.id)
          LEFT JOIN employee e ON (o.employee_id = e.id)
@@ -1017,7 +1037,7 @@ sub order_details {
   my $tax_rate;
   my $taxamount;
 
-  my (@project_ids, %projectnumbers, %projectdescriptions);
+  my (@project_ids);
 
   push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
 
@@ -1048,19 +1068,21 @@ sub order_details {
     push(@project_ids, $form->{"project_id_$i"}) if ($form->{"project_id_$i"});
   }
 
+  my $projects = [];
+  my %projects_by_id;
   if (@project_ids) {
-    $query = "SELECT id, projectnumber, description FROM project WHERE id IN (" .
-      join(", ", map("?", @project_ids)) . ")";
-    $sth = prepare_execute_query($form, $dbh, $query, @project_ids);
-    while (my $ref = $sth->fetchrow_hashref()) {
-      $projectnumbers{$ref->{id}} = $ref->{projectnumber};
-      $projectdescriptions{$ref->{id}} = $ref->{description};
-    }
-    $sth->finish();
+    $projects = SL::DB::Manager::Project->get_all(query => [ id => \@project_ids ]);
+    %projects_by_id = map { $_->id => $_ } @$projects;
   }
 
-  $form->{"globalprojectnumber"} = $projectnumbers{$form->{"globalproject_id"}};
-  $form->{"globalprojectdescription"} = $projectdescriptions{$form->{"globalproject_id"}};
+  if ($projects_by_id{$form->{"globalproject_id"}}) {
+    $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber;
+    $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description;
+
+    for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) {
+      $form->{"project_cvar_" . $_->config->name} = $_->value_as_text;
+    }
+  }
 
   $form->{discount} = [];
 
@@ -1068,6 +1090,7 @@ sub order_details {
   IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form);
 
   my $ic_cvar_configs = CVar->get_configs(module => 'IC');
+  my $project_cvar_configs = CVar->get_configs(module => 'Projects');
 
   my @arrays =
     qw(runningnumber number description longdescription qty ship unit bin
@@ -1077,6 +1100,7 @@ sub order_details {
        price_factor price_factor_name partsgroup weight lineweight);
 
   push @arrays, map { "ic_cvar_$_->{name}" } @{ $ic_cvar_configs };
+  push @arrays, map { "project_cvar_$_->{name}" } @{ $project_cvar_configs };
 
   my @tax_arrays = qw(taxbase tax taxdescription taxrate taxnumber);
 
@@ -1190,12 +1214,14 @@ sub order_details {
         $nodiscount += $linetotal;
       }
 
+      my $project = $projects_by_id{$form->{"project_id_$i"}} || SL::DB::Project->new;
+
       push @{ $form->{TEMPLATE_ARRAYS}->{linetotal} },                  $form->format_amount($myconfig, $linetotal, 2);
       push @{ $form->{TEMPLATE_ARRAYS}->{linetotal_nofmt} },            $linetotal_exact;
       push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal} },       $form->format_amount($myconfig, $nodiscount_linetotal, 2);
       push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_linetotal_nofmt} }, $nodiscount_linetotal;
-      push(@{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $projectnumbers{$form->{"project_id_$i"}});
-      push(@{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $projectdescriptions{$form->{"project_id_$i"}});
+      push @{ $form->{TEMPLATE_ARRAYS}->{projectnumber} },              $project->projectnumber;
+      push @{ $form->{TEMPLATE_ARRAYS}->{projectdescription} },         $project->description;
 
       my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"};
       $totalweight += $lineweight;
@@ -1267,6 +1293,8 @@ sub order_details {
       push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
         CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
           for @{ $ic_cvar_configs };
+
+      push @{ $form->{TEMPLATE_ARRAYS}->{"project_cvar_" . $_->config->name} }, $_->value_as_text for @{ $project->cvars_by_config };
     }
   }
 
@@ -1320,6 +1348,9 @@ sub order_details {
 
   $dbh->disconnect;
 
+  $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef);
+  $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};
+
   $main::lxdebug->leave_sub();
 }
 
index 4b7b15d..daa7d73 100644 (file)
@@ -5,7 +5,24 @@ use strict;
 use SL::DB::Part;
 
 use Exporter qw(import);
-our @EXPORT = qw(part_picker);
+our @EXPORT = qw(part_picker part);
+
+use Carp;
+
+sub part {
+  my ($self, $part, %params) = @_;
+
+  $params{display} ||= 'inline';
+
+  croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
+
+  my $text = join '', (
+    $params{no_link} ? '' : '<a href="ic.pl?action=edit&id=' . $self->escape($part->id) . '">',
+    $self->escape($part->partnumber),
+    $params{no_link} ? '' : '</a>',
+  );
+  return $self->escaped_text($text);
+}
 
 sub part_picker {
   my ($self, $name, $value, %params) = @_;
@@ -31,11 +48,15 @@ __END__
 
 =head1 NAME
 
-SL::Presenter::Part - Part lelated presenter stuff
+SL::Presenter::Part - Part related presenter stuff
 
 =head1 SYNOPSIS
 
-see L<SL::Presenter>
+  # Create an html link for editing/opening a part/service/assembly
+  my $object = my $object = SL::DB::Manager::Part->get_first;
+  my $html   = SL::Presenter->get->part($object, display => 'inline');
+
+see also L<SL::Presenter>
 
 =head1 DESCRIPTION
 
@@ -43,8 +64,29 @@ see L<SL::Presenter>
 
 =head1 FUNCTIONS
 
+=over 2
+
+=item C<part, $object, %params>
+
+Returns a rendered version (actually an instance of
+L<SL::Presenter::EscapedText>) of the part object C<$object>
+
+C<%params> can include:
+
 =over 4
 
+=item * display
+
+Either C<inline> (the default) or C<table-cell>. At the moment both
+representations are identical and produce the part's name linked
+to the corresponding 'edit' action.
+
+=back
+
+=back 
+
+=over 2
+
 =item C<part_picker $name, $value, %params>
 
 All-in-one picker widget for parts. The name will be both id and name
index a00f400..4f9a518 100644 (file)
@@ -37,7 +37,7 @@ sub grouped_record_list {
   $output .= _purchase_order_list(         $self, $groups{purchase_orders},          %params) if $groups{purchase_orders};
   $output .= _purchase_delivery_order_list($self, $groups{purchase_delivery_orders}, %params) if $groups{purchase_delivery_orders};
   $output .= _purchase_invoice_list(       $self, $groups{purchase_invoices},        %params) if $groups{purchase_invoices};
-  $output .= _ar_transaction_list(         $self, $groups{ar_transactions},          %params) if $groups{ar_transactions};
+  $output .= _ap_transaction_list(         $self, $groups{ap_transactions},          %params) if $groups{ap_transactions};
 
   $output .= _sepa_collection_list(        $self, $groups{sepa_collections},         %params) if $groups{sepa_collections};
   $output .= _sepa_transfer_list(          $self, $groups{sepa_transfers},           %params) if $groups{sepa_transfers};
index d31204e..63efe2c 100644 (file)
@@ -19,12 +19,14 @@ sub retrieve_open_invoices {
   my $arap     = $params{vc} eq 'customer' ? 'ar'       : 'ap';
   my $vc       = $params{vc} eq 'customer' ? 'customer' : 'vendor';
 
+  my $mandate  = $params{vc} eq 'customer' ? " AND COALESCE(vc.mandator_id, '') <> '' AND vc.mandate_date_of_signature IS NOT NULL " : '';
+
   my $query =
     qq|
        SELECT ${arap}.id, ${arap}.invnumber, ${arap}.${vc}_id as vc_id, ${arap}.amount AS invoice_amount, ${arap}.invoice,
          vc.name AS vcname, vc.language_id, ${arap}.duedate as duedate, ${arap}.direct_debit,
 
-         COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' AS vc_bank_info_ok,
+         COALESCE(vc.iban, '') <> '' AND COALESCE(vc.bic, '') <> '' ${mandate} AS vc_bank_info_ok,
 
          ${arap}.amount - ${arap}.paid - COALESCE(open_transfers.amount, 0) AS open_amount
 
@@ -76,14 +78,16 @@ sub create_export {
 
   my $q_item_id = qq|SELECT nextval('id')|;
   my $h_item_id = prepare_query($form, $dbh, $q_item_id);
+  my $c_mandate = $params{vc} eq 'customer' ? ', vc_mandator_id, vc_mandate_date_of_signature' : '';
+  my $p_mandate = $params{vc} eq 'customer' ? ', ?, ?' : '';
 
   my $q_insert =
     qq|INSERT INTO sepa_export_items (id,          sepa_export_id,           ${arap}_id,  chart_id,
                                       amount,      requested_execution_date, reference,   end_to_end_id,
-                                      our_iban,    our_bic,                  vc_iban,     vc_bic)
+                                      our_iban,    our_bic,                  vc_iban,     vc_bic ${c_mandate})
        VALUES                        (?,           ?,                        ?,           ?,
                                       ?,           ?,                        ?,           ?,
-                                      ?,           ?,                        ?,           ?)|;
+                                      ?,           ?,                        ?,           ? ${p_mandate})|;
   my $h_insert = prepare_query($form, $dbh, $q_insert);
 
   my $q_reference =
@@ -130,6 +134,8 @@ sub create_export {
                   $transfer->{reference},            $end_to_end_id,
                   map { my $pfx = $_; map { $transfer->{"${pfx}_${_}"} } qw(iban bic) } qw(our vc));
 
+    push @values, $transfer->{vc_mandator_id}, conv_date($transfer->{vc_mandate_date_of_signature}) if $params{vc} eq 'customer';
+
     do_statement($form, $h_insert, $q_insert, @values);
   }
 
@@ -177,8 +183,10 @@ sub retrieve_export {
   if ($export->{id}) {
     my ($columns, $joins);
 
+    my $mandator_id = $params{vc} eq 'customer' ? ', mandator_id, mandate_date_of_signature' : '';
+
     if ($params{details}) {
-      $columns = qq|, arap.invnumber, arap.invoice, arap.transdate AS reference_date, vc.name AS vc_name, vc.${vc}number AS vc_number, c.accno AS chart_accno, c.description AS chart_description|;
+      $columns = qq|, arap.invnumber, arap.invoice, arap.transdate AS reference_date, vc.name AS vc_name, vc.${vc}number AS vc_number, c.accno AS chart_accno, c.description AS chart_description ${mandator_id}|;
       $joins   = qq|LEFT JOIN ${arap} arap ON (sei.${arap}_id = arap.id)
                     LEFT JOIN ${vc} vc     ON (arap.${vc}_id  = vc.id)
                     LEFT JOIN chart c      ON (sei.chart_id   = c.id)|;
index 90c77ec..8ccfa83 100644 (file)
@@ -223,8 +223,8 @@ sub to_xml {
         $xml->startTag('DrctDbtTx');
 
         $xml->startTag('MndtRltdInf');
-        $xml->dataElement('MndtId', $self->_restricted_identification_sepa2($transaction->get('company_number')));
-        $xml->dataElement('DtOfSgntr', $transaction->get('reference_date', 2010-12-02));
+        $xml->dataElement('MndtId', $self->_restricted_identification_sepa2($transaction->get('mandator_id')));
+        $xml->dataElement('DtOfSgntr', $self->_restricted_identification_sepa2($transaction->get('date_of_signature')));
         $xml->endTag('MndtRltdInf');
 
         $xml->startTag('CdtrSchmeId');
index 0c3fe74..2411416 100644 (file)
@@ -247,7 +247,7 @@ sub customer_picker {
   $::request->{layout}->add_javascripts('autocomplete_customer.js');
 
   $self->hidden_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => 'customer_autocomplete') .
-  $self->input_tag("$name_e\_name", (ref $value && $value->can('name')) ? $value->name : '', %params);
+  $self->input_tag('', (ref $value && $value->can('name')) ? $value->name : '', id => $self->name_to_id("$name_e\_name"), %params);
 }
 
 # simple version with select_tag
index 2e50785..d9bd766 100644 (file)
@@ -30,13 +30,8 @@ sub format_string {
 sub get_mime_type() {
   my ($self) = @_;
 
-  if ($self->{"form"}->{"format"} =~ /elsterwinston/i) {
-    return "application/xml ";
-  } elsif ($self->{"form"}->{"format"} =~ /elstertaxbird/i) {
-    return "application/x-taxbird";
-  } else {
-    return "text";
-  }
+  return "text";
+
 }
 
 sub uses_temp_file {
index 72bf0b1..bf9ebbd 100644 (file)
@@ -806,7 +806,7 @@ sub get_accounts_ustva {
   my $arwhere  = "";
   my $item;
 
-    my $gltaxkey_where = "(tk.pos_ustva>=59 AND tk.pos_ustva<=66)";
+    my $gltaxkey_where = "((tk.pos_ustva>=59 AND tk.pos_ustva<=66) or (tk.pos_ustva>=89 AND tk.pos_ustva<=93))";
 
   if ($fromdate) {
     if ($form->{method} eq 'cash') {
index 3087dff..7e4d519 100644 (file)
--- a/SL/WH.pm
+++ b/SL/WH.pm
@@ -38,6 +38,9 @@ use SL::AM;
 use SL::DBUtils;
 use SL::Form;
 
+use SL::DB::Unit;
+use SL::DB::Assembly;
+
 use warnings;
 use strict;
 
@@ -158,6 +161,17 @@ sub transfer_assembly {
   my %params   = @_;
   Common::check_params(\%params, qw(assembly_id dst_warehouse_id login qty unit dst_bin_id chargenumber bestbefore comment));
 
+
+  my $unit = SL::DB::Manager::Unit->find_by(name => $params{unit});        
+  if ($unit) {
+    my $assembly = SL::DB::Manager::Assembly->get_all(
+      query => [ id => $params{assembly_id} ],
+      with_objects => ['part'],
+      limit => 1,
+    )->[0];
+    $params{qty} = $unit->convert_to($params{qty}, $assembly->part->unit_obj);
+  }
+
 #  my $maxcreate=WH->check_assembly_max_create(assembly_id =>$params{'assembly_id'}, dbh => $my_dbh);
 
   my $myconfig = \%main::myconfig;
index d0eeb4f..0bb1a8b 100644 (file)
@@ -606,10 +606,11 @@ sub post {
 
   my ($inline) = @_;
 
-  # check if there is a vendor, invoice and due date
+  # check if there is a vendor, invoice, due date and invnumber
   $form->isblank("transdate", $locale->text("Invoice Date missing!"));
   $form->isblank("duedate",   $locale->text("Due Date missing!"));
   $form->isblank("vendor",    $locale->text('Vendor missing!'));
+  $form->isblank("invnumber", $locale->text('Invoice Number missing!'));
 
   if ($myconfig{mandatory_departments} && !$form->{department}) {
     $form->{saved_message} = $::locale->text('You have to specify a department.');
index 2544986..f56da18 100644 (file)
@@ -61,7 +61,7 @@ sub check_name {
 
   $name = $name eq "customer" ? "customer" : "vendor";
 
-  my ($new_name, $new_id) = split /--/, $form->{$name};
+  my ($new_name,$new_id) = $form->{$name} =~ /^(.*?)--(\d+)$/;
   my $i = 0;
   # if we use a selection
   if ($form->{"select$name"}) {
index c2fd6a2..4bef1d2 100644 (file)
@@ -153,7 +153,7 @@ sub list {
   $::lxdebug->enter_sub;
   $::auth->assert('report');
 
-  $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}";
+  $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}" . " - " . $::form->{description};
 
   $::form->header;
   print $::form->parse_html_template('ca/list', {
index 59c2f94..c51b13f 100644 (file)
@@ -343,21 +343,6 @@ sub calculate_qty {
 
 # -------------------------------------------------------------------------
 
-sub set_longdescription {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my $locale   = $main::locale;
-
-  $form->{title} = $locale->text("Enter longdescription");
-  $form->header(no_layout => 1);
-  print $form->parse_html_template("generic/set_longdescription");
-
-  $main::lxdebug->leave_sub();
-}
-
-# -------------------------------------------------------------------------
-
 sub H {
   return $main::locale->quote_special_chars('HTML', $_[0]);
 }
@@ -455,6 +440,7 @@ sub show_vc_details {
                  $locale->text("No vendor has been selected yet."));
 
   Common->get_vc_details(\%myconfig, $form, $form->{vc}, $form->{vc_id});
+  $form->{discount_as_percent} = $form->format_amount(\%::myconfig, $form->parse_amount(\%::myconfig, $form->{discount}) * 100, 2);
 
   $form->{title} = $form->{vc} eq "customer" ?
     $locale->text("Customer details") : $locale->text("Vendor details");
@@ -510,6 +496,10 @@ sub mark_as_paid_common {
       $referer =~ /^(.*)\?action\=[^\&]*(\&.*)$/;
       $script = $1;
       $callback = $2;
+    } elsif ($referer =~ /RESTORE_FORM_FROM_SESSION_ID/){
+      $referer =~ /^(.*)\?RESTORE_FORM_FROM_SESSION_ID\=(.*)$/;
+      $script = $1;
+      $callback = "";
     } else {
       $script = $referer;
       $callback = "";
index b9aed48..7daa888 100644 (file)
@@ -72,9 +72,8 @@ sub payment {
   # für bugfix 1771 (doppelte Leerzeichen werden nicht 'gepostet')
   $form->{"select$form->{vc}"} = "";
 
-  $form->{selectcustomer} .= "<option value=\"\"></option>\n" if $form->{vc} eq "customer";
-
   if ($form->{"all_$form->{vc}"}) {
+    $form->{"select$form->{vc}"} .= "<option value=\"\"></option>\n";
     # s.o. jb 12.10.2010
     $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
     map { $form->{"select$form->{vc}"} .= "<option value=\"$_->{name}--$_->{id}\">$_->{name}--$_->{id}</option>\n" }
@@ -138,7 +137,7 @@ sub form_header {
 
   # sometimes it happens that values in customer arrive without the signs '--'
   # but in order to select the right option field we need values with '--'
-  if ($form->{vc} eq "customer"){
+  if ($form->{vc} eq "customer" && $form->{"all_$form->{vc}"}){
     my ($customername) = split /--/, $form->{ $form->{vc} };
     $form->{ $form->{vc} } = $customername . "--" . $form->{customer_id};
   }
@@ -324,13 +323,13 @@ sub update {
     $updated = &check_name($form->{vc});
   };
 
-  if ($new_name_selected || $updated) {
+  if ($new_name_selected || $updated) {
     # get open invoices from ar/ap using $form->{vc} and a.${vc}_id, i.e. customer_id
     CP->get_openinvoices(\%myconfig, \%$form);
     ($newvc) = split /--/, $form->{ $form->{vc} };
     $form->{"old$form->{vc}"} = qq|$newvc--$form->{"$form->{vc}_id"}|;
     $updated = 1;
-  }
+  }
 
   if ($form->{currency} ne $form->{oldcurrency}) {
     $form->{oldcurrency} = $form->{currency};
index 513a7ff..845fc3a 100644 (file)
@@ -52,8 +52,10 @@ use SL::CVar;
 use SL::Request qw(flatten);
 use SL::DB::Business;
 use SL::DB::Default;
+use SL::DB::DeliveryTerm;
 use SL::Helper::Flash;
 use SL::ReportGenerator;
+use SL::MoreCommon qw(uri_encode);
 
 require "bin/mozilla/common.pl";
 require "bin/mozilla/reportgenerator.pl";
@@ -63,25 +65,6 @@ use strict;
 
 # end of main
 
-sub add {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{title}    = "Add";
-  $form->{callback} = "$form->{script}?action=add&db=$form->{db}" unless $form->{callback};
-
-  CT->populate_drop_down_boxes(\%myconfig, \%$form);
-
-  &form_header;
-  &form_footer;
-
-  $main::lxdebug->leave_sub();
-}
-
 sub search {
   $main::lxdebug->enter_sub();
 
@@ -415,530 +398,4 @@ sub list_contacts {
   $::lxdebug->leave_sub;
 }
 
-sub edit {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  # show history button
-  $form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|;
-  #/show hhistory button
-
-  CT->get_tuple(\%myconfig, \%$form);
-  CT->populate_drop_down_boxes(\%myconfig, \%$form);
-
-  $form->{title} = "Edit";
-
-  # format discount
-  $form->{discount} *= 100;
-  # format uri
-  $form->{homepage} = 'http://' . $form->{homepage} unless ((!$form->{homepage}) || $form->{homepage} =~ m|^https?://|);
-
-  &form_header;
-  &form_footer;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub _shipto_label {
-  my $s = shift(@_);
-  join('; ', grep { $_ } map { $s->{"shipto$_"} } qw(name department_1 street city)) || ' '
-}
-
-sub _contacts_label {
-  join ", ", grep { $_ } $_[0]->{cp_name}, $_[0]->{cp_givenname};
-}
-
-sub form_header {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  $form->get_lists(taxzones   => "ALL_TAXZONES",
-                   currencies => "ALL_CURRENCIES");
-  $form->get_pricegroup(\%myconfig, { all => 1 });
-
-  $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::instance_conf->get_vertreter;
-  $form->{ALL_EMPLOYEES}          = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{FU_created_for_user},  deleted => 0 ] ]);
-  $form->{ALL_SALESMEN}           = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
-  $form->{USER}                   = SL::DB::Manager::Employee->current;
-
-  $form->{taxincluded}    = ($form->{taxincluded}) ? "checked" : "";
-  $form->{is_customer}    = $form->{db}     eq 'customer';
-  $form->{shipto_label}   = \&_shipto_label;
-  $form->{contacts_label} = \&_contacts_label;
-  $form->{taxzone_id}     = 0                                                               if !$form->{id};
-  $form->{SHIPTO_ALL}     = [ +{ shipto_id => '0', shiptoname => $::locale->text('All') }, @{ $form->{SHIPTO} } ];
-
-  $form->{title} = $form->{title_save}
-                || $locale->text("$form->{title} " . ucfirst $form->{db}) . ($form->{title} eq "Edit" ? " $form->{name}" : '');
-
-  CT->query_titles_and_greetings(\%myconfig, \%$form);
-  map { $form->{"MB_$_"} = [ map +{ id => $_, description => $_ }, @{ $form->{$_} } ] } qw(COMPANY_GREETINGS);
-
-  $form->{NOTES} ||= [ ];
-
-  if (!$form->{'language_id'}) {
-    my $l_id = SL::DB::Default->get->{'language_id'};
-    if ($l_id) {
-      $form->{'default_language_id'} = $l_id;
-    }
-  }
-
-  if (!$form->{'id'}) {
-    $form->{'currency'} = $form->get_default_currency(\%myconfig);
-  } else {
-    $form->{currency} = $form->{curr};
-  }
-
-  $::form->{CUSTOM_VARIABLES} = { };
-  my %specs = ( CT       => { field => 'id',    name_prefix => '',   },
-                Contacts => { field => 'cp_id', name_prefix => 'cp', },
-              );
-
-  for my $module (keys %specs) {
-    my $spec = $specs{$module};
-
-    $::form->{CUSTOM_VARIABLES}->{$module} = CVar->get_custom_variables(module => $module, trans_id => $::form->{ $spec->{field} });
-    CVar->render_inputs(variables => $::form->{CUSTOM_VARIABLES}->{$module}, name_prefix => $spec->{name_prefix})
-      if scalar @{ $::form->{CUSTOM_VARIABLES}->{$module} };
-  }
-
-  $form->header;
-  print $form->parse_html_template('ct/form_header');
-
-  $main::lxdebug->leave_sub();
-}
-
-sub form_footer {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-
-  print $form->parse_html_template('ct/form_footer', { is_orphaned => $form->{status} eq 'orphaned',
-                                                       is_customer => $form->{db}     eq 'customer' });
-  $main::lxdebug->leave_sub();
-}
-
-sub _do_save {
-  $main::auth->assert('customer_vendor_edit');
-
-  $::form->isblank("name", $::locale->text("Name missing!"));
-
-  if ($::form->{new_salesman_id} && $::instance_conf->get_vertreter) {
-    $::form->{salesman_id} = $::form->{new_salesman_id};
-    delete $::form->{new_salesman_id};
-  }
-
-  my $res = $::form->{db} eq 'customer' ? CT->save_customer(\%::myconfig, $::form) : CT->save_vendor(\%::myconfig, $::form);
-
-  if (3 == $res) {
-    if ($::form->{"db"} eq "customer") {
-      $::form->error($::locale->text('This customer number is already in use.'));
-    } else {
-      $::form->error($::locale->text('This vendor number is already in use.'));
-    }
-  }
-}
-
-sub add_transaction {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit & ' .
-                '(general_ledger         | invoice_edit         | vendor_invoice_edit | ' .
-                ' request_quotation_edit | sales_quotation_edit | sales_order_edit    | purchase_order_edit)');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-#  # saving the history
-#  if(!exists $form->{addition}) {
-#    $form->{addition} = "ADD TRANSACTION";
-#    $form->save_history;
-#  }
-#  # /saving the history
-
-  _do_save();
-
-  $form->{callback} = $form->escape($form->{callback}, 1);
-  my $name = $form->escape("$form->{name}", 1);
-
-  $form->{callback} =
-    "$form->{script}?action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
-  $form->redirect;
-
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_ap_transaction {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit & general_ledger');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{script} = "ap.pl";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_ar_transaction {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit & general_ledger');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{script} = "ar.pl";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_invoice {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  if ($form->{db} eq 'customer') {
-    $main::auth->assert('customer_vendor_edit & invoice_edit');
-  } else {
-    $main::auth->assert('customer_vendor_edit & vendor_invoice_edit');
-  }
-
-  $form->{script} = ($form->{db} eq 'customer') ? "is.pl" : "ir.pl";
-  $form->{type} = "invoice";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_rfq {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit & request_quotation_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{script} = "oe.pl";
-  $form->{type}   = "request_quotation";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_quotation {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit & sales_quotation_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{script} = "oe.pl";
-  $form->{type}   = "sales_quotation";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_order {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  if ($form->{db} eq 'customer') {
-    $main::auth->assert('customer_vendor_edit & sales_order_edit');
-  } else {
-    $main::auth->assert('customer_vendor_edit & purchase_order_edit');
-  }
-
-  $form->{script} = "oe.pl";
-  $form->{type}   =
-    ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &add_transaction;
-  $main::lxdebug->leave_sub();
-}
-
-sub save_and_close {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  my $msg = ucfirst $form->{db};
-  $msg .= " saved!";
-
-  _do_save();
-
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  $form->redirect($locale->text($msg));
-
-  $main::lxdebug->leave_sub();
-}
-
-sub save {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  my $msg = ucfirst $form->{db};
-  $msg .= " saved!";
-
-  _do_save();
-
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
-    $form->{addition} = "SAVED";
-    $form->save_history;
-  }
-  # /saving the history
-  &edit;
-
-  $main::lxdebug->leave_sub();
-  ::end_of_request();
-}
-
-sub delete {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-  my $locale   = $main::locale;
-
-  CT->delete(\%myconfig, \%$form);
-
-  my $msg = ucfirst $form->{db};
-  $msg .= " deleted!";
-  # saving the history
-  if(!exists $form->{addition}) {
-    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
-    $form->{addition} = "DELETED";
-    $form->save_history;
-  }
-  # /saving the history
-  $form->redirect($locale->text($msg));
-
-  $main::lxdebug->leave_sub();
-}
-
-sub display {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-
-  &form_header();
-  &form_footer();
-
-  $main::lxdebug->leave_sub();
-}
-
-sub update {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  my $form     = $main::form;
-
-  &display();
-  $main::lxdebug->leave_sub();
-}
-
-sub get_contact {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  CT->populate_drop_down_boxes(\%::myconfig, $::form);
-  CT->query_titles_and_greetings(\%::myconfig, $::form);
-  CT->get_contact(\%::myconfig, $::form) if $::form->{cp_id};
-
-  $::form->{CUSTOM_VARIABLES}{Contacts} = CVar->get_custom_variables(module => 'Contacts', trans_id => $::form->{cp_id});
-  CVar->render_inputs(variables => $::form->{CUSTOM_VARIABLES}{Contacts}, name_prefix => 'cp')
-    if scalar @{ $::form->{CUSTOM_VARIABLES}->{Contacts} };
-
-  $::form->{contacts_label} = \&_contacts_label;
-
-  print $::form->ajax_response_header(), $::form->parse_html_template('ct/_contact');
-
-  $main::lxdebug->leave_sub();
-}
-
-sub get_shipto {
-  $main::lxdebug->enter_sub();
-
-  $main::auth->assert('customer_vendor_edit');
-
-  CT->populate_drop_down_boxes(\%::myconfig, $::form);
-  CT->get_shipto(\%::myconfig, $::form) if $::form->{shipto_id};
-
-  $::form->{shipto_label} = \&_shipto_label;
-
-  print $::form->ajax_response_header(), $::form->parse_html_template('ct/_shipto');
-
-  $main::lxdebug->leave_sub();
-}
-
-sub get_delivery {
-  $::lxdebug->enter_sub;
-
-  $::auth->assert('customer_vendor_edit');
-  $::auth->assert('sales_all_edit');
-
-  CT->get_delivery(\%::myconfig, $::form );
-
-  print $::form->ajax_response_header,
-        $::form->parse_html_template('ct/get_delivery', {
-          is_customer =>  $::form->{db} eq 'customer',
-        });
-
-  $::lxdebug->leave_sub;
-}
-
-sub delete_shipto {
-  $::lxdebug->enter_sub;
-  $::auth->assert('customer_vendor_edit');
-
-  if (!$::form->{shipto_id}) {
-    flash('error', $::locale->text('No shipto selected to delete'));
-  } else {
-
-    CT->get_shipto(\%::myconfig, $::form);
-
-    my $shipto = SL::DB::Manager::Shipto->find_by(shipto_id => $::form->{shipto_id});
-
-    if ($shipto->used) {
-      $shipto->detach->save;
-      flash('info', $::locale->text('Shipto is in use and was flagged invalid.'));
-    } else {
-      $shipto->delete;
-      flash('info', $::locale->text('Shipto deleted.'));
-    }
-    delete $::form->{$_} for grep /^shipto/, keys %$::form;
-  }
-
-  edit();
-
-  $::lxdebug->leave_sub;
-}
-
-sub delete_contact {
-  $::lxdebug->enter_sub;
-  $::auth->assert('customer_vendor_edit');
-
-  if (!$::form->{cp_id}) {
-    flash('error', $::locale->text('No contact selected to delete'));
-  } else {
-
-    CT->get_contact(\%::myconfig, $::form);
-
-    my $contact = SL::DB::Manager::Contact->find_by(cp_id => $::form->{cp_id});
-
-    if ($contact->used) {
-      $contact->detach->save;
-      flash('info', $::locale->text('Contact is in use and was flagged invalid.'));
-    } else {
-      $contact->delete;
-      flash('info', $::locale->text('Contact deleted.'));
-    }
-    delete $::form->{$_} for grep /^cp_/, keys %$::form;
-  }
-
-  edit();
-
-  $::lxdebug->leave_sub;
-}
-
-sub ajax_autocomplete {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my %myconfig = %main::myconfig;
-
-  $form->{column}          = 'name'     unless $form->{column} =~ /^name$/;
-  $form->{vc}              = 'customer' unless $form->{vc} =~ /^customer|vendor$/;
-  $form->{db}              = $form->{vc}; # CT expects this
-  $form->{$form->{column}} = $form->{q}           || '';
-  $form->{limit}           = ($form->{limit} * 1) || 10;
-  $form->{searchitems}   ||= '';
-
-  CT->search(\%myconfig, $form);
-
-  print $form->ajax_response_header(),
-        $form->parse_html_template('ct/ajax_autocomplete');
-
-  $main::lxdebug->leave_sub();
-}
-
 sub continue { call_sub($main::form->{nextsub}); }
index 01658ab..9cac44e 100644 (file)
@@ -251,7 +251,8 @@ sub save_dunning {
 
   $form->{language_id} = $saved_language_id;
 
-  if($form->{DUNNING_PDFS}) {
+  if (scalar @{ $form->{DUNNING_PDFS} }) {
+    $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1;
     DN->melt_pdfs(\%myconfig, $form, $form->{copies});
   }
 
@@ -498,6 +499,7 @@ sub print_multiple {
     if (!$form->{force_lang}) {
       $form->{language_id} = $language_ids[$i];
     }
+    $form->{dunning_id} = $dunning_id;
     DN->print_invoice_for_fees(\%myconfig, $form, $dunning_id);
     DN->print_dunning(\%myconfig, $form, $dunning_id);
     $i++;
@@ -505,7 +507,7 @@ sub print_multiple {
   $form->{language_id} = $saved_language_id;
 
   if (scalar @{ $form->{DUNNING_PDFS} }) {
-    $form->{dunning_id} = strftime("%Y%m%d", localtime time);
+    $form->{dunning_id} = strftime("%Y%m%d", localtime time) if scalar @{ $form->{DUNNING_PDFS}} > 1;
     DN->melt_pdfs(\%myconfig, $form, $form->{copies});
 
     if ($form->{media} eq 'printer') {
index 086c008..26985e2 100644 (file)
@@ -38,6 +38,7 @@ use SL::DB::DeliveryOrder;
 use SL::DO;
 use SL::IR;
 use SL::IS;
+use SL::MoreCommon qw(ary_diff);
 use SL::ReportGenerator;
 use SL::WH;
 require "bin/mozilla/arap.pl";
@@ -172,7 +173,7 @@ sub order_links {
   DO->retrieve('vc'  => $form->{vc},
                'ids' => $form->{id});
 
-  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes currency));
+  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes delivery_term_id currency));
   $form->{shipto} = 1 if $form->{id} || $form->{convert_from_oe_ids};
 
   # get customer / vendor
@@ -184,7 +185,7 @@ sub order_links {
     $form->{discount} = $form->{customer_discount};
   }
 
-  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id));
+  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id delivery_term_id));
   $form->restore_vars(qw(currency)) if ($form->{id} || $form->{convert_from_oe_ids});
   $form->restore_vars(qw(taxincluded)) if $form->{id};
   $form->restore_vars(qw(salesman_id)) if $editing;
@@ -293,22 +294,24 @@ sub form_header {
   $form->{oldvcname}         =  $form->{"old$form->{vc}"};
   $form->{oldvcname}         =~ s/--.*//;
 
-  if ($form->{resubmit}) {
-    my $dispatch_to_popup = '';
-    if ($form->{format} eq "html") {
-      $dispatch_to_popup .= "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
-    }
-    # emulate click for resubmitting actions
-    $dispatch_to_popup .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form;
+  my $dispatch_to_popup = '';
+  if ($form->{resubmit} && ($form->{format} eq "html")) {
+    $dispatch_to_popup  = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
     $dispatch_to_popup .= "document.do.submit();";
-    $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})");
+  } elsif ($form->{resubmit}) {
+    # emulate click for resubmitting actions
+    $dispatch_to_popup  = "document.do.${_}.click(); " for grep { /^action_/ } keys %$form;
   }
+  $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})");
+
 
   my $follow_up_vc                =  $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' };
   $follow_up_vc                   =~ s/--\d*\s*$//;
 
   $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')';
 
+  $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
   $form->header();
   # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID'
   # und Erweiterung für Bug 1760:
@@ -335,6 +338,7 @@ sub form_footer {
   my $form     = $main::form;
 
   $form->{PRINT_OPTIONS} = print_options('inline' => 1);
+  $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
 
   print $form->parse_html_template('do/form_footer',
     {transfer_default         => ($::instance_conf->get_transfer_default)});
@@ -411,9 +415,15 @@ sub update_delivery_order {
         map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] };
 
         $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor};
-        $form->{"sellprice_$i"}          = $form->format_amount(\%myconfig, $form->{"sellprice_$i"});
+        $form->{"sellprice_$i"}          = $form->format_amount(\%myconfig, $form->{"sellprice_$i"} * (1 - $form->{tradediscount}));
         $form->{"lastcost_$i"}          = $form->format_amount(\%myconfig, $form->{"lastcost_$i"});
         $form->{"qty_$i"}                = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+        # get pricegroups for parts
+        IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+
+        # build up html code for prices_$i
+        &set_pricegroup($i);
       }
 
       display_form();
@@ -490,7 +500,7 @@ sub orders {
   my @columns = qw(
     ids                     transdate               reqdate
     id                      donumber
-    ordnumber               customernumber
+    ordnumber               customernumber          cusordnumber
     name                    employee  salesman
     shipvia                 globalprojectnumber
     transaction_description department
@@ -507,19 +517,21 @@ sub orders {
   my $report = SL::ReportGenerator->new(\%myconfig, $form);
 
   my @hidden_variables = map { "l_${_}" } @columns;
-  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber
-                                          transaction_description transdatefrom transdateto type vc employee_id salesman_id project_id);
+  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber
+                                          transaction_description transdatefrom transdateto reqdatefrom reqdateto
+                                          type vc employee_id salesman_id project_id);
 
   my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
 
   my %column_defs = (
     'ids'                     => { 'text' => '', },
-    'transdate'               => { 'text' => $locale->text('Date'), },
+    'transdate'               => { 'text' => $locale->text('Delivery Order Date'), },
     'reqdate'                 => { 'text' => $locale->text('Reqdate'), },
     'id'                      => { 'text' => $locale->text('ID'), },
     'donumber'                => { 'text' => $locale->text('Delivery Order'), },
     'ordnumber'               => { 'text' => $locale->text('Order'), },
     'customernumber'          => { 'text' => $locale->text('Customer Number'), },
+    'cusordnumber'            => { 'text' => $locale->text('Customer Order Number'), },
     'name'                    => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
     'employee'                => { 'text' => $locale->text('Employee'), },
     'salesman'                => { 'text' => $locale->text('Salesman'), },
@@ -569,12 +581,16 @@ sub orders {
   if ($form->{transaction_description}) {
     push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
   }
-  if ($form->{transdatefrom}) {
-    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
-  }
-  if ($form->{transdateto}) {
-    push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1);
-  }
+  if ( $form->{transdatefrom} or $form->{transdateto} ) {
+    push @options, $locale->text('Delivery Order Date');
+    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
+    push @options, $locale->text('Bis')  . " " . $locale->date(\%myconfig, $form->{transdateto},   1)     if $form->{transdateto};
+  };
+  if ( $form->{reqdatefrom} or $form->{reqdateto} ) {
+    push @options, $locale->text('Reqdate');
+    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{reqdatefrom}, 1)       if $form->{reqdatefrom};
+    push @options, $locale->text('Bis')  . " " . $locale->date(\%myconfig, $form->{reqdateto},   1)       if $form->{reqdateto};
+  };
   if ($form->{open}) {
     push @options, $locale->text('Open');
   }
@@ -680,8 +696,8 @@ sub save {
 
   $form->{simple_save} = 1;
   if (!$params{no_redirect} && !$form->{print_and_save}) {
-    set_headings("edit");
-    update();
+    delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])};
+    edit();
     ::end_of_request();
   }
   $main::lxdebug->leave_sub();
@@ -822,7 +838,7 @@ sub invoice {
     $form->{"sellprice_pg_$i"} = join '--', $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
   }
   IS->get_pricegroups_for_parts(\%myconfig, \%$form);
-  set_pricegroup($_) for 1 .. $form->{rowcount};
+  set_pricegroup($form->{rowcount});
 
   display_form();
 
@@ -861,6 +877,8 @@ sub invoice_multi {
   # Hinweis: delete gibt den wert zurueck und loescht danach das element (nett und einfach)
   # $shell: perldoc perlunc; /delete EXPR
   $form->{donumber}            = delete $form->{donumber_array};
+  $form->{ordnumber}           = delete $form->{ordnumber_array};
+  $form->{cusordnumber}        = delete $form->{cusordnumber_array};
   $form->{deliverydate}        = $form->{transdate};
   $form->{transdate}           = $form->current_date(\%myconfig);
   $form->{duedate}             = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
@@ -1311,6 +1329,8 @@ sub transfer_in {
         $request->{parts_id}  = $form->{"id_$i"};
         $row_sum_base_qty    += $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor;
 
+        $request->{project_id} = $form->{"project_id_$i"} || $form->{globalproject_id};
+
         push @all_requests, $request;
       }
 
index d2e0f9c..fb0de34 100644 (file)
@@ -683,17 +683,6 @@ sub display_rows {
     $charts{$item->{accno}} = $item;
   }
 
-  my %taxchart_labels = ();
-  my @taxchart_values = ();
-  my %taxcharts = ();
-  foreach my $item (@{ $form->{TAX_ACCOUNTS} }) {
-    my $key = $item->{id} . "--" . $item->{rate};
-    $taxchart_init = $key if ($taxchart_init == $item->{id});
-    push(@taxchart_values, $key);
-    $taxchart_labels{$key} = $item->{taxdescription} . " " . $item->{rate} * 100 . ' %';
-    $taxcharts{$item->{id}} = $item;
-  }
-
   my ($source, $memo, $source_hidden, $memo_hidden);
   for my $i (1 .. $form->{rowcount}) {
     if ($form->{show_details}) {
@@ -717,6 +706,20 @@ sub display_rows {
     my ($selected_accno, $selected_tax_id) = split(/--/, $selected_accno_full);
     my ($previous_accno, $previous_tax_id) = split(/--/, $form->{"previous_accno_$i"});
 
+    my %taxchart_labels = ();
+    my @taxchart_values = ();
+    my %taxcharts = ();
+    my $filter_accno;
+    $filter_accno = $::form->{ALL_CHARTS}[0]->{accno};
+    $filter_accno = $selected_accno if (!$init and $i < $form->{rowcount});
+    foreach my $item ( GL->get_tax_dropdown($filter_accno) ) {
+      my $key = $item->{id} . "--" . $item->{rate};
+      $taxchart_init = $key if ($taxchart_init == $item->{id});
+      push(@taxchart_values, $key);
+      $taxchart_labels{$key} = $item->{taxdescription} . " " . $item->{rate} * 100 . ' %';
+      $taxcharts{$item->{id}} = $item;
+    }
+
     if ($previous_accno &&
         ($previous_accno eq $selected_accno) &&
         ($previous_tax_id ne $selected_tax_id)) {
@@ -740,11 +743,11 @@ sub display_rows {
       . qq|</td>|;
     my $tax_ddbox = qq|<td>| .
       NTI($cgi->popup_menu('-name' => "taxchart_$i",
-                           '-id' => "taxchart_$i",
-                           '-style' => 'width:200px',
-                           '-values' => \@taxchart_values,
-                           '-labels' => \%taxchart_labels,
-                           '-default' => $selected_taxchart))
+            '-id' => "taxchart_$i",
+            '-style' => 'width:200px',
+            '-values' => \@taxchart_values,
+            '-labels' => \%taxchart_labels,
+            '-default' => $selected_taxchart))
       . qq|</td>|;
 
     my ($fx_transaction, $checked);
@@ -864,9 +867,6 @@ sub form_header {
                    "charts"    => { "key"       => "ALL_CHARTS",
                                     "transdate" => $::form->{transdate} });
 
-  $::form->{accno} = $::form->{ALL_CHARTS}[0]->{accno};
-  GL->get_tax_dropdown();
-
   GL->get_chart_balances('charts' => $::form->{ALL_CHARTS});
 
   my $title      = $::form->{title};
@@ -1225,16 +1225,18 @@ sub continue {
 }
 
 sub get_tax_dropdown {
+  $main::lxdebug->enter_sub();
 
   my $form = $main::form;
-  $main::lxdebug->enter_sub();
-  GL->get_tax_dropdown();
+  my @tax_accounts = GL->get_tax_dropdown($form->{accno});
 
-  foreach my $item (@{ $form->{TAX_ACCOUNTS} }) {
+  foreach my $item (@tax_accounts) {
     $item->{taxdescription} = $::locale->{iconv_utf8}->convert($item->{taxdescription});
     $item->{taxdescription} .= ' ' . $form->round_amount($item->{rate} * 100);
   }
 
+  $form->{TAX_ACCOUNTS} = [ @tax_accounts ];
+
   print $form->ajax_response_header, $form->parse_html_template("gl/update_tax_accounts");
 
   $main::lxdebug->leave_sub();
index c7cb71b..473467b 100644 (file)
@@ -1194,14 +1194,22 @@ sub generate_report {
 
   # soldtotal doesn't make sense with more than one bsooqr option.
   # so reset it to sold (the most common option), and issue a warning
+  # ...
+  # also it doesn't make sense without bsooqr. disable and issue a warning too
   my @bsooqr = qw(sold bought onorder ordered rfq quoted);
-  if ($form->{l_subtotal} && 1 < grep { $form->{$_} } @bsooqr) {
+  my $bsooqr_mode = grep { $form->{$_} } @bsooqr;
+  if ($form->{l_subtotal} && 1 < $bsooqr_mode) {
     my $enabled       = first { $form->{$_} } @bsooqr;
     $form->{$_}       = ''   for @bsooqr;
     $form->{$enabled} = 'Y';
 
     push @options, $::locale->text('Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1', $optiontexts{$enabled});
   }
+  if ($form->{l_soldtotal} && !$bsooqr_mode) {
+    delete $form->{l_soldtotal};
+
+    flash('warning', $::locale->text('Soldtotal does not make sense without any bsooqr options'));
+  }
 
   IC->all_parts(\%myconfig, \%$form);
 
@@ -1266,7 +1274,7 @@ sub generate_report {
     'assembly' => $locale->text('assembly_list'),
   );
 
-  $report->set_options('top_info_text'         => $locale->text('Options') . ': ' . join(', ', grep $_, @options),
+  $report->set_options('raw_top_info_text'     => $form->parse_html_template('ic/generate_report_top', { options => \@options }),
                        'raw_bottom_info_text'  => $form->parse_html_template('ic/generate_report_bottom'),
                        'output_format'         => 'HTML',
                        'title'                 => $form->{title},
@@ -1316,7 +1324,7 @@ sub generate_report {
     $ref->{lastcost}      *= $ref->{exchangerate} / $ref->{price_factor};
 
     # use this for assemblies
-    my $soldtotal = $ref->{soldtotal};
+    my $soldtotal = $bsooqr_mode ? $ref->{soldtotal} : $ref->{onhand};
 
     if ($ref->{assemblyitem}) {
       $row->{partnumber}{align}   = 'right';
@@ -1600,6 +1608,8 @@ sub form_header {
     $form->{bin_id}       ||= $default_bin_id       ||  $form->{WAREHOUSES}->[$max -1]->{BINS}->[0]->{id};
   }
 
+  $form->{LANGUAGES}        = SL::DB::Manager::Language->get_all_sorted;
+  $form->{translations_map} = { map { ($_->{language_id} => $_) } @{ $form->{translations} || [] } };
 
   IC->retrieve_buchungsgruppen(\%myconfig, $form);
   @{ $form->{BUCHUNGSGRUPPEN} } = grep { $_->{id} eq $form->{buchungsgruppen_id} || ($form->{id} && $form->{orphaned}) || !$form->{id} } @{ $form->{BUCHUNGSGRUPPEN} };
@@ -1910,7 +1920,7 @@ sub save {
       } else {
         $i = $form->{assembly_rows};
       }
-      $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+      $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"} > 0);
 
       $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"};
       $form->{weight}    -= $form->{"weight_$i"} * $form->{"qty_$i"};
@@ -1927,7 +1937,7 @@ sub save {
 
       # set values for last invoice/order item
       $i = $form->{rowcount};
-      $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+      $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"} > 0);
 
       map { $form->{"${_}_$i"} = $newform{$_} } qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice lastcost price_factor_id);
       map { $form->{"ic_${_}_$i"} = $newform{$_} } @ic_cvar_fields;
@@ -2055,50 +2065,6 @@ sub price_row {
   $lxdebug->leave_sub();
 }
 
-sub parts_language_selection {
-  $lxdebug->enter_sub();
-
-  $auth->assert('part_service_assembly_edit');
-
-  my $languages = IC->retrieve_languages(\%myconfig, $form);
-
-  if ($form->{language_values} ne "") {
-    foreach my $item (split(/---\+\+\+---/, $form->{language_values})) {
-      my ($language_id, $translation, $longdescription) = split(/--\+\+--/, $item);
-
-      foreach my $language (@{ $languages }) {
-        next unless ($language->{id} == $language_id);
-
-        $language->{translation}     = $translation;
-        $language->{longdescription} = $longdescription;
-
-        $language->{translation_area}     = ($language->{translation_rows} = $form->numtextrows($language->{translation}, 40)) > 1;
-        $language->{longdescription_rows} = max 4, $form->numtextrows($language->{longdescription}, 40);
-
-        last;
-      }
-    }
-  }
-
-  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" => $_,
-         },
-        @header_sort);
-
-  $form->{"title"} = $locale->text("Language Values");
-  $form->header();
-  print $form->parse_html_template("ic/parts_language_selection", { "HEADER"    => \@header,
-                                                                    "LANGUAGES" => $languages, });
-
-  $lxdebug->leave_sub();
-}
-
 sub ajax_autocomplete {
   $main::lxdebug->enter_sub();
 
index 0756448..c584f32 100644 (file)
@@ -225,6 +225,10 @@ sub display_row {
       qw(qty discount sellprice lastcost price_new price_old)
         unless ($form->{simple_save});
 
+    if ($form->{"prices_$i"} && ($form->{"new_pricegroup_$i"} != $form->{"old_pricegroup_$i"})) {
+      $form->{"sellprice_$i"} = $form->{"price_new_$i"};
+    }
+
 # unit begin
     $form->{"unit_old_$i"}      ||= $form->{"unit_$i"};
     $form->{"selected_unit_$i"} ||= $form->{"unit_$i"};
@@ -270,12 +274,12 @@ sub display_row {
     my $linetotal      = $form->round_amount($form->{"qty_$i"} * $form->{"sellprice_$i"} * (100 - $form->{"discount_$i"}) / 100 / $price_factor, 2);
     my $rows            = $form->numtextrows($form->{"description_$i"}, 30, 6);
 
-    $column_data{runningnumber} = $cgi->textfield(-name => "runningnumber_$i", -size => 5,  -value => $i);    # HuT
-    $column_data{partnumber}    = $cgi->textfield(-name => "partnumber_$i",    -size => 12, -value => $form->{"partnumber_$i"});
+    $column_data{runningnumber} = $cgi->textfield(-name => "runningnumber_$i", -id => "runningnumber_$i", -size => 5,  -value => $i);    # HuT
+    $column_data{partnumber}    = $cgi->textfield(-name => "partnumber_$i",    -id => "partnumber_$i",    -size => 12, -value => $form->{"partnumber_$i"});
     $column_data{description} = (($rows > 1) # if description is too large, use a textbox instead
-                                ? $cgi->textarea( -name => "description_$i", -default => $form->{"description_$i"}, -rows => $rows, -columns => 30)
-                                : $cgi->textfield(-name => "description_$i",   -size => 30, -value => $form->{"description_$i"}))
-                                . $cgi->button(-value => $locale->text('L'), -onClick => "set_longdescription_window('longdescription_$i')");
+                                ? $cgi->textarea( -name => "description_$i", -id => "description_$i", -default => $form->{"description_$i"}, -rows => $rows, -columns => 30)
+                                : $cgi->textfield(-name => "description_$i", -id => "description_$i",   -value => $form->{"description_$i"}, -size => 30))
+                                . $cgi->button(-value => $locale->text('L'), -onClick => "kivi.SalesPurchase.edit_longdescription($i)");
 
     my $qty_dec = ($form->{"qty_$i"} =~ /\.(\d+)/) ? length $1 : 2;
 
@@ -421,14 +425,16 @@ sub display_row {
 
     if ($is_delivery_order) {
       map { $form->{"${_}_${i}"} = $form->format_amount(\%myconfig, $form->{"${_}_${i}"}) } qw(sellprice discount lastcost);
-      push @hidden_vars, qw(sellprice discount not_discountable price_factor_id lastcost pricegroup_id);
+      $form->{"pricegroup_id_$i"} = $form->{"pricegroup_old_$i"} if $form->{"pricegroup_old_$i"};
+      $form->{"sellprice_pg_$i"}  = $form->{"hidden_prices_$i"}  if $form->{"hidden_prices_$i"};
+      push @hidden_vars, grep { defined $form->{"${_}_${i}"} } qw(sellprice discount not_discountable price_factor_id lastcost pricegroup_id sellprice_pg);
       push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}";
     }
 
     my @HIDDENS = map { value => $_}, (
           $cgi->hidden("-name" => "unit_old_$i", "-value" => $form->{"selected_unit_$i"}),
           $cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})),
-          map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
+          map { ($cgi->hidden("-name" => $_, "-id" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
             (qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
                 income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
                 longdescription basefactor marge_absolut marge_percent marge_price_factor weight), @hidden_vars)
@@ -483,6 +489,10 @@ sub set_pricegroup {
       $form->{"sellprice_$j"}      = $item->{price}           if $item->{selected} &&  $item->{pricegroup_id};
       $form->{"price_new_$j"}      = $form->{"sellprice_$j"}  if $item->{selected} || !$item->{pricegroup_id};
     }
+
+    # save hidden pricegroups for delivery_orders
+    next unless my @selected_prices = grep { $_->{selected} } @{ $form->{PRICES}{$j} };
+    $form->{"hidden_prices_$j"} = $selected_prices[-1]{price} . "--" . $selected_prices[-1]{pricegroup_id};
   }
   $main::lxdebug->leave_sub();
 }
@@ -1196,12 +1206,17 @@ sub print {
     }
     $form->{print_and_save} = 1;
     my $formname = $form->{formname};
-    &save();
+    save();
     $form->{formname} = $formname;
-    &edit();
+    edit();
     $::lxdebug->leave_sub();
     ::end_of_request();
   }
+  elsif (($form->{type} =~ /_order$/) || ($form->{type} =~ /_quotation$/)) {
+    $form->{print_and_save} = 1;
+    save();
+  }
+
 
   &print_form($old_form);
 
@@ -1331,31 +1346,7 @@ sub print_form {
   # $locale->text('Quotation Number missing!')
   # $locale->text('Quotation Date missing!')
 
-  # assign number
   $form->{what_done} = $form->{formname};
-  if (!$form->{"${inv}number"} && !$form->{preview} && !$form->{id}) {
-    $form->{"${inv}number"} = $form->update_defaults(\%myconfig, $numberfld);
-    if ($form->{media} ne 'email') {
-
-      # get pricegroups for parts
-      IS->get_pricegroups_for_parts(\%myconfig, \%$form);
-
-      # build up html code for prices_$i
-      set_pricegroup($form->{rowcount});
-
-      $form->{rowcount}--;
-
-      call_sub($display_form);
-      # saving the history
-      if(!exists $form->{addition}) {
-        $form->{snumbers} = "${inv}number" . "_" . $form->{"${inv}number"};
-        $form->{addition} = "PRINTED";
-        $form->save_history;
-      }
-      # /saving the history
-      ::end_of_request();
-    }
-  }
 
   &validate_items;
 
@@ -1365,6 +1356,7 @@ sub print_form {
 
   my $language_saved = $form->{language_id};
   my $payment_id_saved = $form->{payment_id};
+  my $delivery_term_id_saved = $form->{delivery_term_id};
   my $salesman_id_saved = $form->{salesman_id};
   my $cp_id_saved = $form->{cp_id};
   my $taxzone_id_saved = $form->{taxzone_id};
@@ -1374,6 +1366,7 @@ sub print_form {
 
   $form->{language_id} = $language_saved;
   $form->{payment_id} = $payment_id_saved;
+  $form->{delivery_term_id} = $delivery_term_id_saved;
   $form->{taxzone_id} = $taxzone_id_saved;
   $form->{currency} = $currency_saved;
 
@@ -1918,6 +1911,13 @@ sub _remove_billed_or_delivered_rows {
   my @fields = map { s/_1$//; $_ } grep { m/_1$/ } keys %{ $::form };
   my @new_rows;
 
+  my $make_key = sub {
+    my ($row) = @_;
+    return $::form->{"id_${row}"} unless $::form->{"serialnumber_${row}"};
+    my $key = $::form->{"id_${row}"} . ':' . $::form->{"serialnumber_${row}"};
+    return exists $params{quantities}->{$key} ? $key : $::form->{"id_${row}"};
+  };
+
   my $removed_rows = 0;
   my $row          = 0;
   while ($row < $::form->{rowcount}) {
@@ -1927,8 +1927,9 @@ sub _remove_billed_or_delivered_rows {
     my $parts_id                      = $::form->{"id_$row"};
     my $base_qty                      = $::form->parse_amount(\%::myconfig, $::form->{"qty_$row"}) * SL::DB::Manager::Unit->find_by(name => $::form->{"unit_$row"})->base_factor;
 
-    my $sub_qty                       = min($base_qty, $params{quantities}->{$parts_id});
-    $params{quantities}->{$parts_id} -= $sub_qty;
+    my $key                           = $make_key->($row);
+    my $sub_qty                       = min($base_qty, $params{quantities}->{$key});
+    $params{quantities}->{$key}      -= $sub_qty;
 
     if (!$sub_qty || ($sub_qty != $base_qty)) {
       $::form->{"qty_${row}"} = $::form->format_amount(\%::myconfig, ($base_qty - $sub_qty) / SL::DB::Manager::Unit->find_by(name => $::form->{"unit_$row"})->base_factor);
index 3653891..2be2776 100644 (file)
@@ -116,37 +116,14 @@ sub invoice_links {
     }
   }
 
-  my ($payment_id, $language_id, $taxzone_id, $currency);
-  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->{currency}) {
-    $currency = $form->{currency};
-  }
+  $form->backup_vars(qw(payment_id language_id taxzone_id
+                        currency delivery_term_id intnotes cp_id));
 
-  my $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;
-  }
-  if ($currency) {
-    $form->{currency} = $currency;
-  }
+  $form->restore_vars(qw(payment_id language_id taxzone_id
+                         currency delivery_term_id intnotes cp_id));
 
   my @curr = $form->get_all_currencies();
   map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
@@ -350,10 +327,12 @@ sub form_header {
     max_dunning_level dunning_amount
     shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax
     shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus
-    convert_from_do_ids convert_from_oe_ids
+    convert_from_do_ids convert_from_oe_ids show_details gldate
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
 
+  $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
   $form->header();
 
   print $form->parse_html_template("ir/form_header", \%TMPL_VAR);
@@ -431,6 +410,8 @@ sub form_footer {
     $totalpaid += $form->{"paid_$i"};
   }
 
+  $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
+
   print $form->parse_html_template('ir/form_footer', {
     is_type_credit_note => ($form->{type} eq "credit_note"),
     totalpaid           => $totalpaid,
index ecc5f55..a1af7b1 100644 (file)
@@ -36,6 +36,7 @@ use SL::IS;
 use SL::PE;
 use SL::OE;
 use Data::Dumper;
+use DateTime;
 use List::Util qw(max sum);
 
 use SL::DB::Default;
@@ -149,8 +150,11 @@ sub invoice_links {
 
   my $editing = $form->{id};
 
-  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded currency cp_id intnotes id shipto_id));
+  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id
+                        taxincluded currency cp_id intnotes id shipto_id
+                        delivery_term_id));
 
+  $form->{shipto} = 1 if $editing || $form->{convert_from_oe_ids} || $form->{convert_from_do_ids};
   IS->get_customer(\%myconfig, \%$form);
 
   #quote all_customer Bug 133
@@ -161,7 +165,8 @@ sub invoice_links {
   $form->restore_vars(qw(id));
 
   IS->retrieve_invoice(\%myconfig, \%$form);
-  $form->restore_vars(qw(payment_id language_id taxzone_id currency intnotes cp_id shipto_id));
+  $form->restore_vars(qw(payment_id language_id taxzone_id currency intnotes
+                         cp_id shipto_id delivery_term_id));
   $form->restore_vars(qw(taxincluded)) if $form->{id};
   $form->restore_vars(qw(salesman_id)) if $editing;
 
@@ -374,9 +379,12 @@ sub form_header {
     shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax
     shiptoemail shiptodepartment_1 shiptodepartment_2  shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus
     convert_from_do_ids convert_from_oe_ids
+    show_details
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
 
+  $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
   $form->header();
 
   print $form->parse_html_template("is/form_header", \%TMPL_VAR);
@@ -460,6 +468,8 @@ sub form_footer {
 
   $form->{oldinvtotal} = $form->{invtotal};
 
+  $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
+
   print $form->parse_html_template('is/form_footer', {
     is_type_credit_note => ($form->{type} eq "credit_note"),
     totalpaid           => $totalpaid,
@@ -811,6 +821,7 @@ sub use_as_new {
   $form->{rowcount}--;
   $form->{invdate} = $form->current_date(\%myconfig);
   $form->{duedate} = $form->get_duedate(\%myconfig, $form->{invdate}) || $form->{invdate};
+  $form->{employee_id} = SL::DB::Manager::Employee->current->id;
 
   # remember pricegroups for "use as new"
   IS->get_pricegroups_for_parts(\%myconfig, \%$form);
@@ -837,6 +848,9 @@ sub storno {
   if (IS->has_storno(\%myconfig, $form, "ar")) {
     $form->error($locale->text("Invoice has already been storno'd!"));
   }
+  if ($form->datetonum($form->{invdate},  \%myconfig) <= $form->datetonum($form->{closedto}, \%myconfig)) {
+    $form->error($locale->text('Cannot storno invoice for a closed period!'));
+  }
 
   map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form }));
 
@@ -852,6 +866,7 @@ sub storno {
   $form->{storno} = 1;
   $form->{id} = "";
   $form->{invnumber} = "Storno zu " . $form->{invnumber};
+  $form->{invdate}   = DateTime->today->to_lxoffice;
   $form->{rowcount}++;
 
   post();
@@ -1011,6 +1026,10 @@ sub yes {
   $main::lxdebug->leave_sub();
 }
 
+sub post_and_e_mail {
+  e_mail();
+};
+
 sub e_mail {
   $main::lxdebug->enter_sub();
 
index 6b84103..8a8e6d4 100644 (file)
@@ -48,6 +48,7 @@ use List::Util qw(min max reduce sum);
 use Data::Dumper;
 
 use SL::DB::Customer;
+use SL::DB::TaxZone;
 
 require "bin/mozilla/io.pl";
 require "bin/mozilla/arap.pl";
@@ -244,14 +245,14 @@ sub order_links {
 
   $form->{"$form->{vc}_id"} ||= $form->{"all_$form->{vc}"}->[0]->{id} if $form->{"all_$form->{vc}"};
 
-  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes shipto_id currency));
+  $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes shipto_id delivery_term_id currency));
   $form->{shipto} = 1 if $form->{id} || $form->{convert_from_oe_ids};
 
   # get customer / vendor
   IR->get_vendor(\%myconfig, \%$form)   if $form->{type} =~ /(purchase_order|request_quotation)/;
   IS->get_customer(\%myconfig, \%$form) if $form->{type} =~ /sales_(order|quotation)/;
 
-  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id shipto_id));
+  $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id shipto_id delivery_term_id));
   $form->restore_vars(qw(currency))    if $form->{id};
   $form->restore_vars(qw(taxincluded)) if $form->{id};
   $form->restore_vars(qw(salesman_id)) if $editing;
@@ -428,19 +429,20 @@ sub form_header {
     }
   }
 
-  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
-  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_history.js"></script>|;
-  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
+  $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details));
 
   $form->header;
-
+  if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) {
+      $form->{shipto_id} = $form->{CFDD_shipto_id};
+  }
   $TMPL_VAR{HIDDENS} = [ map { name => $_, value => $form->{$_} },
      qw(id action type vc formname media format proforma queued printed emailed
         title creditlimit creditremaining tradediscount business
         max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode
-        shiptocity shiptocountry shiptocontact shiptophone shiptofax
+        CFDD_shipto CFDD_shipto_id shiptocity shiptocountry shiptocontact shiptophone shiptofax
         shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender
-        message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus),
+        message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus
+        show_details),
         @custom_hiddens,
         map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ];  # deleted: discount
 
@@ -522,6 +524,8 @@ sub form_footer {
 
   $form->{oldinvtotal} = $form->{invtotal};
 
+  $TMPL_VAR{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
+
   print $form->parse_html_template("oe/form_footer", {
      %TMPL_VAR,
      webdav          => $::instance_conf->get_webdav,
@@ -722,7 +726,8 @@ sub search {
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
                    "departments"  => "ALL_DEPARTMENTS",
                    "$form->{vc}s" => "ALL_VC",
-                   "business_types" => "ALL_BUSINESS_TYPES");
+                   "taxzones"     => "ALL_TAXZONES",
+                   "business_types" => "ALL_BUSINESS_TYPES",);
   $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   # constants and subs for template
@@ -792,7 +797,8 @@ sub orders {
     "delivered",               "periodic_invoices",
     "marge_total",             "marge_percent",
     "vcnumber",                "ustid",
-    "country",
+    "country",                 "shippingpoint",
+    "taxzone",
   );
 
   # only show checkboxes if gotten here via sales_order form.
@@ -831,9 +837,12 @@ sub orders {
   push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber
                                                         transaction_description transdatefrom transdateto type vc employee_id salesman_id
                                                         reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
-                                                        business_id);
+                                                        business_id shippingpoint taxzone_id);
+
+  my   @keys_for_url = grep { $form->{$_} } @hidden_variables;
+  push @keys_for_url, 'taxzone_id' if $form->{taxzone_id} ne ''; # taxzone_id could be 0
 
-  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
+  my $href = build_std_url('action=orders', @keys_for_url);
 
   my %column_defs = (
     'ids'                     => { 'text' => '', },
@@ -861,9 +870,11 @@ sub orders {
     'country'                 => { 'text' => $locale->text('Country'), },
     'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
     'periodic_invoices'       => { 'text' => $locale->text('Per. Inv.'), },
+    'shippingpoint'           => { 'text' => $locale->text('Shipping Point'), },
+    'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
   );
 
-  foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description)) {
+  foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) {
     my $sortdir                 = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
     $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
   }
@@ -888,6 +899,7 @@ sub orders {
   push @options, $locale->text('Order Number')            . " : $form->{ordnumber}"                       if $form->{ordnumber};
   push @options, $locale->text('Notes')                   . " : $form->{notes}"                           if $form->{notes};
   push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"         if $form->{transaction_description};
+  push @options, $locale->text('Shipping Point')          . " : $form->{shippingpoint}"                   if $form->{shippingpoint};
   if ( $form->{transdatefrom} or $form->{transdateto} ) {
     push @options, $locale->text('Order Date');
     push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
@@ -908,6 +920,9 @@ sub orders {
     my $vc_type_label = $form->{vc} eq 'customer' ? $locale->text('Customer type') : $locale->text('Vendor type');
     push @options, $vc_type_label . " : " . SL::DB::Business->new(id => $form->{business_id})->load->description;
   }
+  if ($form->{taxzone_id} ne '') { # taxzone_id could be 0
+    push @options, $locale->text('Steuersatz') . " : " . SL::DB::TaxZone->new(id => $form->{taxzone_id})->load->description;
+  }
 
   $report->set_options('top_info_text'        => join("\n", @options),
                        'raw_top_info_text'    => $form->parse_html_template('oe/orders_top'),
@@ -1105,10 +1120,8 @@ sub save_and_close {
 
   }
 
-  # get new number in sequence if no number is given or if saveasnew was requested
-  if (!$form->{$ordnumber} || $form->{saveasnew}) {
-    $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld);
-  }
+  # get new number in sequence if saveasnew was requested
+  delete $form->{$ordnumber} if $form->{saveasnew};
 
   relink_accounts();
 
@@ -1215,10 +1228,6 @@ sub save {
 
   }
 
-  # value of $ordnumber is ordnumber or quonumber
-  $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
-    unless $form->{$ordnumber};
-
   relink_accounts();
 
   OE->save(\%myconfig, \%$form);
@@ -1344,8 +1353,7 @@ sub invoice {
     $exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate, $buysell);
 
     if (!$exchangerate) {
-      &backorder_exchangerate($orddate, $buysell);
-      ::end_of_request();
+      $exchangerate = 0;
     }
   }
 
@@ -1436,75 +1444,6 @@ sub invoice {
   $main::lxdebug->leave_sub();
 }
 
-sub backorder_exchangerate {
-  $main::lxdebug->enter_sub();
-
-  my $form     = $main::form;
-  my $locale   = $main::locale;
-
-  check_oe_access();
-
-  my ($orddate, $buysell) = @_;
-
-  $form->header;
-
-  print qq|
-<form method=post action=$form->{script}>
-|;
-
-  # delete action variable
-  map { delete $form->{$_} } qw(action header exchangerate);
-
-  foreach my $key (keys %$form) {
-    next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
-    $form->{$key} =~ s/\"/&quot;/g;
-    print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
-  }
-
-  $form->{title} = $locale->text('Add Exchangerate');
-
-  print qq|
-
-<input type=hidden name=exchangeratedate value=$orddate>
-<input type=hidden name=buysell value=$buysell>
-
-<table width=100%>
-  <tr><th class=listtop>$form->{title}</th></tr>
-  <tr height="5"></tr>
-  <tr>
-    <td>
-      <table>
-        <tr>
-          <th align=right>| . $locale->text('Currency') . qq|</th>
-          <td>$form->{currency}</td>
-        </tr>
-        <tr>
-          <th align=right>| . $locale->text('Date') . qq|</th>
-          <td>$orddate</td>
-        </tr>
-        <tr>
-          <th align=right>| . $locale->text('Exchangerate') . qq|</th>
-          <td><input name=exchangerate size=11></td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>
-
-<hr size=3 noshade>
-
-<br>
-<input type=hidden name=nextsub value=save_exchangerate>
-
-<input name=action class=submit type=submit value="|
-    . $locale->text('Continue') . qq|">
-
-</form>
-|;
-
-  $main::lxdebug->leave_sub();
-}
-
 sub save_exchangerate {
   $main::lxdebug->enter_sub();
 
@@ -1655,6 +1594,7 @@ sub check_for_direct_delivery_yes {
   delete @{$form}{grep /^shipto/, keys %{ $form }};
   map { s/^CFDD_//; $form->{$_} = $form->{"CFDD_${_}"} } grep /^CFDD_/, keys %{ $form };
   $form->{shipto} = 1;
+  $form->{CFDD_shipto} = 1;
   purchase_order();
   $main::lxdebug->leave_sub();
 }
@@ -1668,6 +1608,7 @@ sub check_for_direct_delivery_no {
 
   $form->{direct_delivery_checked} = 1;
   delete @{$form}{grep /^shipto/, keys %{ $form }};
+  $form->{CFDD_shipto} = 0;
   purchase_order();
 
   $main::lxdebug->leave_sub();
@@ -2054,7 +1995,9 @@ sub _oe_remove_delivered_or_billed_rows {
     next if $ord_quot->is_sales != $record->is_sales;
 
     foreach my $item (@{ $record->items }) {
-      $handled_base_qtys{ $item->parts_id } += $item->qty * $item->unit_obj->base_factor;
+      my $key  = $item->parts_id;
+      $key    .= ':' . $item->serialnumber if $item->serialnumber;
+      $handled_base_qtys{$key} += $item->qty * $item->unit_obj->base_factor;
     }
   }
 
index 847916d..abffd97 100644 (file)
@@ -221,10 +221,6 @@ sub generate_income_statement {
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
 
-  my $defaults = SL::DB::Default->get;
-  $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
-  $form->{templates} = $defaults->templates;
-
   $form->{padding} = "&nbsp;&nbsp;";
   $form->{bold}    = "<b>";
   $form->{endbold} = "</b>";
@@ -375,9 +371,26 @@ sub generate_income_statement {
       . qq| $longcomparetodate|;
   }
 
-  $form->{IN} = "income_statement.html";
+  if ( $::instance_conf->get_profit_determination eq 'balance' ) {
+    $form->{title} = $locale->text('Income Statement');
+  } elsif ( $::instance_conf->get_profit_determination eq 'income' ) {
+    $form->{title} = $locale->text('Net Income Statement');
+  } else {
+    $form->{title} = "";
+  };
+
+  if ( $form->{method} eq 'cash' ) {
+    $form->{accounting_method} = $locale->text('Cash accounting');
+  } elsif ( $form->{method} eq 'accrual' ) {
+    $form->{accounting_method} = $locale->text('Accrual accounting');
+  } else {
+    $form->{accounting_method} = "";
+  };
+
+  $form->{report_date} = $locale->text('Report date') . ": " . $form->current_date;
 
-  $form->parse_template;
+  $form->header;
+  print $form->parse_html_template('rp/income_statement');
 
   $main::lxdebug->leave_sub();
 }
@@ -386,9 +399,6 @@ sub generate_balance_sheet {
   $::lxdebug->enter_sub;
   $::auth->assert('report');
 
-  my $defaults = SL::DB::Default->get;
-  $::form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
-  $::form->{templates}     = $defaults->templates;
   $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2;
   $::form->{padding}       = "&nbsp;&nbsp;";
   $::form->{bold}          = "<b>";
@@ -397,8 +407,9 @@ sub generate_balance_sheet {
 
   my $data = RP->balance_sheet(\%::myconfig, $::form);
 
-  $::form->{asofdate} ||= $::form->current_date;
-  $::form->{period}     = $::locale->date(\%::myconfig, $::form->current_date, 1);
+  $::form->{asofdate}    ||= $::form->current_date;
+  $::form->{report_title}  = $::locale->text('Balance Sheet');
+  $::form->{report_date} ||= $::form->current_date;
 
   ($::form->{department}) = split /--/, $::form->{department};
 
@@ -409,6 +420,8 @@ sub generate_balance_sheet {
   $::form->{this_period} = $::locale->date(\%::myconfig, $::form->{asofdate}, 0);
   $::form->{last_period} = $::locale->date(\%::myconfig, $::form->{compareasofdate}, 0);
 
+#  balance sheet isn't read from print templates anymore,
+#  instead use template in rp
 #  $::form->{IN} = "balance_sheet.html";
 
   $::form->header;
@@ -577,7 +590,7 @@ sub generate_trial_balance {
   my $attachment_basename = $locale->text('trial_balance');
   my $report              = SL::ReportGenerator->new(\%myconfig, $form);
 
-  my @hidden_variables    = qw(fromdate todate year cash);
+  my @hidden_variables    = qw(fromdate todate year method);
 
   my $href                = build_std_url('action=generate_trial_balance', grep { $form->{$_} } @hidden_variables);
 
@@ -1631,10 +1644,6 @@ sub generate_bwa {
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
 
-  my $defaults = SL::DB::Default->get;
-  $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
-  $form->{templates} = $defaults->templates;
-
   $form->{padding} = "&nbsp;&nbsp;";
   $form->{bold}    = "<b>";
   $form->{endbold} = "</b>";
@@ -1822,9 +1831,20 @@ sub generate_bwa {
       . qq| $longtodate|;
   }
 
-  $form->{IN} = "bwa.html";
+  $form->{report_date} = $locale->text('Report date') . ": " . $form->current_date;
+
+  if ( $form->{method} eq 'cash' ) {
+    $form->{accounting_method} = $locale->text('Cash accounting');
+  } elsif ( $form->{method} eq 'accrual' ) {
+    $form->{accounting_method} = $locale->text('Accrual accounting');
+  } else {
+    $form->{accounting_method} = "";
+  };
+
+  $form->{title} = $locale->text('BWA');
 
-  $form->parse_template;
+  $form->header;
+  print $form->parse_html_template('rp/bwa');
 
   $main::lxdebug->leave_sub();
 }
index 2850bfb..6fb9907 100755 (executable)
@@ -1,7 +1,7 @@
 use strict;
 
 use List::MoreUtils qw(any none uniq);
-use List::Util qw(first);
+use List::Util qw(sum first);
 use POSIX qw(strftime);
 
 use SL::BankAccount;
@@ -105,14 +105,19 @@ sub bank_transfer_create {
     $form->error($locale->text('You have selected none of the invoices.'));
   }
 
+  my $total_trans = sum map { $_->{open_amount} } @bank_transfers;
+
   my ($vc_bank_info);
   my $error_message;
 
+  my @bank_columns    = qw(iban bic);
+  push @bank_columns, qw(mandator_id mandate_date_of_signature) if $vc eq 'customer';
+
   if ($form->{confirmation}) {
     $vc_bank_info = { map { $_->{id} => $_ } @{ $form->{vc_bank_info} || [] } };
 
     foreach my $info (values %{ $vc_bank_info }) {
-      if (any { !$info->{$_} } qw(iban bic)) {
+      if (any { !$info->{$_} } @bank_columns) {
         $error_message = $locale->text('The bank information must not be empty.');
         last;
       }
@@ -136,11 +141,12 @@ sub bank_transfer_create {
                                        'bank_account_label' => $bank_account_label_sub,
                                        'error_message'      => $error_message,
                                        'vc'                 => $vc,
+                                       'total_trans'        => $total_trans,
                                      });
 
   } else {
     foreach my $bank_transfer (@bank_transfers) {
-      foreach (qw(iban bic)) {
+      foreach (@bank_columns) {
         $bank_transfer->{"vc_${_}"}  = $vc_bank_info->{ $bank_transfer->{vc_id} }->{$_};
         $bank_transfer->{"our_${_}"} = $bank_account->{$_};
       }
@@ -493,6 +499,7 @@ sub bank_transfer_download_sepa_xml {
 
   foreach my $item (@items) {
     my $requested_execution_date;
+    my $mandator_id;
     if ($item->{requested_execution_date}) {
       my ($yy, $mm, $dd)        = $locale->parse_date($myconfig, $item->{requested_execution_date});
       $requested_execution_date = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
@@ -501,6 +508,11 @@ sub bank_transfer_download_sepa_xml {
     if ($vc eq 'customer') {
       my ($yy, $mm, $dd)      = $locale->parse_date($myconfig, $item->{reference_date});
       $item->{reference_date} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
+      $mandator_id = $item->{mandator_id};
+      if ($item->{mandate_date_of_signature}) {
+        ($yy, $mm, $dd)                    = $locale->parse_date($myconfig, $item->{mandate_date_of_signature});
+        $item->{mandate_date_of_signature} = sprintf '%04d-%02d-%02d', $yy, $mm, $dd;
+      }
     }
 
     $sepa_xml->add_transaction({ 'src_iban'       => $item->{our_iban},
@@ -511,9 +523,11 @@ sub bank_transfer_download_sepa_xml {
                                  'company_number' => $item->{vc_number},
                                  'amount'         => $item->{amount},
                                  'reference'      => $item->{reference},
+                                 'mandator_id'    => $mandator_id,
                                  'reference_date' => $item->{reference_date},
                                  'execution_date' => $requested_execution_date,
-                                 'end_to_end_id'  => $item->{end_to_end_id} });
+                                 'end_to_end_id'  => $item->{end_to_end_id},
+                                 'date_of_signature' => $item->{mandate_date_of_signature}, });
   }
 
   my $xml = $sepa_xml->to_xml();
index 22ba04c..435117e 100644 (file)
@@ -21,6 +21,7 @@
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #======================================================================
 # German Tax authority Module and later ELSTER Interface
+# 08.01.14  ELSTER Interface software (taxbird/winston) removed
 #======================================================================
 
 use strict;
@@ -502,28 +503,9 @@ sub show_options {
   my $media  = qq|      <input type=hidden name="media" value="screen">|;
   my $format =
       qq|       <option value=html selected>|
-    . $::locale->text('Preview')
+    . $::locale->text('HTML')
     . qq|</option>|;
-  if ($::lx_office_conf{print_templates}{latex}) {
-    $format .=
-        qq|    <option value=pdf>|
-      . $::locale->text('UStVA (PDF-Dokument)')
-      . qq|</option>|;
-  }
-
-  #my $disabled= qq|disabled="disabled"|;
-  #$disabled='' if ($form->{elster} eq '1' );
-  if ($::form->{elster} eq '1') {
-    $format .=
-        qq|<option value=elsterwinston>|
-      . $::locale->text('ELSTER Export (Winston)')
-      . qq|</option>|
-      . qq|<option value=elstertaxbird>|
-      . $::locale->text('ELSTER Export (Taxbird)')
-      . qq|</option>|;
-  }
 
-  #$format .= qq|<option value=elster>|.$locale->text('ELSTER Export nach Winston').qq|</option>|;
   my $show_options = qq|
     $type
     $media
@@ -833,177 +815,6 @@ sub generate_ustva {
       foreach my $number (@category_euro) {
         $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '0');
       }
-
-    } elsif ( $form->{format} eq 'elsterwinston' ) {
-
-      $form->{IN} = 'winston.xml';
-
-      #
-      # Build Winston filename
-      #
-
-      my $file = 'U';     # 1. char 'U' = USTVA
-      $file .= $form->{period};
-      #4. and 5. char = year modulo 100
-      $file .= sprintf("%02d", $form->{year} % 100);
-      #6. to 18. char = Elstersteuernummer
-      #Beispiel: Steuernummer in Bayern
-      #111/222/33334 ergibt für UStVA Jan 2004: U01049111022233334
-      $file .= $form->{elsterFFFF};
-      $file .= $form->{elstersteuernummer};
-      #file suffix
-      $file .= '.xml';
-      $file =~ s|.*/||;
-
-      $form->{attachment_filename} = $file;
-
-      # Zahlenformatierung für Winston
-
-      my $temp_numberformat = $myconfig{numberformat};
-
-      # Numberformat must be '1000,00' for Winston
-
-      $myconfig{numberformat} = '1000,00';
-
-      foreach my $number (@category_cent) {
-        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : '';
-      }
-
-      foreach my $number (@category_euro) {
-        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : '';
-      }
-      # Re-set Numberformat
-      $myconfig{numberformat} = $temp_numberformat;
-
-      # push Kennziffern to <%foreach Array fo easyer
-      # output in xml format. Thx to Moritz.
-      my %winston_id_for = (
-         # No Winston remap?!
-      );
-
-      foreach my $kennziffer (@category_cent, @category_euro) {
-
-        next if ( $kennziffer =~ m/Z\d\d/);
-        next if (   $form->{$kennziffer} == 0 );
-
-        if (defined $winston_id_for{$kennziffer} ) {
-          push(@{ $form->{id}}, $winston_id_for{$kennziffer});
-        } else {
-          push(@{ $form->{id}}, "Kz$kennziffer");
-        }
-        push(@{ $form->{amount}}, $form->{$kennziffer});
-      }
-
-    } elsif ( $form->{format} eq 'elstertaxbird' ) {
-
-      # Define serveral filenames
-      $form->{IN} = 'taxbird.txb';
-
-      $form->{attachment_filename} = "USTVA-" . ($form->{period} * 1) . sprintf("%02d", $form->{year} % 100) . ".txb";
-
-      $form->{attachment_filename} =~ s|.*/||;
-
-      if ($form->{period} =~ /^[4]\d$/ ){
-        my %periods = ( # Lx => taxbird
-                     '41' => '12',
-                     '42' => '13',
-                     '43' => '14',
-                     '44' => '15',
-                   );
-
-        foreach my $quarter ( keys %periods ) {
-          $form->{taxbird_period} = $periods{$quarter} if ( $form->{period} eq $quarter);
-        }
-      } elsif ($form->{period} =~ /^\d+$/ ) {
-        $form->{period} =~ s/^0//g;
-        my $period = $form->{period};
-        $period *= 1;
-        $period--;
-        $form->{taxbird_period} = $period;
-      } else {
-        $form->header;
-        USTVA::error( $locale->text('Wrong Period' ));
-        ::end_of_request();
-      }
-
-      # heuristics for address splitting
-      # lx-office holds the entire address in a single field.
-      # taxbird expects it to be splitted into street, zipcode and city
-      if ($form->{co_street} =~ /\n/) {
-        my $new_co_street;
-        for (split /\n/, $form->{co_street}) {
-          if (/(\d{3,5})\s+(\w+)/) {
-            $form->{co_zip}  = $1;
-            $form->{co_city} = $2;
-          } else {
-            $new_co_street .= $_;
-          }
-        }
-        $form->{co_street} = $new_co_street;
-      } else {
-        $form->{co_zip} = $form->{co_city};
-        $form->{co_zip} =~ s/\D//g;
-        $form->{co_city} =~ s/\d//g;
-        $form->{co_city} =~ s/^\s//g;
-      }
-
-      my $tax_office           = first { $_->{name} eq $form->{elsterland} } @{ $ustva->{tax_office_information} };
-      $form->{taxbird_land_nr} = $tax_office->{taxbird_nr} if $tax_office;
-
-      ($form->{co_phone_prefix}, $form->{co_phone}) = split("-", $form->{tel});
-      $form->{co_phone_prefix} =~ s/\s//g;
-      $form->{co_phone} =~ s/\s//g;
-
-       $form->{taxbird_steuernummer} = $form->{steuernummer};
-      #      $form->{taxbird_steuernummer} =~ s/\D//g;
-#      $form->{taxbird_steuernummer} =~ s/\///; # ersten Querstrich ersetzen
-
-      # Numberformatting for Taxbird
-      my $temp_numberformat = $myconfig{numberformat};
-      # Numberformat must be '1000,00' for Taxbird ?!
-      $myconfig{numberformat} = '1000,00';
-      foreach my $number (@category_cent) {
-        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : '';
-      }
-
-      foreach my $number (@category_euro) {
-        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : '';
-      }
-      # Re-set Numberformat
-      $myconfig{numberformat} = $temp_numberformat;
-
-      # push Kennziffern to <%foreach Array fo easyer
-      # output in xml format. Thx to Moritz.
-      my %taxbird_id_for = (
-
-          '511'  =>  'Kz51-calc',
-          '861'  =>  'Kz86-calc',
-          '971'  =>  'Kz97-calc',
-          '931'  =>  'Kz93-calc',
-          '811'  =>  'Kz81-calc',
-          '891'  =>  'Kz89-calc',
-          'Z45'  =>  'uebertrag',
-          'Z53'  =>  'ust-sum',
-          'Z62'  =>  'ust-minus-vost',
-          'Z65'  =>  'ust-sum+69',
-          'Z67'  =>  'ust-vz',
-      );
-
-
-      for my $kennziffer (@category_cent, @category_euro) {
-
-        next if ($kennziffer eq 'Z43');
-
-        if ($form->{$kennziffer} != 0){
-          if (defined $taxbird_id_for{$kennziffer}) {
-            push(@{ $form->{id}}, $taxbird_id_for{$kennziffer});
-          } else {
-            push(@{ $form->{id}}, "Kz$kennziffer");
-          }
-          push(@{ $form->{amount}}, $form->{$kennziffer});
-        }
-      }
-
     } elsif ( $form->{format} eq '' ){ # No format error.
       $form->header;
       USTVA::error( $locale->text('Application Error. No Format given' ) . "!");
@@ -1076,8 +887,13 @@ sub generate_ustva {
 
   } else
   {
+   # add a prefix for ustva pos numbers, i.e.: 81 ->  post_ustva_81
+   $form->{"pos_ustva_$_"} = $form->{$_} for grep { m{^\d+} } keys %{ $form };
+   $form->{title} = $locale->text('Advance turnover tax return');
+
+   $form->header;
+   print $form->parse_html_template('ustva/ustva');
 
-    $form->parse_template(\%myconfig, $::lx_office_conf{paths}{userspath});
 
   }
 
index f847711..55ec597 100644 (file)
@@ -1,96 +1,96 @@
 .icon16 { background: url(../image/maps/icons16.png) 16px 0px no-repeat; padding: 0; width: 16px; height: 16px; }
-.icon16.AP--Add-Purchase-Order { background-position: -0px 0px; }
-.icon16.AP--Add-RFQ { background-position: -16px 0px; }
-.icon16.AP { background-position: -32px 0px; }
-.icon16.AP--Reports { background-position: -48px 0px; }
-.icon16.AP--Reports--Purchase-Orders { background-position: -64px 0px; }
-.icon16.AP--Reports--RFQs { background-position: -80px 0px; }
-.icon16.AR--Add-Credit-Note { background-position: -96px 0px; }
-.icon16.AR--Add-Delivery-Order { background-position: -112px 0px; }
-.icon16.AR--Add-Dunning { background-position: -128px 0px; }
-.icon16.AR--Add-Quotation { background-position: -144px 0px; }
-.icon16.AR--Add-Sales-Invoice { background-position: -160px 0px; }
-.icon16.AR--Add-Sales-Order { background-position: -176px 0px; }
-.icon16.AR { background-position: -192px 0px; }
-.icon16.AR--Reports--Delivery-Orders { background-position: -208px 0px; }
-.icon16.AR--Reports--Dunnings { background-position: -224px 0px; }
-.icon16.AR--Reports--Invoices { background-position: -240px 0px; }
-.icon16.AR--Reports { background-position: -256px 0px; }
-.icon16.AR--Reports--Quotations { background-position: -272px 0px; }
-.icon16.AR--Reports--Sales-Orders { background-position: -288px 0px; }
-.icon16.Batch-Printing--Packing-Lists { background-position: -304px 0px; }
-.icon16.Batch-Printing { background-position: -320px 0px; }
-.icon16.Batch-Printing--Purchase-Orders { background-position: -336px 0px; }
-.icon16.Batch-Printing--Quotations { background-position: -352px 0px; }
-.icon16.Batch-Printing--Receipts { background-position: -368px 0px; }
-.icon16.Batch-Printing--RFQs { background-position: -384px 0px; }
-.icon16.Batch-Printing--Sales-Invoices { background-position: -400px 0px; }
-.icon16.Batch-Printing--Sales-Orders { background-position: -416px 0px; }
-.icon16.Cash--Payment { background-position: -432px 0px; }
-.icon16.Cash { background-position: -448px 0px; }
-.icon16.Cash--Receipt { background-position: -464px 0px; }
-.icon16.Cash--Reconciliation { background-position: -480px 0px; }
-.icon16.Cash--Reports--Payments { background-position: -496px 0px; }
-.icon16.Cash--Reports { background-position: -512px 0px; }
-.icon16.Cash--Reports--Receipts { background-position: -528px 0px; }
-.icon16.CRM--Admin--Benutzer { background-position: -544px 0px; }
-.icon16.CRM--Admin--Dokumentvorlage { background-position: -560px 0px; }
-.icon16.CRM--Admin--Etiketten { background-position: -576px 0px; }
-.icon16.CRM--Admin--Gruppen { background-position: -592px 0px; }
-.icon16.CRM--Admin--Mitteilungen { background-position: -608px 0px; }
-.icon16.CRM--Admin { background-position: -624px 0px; }
-.icon16.CRM--Admin--Status { background-position: -640px 0px; }
-.icon16.CRM--Auftragschance { background-position: -656px 0px; }
-.icon16.CRM--eMail { background-position: -672px 0px; }
-.icon16.CRM--Hilfe { background-position: -688px 0px; }
-.icon16.CRM--Kunden { background-position: -704px 0px; }
-.icon16.CRM--Lieferant { background-position: -720px 0px; }
-.icon16.CRM--Notizen { background-position: -736px 0px; }
-.icon16.CRM--Personen { background-position: -752px 0px; }
-.icon16.CRM { background-position: -768px 0px; }
-.icon16.CRM--Schnellsuche { background-position: -784px 0px; }
-.icon16.CRM--Service { background-position: -800px 0px; }
-.icon16.CRM--Termine { background-position: -816px 0px; }
-.icon16.CRM--Wiedervorlage { background-position: -832px 0px; }
-.icon16.CRM--Wissens-DB { background-position: -848px 0px; }
-.icon16.General-Ledger--Add-AP-Transaction { background-position: -864px 0px; }
-.icon16.General-Ledger--Add-AR-Transaction { background-position: -880px 0px; }
-.icon16.General-Ledger--Add-Transaction { background-position: -896px 0px; }
-.icon16.General-Ledger--DATEV---Export-Assistent { background-position: -912px 0px; }
-.icon16.General-Ledger { background-position: -928px 0px; }
-.icon16.General-Ledger--Reports--AP-Aging { background-position: -944px 0px; }
-.icon16.General-Ledger--Reports--AR-Aging { background-position: -960px 0px; }
-.icon16.General-Ledger--Reports--Journal { background-position: -976px 0px; }
-.icon16.General-Ledger--Reports { background-position: -992px 0px; }
-.icon16.Master-Data--Add-Assembly { background-position: -1008px 0px; }
-.icon16.Master-Data--Add-Customer { background-position: -1024px 0px; }
-.icon16.Master-Data--Add-License { background-position: -1040px 0px; }
-.icon16.Master-Data--Add-Part { background-position: -1056px 0px; }
-.icon16.Master-Data--Add-Project { background-position: -1072px 0px; }
-.icon16.Master-Data--Add-Service { background-position: -1088px 0px; }
-.icon16.Master-Data--Add-Vendor { background-position: -1104px 0px; }
-.icon16.Master-Data { background-position: -1120px 0px; }
-.icon16.Master-Data--Reports--Assemblies { background-position: -1136px 0px; }
-.icon16.Master-Data--Reports--Customers { background-position: -1152px 0px; }
-.icon16.Master-Data--Reports--Licenses { background-position: -1168px 0px; }
-.icon16.Master-Data--Reports--Parts { background-position: -1184px 0px; }
-.icon16.Master-Data--Reports { background-position: -1200px 0px; }
-.icon16.Master-Data--Reports--Projects { background-position: -1216px 0px; }
-.icon16.Master-Data--Reports--Projecttransactions { background-position: -1232px 0px; }
-.icon16.Master-Data--Reports--Services { background-position: -1248px 0px; }
-.icon16.Master-Data--Reports--Vendors { background-position: -1264px 0px; }
-.icon16.Master-Data--Update-Prices { background-position: -1280px 0px; }
-.icon16.MDI-Text-Editor-16x16 { background-position: -1296px 0px; }
-.icon16.Neues-Fenster { background-position: -1312px 0px; }
-.icon16.Program--Logout { background-position: -1328px 0px; }
-.icon16.Program { background-position: -1344px 0px; }
-.icon16.Program--Preferences { background-position: -1360px 0px; }
-.icon16.Program--Version { background-position: -1376px 0px; }
-.icon16.Reports--Balance-Sheet { background-position: -1392px 0px; }
-.icon16.Reports--Chart-of-Accounts { background-position: -1408px 0px; }
-.icon16.Reports--Income-Statement { background-position: -1424px 0px; }
-.icon16.Reports { background-position: -1440px 0px; }
-.icon16.Reports--UStVa { background-position: -1456px 0px; }
-.icon16.System { background-position: -1472px 0px; }
-.icon16.Warehouse { background-position: -1488px 0px; }
-.icon16.Warehouse--Produce-Assembly { background-position: -1504px 0px; }
+.icon16.ap--add-purchase-order { background-position: -0px 0px; }
+.icon16.ap--add-rfq { background-position: -16px 0px; }
+.icon16.ap { background-position: -32px 0px; }
+.icon16.ap--reports { background-position: -48px 0px; }
+.icon16.ap--reports--purchase-orders { background-position: -64px 0px; }
+.icon16.ap--reports--rfqs { background-position: -80px 0px; }
+.icon16.ar--add-credit-note { background-position: -96px 0px; }
+.icon16.ar--add-delivery-order { background-position: -112px 0px; }
+.icon16.ar--add-dunning { background-position: -128px 0px; }
+.icon16.ar--add-quotation { background-position: -144px 0px; }
+.icon16.ar--add-sales-invoice { background-position: -160px 0px; }
+.icon16.ar--add-sales-order { background-position: -176px 0px; }
+.icon16.ar { background-position: -192px 0px; }
+.icon16.ar--reports--delivery-orders { background-position: -208px 0px; }
+.icon16.ar--reports--dunnings { background-position: -224px 0px; }
+.icon16.ar--reports--invoices--credit-notes---ar-transactions { background-position: -240px 0px; }
+.icon16.ar--reports { background-position: -256px 0px; }
+.icon16.ar--reports--quotations { background-position: -272px 0px; }
+.icon16.ar--reports--sales-orders { background-position: -288px 0px; }
+.icon16.batch-printing--packing-lists { background-position: -304px 0px; }
+.icon16.batch-printing { background-position: -320px 0px; }
+.icon16.batch-printing--purchase-orders { background-position: -336px 0px; }
+.icon16.batch-printing--quotations { background-position: -352px 0px; }
+.icon16.batch-printing--receipts { background-position: -368px 0px; }
+.icon16.batch-printing--rfqs { background-position: -384px 0px; }
+.icon16.batch-printing--sales-invoices { background-position: -400px 0px; }
+.icon16.batch-printing--sales-orders { background-position: -416px 0px; }
+.icon16.cash--payment { background-position: -432px 0px; }
+.icon16.cash { background-position: -448px 0px; }
+.icon16.cash--receipt { background-position: -464px 0px; }
+.icon16.cash--reconciliation { background-position: -480px 0px; }
+.icon16.cash--reports--payments { background-position: -496px 0px; }
+.icon16.cash--reports { background-position: -512px 0px; }
+.icon16.cash--reports--receipts { background-position: -528px 0px; }
+.icon16.crm--add--customer { background-position: -544px 0px; }
+.icon16.crm--add--person { background-position: -560px 0px; }
+.icon16.crm--add--vendor { background-position: -576px 0px; }
+.icon16.crm--admin--document-template { background-position: -592px 0px; }
+.icon16.crm--admin--label { background-position: -608px 0px; }
+.icon16.crm--admin--message { background-position: -624px 0px; }
+.icon16.crm--admin { background-position: -640px 0px; }
+.icon16.crm--admin--status { background-position: -656px 0px; }
+.icon16.crm--admin--user-groups { background-position: -672px 0px; }
+.icon16.crm--admin--user { background-position: -688px 0px; }
+.icon16.crm--appointments { background-position: -704px 0px; }
+.icon16.crm--e-mail { background-position: -720px 0px; }
+.icon16.crm--follow-up { background-position: -736px 0px; }
+.icon16.crm--help { background-position: -752px 0px; }
+.icon16.crm--knowledge { background-position: -768px 0px; }
+.icon16.crm--memo { background-position: -784px 0px; }
+.icon16.crm--opportunity { background-position: -800px 0px; }
+.icon16.crm { background-position: -816px 0px; }
+.icon16.crm--search { background-position: -832px 0px; }
+.icon16.crm--service { background-position: -848px 0px; }
+.icon16.general-ledger--add-ap-transaction { background-position: -864px 0px; }
+.icon16.general-ledger--add-ar-transaction { background-position: -880px 0px; }
+.icon16.general-ledger--add-transaction { background-position: -896px 0px; }
+.icon16.general-ledger--datev---export-assistent { background-position: -912px 0px; }
+.icon16.general-ledger { background-position: -928px 0px; }
+.icon16.general-ledger--reports--ap-aging { background-position: -944px 0px; }
+.icon16.general-ledger--reports--ar-aging { background-position: -960px 0px; }
+.icon16.general-ledger--reports--journal { background-position: -976px 0px; }
+.icon16.general-ledger--reports { background-position: -992px 0px; }
+.icon16.master-data--add-assembly { background-position: -1008px 0px; }
+.icon16.master-data--add-customer { background-position: -1024px 0px; }
+.icon16.master-data--add-license { background-position: -1040px 0px; }
+.icon16.master-data--add-part { background-position: -1056px 0px; }
+.icon16.master-data--add-project { background-position: -1072px 0px; }
+.icon16.master-data--add-service { background-position: -1088px 0px; }
+.icon16.master-data--add-vendor { background-position: -1104px 0px; }
+.icon16.master-data { background-position: -1120px 0px; }
+.icon16.master-data--reports--assemblies { background-position: -1136px 0px; }
+.icon16.master-data--reports--customers { background-position: -1152px 0px; }
+.icon16.master-data--reports--licenses { background-position: -1168px 0px; }
+.icon16.master-data--reports--parts { background-position: -1184px 0px; }
+.icon16.master-data--reports { background-position: -1200px 0px; }
+.icon16.master-data--reports--projects { background-position: -1216px 0px; }
+.icon16.master-data--reports--projecttransactions { background-position: -1232px 0px; }
+.icon16.master-data--reports--services { background-position: -1248px 0px; }
+.icon16.master-data--reports--vendors { background-position: -1264px 0px; }
+.icon16.master-data--update-prices { background-position: -1280px 0px; }
+.icon16.mdi-text-editor-16x16 { background-position: -1296px 0px; }
+.icon16.neues-fenster { background-position: -1312px 0px; }
+.icon16.program--logout { background-position: -1328px 0px; }
+.icon16.program { background-position: -1344px 0px; }
+.icon16.program--preferences { background-position: -1360px 0px; }
+.icon16.program--version { background-position: -1376px 0px; }
+.icon16.reports--balance-sheet { background-position: -1392px 0px; }
+.icon16.reports--chart-of-accounts { background-position: -1408px 0px; }
+.icon16.reports--income-statement { background-position: -1424px 0px; }
+.icon16.reports { background-position: -1440px 0px; }
+.icon16.reports--ustva { background-position: -1456px 0px; }
+.icon16.system { background-position: -1472px 0px; }
+.icon16.warehouse { background-position: -1488px 0px; }
+.icon16.warehouse--produce-assembly { background-position: -1504px 0px; }
index fe6ba0a..87a382e 100644 (file)
@@ -1,93 +1,93 @@
 .icon24 { background: url(../image/maps/icons24.png) 24px 0px no-repeat; padding: 0; width: 24px; height: 24px; }
-.icon24.AP--Add-Purchase-Order { background-position: -0px 0px; }
-.icon24.AP--Add-RFQ { background-position: -24px 0px; }
-.icon24.AP { background-position: -48px 0px; }
-.icon24.AP--Reports { background-position: -72px 0px; }
-.icon24.AP--Reports--Purchase-Orders { background-position: -96px 0px; }
-.icon24.AP--Reports--RFQs { background-position: -120px 0px; }
-.icon24.AR--Add-Dunning { background-position: -144px 0px; }
-.icon24.AR--Add-Quotation { background-position: -168px 0px; }
-.icon24.AR--Add-Sales-Invoice { background-position: -192px 0px; }
-.icon24.AR--Add-Sales-Order { background-position: -216px 0px; }
-.icon24.AR { background-position: -240px 0px; }
-.icon24.AR--Reports--Dunnings { background-position: -264px 0px; }
-.icon24.AR--Reports--Invoices { background-position: -288px 0px; }
-.icon24.AR--Reports { background-position: -312px 0px; }
-.icon24.AR--Reports--Quotations { background-position: -336px 0px; }
-.icon24.AR--Reports--Sales-Orders { background-position: -360px 0px; }
-.icon24.Batch-Printing--Packing-Lists { background-position: -384px 0px; }
-.icon24.Batch-Printing { background-position: -408px 0px; }
-.icon24.Batch-Printing--Purchase-Orders { background-position: -432px 0px; }
-.icon24.Batch-Printing--Quotations { background-position: -456px 0px; }
-.icon24.Batch-Printing--Receipts { background-position: -480px 0px; }
-.icon24.Batch-Printing--RFQs { background-position: -504px 0px; }
-.icon24.Batch-Printing--Sales-Invoices { background-position: -528px 0px; }
-.icon24.Batch-Printing--Sales-Orders { background-position: -552px 0px; }
-.icon24.Cash--Payment { background-position: -576px 0px; }
-.icon24.Cash { background-position: -600px 0px; }
-.icon24.Cash--Receipt { background-position: -624px 0px; }
-.icon24.Cash--Reconciliation { background-position: -648px 0px; }
-.icon24.Cash--Reports--Payments { background-position: -672px 0px; }
-.icon24.Cash--Reports { background-position: -696px 0px; }
-.icon24.Cash--Reports--Receipts { background-position: -720px 0px; }
-.icon24.CRM--Admin--Benutzer { background-position: -744px 0px; }
-.icon24.CRM--Admin--Dokumentvorlage { background-position: -768px 0px; }
-.icon24.CRM--Admin--Etiketten { background-position: -792px 0px; }
-.icon24.CRM--Admin--Gruppen { background-position: -816px 0px; }
-.icon24.CRM--Admin--Mitteilungen { background-position: -840px 0px; }
-.icon24.CRM--Admin { background-position: -864px 0px; }
-.icon24.CRM--Admin--Status { background-position: -888px 0px; }
-.icon24.CRM--Auftragschance { background-position: -912px 0px; }
-.icon24.CRM--eMail { background-position: -936px 0px; }
-.icon24.CRM--Hilfe { background-position: -960px 0px; }
-.icon24.CRM--Kunden { background-position: -984px 0px; }
-.icon24.CRM--Lieferant { background-position: -1008px 0px; }
-.icon24.CRM--Notizen { background-position: -1032px 0px; }
-.icon24.CRM--Personen { background-position: -1056px 0px; }
-.icon24.CRM { background-position: -1080px 0px; }
-.icon24.CRM--Schnellsuche { background-position: -1104px 0px; }
-.icon24.CRM--Service { background-position: -1128px 0px; }
-.icon24.CRM--Termine { background-position: -1152px 0px; }
-.icon24.CRM--Wiedervorlage { background-position: -1176px 0px; }
-.icon24.CRM--Wissens-DB { background-position: -1200px 0px; }
-.icon24.General-Ledger--Add-AP-Transaction { background-position: -1224px 0px; }
-.icon24.General-Ledger--Add-AR-Transaction { background-position: -1248px 0px; }
-.icon24.General-Ledger--Add-Transaction { background-position: -1272px 0px; }
-.icon24.General-Ledger--DATEV---Export-Assistent { background-position: -1296px 0px; }
-.icon24.General-Ledger { background-position: -1320px 0px; }
-.icon24.General-Ledger--Reports--AP-Aging { background-position: -1344px 0px; }
-.icon24.General-Ledger--Reports--AR-Aging { background-position: -1368px 0px; }
-.icon24.General-Ledger--Reports--Journal { background-position: -1392px 0px; }
-.icon24.General-Ledger--Reports { background-position: -1416px 0px; }
+.icon24.ap--add-purchase-order { background-position: -0px 0px; }
+.icon24.ap--add-rfq { background-position: -24px 0px; }
+.icon24.ap { background-position: -48px 0px; }
+.icon24.ap--reports { background-position: -72px 0px; }
+.icon24.ap--reports--purchase-orders { background-position: -96px 0px; }
+.icon24.ap--reports--rfqs { background-position: -120px 0px; }
+.icon24.ar--add-dunning { background-position: -144px 0px; }
+.icon24.ar--add-quotation { background-position: -168px 0px; }
+.icon24.ar--add-sales-invoice { background-position: -192px 0px; }
+.icon24.ar--add-sales-order { background-position: -216px 0px; }
+.icon24.ar { background-position: -240px 0px; }
+.icon24.ar--reports--dunnings { background-position: -264px 0px; }
+.icon24.ar--reports--invoices { background-position: -288px 0px; }
+.icon24.ar--reports { background-position: -312px 0px; }
+.icon24.ar--reports--quotations { background-position: -336px 0px; }
+.icon24.ar--reports--sales-orders { background-position: -360px 0px; }
+.icon24.batch-printing--packing-lists { background-position: -384px 0px; }
+.icon24.batch-printing { background-position: -408px 0px; }
+.icon24.batch-printing--purchase-orders { background-position: -432px 0px; }
+.icon24.batch-printing--quotations { background-position: -456px 0px; }
+.icon24.batch-printing--receipts { background-position: -480px 0px; }
+.icon24.batch-printing--rfqs { background-position: -504px 0px; }
+.icon24.batch-printing--sales-invoices { background-position: -528px 0px; }
+.icon24.batch-printing--sales-orders { background-position: -552px 0px; }
+.icon24.cash--payment { background-position: -576px 0px; }
+.icon24.cash { background-position: -600px 0px; }
+.icon24.cash--receipt { background-position: -624px 0px; }
+.icon24.cash--reconciliation { background-position: -648px 0px; }
+.icon24.cash--reports--payments { background-position: -672px 0px; }
+.icon24.cash--reports { background-position: -696px 0px; }
+.icon24.cash--reports--receipts { background-position: -720px 0px; }
+.icon24.crm--add--customer { background-position: -744px 0px; }
+.icon24.crm--add--person { background-position: -768px 0px; }
+.icon24.crm--add--vendor { background-position: -792px 0px; }
+.icon24.crm--admin--document-template { background-position: -816px 0px; }
+.icon24.crm--admin--label { background-position: -840px 0px; }
+.icon24.crm--admin--message { background-position: -864px 0px; }
+.icon24.crm--admin { background-position: -888px 0px; }
+.icon24.crm--admin--status { background-position: -912px 0px; }
+.icon24.crm--admin--user-groups { background-position: -936px 0px; }
+.icon24.crm--admin--user { background-position: -960px 0px; }
+.icon24.crm--appointments { background-position: -984px 0px; }
+.icon24.crm--email { background-position: -1008px 0px; }
+.icon24.crm--follow-up { background-position: -1032px 0px; }
+.icon24.crm--help { background-position: -1056px 0px; }
+.icon24.crm--knowledge { background-position: -1080px 0px; }
+.icon24.crm--memo { background-position: -1104px 0px; }
+.icon24.crm--opportunity { background-position: -1128px 0px; }
+.icon24.crm { background-position: -1152px 0px; }
+.icon24.crm--search { background-position: -1176px 0px; }
+.icon24.crm--service { background-position: -1200px 0px; }
+.icon24.general-ledger--add-ap-transaction { background-position: -1224px 0px; }
+.icon24.general-ledger--add-ar-transaction { background-position: -1248px 0px; }
+.icon24.general-ledger--add-transaction { background-position: -1272px 0px; }
+.icon24.general-ledger--datev---export-assistent { background-position: -1296px 0px; }
+.icon24.general-ledger { background-position: -1320px 0px; }
+.icon24.general-ledger--reports--ap-aging { background-position: -1344px 0px; }
+.icon24.general-ledger--reports--ar-aging { background-position: -1368px 0px; }
+.icon24.general-ledger--reports--journal { background-position: -1392px 0px; }
+.icon24.general-ledger--reports { background-position: -1416px 0px; }
 .icon24.leftarrow_24 { background-position: -1440px 0px; }
-.icon24.Master-Data--Add-Assembly { background-position: -1464px 0px; }
-.icon24.Master-Data--Add-Customer { background-position: -1488px 0px; }
-.icon24.Master-Data--Add-License { background-position: -1512px 0px; }
-.icon24.Master-Data--Add-Part { background-position: -1536px 0px; }
-.icon24.Master-Data--Add-Project { background-position: -1560px 0px; }
-.icon24.Master-Data--Add-Service { background-position: -1584px 0px; }
-.icon24.Master-Data--Add-Vendor { background-position: -1608px 0px; }
-.icon24.Master-Data { background-position: -1632px 0px; }
-.icon24.Master-Data--Reports--Assemblies { background-position: -1656px 0px; }
-.icon24.Master-Data--Reports--Customers { background-position: -1680px 0px; }
-.icon24.Master-Data--Reports--Licenses { background-position: -1704px 0px; }
-.icon24.Master-Data--Reports--Parts { background-position: -1728px 0px; }
-.icon24.Master-Data--Reports { background-position: -1752px 0px; }
-.icon24.Master-Data--Reports--Projects { background-position: -1776px 0px; }
-.icon24.Master-Data--Reports--Projecttransactions { background-position: -1800px 0px; }
-.icon24.Master-Data--Reports--Services { background-position: -1824px 0px; }
-.icon24.Master-Data--Reports--Vendors { background-position: -1848px 0px; }
-.icon24.Neues-Fenster { background-position: -1872px 0px; }
-.icon24.Productivity { background-position: -1896px 0px; }
-.icon24.Program--Logout { background-position: -1920px 0px; }
-.icon24.Program { background-position: -1944px 0px; }
-.icon24.Program--Preferences { background-position: -1968px 0px; }
-.icon24.Program--Version { background-position: -1992px 0px; }
-.icon24.Reports--Balance-Sheet { background-position: -2016px 0px; }
-.icon24.Reports--Chart-of-Accounts { background-position: -2040px 0px; }
-.icon24.Reports--Income-Statement { background-position: -2064px 0px; }
-.icon24.Reports { background-position: -2088px 0px; }
-.icon24.Reports--UStVa { background-position: -2112px 0px; }
+.icon24.master-data--add-assembly { background-position: -1464px 0px; }
+.icon24.master-data--add-customer { background-position: -1488px 0px; }
+.icon24.master-data--add-license { background-position: -1512px 0px; }
+.icon24.master-data--add-part { background-position: -1536px 0px; }
+.icon24.master-data--add-project { background-position: -1560px 0px; }
+.icon24.master-data--add-service { background-position: -1584px 0px; }
+.icon24.master-data--add-vendor { background-position: -1608px 0px; }
+.icon24.master-data { background-position: -1632px 0px; }
+.icon24.master-data--reports--assemblies { background-position: -1656px 0px; }
+.icon24.master-data--reports--customers { background-position: -1680px 0px; }
+.icon24.master-data--reports--licenses { background-position: -1704px 0px; }
+.icon24.master-data--reports--parts { background-position: -1728px 0px; }
+.icon24.master-data--reports { background-position: -1752px 0px; }
+.icon24.master-data--reports--projects { background-position: -1776px 0px; }
+.icon24.master-data--reports--projecttransactions { background-position: -1800px 0px; }
+.icon24.master-data--reports--services { background-position: -1824px 0px; }
+.icon24.master-data--reports--vendors { background-position: -1848px 0px; }
+.icon24.neues-fenster { background-position: -1872px 0px; }
+.icon24.productivity { background-position: -1896px 0px; }
+.icon24.program--logout { background-position: -1920px 0px; }
+.icon24.program { background-position: -1944px 0px; }
+.icon24.program--preferences { background-position: -1968px 0px; }
+.icon24.program--version { background-position: -1992px 0px; }
+.icon24.reports--balance-sheet { background-position: -2016px 0px; }
+.icon24.reports--chart-of-accounts { background-position: -2040px 0px; }
+.icon24.reports--income-statement { background-position: -2064px 0px; }
+.icon24.reports { background-position: -2088px 0px; }
+.icon24.reports--ustva { background-position: -2112px 0px; }
 .icon24.rightarrow_24 { background-position: -2136px 0px; }
-.icon24.System { background-position: -2160px 0px; }
-.icon24.Warehouse { background-position: -2184px 0px; }
+.icon24.system { background-position: -2160px 0px; }
+.icon24.warehouse { background-position: -2184px 0px; }
index a8d9d0d..0628d83 100644 (file)
@@ -1,90 +1,90 @@
 .icon32 { background: url(../image/maps/icons32.png) 32px 0px no-repeat; padding: 0; width: 32px; height: 32px; }
-.icon32.AP--Add-Purchase-Order { background-position: -0px 0px; }
-.icon32.AP--Add-RFQ { background-position: -32px 0px; }
-.icon32.AP { background-position: -64px 0px; }
-.icon32.AP--Reports { background-position: -96px 0px; }
-.icon32.AP--Reports--Purchase-Orders { background-position: -128px 0px; }
-.icon32.AP--Reports--RFQs { background-position: -160px 0px; }
-.icon32.AR--Add-Dunning { background-position: -192px 0px; }
-.icon32.AR--Add-Quotation { background-position: -224px 0px; }
-.icon32.AR--Add-Sales-Invoice { background-position: -256px 0px; }
-.icon32.AR--Add-Sales-Order { background-position: -288px 0px; }
-.icon32.AR { background-position: -320px 0px; }
-.icon32.AR--Reports--Dunnings { background-position: -352px 0px; }
-.icon32.AR--Reports--Invoices { background-position: -384px 0px; }
-.icon32.AR--Reports { background-position: -416px 0px; }
-.icon32.AR--Reports--Quotations { background-position: -448px 0px; }
-.icon32.AR--Reports--Sales-Orders { background-position: -480px 0px; }
-.icon32.Batch-Printing--Packing-Lists { background-position: -512px 0px; }
-.icon32.Batch-Printing { background-position: -544px 0px; }
-.icon32.Batch-Printing--Purchase-Orders { background-position: -576px 0px; }
-.icon32.Batch-Printing--Quotations { background-position: -608px 0px; }
-.icon32.Batch-Printing--Receipts { background-position: -640px 0px; }
-.icon32.Batch-Printing--RFQs { background-position: -672px 0px; }
-.icon32.Batch-Printing--Sales-Invoices { background-position: -704px 0px; }
-.icon32.Batch-Printing--Sales-Orders { background-position: -736px 0px; }
-.icon32.Cash--Payment { background-position: -768px 0px; }
-.icon32.Cash { background-position: -800px 0px; }
-.icon32.Cash--Receipt { background-position: -832px 0px; }
-.icon32.Cash--Reconciliation { background-position: -864px 0px; }
-.icon32.Cash--Reports--Payments { background-position: -896px 0px; }
-.icon32.Cash--Reports { background-position: -928px 0px; }
-.icon32.Cash--Reports--Receipts { background-position: -960px 0px; }
-.icon32.CRM--Admin--Benutzer { background-position: -992px 0px; }
-.icon32.CRM--Admin--Dokumentvorlage { background-position: -1024px 0px; }
-.icon32.CRM--Admin--Etiketten { background-position: -1056px 0px; }
-.icon32.CRM--Admin--Gruppen { background-position: -1088px 0px; }
-.icon32.CRM--Admin--Mitteilungen { background-position: -1120px 0px; }
-.icon32.CRM--Admin { background-position: -1152px 0px; }
-.icon32.CRM--Admin--Status { background-position: -1184px 0px; }
-.icon32.CRM--Auftragschance { background-position: -1216px 0px; }
-.icon32.CRM--eMail { background-position: -1248px 0px; }
-.icon32.CRM--Hilfe { background-position: -1280px 0px; }
-.icon32.CRM--Kunden { background-position: -1312px 0px; }
-.icon32.CRM--Lieferant { background-position: -1344px 0px; }
-.icon32.CRM--Notizen { background-position: -1376px 0px; }
-.icon32.CRM--Personen { background-position: -1408px 0px; }
-.icon32.CRM { background-position: -1440px 0px; }
-.icon32.CRM--Schnellsuche { background-position: -1472px 0px; }
-.icon32.CRM--Service { background-position: -1504px 0px; }
-.icon32.CRM--Termine { background-position: -1536px 0px; }
-.icon32.CRM--Wiedervorlage { background-position: -1568px 0px; }
-.icon32.CRM--Wissens-DB { background-position: -1600px 0px; }
-.icon32.General-Ledger--Add-AP-Transaction { background-position: -1632px 0px; }
-.icon32.General-Ledger--Add-AR-Transaction { background-position: -1664px 0px; }
-.icon32.General-Ledger--Add-Transaction { background-position: -1696px 0px; }
-.icon32.General-Ledger--DATEV---Export-Assistent { background-position: -1728px 0px; }
-.icon32.General-Ledger { background-position: -1760px 0px; }
-.icon32.General-Ledger--Reports--AP-Aging { background-position: -1792px 0px; }
-.icon32.General-Ledger--Reports--AR-Aging { background-position: -1824px 0px; }
-.icon32.General-Ledger--Reports--Journal { background-position: -1856px 0px; }
-.icon32.General-Ledger--Reports { background-position: -1888px 0px; }
-.icon32.Master-Data--Add-Assembly { background-position: -1920px 0px; }
-.icon32.Master-Data--Add-Customer { background-position: -1952px 0px; }
-.icon32.Master-Data--Add-License { background-position: -1984px 0px; }
-.icon32.Master-Data--Add-Part { background-position: -2016px 0px; }
-.icon32.Master-Data--Add-Project { background-position: -2048px 0px; }
-.icon32.Master-Data--Add-Service { background-position: -2080px 0px; }
-.icon32.Master-Data--Add-Vendor { background-position: -2112px 0px; }
-.icon32.Master-Data { background-position: -2144px 0px; }
-.icon32.Master-Data--Reports--Assemblies { background-position: -2176px 0px; }
-.icon32.Master-Data--Reports--Customers { background-position: -2208px 0px; }
-.icon32.Master-Data--Reports--Licenses { background-position: -2240px 0px; }
-.icon32.Master-Data--Reports--Parts { background-position: -2272px 0px; }
-.icon32.Master-Data--Reports { background-position: -2304px 0px; }
-.icon32.Master-Data--Reports--Projects { background-position: -2336px 0px; }
-.icon32.Master-Data--Reports--Projecttransactions { background-position: -2368px 0px; }
-.icon32.Master-Data--Reports--Services { background-position: -2400px 0px; }
-.icon32.Master-Data--Reports--Vendors { background-position: -2432px 0px; }
-.icon32.Neues-Fenster { background-position: -2464px 0px; }
-.icon32.Program--Logout { background-position: -2496px 0px; }
-.icon32.Program { background-position: -2528px 0px; }
-.icon32.Program--Preferences { background-position: -2560px 0px; }
-.icon32.Program--Version { background-position: -2592px 0px; }
-.icon32.Reports--Balance-Sheet { background-position: -2624px 0px; }
-.icon32.Reports--Chart-of-Accounts { background-position: -2656px 0px; }
-.icon32.Reports--Income-Statement { background-position: -2688px 0px; }
-.icon32.Reports { background-position: -2720px 0px; }
-.icon32.Reports--UStVa { background-position: -2752px 0px; }
-.icon32.System { background-position: -2784px 0px; }
-.icon32.Warehouse--Produce-Assembly { background-position: -2816px 0px; }
+.icon32.ap--add-purchase-order { background-position: -0px 0px; }
+.icon32.ap--add-rfq { background-position: -32px 0px; }
+.icon32.ap { background-position: -64px 0px; }
+.icon32.ap--reports { background-position: -96px 0px; }
+.icon32.ap--reports--purchase-orders { background-position: -128px 0px; }
+.icon32.ap--reports--rfqs { background-position: -160px 0px; }
+.icon32.ar--add-dunning { background-position: -192px 0px; }
+.icon32.ar--add-quotation { background-position: -224px 0px; }
+.icon32.ar--add-sales-invoice { background-position: -256px 0px; }
+.icon32.ar--add-sales-order { background-position: -288px 0px; }
+.icon32.ar { background-position: -320px 0px; }
+.icon32.ar--reports--dunnings { background-position: -352px 0px; }
+.icon32.ar--reports--invoices { background-position: -384px 0px; }
+.icon32.ar--reports { background-position: -416px 0px; }
+.icon32.ar--reports--quotations { background-position: -448px 0px; }
+.icon32.ar--reports--sales-orders { background-position: -480px 0px; }
+.icon32.batch-printing--packing-lists { background-position: -512px 0px; }
+.icon32.batch-printing { background-position: -544px 0px; }
+.icon32.batch-printing--purchase-orders { background-position: -576px 0px; }
+.icon32.batch-printing--quotations { background-position: -608px 0px; }
+.icon32.batch-printing--receipts { background-position: -640px 0px; }
+.icon32.batch-printing--rfqs { background-position: -672px 0px; }
+.icon32.batch-printing--sales-invoices { background-position: -704px 0px; }
+.icon32.batch-printing--sales-orders { background-position: -736px 0px; }
+.icon32.cash--payment { background-position: -768px 0px; }
+.icon32.cash { background-position: -800px 0px; }
+.icon32.cash--receipt { background-position: -832px 0px; }
+.icon32.cash--reconciliation { background-position: -864px 0px; }
+.icon32.cash--reports--payments { background-position: -896px 0px; }
+.icon32.cash--reports { background-position: -928px 0px; }
+.icon32.cash--reports--receipts { background-position: -960px 0px; }
+.icon32.crm--add--customer { background-position: -992px 0px; }
+.icon32.crm--add--person { background-position: -1024px 0px; }
+.icon32.crm--add--vendor { background-position: -1056px 0px; }
+.icon32.crm--admin--document-template { background-position: -1088px 0px; }
+.icon32.crm--admin--label { background-position: -1120px 0px; }
+.icon32.crm--admin--message { background-position: -1152px 0px; }
+.icon32.crm--admin { background-position: -1184px 0px; }
+.icon32.crm--admin--status { background-position: -1216px 0px; }
+.icon32.crm--admin--user-groups { background-position: -1248px 0px; }
+.icon32.crm--admin--user { background-position: -1280px 0px; }
+.icon32.crm--appointments { background-position: -1312px 0px; }
+.icon32.crm--email { background-position: -1344px 0px; }
+.icon32.crm--follow-up { background-position: -1376px 0px; }
+.icon32.crm--help { background-position: -1408px 0px; }
+.icon32.crm--knowledge { background-position: -1440px 0px; }
+.icon32.crm--memo { background-position: -1472px 0px; }
+.icon32.crm--opportunity { background-position: -1504px 0px; }
+.icon32.crm { background-position: -1536px 0px; }
+.icon32.crm--search { background-position: -1568px 0px; }
+.icon32.crm--service { background-position: -1600px 0px; }
+.icon32.general-ledger--add-ap-transaction { background-position: -1632px 0px; }
+.icon32.general-ledger--add-ar-transaction { background-position: -1664px 0px; }
+.icon32.general-ledger--add-transaction { background-position: -1696px 0px; }
+.icon32.general-ledger--datev---export-assistent { background-position: -1728px 0px; }
+.icon32.general-ledger { background-position: -1760px 0px; }
+.icon32.general-ledger--reports--ap-aging { background-position: -1792px 0px; }
+.icon32.general-ledger--reports--ar-aging { background-position: -1824px 0px; }
+.icon32.general-ledger--reports--journal { background-position: -1856px 0px; }
+.icon32.general-ledger--reports { background-position: -1888px 0px; }
+.icon32.master-data--add-assembly { background-position: -1920px 0px; }
+.icon32.master-data--add-customer { background-position: -1952px 0px; }
+.icon32.master-data--add-license { background-position: -1984px 0px; }
+.icon32.master-data--add-part { background-position: -2016px 0px; }
+.icon32.master-data--add-project { background-position: -2048px 0px; }
+.icon32.master-data--add-service { background-position: -2080px 0px; }
+.icon32.master-data--add-vendor { background-position: -2112px 0px; }
+.icon32.master-data { background-position: -2144px 0px; }
+.icon32.master-data--reports--assemblies { background-position: -2176px 0px; }
+.icon32.master-data--reports--customers { background-position: -2208px 0px; }
+.icon32.master-data--reports--licenses { background-position: -2240px 0px; }
+.icon32.master-data--reports--parts { background-position: -2272px 0px; }
+.icon32.master-data--reports { background-position: -2304px 0px; }
+.icon32.master-data--reports--projects { background-position: -2336px 0px; }
+.icon32.master-data--reports--projecttransactions { background-position: -2368px 0px; }
+.icon32.master-data--reports--services { background-position: -2400px 0px; }
+.icon32.master-data--reports--vendors { background-position: -2432px 0px; }
+.icon32.neues-fenster { background-position: -2464px 0px; }
+.icon32.program--logout { background-position: -2496px 0px; }
+.icon32.program { background-position: -2528px 0px; }
+.icon32.program--preferences { background-position: -2560px 0px; }
+.icon32.program--version { background-position: -2592px 0px; }
+.icon32.reports--balance-sheet { background-position: -2624px 0px; }
+.icon32.reports--chart-of-accounts { background-position: -2656px 0px; }
+.icon32.reports--income-statement { background-position: -2688px 0px; }
+.icon32.reports { background-position: -2720px 0px; }
+.icon32.reports--ustva { background-position: -2752px 0px; }
+.icon32.system { background-position: -2784px 0px; }
+.icon32.warehouse--produce-assembly { background-position: -2816px 0px; }
diff --git a/css/kivitendo/bwa.css b/css/kivitendo/bwa.css
new file mode 100644 (file)
index 0000000..4357a97
--- /dev/null
@@ -0,0 +1,64 @@
+/* Allgemeine Schriftdefinition */
+th,td {
+       font-family: Arial, Verdana, Helvetica, Sans-serif;
+       font-size:small;
+}
+
+@page {
+       size: landscape;
+       margin: 0.5cm;
+}
+
+/* Definition Tabellenueberschrift */
+
+.left  { text-align:left; }
+.center        { text-align:center; }
+.right { text-align:right; }
+
+tr.headline    { border:0; }
+tr.headline td { border:0; }
+h3 { font-size:120%; }
+h3 { font-size:100%; }
+
+/* Tabellenkopf */
+th {
+       font-weight: bold;
+       border-bottom: solid thin black;
+       padding:0 10px;
+       text-align:right;
+}
+
+th.left  { border-left:  solid thin black; }
+th.right { border-right: solid thin black; }
+
+.querkopf th.right { text-align:center; }
+.querkopf th {
+       border-top: solid thin black;
+       border-bottom:0;
+}
+
+/* Tabelleninhalt */
+td {
+       text-align:right;
+       padding:0 0.5em;
+}
+td.left  { border-left:  solid thin black; }
+td.right { border-right: solid thin black; }
+
+
+/* jede zweite Zeile grau hinterlegen */
+tr.grey {
+       background:#f0f0f0;
+}
+
+/* letzte Zeile in der Tabelle */
+#last td{ border-bottom: solid thin black; }
+
+/* Zwischensumme/-ueberschriften */
+tr.subtotal td { font-weight: bold; }
+
+/* Fusszeile unter der Tabelle */
+td.footer {
+       text-align:right;
+       font-size:smaller;
+}
diff --git a/css/kivitendo/ustva.css b/css/kivitendo/ustva.css
new file mode 100644 (file)
index 0000000..7920c15
--- /dev/null
@@ -0,0 +1,33 @@
+table {
+       text-align: right;
+       border:0;
+       border-collapse:collapse;
+}
+td {
+       font-size:100%;
+       vertical-align:top;
+}
+td.text {
+       text-align: left;
+       background-color:#BDBEBD;
+}
+td.text2 {
+       text-align: left;
+       background-color:#ADBEBD;
+}
+td.spalte,
+td.zeile,
+td.betrag {
+       border:solid thin black;
+}
+td.spalte { font-weight:bold; font-size:120%; }
+td.zeile  { font-weight:bold; }
+td.betrag { width:10em; }
+td.summe  { border:solid medium black; }
+td.spacer { border:0 }
+
+tr.uebertrag td { border-top:solid medium black; }
+b.h3 { font-size:120%; }
+.ausfuellen { background-color:#FFFFC0; }
+.nodis { display:none; }
+
index 29415a1..29b67cd 100644 (file)
@@ -50,6 +50,18 @@ Upgrade auf v3.x.0
   - scripts/dbupgrade2_tool.pl
   - scripts/rose_auto_create_model.pl
 
+* Neue Benutzerrechte
+  Diese muessen bei vorhandenen Gruppen eventuell nachgepfl;egt werden. Z.B. bei der Gruppe Vollzugriff
+
+  - Stammdaten -> Kunden und Lieferanten erfassen. Alle Lieferanten bearbeiten. Alle Kunden bearbeiten
+  - Konfiguration -> Verändern der kivitendo-Installationseinstellungen (die meisten Menüpunkte unterhalb von 'System')
+
+* Die alten ungepflegten Druckvorlagenvarianten French und Service
+  wurden entfernt.
+
+* Die Druckvorlage für GuV/EÜR wird jetzt wie die Bilanz zentral in den
+  Webvorlagen verwaltet, es gibt keine benutzerangepassten Version in den
+  Druckvorlage mehr.
 
 Upgrade auf v3.0.0
 ==================
index 088435b..2d714e7 100644 (file)
@@ -35,13 +35,22 @@ Größere neue Features:
   WebDAV-Verzeichnis pro Mandant gibt. Die dafür notwendigen
   Umstellungen werden zusammen mit dem Datenbankupgrade durchgeführt.
 
-
+- CSV-Import von Aufträgen
 
 Kleinere neue Features und Detailverbesserungen:
 
+- Die bwa.html und ustva.html werden jetzt zentral gepflegt und nicht mehr als benutzerdefinierte
+  Druckvorlage. Falls hier jmd. Anpassungen gemacht hat, müssten diese in templates/rp/$VORLAGE.html
+  nachgepflegt werden
+- Für UstVa: Winston, Taxbird und Pdf-Export werden nicht mehr unterstützt. Die UstVa muss sowieso mittlerweile
+  per Elster erfolgen
+- Lieferbedingungen analog zu Zahlungsbedingungen eingeführt.
+  Sie können angelegt, beim Benutzer voreingestellt und in allen Ein- und Ver-
+  kaufsmasken gesetzt werden.
+
 - Rechte für die Anzeige von Debitoren- und Kreditorenbuchungen in Berichten
 __Es kann sinnvoll sein, den Standardeinkäufern und Verkäufern keinen Zugriff
-__auf Debitoren- oder Kreditorenbuchungen zu geben. Debitorenbuchungen werden 
+__auf Debitoren- oder Kreditorenbuchungen zu geben. Debitorenbuchungen werden
 __meist nur für die Mahngebührenrechnungen verwendet, da ist das nicht so
 __interessant, aber bei Kreditorenbuchungen werden oft Sachen gebucht, die
 __nichts mit Wareneinkauf zu tun haben, und nicht jeder sehen soll. Für diesen
@@ -99,6 +108,12 @@ Wichtige Änderungen:
 - Perl v5.10.1 oder neuer und PostgreSQL v8.4 oder neuer werden
   zwingend vorausgesetzt.
 
+Bugfixes:
+ - Punkt in Belegnummer korrekt für WebDAV File Feature escapt (Bug 2394)
+ - Stornierte Rechnungen (sowohl die Stornorechnung als auch das Storno nicht
+   Buchen oder Löschen, egal was in der Mandantenkonfiguration steht)
+ - Wiederkehrende Rechnung mit Steuer inklusive buchen Erlöse falsch (Bug 2314)
+ - manuelle Lieferadresse im Auftrag wird nicht in wiederkehrende Rechung übernommen (Bug 2296)
 
 
 2012-12-10 - Release 3.0.0
index 8018143..5bbc172 100644 (file)
@@ -1395,24 +1395,30 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
 
       <sect2 id="Vorlagenverzeichnis-anlegen" xreflabel="Vorlagenverzeichnis anlegen">
         <title>Vorlagenverzeichnis anlegen</title>
-        <para>Im Administrationsbereich lässt sich bei einem Benutzer/Mandanten einer dieser Vorlagensätze als Basis für die zu
-        druckenden Dokumente auswählen. Rufen Sie dazu die <guimenu>Benutzerverwaltung</guimenu> auf.</para>
+        <para>Es lässt sich ein initialer Vorlagensatz erstellen. Die LaTeX-System-Abhängigkeiten hierfür kann man prüfen mit:</para>
 
-        <para>Wählen Sie dort einen Benutzer aus oder legen Sie einen neuen an. In der Benutzerbearbeiten-Maske müssen Sie zwei Dinge
-        angeben:</para>
+        <programlisting>./scripts/installation_check.pl -lv</programlisting>
+
+       <para>Der Angemmeldete Benutzer muss in einer Gruppe sein, die über das
+              Recht "Konfiguration -> Mandantenverwaltung" verfügt. Siehe auch <xref linkend="Gruppen-anlegen"/>.
+        </para>
+        <para>Im Userbereich lässt sich unter:
+        "<guimenu>System</guimenu> -&gt;
+        <guisubmenu>Mandantenverwaltung</guisubmenu> -&gt; <guimenuitem>Verschiedenes</guimenuitem>" die Option
+        "Neue Druckvorlagen aus Vorlagensatz erstellen" auswählen.</para>
 
         <orderedlist>
-          <listitem><para><option>Name</option>: Der Verzeichnisname für den neuen Vorlagensatz. Dieser kann im Rahmen der üblichen
-          Bedingungen für Verzeichnisnamen frei gewählt werden.</para></listitem>
           <listitem><para><option>Vorlagen auswählen</option>: Wählen Sie hier den Vorlagensatz aus, der kopiert werden soll
           (<filename>Standard</filename>, <filename>f-tex</filename> oder <filename>RB</filename>.)</para></listitem>
+          <listitem><para><option>Neuer Name</option>: Der Verzeichnisname für den neuen Vorlagensatz. Dieser kann im Rahmen der üblichen
+          Bedingungen für Verzeichnisnamen frei gewählt werden.</para></listitem>
         </orderedlist>
 
-        <para>Der gleiche Vorlagensatz kann, wenn er mal angelegt ist, bei mehreren Benutzern verwendet werden.</para>
-
-        <para>Die Abhängigkeiten kann man prüfen mit:</para>
+        <para>Nach dem Speichern wird das Vorlagenverzeichnis angelegt und ist für den aktuellen Mandanten ausgewählt.
+           Der gleiche Vorlagensatz kann, wenn er mal angelegt ist, bei mehreren Mandanten verwendet werden.
+           Eventuell muessen Anpassungen (Logo, Erscheinungsbild, etc) noch vorgenommen werden. Den Ordner findet man im Dateisistem unter
+           <filename>./templates/[Neuer Name]</filename></para>
 
-        <programlisting>/scripts/installation_check.pl -l</programlisting>
 
       </sect2>
       <sect2 id="Vorlagen-Standard">
@@ -3219,7 +3225,7 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
         </sect3>
 
         <sect3 id="dokumentenvorlagen-und-variablen.allgemein-verkaeufer">
-          <title>Informationen über den Bearbeiter</title>
+          <title>Informationen über den Verkäufer</title>
 
           <variablelist>
             <varlistentry>
@@ -3349,6 +3355,25 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
             </varlistentry>
           </variablelist>
         </sect3>
+
+        <sect3 id="dokumentenvorlagen-und-variablen.allgemein-lieferbedingungen">
+          <title>Variablen für Lieferbedingungen</title>
+
+          <variablelist>
+            <varlistentry>
+              <term><varname>delivery_term</varname></term>
+              <listitem><para>Datenbank-Objekt der Lieferbedingung</para></listitem>
+            </varlistentry>
+            <varlistentry>
+              <term><varname>delivery_term.description</varname></term>
+              <listitem><para>Beschreibung der Lieferbedingung</para></listitem>
+            </varlistentry>
+            <varlistentry>
+              <term><varname>delivery_term.long_description</varname></term>
+              <listitem><para>Langtext bzw. übersetzter Langtext der Lieferbedingung</para></listitem>
+            </varlistentry>
+          </variablelist>
+        </sect3>
       </sect2>
 
       <sect2 id="dokumentenvorlagen-und-variablen.invoice">
index 5763062..e8667b4 100644 (file)
                         <code class="varname">employee_taxnumber</code>
                      </span></dt><dd><p>Steuernummer</p></dd><dt><span class="term">
                         <code class="varname">employee_tel</code>
-                     </span></dt><dd><p>Telefonnummer</p></dd></dl></div></div><div class="sect3" title="3.2.7.4. Informationen über den Bearbeiter"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.allgemein-verkaeufer"></a>3.2.7.4. Informationen über den Bearbeiter</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
+                     </span></dt><dd><p>Telefonnummer</p></dd></dl></div></div><div class="sect3" title="3.2.7.4. Informationen über den Verkäufer"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.allgemein-verkaeufer"></a>3.2.7.4. Informationen über den Verkäufer</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
                         <code class="varname">salesman_address</code>
                      </span></dt><dd><p>Adressfeld</p></dd><dt><span class="term">
                         <code class="varname">salesman_businessnumber</code>
                         <code class="varname">taxdescription</code>
                      </span></dt><dd><p>Name der Steuer</p></dd><dt><span class="term">
                         <code class="varname">taxrate</code>
-                     </span></dt><dd><p>Steuersatz</p></dd></dl></div></div></div><div class="sect2" title="3.2.8. Variablen in Rechnungen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.invoice"></a>3.2.8. Variablen in Rechnungen</h3></div></div></div><div class="sect3" title="3.2.8.1. Allgemeine Variablen"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.invoice-allgemein"></a>3.2.8.1. Allgemeine Variablen</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
+                     </span></dt><dd><p>Steuersatz</p></dd></dl></div></div><div class="sect3" title="3.2.7.6. Variablen für Lieferbedingungen"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.allgemein-lieferbedingungen"></a>3.2.7.6. Variablen für Lieferbedingungen</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
+                        <code class="varname">delivery_term</code>
+                     </span></dt><dd><p>Datenbank-Objekt der Lieferbedingung</p></dd><dt><span class="term">
+                        <code class="varname">delivery_term.description</code>
+                     </span></dt><dd><p>Beschreibung der Lieferbedingung</p></dd><dt><span class="term">
+                        <code class="varname">delivery_term.long_description</code>
+                     </span></dt><dd><p>Langtext bzw. übersetzter Langtext der Lieferbedingung</p></dd></dl></div></div></div><div class="sect2" title="3.2.8. Variablen in Rechnungen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.invoice"></a>3.2.8. Variablen in Rechnungen</h3></div></div></div><div class="sect3" title="3.2.8.1. Allgemeine Variablen"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.invoice-allgemein"></a>3.2.8.1. Allgemeine Variablen</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
                         <code class="varname">creditremaining</code>
                      </span></dt><dd><p>Verbleibender Kredit</p></dd><dt><span class="term">
                         <code class="varname">currency</code>
                         <code class="varname">invdate</code>
                      </span></dt><dd><p>Rechnungsdatum</p></dd><dt><span class="term">
                         <code class="varname">invnumber</code>
-                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4654"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
+                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4685"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
           Rechnung. Allerdings heißen die Variablen, die mit
           <code class="varname">inv</code> beginnen, jetzt anders. Bei den Angeboten
           fangen sie mit <code class="varname">quo</code> für "quotation" an:
index f6518ed..8c7b140 100644 (file)
@@ -1,6 +1,6 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s03.html" title="3.3. Excel-Vorlagen"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e5261"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5267"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
+   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s03.html" title="3.3. Excel-Vorlagen"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e5292"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5298"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
         "main", der von überall erreichbar ist. Darüber hinaus sind bareword
         globs global und die meisten speziellen Variablen sind...
         speziell.</p><p>Daraus ergeben sich folgende Formen:</p><div class="variablelist"><dl><dt><span class="term">
@@ -25,7 +25,7 @@
               <code class="varname">$PACKAGE::form</code>.</p></dd><dt><span class="term">
                      <code class="literal">local $form</code>
                   </span></dt><dd><p>Alle Änderungen an <code class="varname">$form</code> werden am Ende
-              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5368"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
+              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5399"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
                <span class="productname">SQL-Ledger</span>™ hat fast alles im globalen
         namespace abgelegt, und erwartet, dass es da auch wiederzufinden ist.
         Unter <span class="productname">FCGI</span>™ müssen diese Sachen aber wieder
@@ -39,7 +39,7 @@
         dies hat, seit der Einführung, u.a. schon so manche langwierige
         Bug-Suche verkürzt. Da globale Variablen aber implizit mit Package
         angegeben werden, werden die nicht geprüft, und somit kann sich
-        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5401"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
+        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5432"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
         globale Variablen, die kanonisch sind, d.h. sie haben bestimmte
         vorgegebenen Eigenschaften, und alles andere sollte anderweitig
         umhergereicht werden.</p><p>Diese Variablen sind im Moment die folgenden neun:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@@ -62,7 +62,7 @@
                      <code class="varname">$::request</code>
                   </p></li></ul></div><p>Damit diese nicht erneut als Müllhalde missbraucht werden, im
         Folgenden eine kurze Erläuterung der bestimmten vorgegebenen
-        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5465"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
+        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5496"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
               "<code class="classname">Form</code>"</p></li><li class="listitem"><p>Wird nach jedem Request gelöscht</p></li><li class="listitem"><p>Muss auch in Tests und Konsolenscripts vorhanden
               sein.</p></li><li class="listitem"><p>Enthält am Anfang eines Requests die Requestparameter vom
               User</p></li><li class="listitem"><p>Kann zwar intern über Requestgrenzen ein Datenbankhandle
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{number} },          $form-&gt;{"partnumber_$i"};
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{description} },     $form-&gt;{"description_$i"};
   # ...
-}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5549"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
+}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5580"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
               zugegriffen wird</p></li><li class="listitem"><p>Wird bei jedem Request neu erstellt.</p></li><li class="listitem"><p>Enthält die Userdaten des aktuellen Logins</p></li><li class="listitem"><p>Sollte nicht ohne Filterung irgendwo gedumpt werden oder
               extern serialisiert werden, weil da auch der Datenbankzugriff
               für diesen user drinsteht.</p></li><li class="listitem"><p>Enthält unter anderem Listenbegrenzung vclimit,
           überwiegend die Daten, die sich unter <span class="guimenu">Programm</span>
           -&gt; <span class="guimenuitem">Einstellungen</span> befinden, bzw. die
           Informationen über den Benutzer die über die
-          Administrator-Schnittstelle eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5588"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
+          Administrator-Schnittstelle eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5619"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
               sein.</p></li><li class="listitem"><p>Cached intern über Requestgrenzen hinweg benutzte
               Locales</p></li></ul></div><p>Lokalisierung für den aktuellen User. Alle Übersetzungen,
-          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5606"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
+          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5637"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
               Funktionen</p></li></ul></div><p>
                   <code class="varname">$::lxdebug</code> stellt Debuggingfunktionen
           bereit, wie "<code class="function">enter_sub</code>" und
           "<code class="function">message</code>" und "<code class="function">dump</code>" mit
           denen man flott Informationen ins Log (tmp/kivitendo-debug.log)
           packen kann.</p><p>Beispielsweise so:</p><pre class="programlisting">$main::lxdebug-&gt;message(0, 'Meine Konfig:' . Dumper (%::myconfig));
-$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5643"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
+$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5674"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
                   <code class="varname">$::auth</code> stellt Funktionen bereit um die
           Rechte des aktuellen Users abzufragen. Obwohl diese Informationen
           vom aktuellen User abhängen wird das Objekt aus
           Geschwindigkeitsgründen nur einmal angelegt und dann nach jedem
           Request kurz resettet.</p><p>Dieses Objekt kapselt auch den gerade aktiven Mandanten. Dessen Einstellungen können über
           <code class="literal">$::auth-&gt;client</code> abgefragt werden; Rückgabewert ist ein Hash mit den Werten aus der Tabelle
-          <code class="literal">auth.clients</code>.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5672"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          <code class="literal">auth.clients</code>.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5703"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::LxOfficeConf</code>"</p></li><li class="listitem"><p>Global gecached</p></li><li class="listitem"><p>Repräsentation der
               <code class="filename">config/kivitendo.conf[.default]</code>-Dateien</p></li></ul></div><p>Globale Konfiguration. Configdateien werden zum Start gelesen
           und danach nicht mehr angefasst. Es ist derzeit nicht geplant, dass
@@ -152,16 +152,16 @@ $main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{
 file = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">file</code> im Programm als
           <code class="varname">$::lx_office_conf-&gt;{debug}{file}</code>
           erreichbar.</p><div class="warning" title="Warnung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warnung]" src="system/docbook-xsl/images/warning.png"></td><th align="left">Warnung</th></tr><tr><td align="left" valign="top"><p>Zugriff auf die Konfiguration erfolgt im Moment über
-            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5708"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5739"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::InstanceConfiguration</code>"</p></li><li class="listitem"><p>wird pro Request neu erstellt</p></li></ul></div><p>Funktioniert wie <code class="varname">$::lx_office_conf</code>,
           speichert aber Daten die von der Instanz abhängig sind. Eine Instanz
           ist hier eine Mandantendatenbank. Beispielsweise überprüft
           </p><pre class="programlisting">$::instance_conf-&gt;get_inventory_system eq 'perpetual'</pre><p>
-          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5729"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5760"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="varname">SL::Dispatcher</code>"</p></li><li class="listitem"><p>wird pro Serverprozess erstellt.</p></li><li class="listitem"><p>enthält Informationen über die technische Verbindung zum
               Server</p></li></ul></div><p>Der dritte Punkt ist auch der einzige Grund warum das Objekt
           global gespeichert wird. Wird vermutlich irgendwann in einem anderen
-          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5747"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
+          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5778"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
                   <code class="varname">$::request</code> ist ein generischer Platz um
           Daten "für den aktuellen Request" abzulegen. Sollte nicht für action
           at a distance benutzt werden, sondern um lokales memoizing zu
@@ -174,20 +174,20 @@ file = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">file</
               <code class="varname">$::request</code>
                      </p></li><li class="listitem"><p>Muss ich von anderen Teilen des Programms lesend drauf
               zugreifen? Dann <code class="varname">$::request</code>, aber Zugriff über
-              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5789"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
-        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5794"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
+              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5820"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
+        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5825"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
               Klassenfunktionen funktionieren</p></li><li class="listitem"><p>Aufruf als Klasse erzeugt Dummyobjekt was im
               Klassennamespace gehalten wird und über Requestgrenzen
               leaked</p></li><li class="listitem"><p>liegt jetzt unter
               <code class="varname">$::request-&gt;{cgi}</code>
-                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5810"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
+                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5841"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
               ein paar hundert mal pro Request eine Liste der Einheiten
               brauchen, und de als Parameter durch einen Riesenstack von
               Funktionen geschleift werden müssten.</p></li><li class="listitem"><p>Liegt jetzt unter
               <code class="varname">$::request-&gt;{cache}{all_units}</code>
                      </p></li><li class="listitem"><p>Wird nur in
               <code class="function">AM-&gt;retrieve_all_units()</code> gesetzt oder
-              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5829"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
+              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5860"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
               abzufangen.</p></li><li class="listitem"><p>Wurde entfernt, weil callsub nur einen Bruchteil der
               möglichen Rekursioenen darstellt, und da nie welche
               auftreten.</p></li><li class="listitem"><p>komplette recursion protection wurde entfernt.</p></li></ul></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">3.3. Excel-Vorlagen&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td><td width="40%" align="right" valign="top">&nbsp;4.2. Entwicklung unter FastCGI</td></tr></table></div></body></html>
\ No newline at end of file
index 627d461..c97f3d3 100644 (file)
@@ -3,7 +3,7 @@
    <title>kivitendo 3.0.0: Installation, Konfiguration, Entwicklung</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><link rel="next" href="ch01.html" title="Kapitel 1. Aktuelle Hinweise"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">kivitendo 3.0.0: Installation, Konfiguration, Entwicklung</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr></table><hr></div><div lang="de" class="book" title="kivitendo 3.0.0: Installation, Konfiguration, Entwicklung"><div class="titlepage"><div><div><h1 class="title"><a name="kivitendo-documentation"></a>kivitendo 3.0.0: Installation, Konfiguration, Entwicklung</h1></div></div><hr></div><div class="toc"><p><b>Inhaltsverzeichnis</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Aktuelle Hinweise</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. Installation und Grundkonfiguration</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#Installation-%C3%9Cbersicht">2.1. Übersicht</a></span></dt><dt><span class="sect1"><a href="ch02s02.html">2.2. Benötigte Software und Pakete</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s02.html#Betriebssystem">2.2.1. Betriebssystem</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#Pakete">2.2.2. Benötigte Perl-Pakete installieren</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s03.html">2.3. Manuelle Installation des Programmpaketes</a></span></dt><dt><span class="sect1"><a href="ch02s04.html">2.4. kivitendo-Konfigurationsdatei</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s04.html#config.config-file.introduction">2.4.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#config.config-file.sections-parameters">2.4.2. Abschnitte und Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#config.config-file.prior-versions">2.4.3. Versionen vor 2.6.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s05.html">2.5. Anpassung der PostgreSQL-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s05.html#Zeichens%C3%A4tze-die-Verwendung-von-UTF-8">2.5.1. Zeichensätze/die Verwendung von Unicode/UTF-8</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#%C3%84nderungen-an-Konfigurationsdateien">2.5.2. Änderungen an Konfigurationsdateien</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Erweiterung-f%C3%BCr-servergespeicherte-Prozeduren">2.5.3. Erweiterung für servergespeicherte Prozeduren</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Datenbankbenutzer-anlegen">2.5.4. Datenbankbenutzer anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s06.html">2.6. Webserver-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s06.html#d0e697">2.6.1. Grundkonfiguration mittels CGI</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Apache-Konfiguration.FCGI">2.6.2. Konfiguration für FastCGI/FCGI</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s07.html">2.7. Der Task-Server</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s07.html#Konfiguration-des-Task-Servers">2.7.1. Verfügbare und notwendige Konfigurationsoptionen</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Einbinden-in-den-Boot-Prozess">2.7.2. Automatisches Starten des Task-Servers beim Booten</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Prozesskontrolle">2.7.3. Wie der Task-Server gestartet und beendet wird</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Prozesskontrolle2">2.7.4. Task-Server mit mehreren Mandanten</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s08.html">2.8. Benutzerauthentifizierung und Administratorpasswort</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s08.html#Grundlagen-zur-Benutzerauthentifizierung">2.8.1. Grundlagen zur Benutzerauthentifizierung</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Administratorpasswort">2.8.2. Administratorpasswort</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Authentifizierungsdatenbank">2.8.3. Authentifizierungsdatenbank</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Passwort%C3%BCberpr%C3%BCfung">2.8.4. Passwortüberprüfung</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Name-des-Session-Cookies">2.8.5. Name des Session-Cookies</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Anlegen-der-Authentifizierungsdatenbank">2.8.6. Anlegen der Authentifizierungsdatenbank</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s09.html">2.9. Mandanten-, Benutzer- und Gruppenverwaltung</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s09.html#Zusammenh%C3%A4nge">2.9.1. Zusammenhänge</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Mandanten-Benutzer-Gruppen">2.9.2. Mandanten, Benutzer und Gruppen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Datenbanken-anlegen">2.9.3. Datenbanken anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Gruppen-anlegen">2.9.4. Gruppen anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Benutzer-anlegen">2.9.5. Benutzer anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Mandanten-anlegen">2.9.6. Mandanten anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s10.html">2.10. E-Mail-Versand aus kivitendo heraus</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s10.html#config.sending-email.sendmail">2.10.1. Versand über lokalen E-Mail-Server</a></span></dt><dt><span class="sect2"><a href="ch02s10.html#config.sending-email.smtp">2.10.2. Versand über einen SMTP-Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s11.html">2.11. Drucken mit kivitendo</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s11.html#Vorlagenverzeichnis-anlegen">2.11.1. Vorlagenverzeichnis anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#Vorlagen-Standard">2.11.2. Standard</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#f-tex">2.11.3. f-tex</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#Vorlagen-RB">2.11.4. RB</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#allgemeine-hinweise-zu-latex">2.11.5. Allgemeine Hinweise zu LaTeX Vorlagen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s12.html">2.12. OpenDocument-Vorlagen</a></span></dt><dt><span class="sect1"><a href="ch02s13.html">2.13. Konfiguration zur Einnahmenüberschussrechnung/Bilanzierung:
       EUR</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s13.html#config.eur.introduction">2.13.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s13.html#config.eur.parameters">2.13.2. Konfigurationsparameter</a></span></dt><dt><span class="sect2"><a href="ch02s13.html#config.eur.setting-parameters">2.13.3. Festlegen der Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s13.html#config.eur.inventory-system-perpetual">2.13.4. Bemerkungen zu Bestandsmethode</a></span></dt><dt><span class="sect2"><a href="ch02s13.html#config.eur.knonw-issues">2.13.5. Bekannte Probleme</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s14.html">2.14. SKR04 19% Umstellung für innergemeinschaftlichen Erwerb</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s14.html#config.skr04-update-3804.introduction">2.14.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s14.html#config.skr04-update-3804.create-chart">2.14.2. Konto 3804 manuell anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s15.html">2.15. Einstellungen pro Mandant</a></span></dt><dt><span class="sect1"><a href="ch02s16.html">2.16. kivitendo ERP verwenden</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Features und Funktionen</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch03.html#features.periodic-invoices">3.1. Wiederkehrende Rechnungen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.introduction">3.1.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.configuration">3.1.2. Konfiguration</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.variables">3.1.3. Spezielle Variablen</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.reports">3.1.4. Auflisten</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.task-server">3.1.5. Erzeugung der eigentlichen Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.create-for-current-month">3.1.6. Erste Rechnung für aktuellen Monat erstellen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s02.html">3.2. Dokumentenvorlagen und verfügbare Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.einf%C3%BChrung">3.2.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.variablen-ausgeben">3.2.2. Variablen ausgeben</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.verwendung-in-druckbefehlen">3.2.3. Verwendung in Druckbefehlen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.tag-style">3.2.4. Anfang und Ende der Tags verändern</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.zuordnung-dateinamen">3.2.5. Zuordnung von den Dateinamen zu den Funktionen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dateinamen-erweitert">3.2.6. Sprache, Drucker und E-Mail</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.allgemeine-variablen">3.2.7. Allgemeine Variablen, die in allen Vorlagen vorhanden
         sind</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.invoice">3.2.8. Variablen in Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dunning">3.2.9. Variablen in Mahnungen und Rechnungen über Mahngebühren</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.andere-vorlagen">3.2.10. Variablen in anderen Vorlagen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.bloecke">3.2.11. Blöcke, bedingte Anweisungen und Schleifen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.markup">3.2.12. Markup-Code zur Textformatierung innerhalb von
-        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e5267">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5368">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5401">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5789">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format-perl-files">4.3.3. Format von in Perl geschriebenen Datenbankupgradescripten</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.4. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.character-set">4.4.2. Character set</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.3. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Die kivitendo-Test-Suite</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.intro">4.5.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.prerequisites">4.5.2. Voraussetzungen</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.execution">4.5.3. 
+        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e5298">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5399">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5432">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5820">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format-perl-files">4.3.3. Format von in Perl geschriebenen Datenbankupgradescripten</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.4. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.character-set">4.4.2. Character set</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.3. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Die kivitendo-Test-Suite</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.intro">4.5.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.prerequisites">4.5.2. Voraussetzungen</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.execution">4.5.3. 
           Existierende Tests ausführen
         </a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.meaning_of_scripts">4.5.4. 
           Bedeutung der verschiedenen Test-Scripte
index 8ab4156..6b36490 100644 (file)
Binary files a/doc/kivitendo-Dokumentation.pdf and b/doc/kivitendo-Dokumentation.pdf differ
index 533915f..05a18d3 100644 (file)
@@ -20,12 +20,12 @@ als freundliche Checkliste zum ausdrucken und erweitern.
 1. KONSISTENZ DES PROGRAMMS
 ===========================
 
-* Testlauf t/test.sh
+* Testlauf mit t/test.pl
+  Benutzer und Mandant muss hierfür entsprechend in kivitendo.conf > Abschnitt testing
+  konfiguriert sein.
 
   - Im Moment sind 3 Fehler optimal (die sind noch nicht angegangen):
-    o  bin/mozilla/ic.pl contains at least 130 html tags.
-    o  bin/mozilla/ap.pl contains at least 183 html tags.
-    o  bin/mozilla/admin.pl DOES NOT use proper system or exec calls
+    o  bin/mozilla/ic.pl contains at least 123 html tags.
   - Einige Tests setzen eine korrekt aufgesetzte Datenbank für tests voraus.
     TODO: diese Tests korrekt skippen wenn keine DB gefunden wurde.
     TODO: Dokumentieren wie der Releasemanager sich so eine DB baut, die
diff --git a/image/icons/16x16/AR--Reports--Invoices, Credit Notes & AR Transactions.png b/image/icons/16x16/AR--Reports--Invoices, Credit Notes & AR Transactions.png
new file mode 100644 (file)
index 0000000..ca74ae1
Binary files /dev/null and b/image/icons/16x16/AR--Reports--Invoices, Credit Notes & AR Transactions.png differ
diff --git a/image/icons/16x16/AR--Reports--Invoices.png b/image/icons/16x16/AR--Reports--Invoices.png
deleted file mode 100644 (file)
index ca74ae1..0000000
Binary files a/image/icons/16x16/AR--Reports--Invoices.png and /dev/null differ
index 87ff0b1..dafc5ce 100644 (file)
Binary files a/image/maps/icons16.png and b/image/maps/icons16.png differ
index 4bd1206..179097f 100644 (file)
Binary files a/image/maps/icons24.png and b/image/maps/icons24.png differ
index a564f6e..8ede568 100644 (file)
Binary files a/image/maps/icons32.png and b/image/maps/icons32.png differ
index 2bc9107..d961814 100644 (file)
@@ -33,17 +33,6 @@ function centerParms(width,height,extra) {
   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?" +
-    "INPUT_ENCODING=UTF-8&" +
-    "action=set_longdescription&" +
-    "longdescription=" + encodeURIComponent(document.getElementsByName(input_name)[0].value) + "&" +
-    "input_name=" + encodeURIComponent(input_name) + "&"
-  window.open(url, "_new_generic", parm);
-  }
-
 function check_right_number_format(input_name) {
   if(decpoint && thpoint && thpoint == decpoint) {
     return show_alert_and_focus(input_name, wrongNumberFormat);
index cef64ef..00798d8 100644 (file)
@@ -7,11 +7,11 @@
 ;(function($) {
 
 $.fn.extend({
-  checkall: function(target, property) {
+  checkall: function(target, property, inverted) {
     if (property == null)
       property = 'checked';
     return $(this).click(function() {
-      $(target).prop(property, $(this).prop('checked'));
+      $(target).prop(property, inverted ? !$(this).prop('checked') : $(this).prop('checked'));
     });
   }
 });
index aed7081..59c0735 100644 (file)
@@ -44,32 +44,25 @@ namespace('kivi.CustomerVendor', function(ns) {
   this.selectContact = function(params) {
     var contactId = $('#contact_cp_id').val();
 
-    if( contactId ) {
-      var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
+         var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId;
 
-      $.getJSON(url, function(data) {
-        var contact = data.contact;
-        for(var key in contact)
-          $(document.getElementById('contact_'+ key)).val(contact[key])
+    $.getJSON(url, function(data) {
+      var contact = data.contact;
+      for(var key in contact)
+        $(document.getElementById('contact_'+ key)).val(contact[key])
 
-        var cvars = data.contact_cvars;
-        for(var key in cvars)
-          $(document.getElementById('contact_cvar_'+ key)).val(cvars[key]);
+      var cvars = data.contact_cvars;
+      for(var key in cvars)
+        $(document.getElementById('contact_cvars_'+ key)).val(cvars[key]);
 
+      if ( contactId )
         $('#action_delete_contact').show();
+      else
+        $('#action_delete_contact').hide();
 
-        if( params.onFormSet )
-          params.onFormSet();
-      });
-    }
-    else {
-      $('#contacts :input').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
-
-      $('#action_delete_contact').hide();
-
-      if( params.onFormSet )
+      if ( params.onFormSet )
         params.onFormSet();
-    }
+    });
 
     $('#contact_cp_title_select, #contact_cp_abteilung_select').val('');
   };
@@ -105,7 +98,7 @@ namespace('kivi.CustomerVendor', function(ns) {
 
     var isNotEmpty = function() {
       for(var i in $mapSearchElements)
-        if( $mapSearchElements[i].val() == '' )
+        if( ($mapSearchElements[i].attr('id') != prefix + 'country') && ($mapSearchElements[i].val() == '') )
           return false;
       return true;
     };
diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js
new file mode 100644 (file)
index 0000000..0331d84
--- /dev/null
@@ -0,0 +1,37 @@
+namespace('kivi.SalesPurchase', function(ns) {
+  this.edit_longdescription = function(row) {
+    var $edit    = $('#popup_edit_longdescription_input');
+    var $element = $('#longdescription_' + row);
+
+    if (!$element.length) {
+      console.error("kivi.SalesPurchase.edit_longdescription: Element #longdescription_" + row + " not found");
+      return;
+    }
+
+    $edit.data('element', $element);
+    $edit.val($element.val());
+
+    $('#popup_edit_longdescription_runningnumber').html(row);
+    $('#popup_edit_longdescription_partnumber').html($('#partnumber_' + row).val() || '');
+
+    var description = ($('#description_' + row).val() || '').replace(/[\n\r]+/, '');
+    if (description.length >= 50)
+      description = description.substring(0, 50) + "…";
+    $('#popup_edit_longdescription_description').html(description);
+
+    kivi.popup_dialog({
+      id:    'edit_longdescription_dialog',
+      dialog: {
+        title: kivi.t8('Enter longdescription')
+      }
+    });
+  };
+
+  this.set_longdescription = function() {
+    var $edit    = $('#popup_edit_longdescription_input');
+    var $element = $edit.data('element');
+
+    $element.val($edit.val());
+    $('#edit_longdescription_dialog').dialog('close');
+  };
+});
index 2c28110..81a978f 100644 (file)
@@ -59,11 +59,16 @@ namespace("kivi", function(ns) {
     return namespace(parts[1])[ parts[2] ];
   };
 
-  // Open a modal jQuery UI popup dialog. The content is loaded via AJAX.
+  // Open a modal jQuery UI popup dialog. The content can be either
+  // loaded via AJAX (if the parameter 'url' is given) or simply
+  // displayed if it exists in the DOM already (referenced via
+  // 'id'). If an existing DOM div should be used then the element
+  // won't be removed upon closing the dialog which allows re-opening
+  // it later on.
   //
   // Parameters:
   // - id: dialog DIV ID (optional; defaults to 'jqueryui_popup_dialog')
-  // - url, data, type: passed as the first three arguments to the $.ajax() call
+  // - url, data, type: passed as the first three arguments to the $.ajax() call if an AJAX call is made, otherwise ignored.
   // - dialog: an optional object of options passed to the $.dialog() call
   ns.popup_dialog = function(params) {
     var dialog;
@@ -79,9 +84,15 @@ namespace("kivi", function(ns) {
         // User supplied options:
       params.dialog || { },
       { // Options that must not be changed:
-        close: function(event, ui) { dialog.remove(); }
+        close: function(event, ui) { if (params.url) dialog.remove(); else dialog.dialog('close'); }
       });
 
+    if (!params.url) {
+      // Use existing DOM element and show it. No AJAX call.
+      dialog = $('#' + id).dialog(dialog_params);
+      return true;
+    }
+
     $('#' + id).remove();
 
     dialog = $('<div style="display:none" class="loading" id="' + id + '"></div>').appendTo('body');
index 969a162..3fbe538 100644 (file)
@@ -3,6 +3,7 @@ namespace("kivi").setupLocale({
 "Are you sure?":"Sind Sie sicher?",
 "Database Connection Test":"Test der Datenbankverbindung",
 "Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"Soll die Kontonummer \"#1\" zu \"#2\" und den Name \"#3\" zu \"#4\" geändert werden?",
+"Enter longdescription":"Langtext eingeben",
 "Map":"Karte",
 "Part picker":"Artikelauswahl",
 "The description is missing.":"Die Beschreibung fehlt.",
diff --git a/js/parts_language_selection.js b/js/parts_language_selection.js
deleted file mode 100644 (file)
index a060716..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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?" +
-    "INPUT_ENCODING=UTF-8&" +
-    "action=parts_language_selection&" +
-    "id="              + encodeURIComponent(document.ic.id.value)              + "&" +
-    "language_values=" + encodeURIComponent(document.ic.language_values.value) + "&" +
-    "name="            + encodeURIComponent(name)                              + "&" +
-    "input_name="      + encodeURIComponent(input_name)                        + "&"
-  window.open(url, "_new_generic", parm);
-}
index ea2c596..14151a6 100755 (executable)
@@ -10,6 +10,7 @@ use utf8;
 # run locales.pl from this directory to rebuild the translation files
 
 $self->{texts} = {
+  ' (in use so no change allowed)' => ' (Faktor wird verwendet, keine Änderung erlaubt)',
   ' Date missing!'              => ' Datum fehlt!',
   ' Part Number missing!'       => ' Artikelnummer fehlt!',
   ' missing!'                   => ' fehlt!',
@@ -18,7 +19,8 @@ $self->{texts} = {
   '#1 h'                        => '#1 h',
   '#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.',
   '#1 prices were updated.'     => '#1 Preise wurden aktualisiert.',
-  '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '(empfohlen) Fügen Sie die verwaisten Währungen in Ihr System ein. Sie können den Namen der Währung einfach ändern, indem Sie die Felder oben bearbeiten. Benutzen Sie keine Namen von Währungen, die Sie bereits benutzen.',
+  '%'                           => '%',
+  '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '(empfohlen) F&uuml;gen Sie die verwaisten Währungen in Ihr System ein. Sie können den Namen der Währung einfach ändern, indem Sie die Felder oben bearbeiten. Benutzen Sie keine Namen von Währungen, die Sie bereits benutzen.',
   '*/'                          => '*/',
   ', if set'                    => ', falls gesetzt',
   '---please select---'         => '---bitte auswählen---',
@@ -26,12 +28,12 @@ $self->{texts} = {
   '...after loggin in'          => '...nach dem Anmelden',
   '...done'                     => '...fertig',
   '...on the TODO list'         => '...auf der Aufgabenliste',
-  '0% tax with taxkey'          => '0% Steuer mit Steuerschlüssel ',
+  '0% tax with taxkey'          => '0% Steuer mit Steuerschl&uuml;ssel ',
   '1. Quarter'                  => '1. Quartal',
   '2. Quarter'                  => '2. Quartal',
   '3. Quarter'                  => '3. Quartal',
   '4. Quarter'                  => '4. Quartal',
-  '<b> I DO CARE!</b> Please check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => '<b>ICH KÜMMER MICH</b> Bitte haken Sie Lager und Lagerplätze erzeugen an (Automatisches Zuweisen der Lagerplätze) und vergeben einen Namen für dieses Lager (Lagerplätze werden automatisch übernommen). Danach auf weiter.',
+  '<b> I DO CARE!</b> Please check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => '<b>ICH KÜMMER MICH</b> Bitte haken Sie Lager und Lagerplätze erzeugen an (Automatisches Zuweisen der Lagerplätze) und vergeben einen Namen für dieses Lager (Lagerpl&auml;tze werden automatisch übernommen). Danach auf weiter.',
   '<b> I DO CARE!</b> Please click back and cancel the update and come back after there has been at least one warehouse defined with bin(s).:' => '<b>ICH KÜMMER MICH</b> Brechen Sie das Update ab und legen selber mindestens ein Lager mit Lagerplätzen unter dem Menü System / Lager an.',
   '<b> I DO NOT CARE</b> Please click continue and the following data (see list) will be deleted:' => '<b>IST MIR EGAL</b> Mit einem Klick auf Weiter (rot) werden keine Daten übernommen, bzw. migriert und die folgende Information in der untenstehenden Liste wird gelöscht.',
   '<b>Automatically create new bins</b> in the following new warehouse ' => '<b>Automatisches Zuweisen der Lagerplätze</b> im folgenden neuem Lager:',
@@ -130,7 +132,6 @@ $self->{texts} = {
   'Add Delivery Note'           => 'Lieferschein erfassen',
   'Add Delivery Order'          => 'Lieferschein erfassen',
   'Add Dunning'                 => 'Mahnung erzeugen',
-  'Add Exchangerate'            => 'Wechselkurs erfassen',
   'Add Follow-Up'               => 'Wiedervorlage erstellen',
   'Add Follow-Up for #1'        => 'Wiedervorlage f&uuml;r #1 erstellen',
   'Add General Ledger Transaction' => 'Dialogbuchen',
@@ -194,7 +195,9 @@ $self->{texts} = {
   'Amended Advance Turnover Tax Return' => 'Berichtigte Anmeldung',
   'Amended Advance Turnover Tax Return (Nr. 10)' => 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)',
   'Amount'                      => 'Betrag',
+  'Amount (for verification)'   => 'Betrag (zur Überprüfung)',
   'Amount Due'                  => 'Betrag fällig',
+  'Amount and net amount are calculated by kivitendo. "verify_amount" and "verify_netamount" can be used for sanity checks.' => 'Betrag und Nettobetrag werden von kivitendo berechnet. "verify_amount" und "verify_netamount" können für Plausibilitätsprüfungen angegeben werden.',
   'Amount payable'              => 'Noch zu bezahlender Betrag',
   'Amount payable less discount' => 'Noch zu bezahlender Betrag abzüglich Skonto',
   'An exception occurred during execution.' => 'Während der Ausführung trat eine Ausnahme auf.',
@@ -219,6 +222,7 @@ $self->{texts} = {
   'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
   'Are you sure you want to delete this background job?' => 'Sind Sie sicher, dass Sie diesen Hintergrund-Job löschen möchten?',
   'Are you sure you want to delete this business?' => 'Sind Sie sicher, dass Sie diesen Kunden-/Lieferantentyp löschen wollen?',
+  'Are you sure you want to delete this delivery term?' => 'Wollen Sie diese Lieferbedingungen wirklich löschen?',
   'Are you sure you want to delete this department?' => 'Sind Sie sicher, dass Sie diese Abteilung löschen wollen?',
   'Are you sure you want to delete this payment term?' => 'Wollen Sie diese Zahlungsbedingungen 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?',
@@ -252,6 +256,8 @@ $self->{texts} = {
   'Authentification database creation' => 'Anlegen der Datenbank zur Benutzerauthentifizierung',
   'Authentification tables creation' => 'Anlegen der Tabellen zur Benutzerauthentifizierung',
   'Auto Send?'                  => 'Auto. Versand?',
+  'Automatic deletion of leading, trailing and excessive (repetitive) spaces in customer or vendor names' => 'Automatisches Löschen von voran-, mehrfach wiederholenten oder nachgestellten Leerzeichen im Kunden- oder Lieferantennamen (Bspw.: " Schmidt &nbsp;&nbsp;&nbsp;& Söhne GmbH" -> "Schmidt & Söhne GmbH"',
+  'Automatic deletion of leading, trailing and excessive (repetitive) spaces in part description and part notes. Affects also the CSV-Import.' => '',
   'Automatically created invoice for fee and interest for dunning %s' => 'Automatisch erzeugte Rechnung für Gebühren und Zinsen zu Mahnung %s',
   'Available'                   => 'Verfügbar',
   'Available qty'               => 'Lagerbestand',
@@ -266,6 +272,7 @@ $self->{texts} = {
   'Background jobs and task server' => 'Hintergrund-Jobs und Task-Server',
   'Balance'                     => 'Bilanz',
   'Balance Sheet'               => 'Bilanz',
+  'Balance sheet date'          => 'Bilanzstichtag',
   'Balancing'                   => 'Bilanzierung',
   'Bank'                        => 'Bank',
   'Bank Code'                   => 'BLZ',
@@ -273,6 +280,7 @@ $self->{texts} = {
   'Bank Code Number'            => 'Bankleitzahl',
   'Bank Connection Tax Office'  => 'Bankverbindung des Finanzamts',
   'Bank Connections'            => 'Bankverbindungen',
+  'Bank account'                => 'Bankkonto',
   'Bank accounts'               => 'Bankkonten',
   'Bank code'                   => 'Bankleitzahl',
   'Bank collection amount'      => 'Einzugsbetrag',
@@ -295,6 +303,9 @@ $self->{texts} = {
   'Best Before'                 => 'Mindesthaltbarkeit',
   'Bestandskonto'               => 'Bestandskonto',
   'Bilanz'                      => 'Bilanz',
+  'Billable amount'             => 'Abrechenbarer Betrag',
+  'Billed amount'               => 'Abgerechneter Betrag',
+  'Billed extra expenses'       => 'Abgerechnete Nebenkosten',
   'Billing Address'             => 'Rechnungsadresse',
   'Billing/shipping address (city)' => 'Rechnungsadresse (Stadt)',
   'Billing/shipping address (country)' => 'Rechnungsadresse (Land)',
@@ -359,6 +370,7 @@ $self->{texts} = {
   'CSV export -- options'       => 'CSV-Export -- Optionen',
   'CSV import: contacts'        => 'CSV-Import: Ansprechpersonen',
   'CSV import: customers and vendors' => 'CSV-Import: Kunden und Lieferanten',
+  'CSV import: orders'          => 'CSV-Import: Aufträge',
   'CSV import: parts and services' => 'CSV-Import: Waren und Dienstleistungen',
   'CSV import: projects'        => 'CSV-Import: Projekte',
   'CSV import: shipping addresses' => 'CSV-Import: Lieferadressen',
@@ -398,6 +410,9 @@ $self->{texts} = {
   'Cannot save order!'          => 'Auftrag kann nicht gespeichert werden!',
   'Cannot save preferences!'    => 'Einstellungen können nicht gespeichert werden!',
   'Cannot save quotation!'      => 'Angebot kann nicht gespeichert werden!',
+  'Cannot stock negative amounts' => 'Negative Mengen können nicht eingelagert werden!',
+  'Cannot stock without amount' => 'Kann nicht ohne Menge einlagern!',
+  'Cannot storno invoice for a closed period!' => 'Das Rechnungsdatum der zu stornierenden Rechnung fällt in einen abgeschlossenen Zeitraum!',
   'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren',
   'Cannot transfer. <br> Reason:<br>#1' => 'Kann nicht auslagern. <br>Grund:<br>#1',
   'Carry over shipping address' => 'Lieferadresse &uuml;bernehmen',
@@ -409,7 +424,6 @@ $self->{texts} = {
   'Cc E-mail'                   => 'CC (E-Mail)',
   'Change default bin for this parts' => 'Standardlagerplatz für diese Waren ändern',
   'Change kivitendo installation settings (most entries in the \'System\' menu)' => 'Verändern der kivitendo-Installationseinstellungen (die meisten Menüpunkte unterhalb von \'System\')',
-  'Change representative to'    => 'Vertreter ändern in',
   'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' => 'Es ist nur sinnvoll Änderungen vorzunehmen, wenn das Konto KEIN Sammelkonto ist und wenn ein gültiger Steuerschlüssel für das Konto existiert. Gleichzeitig Haken bei Forderungen und Verbindlichkeiten zu setzen, macht auch NUR für den Zahlungsein- und Ausgang (bspw. Bank oder Kasse) Sinn.',
   'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' => 'Änderungen bei Forderungen oder Verbindlichkeiten sind nur möglich, wenn dieses Konto noch nicht bebucht wurde.',
   'Charge Number'               => 'Chargennummer',
@@ -470,6 +484,8 @@ $self->{texts} = {
   'Confirmation'                => 'Auftragsbestätigung',
   'Contact'                     => 'Kontakt',
   'Contact Person'              => 'Ansprechperson',
+  'Contact Person (database ID)' => 'Ansprechperson (Datenbank-ID)',
+  'Contact Person (name)'       => 'Ansprechperson (Name)',
   'Contact deleted.'            => 'Ansprechperson gelöscht.',
   'Contact is in use and was flagged invalid.' => 'Die Ansprechperson ist noch in Verwendung und wurde deshalb nur als ungültig markiert.',
   'Contact person (surname)'    => 'Ansprechperson (Nachname)',
@@ -497,11 +513,13 @@ $self->{texts} = {
   'Create a new background job' => 'Einen neuen Hintergrund-Job anlegen',
   'Create a new business'       => 'Einen neuen Kunden-/Lieferantentyp erfassen',
   'Create a new client'         => 'Einen neuen Mandanten anlegen',
+  'Create a new delivery term'  => 'Neue Lieferbedingungen anlegen',
   'Create a new department'     => 'Eine neue Abteilung erfassen',
   'Create a new group'          => 'Neue Benutzergruppe erfassen',
   'Create a new payment term'   => 'Neue Zahlungsbedingungen anlegen',
   'Create a new printer'        => 'Einen neuen Drucker anlegen',
   'Create a new project'        => 'Neues Projekt anlegen',
+  'Create a new project type'   => 'Einen neuen Projekttypen anlegen',
   'Create a new user'           => 'Einen neuen Benutzer anlegen',
   'Create a new user group'     => 'Eine neue Benutzergruppe erfassen',
   'Create and edit RFQs'        => 'Lieferantenanfragen erfassen und bearbeiten',
@@ -526,8 +544,10 @@ $self->{texts} = {
   'Create new background job'   => 'Neuen Hintergrund-Job anlegen',
   'Create new business'         => 'Kunden-/Lieferantentyp erfassen',
   'Create new client #1'        => 'Neuen Mandanten #1 anlegen',
+  'Create new delivery term'    => 'Neue Lieferbedingungen anlegen',
   'Create new department'       => 'Neue Abteilung erfassen',
   'Create new payment term'     => 'Neue Zahlungsbedingung anlegen',
+  'Create new project type'     => 'Neuen Projekttypen anlegen',
   'Create new templates from master templates' => 'Neue Druckvorlagen aus Vorlagensatz erstellen',
   'Create tables'               => 'Tabellen anlegen',
   'Created by'                  => 'Erstellt von',
@@ -560,9 +580,11 @@ $self->{texts} = {
   'Current profile'             => 'Aktuelles Profil',
   'Current status'              => 'Aktueller Status',
   'Current value:'              => 'Aktueller Wert:',
+  'Current year'                => 'Aktuelles Jahr',
   'Custom Variables'            => 'Benutzerdefinierte Variablen',
   'Custom variables for module' => 'Benutzerdefinierte Variablen für Modul',
   'Customer'                    => 'Kunde',
+  'Customer (database ID)'      => 'Kunde (Datenbank-ID)',
   'Customer (name)'             => 'Kunde (Name)',
   'Customer Master Data'        => 'Kundenstammdaten',
   'Customer Name'               => 'Kundenname',
@@ -667,6 +689,7 @@ $self->{texts} = {
   'Delete transaction'          => 'Buchung löschen',
   'Deleted'                     => 'Gelöscht',
   'Delivered'                   => 'Geliefert',
+  'Delivered amount'            => 'Gelieferter Betrag',
   'Delivery Date'               => 'Lieferdatum',
   'Delivery Order'              => 'Lieferschein',
   'Delivery Order Date'         => 'Lieferscheindatum',
@@ -677,7 +700,13 @@ $self->{texts} = {
   'Delivery Orders'             => 'Lieferscheine',
   'Delivery Plan'               => 'Lieferplan',
   'Delivery Plan for currently outstanding sales orders' => 'Lieferplan für offene Verkaufsaufträge',
+  'Delivery Terms'              => 'Lieferbedingungen',
+  'Delivery terms'              => 'Lieferbedingungen',
+  'Delivery terms (database ID)' => 'Lieferbedingungen (Datenbank-ID)',
+  'Delivery terms (name)'       => 'Lieferbedingungen (Name)',
   'Department'                  => 'Abteilung',
+  'Department (database ID)'    => 'Abeilung (Datenbank-ID)',
+  'Department (description)'    => 'Abteilung (Beschreibung)',
   'Department 1'                => 'Abteilung (1)',
   'Department 2'                => 'Abteilung (2)',
   'Department Id'               => 'Reservierung',
@@ -719,6 +748,9 @@ $self->{texts} = {
   'Do you want to set the account number "#1" to "#2" and the name "#3" to "#4"?' => 'Soll die Kontonummer "#1" zu "#2" und den Name "#3" zu "#4" geändert werden?',
   'Do you want to store the existing onhand values into a new warehouse?' => 'M&ouml;chten Sie die vorhandenen Mengendaten in ein Lager &uuml;bertragen?',
   'Document'                    => 'Dokument',
+  'Document Project (database ID)' => 'Projektnummer des Belegs (Datenbank-ID)',
+  'Document Project (description)' => 'Projektnummer des Belegs (Beschreibung)',
+  'Document Project (number)'   => 'Projektnummer des Belegs',
   'Document Project Number'     => 'Projektnummer des Belegs',
   'Document Template'           => 'Dokumentvorlage',
   'Documentation'               => 'Dokumentation',
@@ -762,9 +794,6 @@ $self->{texts} = {
   'EB-Wert'                     => 'EB-Wert',
   'EK'                          => 'EK',
   'ELSE'                        => 'Zusatz',
-  'ELSTER Export (Taxbird)'     => 'ELSTER-Export nach Taxbird',
-  'ELSTER Export (Winston)'     => 'ELSTER Export nach Winston',
-  'ELSTER Export nach Winston'  => 'ELSTER Export nach Winston',
   'ELSTER Tax Number'           => 'ELSTER-Steuernummer',
   'EQUITY'                      => 'EIGENTUM',
   'EUER'                        => 'Einnahmen-/Überschussrechnung',
@@ -816,6 +845,7 @@ $self->{texts} = {
   'Edit bank account'           => 'Bankkonto bearbeiten',
   'Edit business'               => 'Kunden-/Lieferantentyp bearbeiten',
   'Edit custom variable'        => 'Benutzerdefinierte Variable bearbeiten',
+  'Edit delivery term'          => 'Lieferbedingungen bearbeiten',
   'Edit department'             => 'Abteilung bearbeiten',
   'Edit file'                   => 'Datei bearbeiten',
   'Edit greetings'              => 'Anreden bearbeiten',
@@ -824,6 +854,7 @@ $self->{texts} = {
   'Edit prices and discount (if not used, textfield is ONLY set readonly)' => 'Preise und Rabatt in Formularen frei anpassen (falls deaktiviert, wird allerdings NUR das textfield auf READONLY gesetzt / kann je nach Browserversion und technischen Fähigkeiten des Anwenders noch umgangen werden)',
   'Edit project'                => 'Projekt bearbeiten',
   'Edit project #1'             => 'Projekt #1 bearbeiten',
+  'Edit project type'           => 'Projekttypen bearbeiten',
   'Edit templates'              => 'Vorlagen bearbeiten',
   'Edit the Delivery Order'     => 'Lieferschein bearbeiten',
   'Edit the configuration for periodic invoices' => 'Konfiguration für wiederkehrende Rechnungen bearbeiten',
@@ -839,6 +870,7 @@ $self->{texts} = {
   'Element disabled'            => 'Element deaktiviert',
   'Employee'                    => 'Bearbeiter',
   'Employee #1 saved!'          => 'Benutzer #1 gespeichert!',
+  'Employee (database ID)'      => 'Bearbeiter (Datenbank-ID)',
   'Employees'                   => 'Benutzer',
   'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => 'Leere Lager-Auswahl wird ignoriert, selbst wenn noch ein Lagerplatz ausgewählt ist. Alle Daten können durch zurück und vorwärts korrigiert werden.',
   'Empty transaction!'          => 'Buchung ist leer!',
@@ -859,17 +891,28 @@ $self->{texts} = {
   'Error when saving: #1'       => 'Fehler beim Speichern: #1',
   'Error!'                      => 'Fehler!',
   'Error: Buchungsgruppe missing or invalid' => 'Fehler: Buchungsgruppe fehlt oder ungültig',
+  'Error: Customer/vendor missing' => 'Fehler: Kunde/Lieferant fehlt',
   'Error: Customer/vendor not found' => 'Fehler: Kunde/Lieferant nicht gefunden',
   'Error: Gender (cp_gender) missing or invalid' => 'Fehler: Geschlecht (cp_gender) fehlt oder ungültig',
   'Error: Invalid business'     => 'Fehler: Kunden-/Lieferantentyp ungültig',
+  'Error: Invalid contact'      => 'Fehler: Ansprechperson ungültig',
   'Error: Invalid currency'     => 'Fehler: ungültige Währung',
+  'Error: Invalid delivery terms' => 'Fehler: Lieferbedingungen ungültig',
+  'Error: Invalid department'   => 'Fehler: Abteilung ungültig',
   'Error: Invalid language'     => 'Fehler: Sprache ungültig',
+  'Error: Invalid order for this order item' => 'Fehler: Auftrag für diese Position ungültig',
+  'Error: Invalid part'         => 'Fehler: Artikel ungültig',
   'Error: Invalid part type'    => 'Fehler: Artikeltyp ungültig',
   'Error: Invalid parts group'  => 'Fehler: Warengruppe ungültig',
   'Error: Invalid payment terms' => 'Fehler: Zahlungsbedingungen ungültig',
   'Error: Invalid price factor' => 'Fehler: Preisfaktor ungültig',
+  'Error: Invalid price group'  => 'Fehler: Preisgruppe ungültig',
+  'Error: Invalid project'      => 'Fehler: Projekt ungültig',
+  'Error: Invalid shipto'       => 'Fehler: Lieferadresse ungültig',
+  'Error: Invalid tax zone'     => 'Fehler: Steuerzone ungültig',
   'Error: Invalid vendor in column make_#1' => 'Fehler: Lieferant ungültig in Spalte make_#1',
   'Error: Name missing'         => 'Fehler: Name fehlt',
+  'Error: Part not found'       => 'Fehler: Artikel nicht gefunden',
   'Error: Unit missing or invalid' => 'Fehler: Einheit fehlt oder ungültig',
   'Errors'                      => 'Fehler',
   'Ertrag'                      => 'Ertrag',
@@ -932,6 +975,11 @@ $self->{texts} = {
   'Filter for customer variables' => 'Filter für benutzerdefinierte Kundenvariablen',
   'Filter for item variables'   => 'Filter für benutzerdefinierte Artikelvariablen',
   'Filter parts'                => 'Artikel filtern',
+  'Financial Controlling'       => 'Finanzcontrolling',
+  'Financial Controlling Report' => 'Finanzcontrollingbericht',
+  'Financial Overview'          => 'Finanzübersicht',
+  'Financial controlling report for open sales orders' => 'Finanzcontrollingbericht für offene Aufträge',
+  'Financial overview for #1'   => 'Finanzübersicht für #1',
   'Finish'                      => 'Abschlie&szlig;en',
   'First 20 Lines'              => 'Nur erste 20 Datensätze',
   'Fix transaction'             => 'Buchung korrigieren',
@@ -946,6 +994,7 @@ $self->{texts} = {
   'Follow-Up saved.'            => 'Wiedervorlage gespeichert.',
   'Follow-Ups'                  => 'Wiedervorlagen',
   'Follow-up for'               => 'Wiedervorlage für',
+  'Following year'              => 'Folgendes Jahr',
   'Font'                        => 'Schriftart',
   'Font size'                   => 'Schriftgr&ouml;&szlig;e',
   'For AP transactions it will replace the sales taxkeys with input taxkeys with the same tax rate.' => 'Bei Kreditorenbuchungen werden die Umsatzsteuer-Steuerschlüssel durch Vorsteuer-Steuerschlüssel mit demselben Steuersatz ersetzt.',
@@ -1033,6 +1082,7 @@ $self->{texts} = {
   'II'                          => 'II',
   'III'                         => 'III',
   'IV'                          => 'IV',
+  'If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.' => 'Weichen die Beträge mehr als die "maximale Betragsabweichung" (siehe Einstellungen) ab, so wird diese Position als ungültig markiert.',
   'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' => 'Falls angehakt wird der DATEV-Steuerschlüssel bei Buchungen auf dieses Konto nicht beim DATEV-Export mitexportiert, allerdings nur wenn zusätzlich der Konto-Steuerschlüssel vom Buchungs (Hauptbuch) Steuerschlüssel abweicht',
   'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' => 'Falls konfiguriert, wird dieses Lager mit Lagerplatz für neu angelegte Waren vorausgewählt.',
   'If the article type is set to \'mixed\' then a column called \'type\' must be present.' => 'Falls der Artikeltyp auf \'gemischt\' gestellt wird, muss eine Spalte namens \'type\' vorhanden sein.',
@@ -1159,7 +1209,6 @@ $self->{texts} = {
   'Language'                    => 'Sprache',
   'Language (database ID)'      => 'Sprache (Datenbank-ID)',
   'Language (name)'             => 'Sprache (Name)',
-  'Language Values'             => 'Sprachübersetzungen',
   'Language deleted!'           => 'Sprache gelöscht!',
   'Language missing!'           => 'Sprache fehlt!',
   'Language saved!'             => 'Sprache gespeichert!',
@@ -1183,6 +1232,7 @@ $self->{texts} = {
   'Last Vendor Number'          => 'Letzte Lieferantennummer',
   'Last command output'         => 'Ausgabe des letzten Befehls',
   'Last run at'                 => 'Letzte Ausführung um',
+  'Lastcost'                    => 'Einkaufspreis',
   'Lastcost (with X being a number)' => 'Einkaufspreis (X ist eine fortlaufende Zahl)',
   'Lead'                        => 'Kundenquelle',
   'Leads'                       => 'Leads',
@@ -1235,6 +1285,8 @@ $self->{texts} = {
   'Make default profile'        => 'Zu Standardprofil machen',
   'Manage Custom Variables'     => 'Benutzerdefinierte Variablen',
   'Mandantennummer'             => 'Mandantennummer',
+  'Mandate Date of Signature'   => 'Mandat-Unterschriftsdatum',
+  'Mandator ID'                 => 'Mandanten-ID',
   'Mandatory Departments'       => 'Benutzer muss Abteilungen vergeben',
   'Map'                         => 'Karte',
   'Mar'                         => 'März',
@@ -1251,6 +1303,7 @@ $self->{texts} = {
   'Master Data'                 => 'Stammdaten',
   'Master Data Bin Text Deleted' => 'Gelöschte Stammdaten Freitext-Lagerplätze',
   'Max. Dunning Level'          => 'höchste Mahnstufe',
+  'Maximal amount difference'   => 'maximale Betragsabweichung',
   'Maximum future booking interval' => 'Maximale Anzahl von Tagen an denen Buchungen in der Zukunft erlaubt sind.',
   'May'                         => 'Mai',
   'May '                        => 'Mai',
@@ -1292,10 +1345,11 @@ $self->{texts} = {
   'MwSt. inkl.'                 => 'MwSt. inkl.',
   'Name'                        => 'Name',
   'Name and Street'             => 'Name und Straße',
-  'Name missing!'               => 'Name fehlt!',
   'National Expenses'           => 'Aufwand Inland',
   'National Revenues'           => 'Erl&ouml;se Inland',
+  'Net Income Statement'        => 'Einnahmenüberschußrechnung',
   'Net amount'                  => 'Nettobetrag',
+  'Net amount (for verification)' => 'Nettobetrag (zur Überprüfung)',
   'Netto Terms'                 => 'Zahlungsziel netto',
   'New Password'                => 'Neues Passwort',
   'New assembly'                => 'Neues Erzeugnis',
@@ -1332,6 +1386,7 @@ $self->{texts} = {
   'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgewählt.',
   'No data was found.'          => 'Es wurden keine Daten gefunden.',
   'No default currency'         => 'Keine Standardwährung',
+  'No delivery term has been created yet.' => 'Es wurden noch keine Lieferbedingungen angelegt',
   'No department has been created yet.' => 'Es wurde noch keine Abteilung erfasst.',
   'No dunnings have been selected for printing.' => 'Es wurden keine Mahnungen zum Drucken ausgew&auml;hlt.',
   'No file has been uploaded yet.' => 'Es wurde noch keine Datei hochgeladen.',
@@ -1343,6 +1398,7 @@ $self->{texts} = {
   'No print templates have been created for this client yet. Please do so in the client configuration.' => 'Für diesen Mandanten wurden noch keine Druckvorlagen angelegt. Bitte holen Sie dies in der Mandantenkonfiguration nach.',
   'No printers have been created yet.' => 'Es wurden noch keine Drucker angelegt.',
   'No problems were recognized.' => 'Es wurden keine Probleme gefunden.',
+  'No project type has been created yet.' => 'Es wurden noch keine Projekttypen angelegt.',
   'No report with id #1'        => 'Es gibt keinen Report mit der Id #1',
   'No shipto selected to delete' => 'Keine Lieferadresse zum Löschen ausgewählt',
   'No summary account'          => 'Kein Sammelkonto',
@@ -1356,6 +1412,8 @@ $self->{texts} = {
   'No.'                         => 'Position',
   'None'                        => 'Kein',
   'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.',
+  'Normalize Customer / Vendor names' => 'Normalisierung Kunden- / Lieferantennamen',
+  'Normalize part description and part notes' => 'Normalisierung Artikelbeschreibung und Artikellangtext (Bemerkung)',
   'Not Discountable'            => 'Nicht rabattierfähig',
   'Not delivered'               => 'Nicht geliefert',
   'Not done yet'                => 'Noch nicht fertig',
@@ -1395,6 +1453,7 @@ $self->{texts} = {
   'On Hand'                     => 'Auf Lager',
   'On Order'                    => 'Ist bestellt',
   'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen',
+  'Onhand only sets the quantity in master data, not in inventory. This is only a legacy info field and will be overwritten as soon as a inventory transfer happens.' => 'Das Import-Feld Auf Lager setzt nur die Menge in den Stammdaten, nicht im Lagerbereich. Dies ist historisch gewachsen nur ein Informationsfeld was mit dem tatsächlichen Wert überschrieben wird, sobald eine wirkliche Lagerbewegung stattfindet (DB-Trigger).',
   'Only Warnings and Errors'    => 'Nur Warnungen und Fehler',
   'Only due follow-ups'         => 'Nur f&auml;llige Wiedervorlagen',
   'Only groups that have been configured for the client the user logs in to will be considered.' => 'Allerdings werden nur diejenigen Gruppen herangezogen, die für den Mandanten konfiguriert sind.',
@@ -1417,8 +1476,12 @@ $self->{texts} = {
   'Order Date missing!'         => 'Auftragsdatum fehlt!',
   'Order Number'                => 'Auftragsnummer',
   'Order Number missing!'       => 'Auftragsnummer fehlt!',
+  'Order amount'                => 'Auftragswert',
   'Order deleted!'              => 'Auftrag gelöscht!',
+  'Order/Item row name'         => 'Name der Auftrag-/Positions-Zeilen',
+  'OrderItem'                   => 'Position',
   'Ordered'                     => 'Von Kunden bestellt',
+  'Orders'                      => 'Aufträge',
   'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
   'Orientation'                 => 'Seitenformat',
   'Orphaned'                    => 'Nie benutzt',
@@ -1435,6 +1498,7 @@ $self->{texts} = {
   'Outputformat'                => 'Ausgabeformat',
   'Overdue sales quotations and requests for quotations' => 'Überfällige Angebote und Preisanfragen',
   'Override invoice language'   => 'Diese Sprache verwenden',
+  'Owner of account'            => 'Kontoinhaber',
   'PAYMENT POSTED'              => 'Rechung gebucht',
   'PDF'                         => 'PDF',
   'PDF (OpenDocument/OASIS)'    => 'PDF (OpenDocument/OASIS)',
@@ -1447,7 +1511,9 @@ $self->{texts} = {
   'Page'                        => 'Seite',
   'Page #1/#2'                  => 'Seite #1/#2',
   'Paid'                        => 'bezahlt',
+  'Paid amount'                 => 'Bezahlter Betrag',
   'Part'                        => 'Ware',
+  'Part (database ID)'          => 'Artikel (Datenbank-ID)',
   'Part Description'            => 'Artikelbeschreibung',
   'Part Description missing!'   => 'Artikelbezeichnung fehlt!',
   'Part Notes'                  => 'Bemerkungen',
@@ -1468,7 +1534,7 @@ $self->{texts} = {
   'Password'                    => 'Passwort',
   'Payables'                    => 'Verbindlichkeiten',
   'Payment'                     => 'Zahlungsausgang',
-  'Payment Options'             => 'Zahlungsoptionen',
+  'Payment / Delivery Options'  => 'Zahlungs- und Lieferoptionen',
   'Payment Reminder'            => 'Zahlungserinnerung',
   'Payment Terms'               => 'Zahlungsbedingungen',
   'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
@@ -1523,8 +1589,6 @@ $self->{texts} = {
   'Please enter the taxnumber in the client configuration.' => 'Bitte geben Sie in der Mandantenkonfiguration die Steuernummer 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 install the below listed modules or ask your system administrator to.' => 'Bitte installieren Sie die unten aufgef&uuml;hrten Module, oder bitten Sie Ihren Administrator darum.',
   'Please log in to the administration panel.' => 'Bitte melden Sie sich im Administrationsbereich an.',
   'Please re-run the analysis for broken general ledger entries by clicking this button:' => 'Bitte wiederholen Sie die Analyse der Hauptbucheinträge, indem Sie auf diesen Button klicken:',
@@ -1543,6 +1607,7 @@ $self->{texts} = {
   'Portrait'                    => 'Hochformat',
   'Post'                        => 'Buchen',
   'Post Payment'                => 'Zahlung buchen',
+  'Post and E-mail'             => 'Buchen und E-Mail',
   'Post payments'               => 'Zahlungen buchen',
   'Posting Configuration'       => 'Buchungskonfiguration',
   'Postscript'                  => 'Postscript',
@@ -1566,6 +1631,8 @@ $self->{texts} = {
   'Price factor (name)'         => 'Preisfaktor (Name)',
   'Price factor deleted!'       => 'Preisfaktor gel&ouml;scht.',
   'Price factor saved!'         => 'Preisfaktor gespeichert.',
+  'Price group (database ID)'   => 'Preisgruppe (Datenbank-ID)',
+  'Price group (name)'          => 'Preisgruppe (Name) ',
   'Price information'           => 'Preisinformation',
   'Pricegroup'                  => 'Preisgruppe',
   'Pricegroup deleted!'         => 'Preisgruppe gelöscht!',
@@ -1586,6 +1653,7 @@ $self->{texts} = {
   'Printer Management'          => 'Druckeradministration',
   'Printer management'          => 'Druckerverwaltung',
   'Printing ... '               => 'Es wird gedruckt.',
+  'Prior year'                  => 'Vorheriges Jahr',
   'Private E-mail'              => 'Private E-Mail',
   'Private Phone'               => 'Privates Tel.',
   'Problem'                     => 'Problem',
@@ -1595,10 +1663,16 @@ $self->{texts} = {
   'Proforma Invoice'            => 'Proformarechnung',
   'Program'                     => 'Programm',
   'Project'                     => 'Projekt',
+  'Project (database ID)'       => 'Projekt (Datenbank-ID)',
+  'Project (description)'       => 'Projekt (Beschreibung)',
+  'Project (number)'            => 'Projektnummer',
   'Project Description'         => 'Projektbeschreibung',
   'Project Number'              => 'Projektnummer',
   'Project Numbers'             => 'Projektnummern',
   'Project Transactions'        => 'Projektbuchungen',
+  'Project Type'                => 'Projekttyp',
+  'Project Types'               => 'Projekttypen',
+  'Project type'                => 'Projekttyp',
   'Projects'                    => 'Projekte',
   'Projecttransactions'         => 'Projektbuchungen',
   'Prozentual/Absolut'          => 'Prozentual/Absolut',
@@ -1678,6 +1752,7 @@ $self->{texts} = {
   'Report about warehouse contents' => 'Lagerbestand anzeigen',
   'Report about warehouse transactions' => 'Lagerbuchungen anzeigen',
   'Report and misc. Preferences' => 'Sonstige Einstellungen',
+  'Report date'                 => 'Berichtsdatum',
   'Report for'                  => 'Bericht für',
   'Reports'                     => 'Berichte',
   'Representative'              => 'Vertreter',
@@ -1691,6 +1766,7 @@ $self->{texts} = {
   'Requested execution date'    => 'Gewünschtes Ausführungsdatum',
   'Requested execution date from' => 'Gewünschtes Ausführungsdatum von',
   'Requested execution date to' => 'Gewünschtes Ausführungsdatum bis',
+  'Requests for Quotation'      => 'Preisanfragen',
   'Required by'                 => 'Lieferdatum',
   'Reset'                       => 'Zurücksetzen',
   'Result'                      => 'Ergebnis',
@@ -1700,6 +1776,7 @@ $self->{texts} = {
   'Revenues EU without UStId'   => 'Erl&ouml;se EU o. UStId',
   'Review of Aging list'        => 'Altersstrukturliste',
   'Right'                       => 'Rechts',
+  'Row'                         => 'Zeile',
   'Row #1: amount has to be different from zero.' => 'Zeile #1: Der Wert darf nicht 0 sein.',
   'Row number'                  => 'Zeilennummer',
   'Row was created from current record' => 'Zeile wurde aus aktuellem Beleg erstellt',
@@ -1739,6 +1816,7 @@ $self->{texts} = {
   'Sales price total'           => 'VK-Betrag',
   'Sales quotation'             => 'Angebot',
   'Salesman'                    => 'Verkäufer/in',
+  'Salesman (database ID)'      => 'Verkäufer (Datenbank-ID)',
   'Salesperson'                 => 'Verkäufer',
   'Same as the quote character' => 'Wie Anf&uuml;hrungszeichen',
   'Sat. Fax'                    => 'Sat. Fax',
@@ -1808,11 +1886,11 @@ $self->{texts} = {
   'Service Number missing!'     => 'Dienstleistungsnummer fehlt!',
   'Service, assembly or part'   => 'Dienstleistung, Erzeugnis oder Ware',
   'Services'                    => 'Dienstleistungen',
-  'Set Language Values'         => 'Spracheinstellungen',
   'Set eMail text'              => 'E-Mail Text eingeben',
   'Settings'                    => 'Einstellungen',
   'Setup Menu'                  => 'Menü-Variante',
   'Ship to'                     => 'Lieferadresse',
+  'Ship to (database ID)'       => 'Lieferadresse (Datenbank-ID)',
   'Ship via'                    => 'Transportmittel',
   'Shipping Address'            => 'Lieferadresse',
   'Shipping Point'              => 'Versandort',
@@ -1851,6 +1929,7 @@ $self->{texts} = {
   'Show delete button in purchase orders?' => 'Soll der "Löschen"-Knopf bei Lieferantenaufträgen angezeigt werden?',
   'Show delete button in sales delivery orders?' => 'Soll der "Löschen"-Knopf bei Verkaufslieferscheinen angezeigt werden?',
   'Show delete button in sales orders?' => 'Soll der "Löschen"-Knopf bei Kundenaufträgen angezeigt werden?',
+  'Show delivery plan'          => 'Lieferplan anzeigen',
   'Show details'                => 'Detailsanzeige',
   'Show details and reports of parts, services, assemblies' => 'Details und Berichte von Waren, Dienstleistungen und Erzeugnissen anzeigen',
   'Show fields used for the best before date?' => 'Felder zur Eingabe des Mindesthaltbarkeitsdatums anzeigen?',
@@ -1877,6 +1956,7 @@ $self->{texts} = {
   'Skonto Terms'                => 'Zahlungsziel Skonto',
   'So far you could use one partnumber for severel parts, for example a service and an article.' => 'Bisher war es möglich eine Artikelnummer für mehrere Artikel zu verwenden, zum Beispiel eine Artikelnummer für eine Dienstleistung, eine Ware und ein Erzeugnis.',
   'Sold'                        => 'Verkauft',
+  'Soldtotal does not make sense without any bsooqr options' => 'Option "Menge in gewählten Belegen" ohne gewählte Belege wird ignoriert.',
   'Solution'                    => 'Lösung',
   'Sort By'                     => 'Sortiert nach',
   'Source'                      => 'Beleg',
@@ -1920,10 +2000,12 @@ $self->{texts} = {
   'Subject:'                    => 'Betreff:',
   'Subtotal'                    => 'Zwischensumme',
   'Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1' => 'Zwischensummen können nicht zwischen den einzelnen Belegen unterscheiden, es wird nur "#1" angezeigt',
+  'Subtotals per quarter'       => 'Zwischensummen pro Quartal',
   'Such entries cannot be exported into the DATEV format and have to be fixed as well.' => 'Solche Einträge sind aber nicht DATEV-exportiertbar und müssen ebenfalls korrigiert werden.',
   'Sum Credit'                  => 'Summe Haben',
   'Sum Debit'                   => 'Summe Soll',
   'Sum for'                     => 'Summe für',
+  'Sum open amount'             => 'Summierter offener Betrag',
   'Sum per'                     => 'Summe per',
   'Summen- und Saldenliste'     => 'Summen- und Saldenliste',
   'Superuser name'              => 'Datenbankadministrator',
@@ -1959,6 +2041,8 @@ $self->{texts} = {
   'Tax paid'                    => 'Vorsteuer',
   'Tax rate'                    => 'Steuersatz',
   'Tax saved!'                  => 'Steuer gespeichert!',
+  'Tax zone (database ID)'      => 'Steuerzone ((Datenbank-ID)',
+  'Tax zone (description)'      => 'Steuerzone (Beschreibung)',
   'Tax-O-Matic'                 => 'Steuer',
   'Tax-o-matic Account'         => 'Automatikbuchung auf Konto',
   'Taxaccount_coa'              => 'Automatikkonto',
@@ -2032,6 +2116,7 @@ $self->{texts} = {
   'The client has been created.' => 'Der Mandant wurde angelegt.',
   'The client has been deleted.' => 'Der Mandant wurde gelöscht.',
   'The client has been saved.'  => 'Der Mandant wurde gespeichert.',
+  'The column "datatype" must be present and must be the first column. The values must be the row names (see settings) for order and item data respectively.' => 'Die Spalte "datatype" muss vorhanden sein und sie muss die erste Spalte sein. Die Werte in dieser Spalte müssen die Namen der Auftrag-/Positions-Zeilen (siehe Einstellungen) sein.',
   'The column "make_X" can contain either a vendor\'s database ID, a vendor number or a vendor\'s name.' => 'Die Spalte "make_X" can entweder die Datenbank-ID des Lieferanten, eine Lieferantennummer oder einen Lieferantennamen enthalten.',
   'The column triplets can occur multiple times with different numbers "X" each time (e.g. "make_1", "model_1", "lastcost_1", "make_2", "model_2", "lastcost_2", "make_3", "model_3", "lastcost_3" etc).' => 'Die Spalten-Dreiergruppen können mehrfach auftreten, sofern sie unterschiedliche Nummern "X" verwenden (z.B. "make_1", "model_1", "lastcost_1", "make_2", "model_2", "lastcost_2", "make_3", "model_3", "lastcost_3" etc).',
   'The columns &quot;Dunning Duedate&quot;, &quot;Total Fees&quot; and &quot;Interest&quot; show data for the previous dunning created for this invoice.' => 'Die Spalten &quot;Zahlbar bis&quot;, &quot;Kumulierte Geb&uuml;hren&quot; und &quot;Zinsen&quot; zeigen Daten der letzten f&uuml;r diese Rechnung erzeugten Mahnung.',
@@ -2060,6 +2145,10 @@ $self->{texts} = {
   'The deductible amount'       => 'Der abziehbare Skontobetrag',
   'The default value depends on the variable type:' => 'Die Bedeutung des Standardwertes h&auml;ngt vom Variablentypen ab:',
   'The delivery order has not been marked as delivered. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht als geliefert markiert. Der Lagerinhalt wurde nicht verändert.',
+  'The delivery term has been created.' => 'Die Lieferbedingungen wurden angelegt.',
+  'The delivery term has been deleted.' => 'Die Lieferbedingungen wurden gelöscht.',
+  'The delivery term has been saved.' => 'Die Lieferbedingungen wurden gespeichert.',
+  'The delivery term is in use and cannot be deleted.' => 'Die Lieferbedingungen werden bereits verwendet und können nicht gelöscht werden.',
   'The department has been created.' => 'Die Abteilung wurde angelegt.',
   'The department has been deleted.' => 'Die Abteiltung wurde gelöscht.',
   'The department has been saved.' => 'Die abteilung wurde gespeichert.',
@@ -2136,6 +2225,12 @@ $self->{texts} = {
   'The project is in use and cannot be deleted.' => 'Das Projekt ist in Verwendung und kann nicht gelöscht werden.',
   'The project number is already in use.' => 'Die Projektnummer wird bereits verwendet.',
   'The project number is missing.' => 'Die Projektnummer fehlt.',
+  'The project type has been created.' => 'Der Projekttyp wurde angelegt.',
+  'The project type has been deleted.' => 'Der Projekttyp wurde gelöscht.',
+  'The project type has been saved.' => 'Der Projekttyp wurde gespeichert.',
+  'The project type is in use and cannot be deleted.' => 'Der Projekttyp wird verwendet und kann nicht gelöscht werden.',
+  'The required information consists of the IBAN and the BIC.' => 'Die benötigten Informationen bestehen aus der IBAN und der BIC.',
+  'The required information consists of the IBAN, the BIC, the mandator ID and the mandate\'s date of signature.' => 'Die benötigten Informationen bestehen aus IBAN, BIC, Mandanten-ID und dem Unterschriftsdatum des Mandates.',
   'The second reason is that kivitendo allowed the user to enter the tax amount manually regardless of the taxkey used.' => 'Der zweite Grund war, dass kivitendo zuließ, dass die Benutzer beliebige, von den tatsächlichen Steuerschlüsseln unabhängige Steuerbeträge eintrugen.',
   'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul f&uuml;r Sie installieren zu lassen.',
   'The selected bank account does not exist anymore.' => 'Das ausgewählte Bankkonto existiert nicht mehr.',
@@ -2289,6 +2384,7 @@ $self->{texts} = {
   'Transfer qty'                => 'Umlagermenge',
   'Transfer successful'         => 'Lagervorgang erfolgreich',
   'Translation'                 => 'Übersetzung',
+  'Translations'                => 'Übersetzungen',
   'Trial Balance'               => 'Summen- und Saldenliste',
   'Trial balance between %s and %s' => 'Summen- und Saldenlisten vom %s bis zum %s',
   'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
@@ -2308,7 +2404,6 @@ $self->{texts} = {
   'USt-IdNr.'                   => 'USt-IdNr.',
   'USt-Konto'                   => 'USt-Konto',
   'UStVA'                       => 'UStVA',
-  'UStVA (PDF-Dokument)'        => 'UStVa als PDF-Dokument',
   'UStVa'                       => 'UStVa',
   'UStVa Einstellungen'         => 'UStVa Einstellungen',
   'Unbalanced Ledger'           => 'Bilanzfehler',
@@ -2366,6 +2461,7 @@ $self->{texts} = {
   'Variable Description'        => 'Datenfeldbezeichnung',
   'Variable Name'               => 'Datenfeldname (intern)',
   'Vendor'                      => 'Lieferant',
+  'Vendor (database ID)'        => '(Datenbank-ID)',
   'Vendor (name)'               => 'Lieferant (Name)',
   'Vendor Invoice'              => 'Einkaufsrechnung',
   'Vendor Invoices & AP Transactions' => 'Einkaufsrechnungen & Kreditorenbuchungen',
@@ -2420,7 +2516,6 @@ $self->{texts} = {
   'Workflow sales_order'        => 'Workflow Auftrag',
   'Workflow sales_quotation'    => 'Workflow Angebot',
   'Write bin to default bin in part?' => 'Diesen Lagerplatz als Standardlagerplatz im Artikel setzen?',
-  'Wrong Period'                => 'Falscher Zeitraum',
   'Wrong tax keys recorded'     => 'Gespeicherte Steuerschlüssel sind falsch',
   'Wrong taxes recorded'        => 'Gespeicherte Steuern passen nicht zum Steuerschlüssel',
   'YYYY'                        => 'JJJJ',
@@ -2675,6 +2770,7 @@ $self->{texts} = {
   'transferred out'             => 'ausgelagert',
   'trial_balance'               => 'susa',
   'unconfigured'                => 'unkonfiguriert',
+  'uncorrect partnumber '       => 'Unbekannte Teilenummer ',
   'up'                          => 'hoch',
   'use program settings'        => 'benutze Programmeinstellungen',
   'use user config'             => 'Verwende Benutzereinstellung',
index 38be9b3..b5faaca 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # -*- coding: utf-8; -*-
-# vim: fenc=UTF-8
+# vim: fenc=utf-8
 
 use utf8;
 
@@ -14,11 +14,13 @@ $self->{texts} = {
   ' Part Number missing!'       => '',
   ' missing!'                   => '',
   '#1 (custom variable)'        => '',
+  '#1 MD'                       => '',
+  '#1 h'                        => '',
   '#1 of #2 importable objects were imported.' => '',
   '#1 prices were updated.'     => '',
-  '* there are restrictions for the perpetual method, look at chapter "Bemerkungen zu Bestandsmethode"  in' => '',
-  '*) Since version 2.7 these parameters ares set in the client database and not in the lx-erp.conf / lx_office.conf file, details in chapter:' => '',
+  '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '',
   '*/'                          => '',
+  ', if set'                    => '',
   '---please select---'         => '',
   '. Automatically generated.'  => '',
   '...after loggin in'          => '',
@@ -29,17 +31,18 @@ $self->{texts} = {
   '2. Quarter'                  => '',
   '3. Quarter'                  => '',
   '4. Quarter'                  => '',
+  '<b> I DO CARE!</b> Please check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => '',
+  '<b> I DO CARE!</b> Please click back and cancel the update and come back after there has been at least one warehouse defined with bin(s).:' => '',
+  '<b> I DO NOT CARE</b> Please click continue and the following data (see list) will be deleted:' => '',
+  '<b>Automatically create new bins</b> in the following new warehouse ' => '',
+  '<b>Automatically create new bins</b> in the following warehouse if not selected in the list above' => '',
+  '<b>Default Bins Migration !READ CAREFULLY!</b>' => '',
   '<b>What</b> do you want to look for?' => '',
-  'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => '',
   'A digit is required.'        => '',
-  'A group named &quot;Full Access&quot; has been created.' => '',
-  'A group with that name does already exist.' => '',
+  'A directory with the name for the new print templates exists already.' => '',
   'A lot of the usability of kivitendo has been enhanced with javascript. Although it is currently possible to use every aspect of kivitendo without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => '',
   'A lower-case character is required.' => '',
   'A special character is required (valid characters: #1).' => '',
-  'A temporary directory could not be created:' => '',
-  'A temporary file could not be created. Please verify that the directory "#1" is writeable by the webserver.' => '',
-  'A temporary file could not be created:' => '',
   'A unit with this name does already exist.' => '',
   'A valid taxkey is missing!'  => '',
   'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' => '',
@@ -62,9 +65,12 @@ $self->{texts} = {
   'ASSETS'                      => '',
   'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => '',
   'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
+  'AUTOMATICALLY MATCH BINS'    => '',
   'Abort'                       => '',
   'Abrechnungsnummer'           => '',
   'Abteilung'                   => '',
+  'Access rights'               => '',
+  'Access to clients'           => '',
   'Account'                     => '',
   'Account Category A'          => '',
   'Account Category C'          => '',
@@ -90,21 +96,23 @@ $self->{texts} = {
   'Account Link IC_taxpart'     => '',
   'Account Link IC_taxservice'  => '',
   'Account Number'              => '',
-  'Account Number already used!' => '',
   'Account Number missing!'     => '',
   'Account Nummer'              => '',
   'Account Type'                => '',
   'Account Type missing!'       => '',
+  'Account categories'          => '',
   'Account deleted!'            => '',
   'Account for fees'            => '',
   'Account for interest'        => '',
   'Account number'              => '',
   'Account number #1, bank code #2, #3' => '',
+  'Account number not unique!'  => '',
   'Account saved!'              => '',
   'Accounting Group deleted!'   => '',
   'Accounting Group saved!'     => '',
   'Accounting method'           => '',
   'Accrual'                     => '',
+  'Accrual accounting'          => '',
   'Active'                      => '',
   'Active?'                     => '',
   'Add'                         => '',
@@ -116,12 +124,11 @@ $self->{texts} = {
   'Add Accounts Receivables Transaction' => 'Add Sales Transaction',
   'Add Assembly'                => '',
   'Add Buchungsgruppe'          => '',
-  'Add Business'                => '',
+  'Add Client'                  => '',
   'Add Credit Note'             => '',
   'Add Customer'                => '',
   'Add Delivery Note'           => '',
   'Add Delivery Order'          => '',
-  'Add Department'              => '',
   'Add Dunning'                 => '',
   'Add Exchangerate'            => '',
   'Add Follow-Up'               => '',
@@ -132,7 +139,6 @@ $self->{texts} = {
   'Add Lead'                    => '',
   'Add Machine'                 => '',
   'Add Part'                    => '',
-  'Add Payment Terms'           => '',
   'Add Price Factor'            => '',
   'Add Pricegroup'              => '',
   'Add Printer'                 => '',
@@ -150,48 +156,54 @@ $self->{texts} = {
   'Add Storno Credit Note'      => '',
   'Add Transaction'             => '',
   'Add User'                    => '',
+  'Add User Group'              => '',
   'Add Vendor'                  => '',
   'Add Vendor Invoice'          => '',
   'Add Warehouse'               => '',
-  'Add a new group'             => '',
   'Add and edit units'          => '',
   'Add bank account'            => '',
   'Add custom variable'         => '',
+  'Add link: select records to link with' => '',
+  'Add linked record'           => '',
+  'Add links'                   => '',
+  'Add new currency'            => '',
+  'Add new custom variable'     => '',
   'Add note'                    => '',
   'Add unit'                    => '',
   'Address'                     => '',
+  'Admin'                       => '',
   'Administration'              => '',
-  'Administration (Used to access instance administration from user logins)' => '',
   'Administration area'         => '',
   'Advance turnover tax return' => '',
   'Aktion'                      => '',
   'All'                         => '',
   'All Accounts'                => '',
-  'All Datasets up to date!'    => '',
   'All changes in that file have been reverted.' => '',
-  'All database upgrades have been applied.' => '',
+  'All clients'                 => '',
   'All general ledger entries'  => '',
+  'All groups'                  => '',
   'All of the exports you have selected were already closed.' => '',
   'All reports'                 => '',
+  'All the other clients will start with an empty set of WebDAV folders.' => '',
   'All the selected exports have already been closed, or all of their items have already been executed.' => '',
   'All units have either no or exactly one base unit of which they are multiples.' => '',
   'All users'                   => '',
   'Allow access'                => '',
   'Allow the following users access to my follow-ups:' => '',
   'Alternatively you can create a new part which will then be selected.' => '',
-  'Alternatively you can skip this step and create groups yourself.' => '',
   'Amended Advance Turnover Tax Return' => '',
   'Amended Advance Turnover Tax Return (Nr. 10)' => '',
   'Amount'                      => '',
+  'Amount (for verification)'   => '',
   'Amount Due'                  => '',
-  'Amount has to be greater then zero! Wrong row number: ' => '',
+  'Amount and net amount are calculated by kivitendo. "verify_amount" and "verify_netamount" can be used for sanity checks.' => '',
   'Amount payable'              => '',
   'Amount payable less discount' => '',
+  'An exception occurred during execution.' => '',
   'An invalid character was used (invalid characters: #1).' => '',
   'An invalid character was used (valid characters: #1).' => '',
   'An upper-case character is required.' => '',
   'Annotations'                 => '',
-  'Another user with the login #1 does already exist.' => '',
   'Any stock contents containing a best before date will be impossible to stock out otherwise.' => '',
   'Ap aging on %s'              => '',
   'Application Error. No Format given' => '',
@@ -205,16 +217,16 @@ $self->{texts} = {
   'Apr'                         => '',
   'April'                       => '',
   'Ar aging on %s'              => '',
-  'Are you sure you want to delete Delivery Order Number #1?' => '',
   'Are you sure you want to delete Invoice Number' => '',
-  'Are you sure you want to delete Order Number' => '',
-  'Are you sure you want to delete Quotation Number' => '',
   'Are you sure you want to delete Transaction' => '',
+  'Are you sure you want to delete this background job?' => '',
   'Are you sure you want to delete this business?' => '',
+  'Are you sure you want to delete this delivery term?' => '',
   'Are you sure you want to delete this department?' => '',
   'Are you sure you want to delete this payment term?' => '',
   'Are you sure you want to remove the marked entries from the queue?' => '',
   'Are you sure you want to update the prices' => '',
+  'Are you sure?'               => '',
   'Article Code'                => '',
   'Article Code missing!'       => '',
   'Article type (see below)'    => '',
@@ -226,12 +238,10 @@ $self->{texts} = {
   'Assembly Number missing!'    => '',
   'Asset'                       => '',
   'Assets'                      => '',
-  'Assign new units'            => '',
-  'Assign units'                => '',
   'Assistant for general ledger corrections' => '',
   'Assume Tax Consultant Data in Tax Computation?' => '',
   'At least'                    => '',
-  'At least one Perl module that Lx-Office ERP requires for running is not installed on your system.' => '',
+  'At least one Perl module that kivitendo ERP requires for running is not installed on your system.' => '',
   'At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.' => '',
   'At most'                     => '',
   'At the moment the transaction looks like this:' => '',
@@ -254,12 +264,12 @@ $self->{texts} = {
   'BWA'                         => '',
   'Back'                        => '',
   'Back to login'               => '',
-  'Back to the login page'      => '',
-  'Backup Dataset'              => '',
-  'Backup file'                 => '',
-  'Backup of dataset'           => '',
+  'Background job history'      => '',
+  'Background jobs'             => '',
+  'Background jobs and task server' => '',
   'Balance'                     => '',
   'Balance Sheet'               => '',
+  'Balancing'                   => '',
   'Bank'                        => '',
   'Bank Code'                   => '',
   'Bank Code (long)'            => '',
@@ -280,6 +290,8 @@ $self->{texts} = {
   'Basic Data'                  => '',
   'Batch Printing'              => '',
   'Bcc'                         => '',
+  'Bcc E-mail'                  => '',
+  'Because the useability gets worse if one partnumber is used for several parts (for example if you are searching a position for an invoice), partnumbers should be unique.' => '',
   'Belegnummer'                 => '',
   'Beratername'                 => '',
   'Beraternummer'               => '',
@@ -288,16 +300,19 @@ $self->{texts} = {
   'Bilanz'                      => '',
   'Billing Address'             => '',
   'Billing/shipping address (city)' => '',
+  'Billing/shipping address (country)' => '',
   'Billing/shipping address (street)' => '',
   'Billing/shipping address (zipcode)' => '',
   'Bin'                         => '',
   'Bin From'                    => '',
   'Bin List'                    => '',
   'Bin To'                      => '',
-  'Binding to the LDAP server as "#1" failed. Please check config/lx_office.conf.' => '',
+  'Binding to the LDAP server as "#1" failed. Please check config/kivitendo.conf.' => '',
   'Bins saved.'                 => '',
   'Bins that have been used in the past cannot be deleted anymore. For these bins there\'s no checkbox in the &quot;Delete&quot; column.' => '',
   'Birthday'                    => '',
+  'Birthday (after conversion)' => '',
+  'Birthday (before conversion)' => '',
   'Bis'                         => '',
   'Bis Konto: '                 => '',
   'Block'                       => '',
@@ -310,6 +325,7 @@ $self->{texts} = {
   'Both'                        => '',
   'Bottom'                      => '',
   'Bought'                      => '',
+  'Break up the update and contact a service provider.' => '',
   'Buchungsdatum'               => '',
   'Buchungsgruppe'              => '',
   'Buchungsgruppe (database ID)' => '',
@@ -327,6 +343,7 @@ $self->{texts} = {
   'CB Transaction'              => '',
   'CB Transactions'             => '',
   'CR'                          => '',
+  'CRM'                         => '',
   'CRM admin'                   => '',
   'CRM create customers, vendors and contacts' => '',
   'CRM follow up'               => '',
@@ -341,18 +358,20 @@ $self->{texts} = {
   'CRM status'                  => '',
   'CRM termin'                  => '',
   'CRM user'                    => '',
+  'CSS style for pictures'      => '',
   'CSV export -- options'       => '',
   'CSV import: contacts'        => '',
   'CSV import: customers and vendors' => '',
+  'CSV import: orders'          => '',
   'CSV import: parts and services' => '',
+  'CSV import: projects'        => '',
   'CSV import: shipping addresses' => '',
   'Calculate'                   => '',
-  'Calendar'                    => '',
   'Can not create that quantity with current stock' => '',
   'Cancel'                      => '',
   'Cancel Accounts Payables Transaction' => '',
   'Cancel Accounts Receivables Transaction' => '',
-  'Cannot create Lock!'         => '',
+  'Cannot check correct WebDAV folder' => '',
   'Cannot delete account!'      => '',
   'Cannot delete customer!'     => '',
   'Cannot delete default account!' => '',
@@ -372,6 +391,8 @@ $self->{texts} = {
   'Cannot post invoice!'        => '',
   'Cannot post payment for a closed period!' => '',
   'Cannot post payment!'        => '',
+  'Cannot post storno for a closed period!' => '',
+  'Cannot post transaction above the maximum future booking date!' => '',
   'Cannot post transaction for a closed period!' => '',
   'Cannot post transaction with a debit and credit entry for the same account!' => '',
   'Cannot post transaction!'    => '',
@@ -382,10 +403,16 @@ $self->{texts} = {
   'Cannot save preferences!'    => '',
   'Cannot save quotation!'      => '',
   'Cannot storno storno invoice!' => '',
+  'Cannot transfer. <br> Reason:<br>#1' => '',
   'Carry over shipping address' => '',
   'Cash'                        => '',
+  'Cash accounting'             => '',
+  'Cash basis accounting'       => '',
+  'Catalog'                     => '',
   'Cc'                          => '',
-  'Change Lx-Office installation settings (all menu entries beneath \'System\')' => '',
+  'Cc E-mail'                   => '',
+  'Change default bin for this parts' => '',
+  'Change kivitendo installation settings (most entries in the \'System\' menu)' => '',
   'Change representative to'    => '',
   'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' => '',
   'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' => '',
@@ -396,7 +423,6 @@ $self->{texts} = {
   'Chart Type'                  => '',
   'Chart balance'               => '',
   'Chart of Accounts'           => '',
-  'Chart of accounts'           => '',
   'Chartaccounts connected to this Tax:' => '',
   'Check'                       => 'Cheque',
   'Check Details'               => '',
@@ -414,15 +440,23 @@ $self->{texts} = {
   'City'                        => '',
   'Cleared Balance'             => '',
   'Clearing Tax Received (No 71)' => '',
-  'Click on login name to edit!' => '',
+  'Client'                      => '',
+  'Client #1'                   => '',
   'Client Configuration'        => '',
   'Client Configuration saved!' => '',
+  'Client administration: configuration, editing templates, task server control, background jobs (remaining entries in the \'System\' menu)' => '',
+  'Client list'                 => '',
+  'Client name'                 => '',
+  'Client to assign the existing WebDAV folders to' => '',
+  'Client to configure the printers for' => '',
+  'Clients this Group is valid for' => '',
+  'Clients this user has access to' => '',
   'Close'                       => '',
   'Close Books up to'           => '',
-  'Close Dialog'                => '',
   'Close Flash'                 => '',
   'Close SEPA exports'          => '',
   'Close Window'                => '',
+  'Close window'                => '',
   'Closed'                      => '',
   'Collective Orders only work for orders from one customer!' => '',
   'Column name'                 => '',
@@ -430,15 +464,18 @@ $self->{texts} = {
   'Comment'                     => '',
   'Company'                     => '',
   'Company Name'                => '',
+  'Company name'                => '',
+  'Company settings'            => '',
   'Compare to'                  => '',
   'Configuration'               => '',
   'Configuration of individual TODO items' => '',
   'Configure'                   => '',
-  'Confirm'                     => '',
   'Confirm!'                    => '',
   'Confirmation'                => '',
   'Contact'                     => '',
   'Contact Person'              => '',
+  'Contact Person (database ID)' => '',
+  'Contact Person (name)'       => '',
   'Contact deleted.'            => '',
   'Contact is in use and was flagged invalid.' => '',
   'Contact person (surname)'    => '',
@@ -446,31 +483,34 @@ $self->{texts} = {
   'Contacts'                    => '',
   'Continue'                    => '',
   'Contra'                      => '',
+  'Conversion of "birthday" contact person attribute' => '',
   'Copies'                      => '',
+  'Copy file from #1 to #2 failed: #3' => '',
   'Correct taxkey'              => '',
-  'Corrections'                 => '',
   'Costs'                       => '',
-  'Could not copy %s to %s. Reason: %s' => '',
   'Could not load class #1 (#2): "#3"' => '',
   'Could not load class #1, #2' => '',
   'Could not load employee'     => '',
-  'Could not open the file users/members.' => '',
-  'Could not open the old memberfile.' => '',
   'Could not print dunning.'    => '',
-  'Could not rename %s to %s. Reason: %s' => '',
   'Could not spawn ghostscript.' => '',
   'Could not spawn the printer command.' => '',
   'Could not update prices!'    => '',
   'Country'                     => '',
   'Create Assembly'             => '',
-  'Create Buchungsgruppen'      => '',
   'Create Chart of Accounts'    => '',
   'Create Dataset'              => '',
   'Create Date'                 => '',
+  'Create a new background job' => '',
   'Create a new business'       => '',
+  'Create a new client'         => '',
+  'Create a new delivery term'  => '',
   'Create a new department'     => '',
+  'Create a new group'          => '',
   'Create a new payment term'   => '',
-  'Create a standard group'     => '',
+  'Create a new printer'        => '',
+  'Create a new project'        => '',
+  'Create a new user'           => '',
+  'Create a new user group'     => '',
   'Create and edit RFQs'        => '',
   'Create and edit dunnings'    => '',
   'Create and edit invoices and credit notes' => '',
@@ -490,9 +530,12 @@ $self->{texts} = {
   'Create customers and vendors. Edit all vendors. Edit only customers where salesman equals employee (login)' => '',
   'Create invoice?'             => '',
   'Create new'                  => '',
+  'Create new background job'   => '',
   'Create new business'         => '',
+  'Create new client #1'        => '',
   'Create new department'       => '',
   'Create new payment term'     => '',
+  'Create new templates from master templates' => '',
   'Create tables'               => '',
   'Created by'                  => '',
   'Created for'                 => '',
@@ -513,16 +556,23 @@ $self->{texts} = {
   'Curr'                        => '',
   'Currencies'                  => '',
   'Currency'                    => '',
+  'Currency (database ID)'      => '',
+  'Currency name'               => '',
+  'Currency names must be unique.' => '',
+  'Currency names must not be empty.' => '',
   'Current / Next Level'        => '',
   'Current Earnings'            => '',
   'Current assets account'      => '',
+  'Current filter'              => '',
   'Current profile'             => '',
-  'Current unit'                => '',
+  'Current status'              => '',
   'Current value:'              => '',
   'Custom Variables'            => '',
   'Custom variables for module' => '',
   'Customer'                    => '',
+  'Customer (database ID)'      => '',
   'Customer (name)'             => '',
+  'Customer Master Data'        => '',
   'Customer Name'               => '',
   'Customer Number'             => '',
   'Customer Order Number'       => '',
@@ -531,6 +581,7 @@ $self->{texts} = {
   'Customer missing!'           => '',
   'Customer not on file or locked!' => '',
   'Customer not on file!'       => '',
+  'Customer saved'              => '',
   'Customer saved!'             => '',
   'Customer type'               => '',
   'Customer variables'          => '',
@@ -551,22 +602,26 @@ $self->{texts} = {
   'DATEX - Export Assistent'    => '',
   'DELETED'                     => '',
   'DFV-Kennzeichen'             => '',
+  'DHL'                         => '',
   'DR'                          => '',
   'DUNNING STARTED'             => '',
+  'DUNS number'                 => '',
   'DUNS-Nr'                     => '',
-  'Database'                    => '',
+  'Data'                        => '',
   'Database Administration'     => '',
   'Database Connection Test'    => '',
   'Database Host'               => '',
+  'Database ID'                 => '',
+  'Database Management'         => '',
   'Database User'               => '',
-  'Database User missing!'      => '',
-  'Database backups and restorations are disabled in the configuration.' => '',
+  'Database host and port'      => '',
+  'Database login (#1)'         => '',
   'Database name'               => '',
+  'Database settings'           => '',
   'Database template'           => '',
   'Database update error:'      => '',
-  'Dataset'                     => '',
+  'Database user and password'  => '',
   'Dataset missing!'            => '',
-  'Dataset name'                => '',
   'Dataset upgrade'             => '',
   'Date'                        => '',
   'Date Format'                 => '',
@@ -590,22 +645,32 @@ $self->{texts} = {
   'Decrease'                    => '',
   'Default (no language selected)' => '',
   'Default Accounts'            => '',
+  'Default Bin'                 => '',
+  'Default Bin with ignoring onhand' => '',
+  'Default Client (unconfigured)' => '',
   'Default Customer/Vendor Language' => '',
+  'Default Transfer'            => '',
+  'Default Transfer Out always succeed. The current part onhand is ignored and the inventory can have negative stocks (not recommended).' => '',
+  'Default Transfer Out with negative inventory' => '',
+  'Default Transfer with Master Bin' => '',
+  'Default Warehouse'           => '',
+  'Default Warehouse with ignoring on hand' => '',
   'Default buchungsgruppe'      => '',
+  'Default client'              => '',
+  'Default currency'            => '',
+  'Default currency missing!'   => '',
   'Default output medium'       => '',
   'Default printer'             => '',
   'Default template format'     => '',
   'Default unit'                => '',
   'Default value'               => '',
-  'Defaults saved.'             => '',
   'Delete'                      => '',
   'Delete Account'              => '',
   'Delete Contact'              => '',
   'Delete Dataset'              => '',
   'Delete Shipto'               => '',
-  'Delete delivery order'       => '',
   'Delete drafts'               => '',
-  'Delete group'                => '',
+  'Delete links'                => '',
   'Delete profile'              => '',
   'Delete transaction'          => '',
   'Deleted'                     => '',
@@ -620,7 +685,13 @@ $self->{texts} = {
   'Delivery Orders'             => '',
   'Delivery Plan'               => '',
   'Delivery Plan for currently outstanding sales orders' => '',
+  'Delivery Terms'              => '',
+  'Delivery terms'              => '',
+  'Delivery terms (database ID)' => '',
+  'Delivery terms (name)'       => '',
   'Department'                  => '',
+  'Department (database ID)'    => '',
+  'Department (description)'    => '',
   'Department 1'                => '',
   'Department 2'                => '',
   'Department Id'               => '',
@@ -639,7 +710,6 @@ $self->{texts} = {
   'Destination warehouse and bin' => '',
   'Details (one letter abbreviation)' => '',
   'Difference'                  => '',
-  'Dimension unit'              => '',
   'Directory'                   => '',
   'Discard duplicate entries in CSV file' => '',
   'Discard entries with duplicates in database or CSV file' => '',
@@ -647,6 +717,7 @@ $self->{texts} = {
   'Display'                     => '',
   'Display file'                => '',
   'Display options'             => '',
+  'Do not change the tax rate of taxkey 0.' => '',
   'Do not check for duplicates' => '',
   'Do not set default buchungsgruppe' => '',
   'Do you really want to close the following SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.' => '',
@@ -654,25 +725,29 @@ $self->{texts} = {
   'Do you really want to delete AP transaction #1?' => '',
   'Do you really want to delete AR transaction #1?' => '',
   'Do you really want to delete GL transaction #1?' => '',
-  'Do you really want to delete this group?' => '',
+  'Do you really want to delete the selected links?' => '',
   'Do you really want to delete this object?' => '',
   'Do you really want to delete this warehouse?' => '',
-  'Do you want kivitendo to create a group for access to all functions?' => '',
   'Do you want to <b>limit</b> your search?' => '',
   'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => '',
+  'Do you want to set the account number "#1" to "#2" and the name "#3" to "#4"?' => '',
   'Do you want to store the existing onhand values into a new warehouse?' => '',
   'Document'                    => '',
+  'Document Project (database ID)' => '',
+  'Document Project (description)' => '',
+  'Document Project (number)'   => '',
+  'Document Project Number'     => '',
   'Document Template'           => '',
+  'Documentation'               => '',
+  'Documentation (in German)'   => '',
   'Documents'                   => '',
-  'Document Project Number'     => '',
   'Documents in the WebDAV repository' => '',
   'Done'                        => '',
+  'Double partnumbers'          => '',
   'Download SEPA XML export file' => '',
   'Download sample file'        => '',
-  'Download the backup'         => '',
   'Draft saved.'                => '',
   'Drawing'                     => '',
-  'Driver'                      => '',
   'Dropdown Limit'              => '',
   'Due'                         => '',
   'Due Date'                    => '',
@@ -695,7 +770,7 @@ $self->{texts} = {
   'Dunnings'                    => '',
   'Duplicate in CSV file'       => '',
   'Duplicate in database'       => '',
-  'During this user migration kivitendo can create such a group for you and grant all users access to all of kivitendo\'s functions.' => '',
+  'During the next update a taxkey 0 with tax rate of 0 will automatically created.' => '',
   'E-mail'                      => '',
   'E-mail Statement to'         => '',
   'E-mail address missing!'     => '',
@@ -709,10 +784,7 @@ $self->{texts} = {
   'ELSTER Export nach Winston'  => '',
   'ELSTER Tax Number'           => '',
   'EQUITY'                      => '',
-  'EU with VAT ID'              => '',
-  'EU without VAT ID'           => '',
   'EUER'                        => '',
-  'EUR'                         => '',
   'Earlier versions of kivitendo contained bugs which might have led to wrong entries in the general ledger.' => '',
   'Edit'                        => '',
   'Edit Access Rights'          => '',
@@ -724,6 +796,7 @@ $self->{texts} = {
   'Edit Assembly'               => '',
   'Edit Bins'                   => '',
   'Edit Buchungsgruppe'         => '',
+  'Edit Client'                 => '',
   'Edit Credit Note'            => '',
   'Edit Customer'               => '',
   'Edit Dunning'                => '',
@@ -740,7 +813,6 @@ $self->{texts} = {
   'Edit Price Factor'           => '',
   'Edit Pricegroup'             => '',
   'Edit Printer'                => '',
-  'Edit Project'                => '',
   'Edit Purchase Delivery Order' => '',
   'Edit Purchase Order'         => '',
   'Edit Quotation'              => '',
@@ -753,28 +825,27 @@ $self->{texts} = {
   'Edit Storno Credit Note'     => '',
   'Edit Storno Invoice'         => '',
   'Edit User'                   => '',
+  'Edit User Group'             => '',
   'Edit Vendor'                 => '',
   'Edit Vendor Invoice'         => '',
   'Edit Warehouse'              => '',
-  'Edit and delete a group'     => '',
+  'Edit background job'         => '',
   'Edit bank account'           => '',
   'Edit business'               => '',
   'Edit custom variable'        => '',
+  'Edit delivery term'          => '',
   'Edit department'             => '',
   'Edit file'                   => '',
   'Edit greetings'              => '',
-  'Edit group '                 => '',
-  'Edit group membership'       => '',
-  'Edit groups'                 => '',
-  'Edit membership'             => '',
   'Edit note'                   => '',
   'Edit payment term'           => '',
   'Edit prices and discount (if not used, textfield is ONLY set readonly)' => '',
-  'Edit rights'                 => '',
+  'Edit project'                => '',
+  'Edit project #1'             => '',
   'Edit templates'              => 'Templates, edit',
   'Edit the Delivery Order'     => '',
   'Edit the configuration for periodic invoices' => '',
-  'Edit the membership of all users in all groups:' => '',
+  'Edit the currency names in order to rename them.' => '',
   'Edit the purchase_order'     => '',
   'Edit the request_quotation'  => '',
   'Edit the sales_order'        => '',
@@ -786,13 +857,16 @@ $self->{texts} = {
   'Element disabled'            => '',
   'Employee'                    => '',
   'Employee #1 saved!'          => '',
+  'Employee (database ID)'      => '',
   'Employees'                   => '',
+  'Empty selection for warehouse will not be added, even if the old bin is still visible (use back and forth to edit again).' => '',
   'Empty transaction!'          => '',
   'End date'                    => '',
   'Enter a description for this new draft.' => '',
   'Enter longdescription'       => '',
   'Enter the requested execution date or leave empty for the quickest possible execution:' => '',
-  'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => '',
+  'Entries for which automatic conversion failed:' => '',
+  'Entries for which automatic conversion succeeded:' => '',
   'Equity'                      => '',
   'Error'                       => '',
   'Error in database control file \'%s\': %s' => '',
@@ -800,24 +874,39 @@ $self->{texts} = {
   'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => '',
   'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => '',
   'Error message from the database driver:' => '',
+  'Error message from the database: #1' => '',
   'Error when saving: #1'       => '',
   'Error!'                      => '',
   'Error: Buchungsgruppe missing or invalid' => '',
+  'Error: Customer/vendor missing' => '',
   'Error: Customer/vendor not found' => '',
   'Error: Gender (cp_gender) missing or invalid' => '',
   'Error: Invalid business'     => '',
+  'Error: Invalid contact'      => '',
+  'Error: Invalid currency'     => '',
+  'Error: Invalid delivery terms' => '',
+  'Error: Invalid department'   => '',
   'Error: Invalid language'     => '',
+  'Error: Invalid order for this order item' => '',
+  'Error: Invalid part'         => '',
   'Error: Invalid part type'    => '',
   'Error: Invalid parts group'  => '',
   'Error: Invalid payment terms' => '',
   'Error: Invalid price factor' => '',
+  'Error: Invalid price group'  => '',
+  'Error: Invalid project'      => '',
+  'Error: Invalid shipto'       => '',
+  'Error: Invalid tax zone'     => '',
   'Error: Invalid vendor in column make_#1' => '',
   'Error: Name missing'         => '',
+  'Error: Part not found'       => '',
   'Error: Unit missing or invalid' => '',
   'Errors'                      => '',
   'Ertrag'                      => '',
   'Ertrag prozentual'           => '',
   'Escape character'            => '',
+  'EuR'                         => '',
+  'Everyone can log in.'        => '',
   'Exact'                       => '',
   'Example: http://kivitendo.de' => '',
   'Excel'                       => '',
@@ -826,23 +915,28 @@ $self->{texts} = {
   'Exchangerate Difference'     => '',
   'Exchangerate for payment missing!' => '',
   'Exchangerate missing!'       => '',
+  'Execute now'                 => '',
   'Executed'                    => '',
   'Execution date'              => '',
   'Execution date from'         => '',
   'Execution date to'           => '',
-  'Existing Buchungsgruppen'    => '',
+  'Execution schedule'          => '',
+  'Execution status'            => '',
+  'Execution type'              => '',
   'Existing Datasets'           => '',
+  'Existing contacts (with column \'cp_id\')' => '',
+  'Existing customers/vendors with same customer/vendor number' => '',
   'Existing file on server'     => '',
   'Existing pending follow-ups for this item' => '',
   'Existing profiles'           => '',
   'Expected Tax'                => '',
   'Expense'                     => '',
   'Expense Account'             => '',
-  'Expense accno'               => '',
   'Expense/Asset'               => '',
   'Expenses EU with UStId'      => '',
   'Expenses EU without UStId'   => '',
   'Export Buchungsdaten'        => '',
+  'Export Number'               => '',
   'Export Stammdaten'           => '',
   'Export as CSV'               => '',
   'Export as PDF'               => '',
@@ -856,17 +950,18 @@ $self->{texts} = {
   'Factor missing!'             => '',
   'Falsches Datumsformat!'      => '',
   'Fax'                         => '',
+  'Features'                    => '',
   'Feb'                         => '',
   'February'                    => '',
   'Fee'                         => '',
   'Field'                       => '',
   'File'                        => '',
   'File name'                   => '',
-  'Files created by kivitendo\'s &quot;Backup Dataset&quot; function are such files.' => '',
   'Filter'                      => '',
   'Filter date by'              => '',
   'Filter for customer variables' => '',
   'Filter for item variables'   => '',
+  'Filter parts'                => '',
   'Finish'                      => '',
   'First 20 Lines'              => '',
   'Fix transaction'             => '',
@@ -885,7 +980,6 @@ $self->{texts} = {
   'Font size'                   => '',
   'For AP transactions it will replace the sales taxkeys with input taxkeys with the same tax rate.' => '',
   'For AR transactions it will replace the input taxkeys with sales taxkeys with the same tax rate.' => '',
-  'For each unit there\'s either no or exactly one base unit. If you chose a base unit then you also have to chose a factor. That way the new unit will be defined as a multiple of the base unit. The base unit must be the &quot;smaller&quot; one. A factor may not be less than 1. Therefore you may define &quot;kg&quot; with the base unit &quot;g&quot; and a factor of &quot;1&quot;, but not the other way round.' => '',
   'For further information read this: ' => '',
   'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' => '',
   'Foreign Exchange Gain'       => '',
@@ -901,11 +995,14 @@ $self->{texts} = {
   'Fristsetzung'                => '',
   'From'                        => '',
   'From Date'                   => '',
-  'From this version on the taxkey 0 is reserved for tax rate 0.' => '',
+  'From this version on a new feature is available.' => '',
+  'From this version on it is necessary to name a default value.' => '',
+  'From this version on the partnumber of services, articles and assemblies have to be unique.' => '',
+  'From this version on the taxkey 0 must have a tax rate of 0 (for DATEV compatibility).' => '',
   'Full Access'                 => '',
   'Full Preview'                => '',
   'Full access to all functions' => '',
-  'Furthermore you should define a taxkey for all accounts, because this update cannot be executed.' => '',
+  'Function/position'           => '',
   'Fwd'                         => 'Forward',
   'GL Transaction'              => '',
   'GL transactions changeable'  => '',
@@ -916,7 +1013,9 @@ $self->{texts} = {
   'General Ledger Transaction'  => '',
   'General ledger and cash'     => '',
   'General ledger corrections'  => '',
+  'General settings'            => '',
   'Generic Tax Report'          => '',
+  'Git revision: #1, #2 #3'     => '',
   'Given Name'                  => '',
   'Go one step back'            => '',
   'Go one step forward'         => '',
@@ -925,23 +1024,32 @@ $self->{texts} = {
   'Group'                       => '',
   'Group Invoices'              => '',
   'Group Items'                 => '',
+  'Group assignment'            => '',
   'Group deleted!'              => '',
+  'Group list'                  => '',
   'Group membership'            => '',
   'Group missing!'              => '',
   'Group saved!'                => '',
   'Groups'                      => '',
+  'Groups that are valid for this client for access rights' => '',
+  'Groups this user is a member in' => '',
+  'Groups valid for this client' => '',
   'HTML'                        => '',
   'HTML Templates'              => '',
+  'Handling of WebDAV'          => '',
   'Hardcopy'                    => '',
   'Has serial number'           => '',
   'Heading'                     => '',
-  'Help'                        => '',
   'Help Template Variables'     => '',
   'Help on column names'        => '',
+  'Here'                        => '',
+  'Here you only provide the credentials for logging into the database.' => '',
   'Here\'s an example command line:' => '',
   'Hide Filter'                 => '',
   'Hide by default'             => '',
   'Hide help text'              => '',
+  'Hide settings'               => '',
+  'Hints'                       => '',
   'History'                     => '',
   'History Search'              => '',
   'History Search Engine'       => '',
@@ -954,31 +1062,38 @@ $self->{texts} = {
   'ID-Nummer'                   => '',
   'II'                          => '',
   'III'                         => '',
-  'IMPORTANT NOTE: You cannot safely change currencies, IF you have already booking entries!' => '',
   'IV'                          => '',
+  'If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.' => '',
   'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' => '',
+  'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' => '',
   'If the article type is set to \'mixed\' then a column called \'type\' must be present.' => '',
   'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => '',
   'If the database user listed above does not have the right to create a database then enter the name and password of the superuser below:' => '',
-  'If you chose to let Lx-Office do the migration then Lx-Office will also remove the old member file after creating a backup copy of it in the directory &quot;#1&quot;.' => '',
+  'If the default transfer out always succeed use this bin for negative stock quantity.' => '',
   'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' => '',
+  'If you have not chosen for example the category revenue for a tax and you choose an revenue account to create a transfer in the general ledger, this tax will not be displayed in the tax dropdown.' => '',
+  'If you lock the system normal users won\'t be able to log in.' => '',
   '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.' => '',
   'If you select a base unit then you also have to enter a factor.' => '',
-  'If you want to change any of these parameters then press the &quot;Back&quot; button, edit the file &quot;config/lx_office.conf&quot; and login into the admin module again.' => '',
-  'If you want to delete such a dataset you have to edit the user(s) that are using the dataset in question and have them use another dataset.' => '',
+  'If you want to change any of these parameters then press the "Back" button, edit the file "config/kivitendo.conf" and login into the admin module again.' => '',
+  'If you want to delete such a dataset you have to edit the client(s) that are using the dataset in question and have them use another dataset.' => '',
   'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' => '',
-  'If you yourself want to upgrade the installation then please read the file &quot;doc/UPGRADE&quot; and follow the steps outlined in this file.' => '',
+  'If your old bins match exactly Bins in the Warehouse CLICK on <b>AUTOMATICALLY MATCH BINS</b>.' => '',
+  'Illegal characters have been removed from the following fields: #1' => '',
   'Image'                       => '',
   'Import'                      => '',
   'Import CSV'                  => '',
+  'Import Status'               => '',
   'Import file'                 => '',
+  'Import not started yet, please wait...' => '',
   'Import preview'              => '',
   'Import profiles'             => '',
   'Import result'               => '',
   'Import summary'              => '',
   'In order to do that hit the button "Delete transaction".' => '',
-  'In the latter case the tables needed by Lx-Office will be created in that database.' => '',
-  'In version 2.4.0 the administrator has to enter a list of units in the administrative section.' => '',
+  'In order to migrate the old folder structure into the new structure you have to chose which client the old structure will be assigned to.' => '',
+  'In order to use kivitendo you have to create at least a client, a user and a group.' => '',
+  'In the latter case the tables needed by kivitendo will be created in that database.' => '',
   'In-line'                     => '',
   'Inactive'                    => '',
   'Include Exchangerate Difference' => '',
@@ -988,29 +1103,31 @@ $self->{texts} = {
   'Include in drop-down menus'  => '',
   'Include invalid warehouses ' => '',
   'Includeable in reports'      => '',
+  'Included in reports by default' => '',
   'Including'                   => '',
   'Income Statement'            => '',
-  'Income accno'                => '',
   'Incoming Payments'           => '',
   'Incoming invoice number'     => '',
-  'Incorrect Password!'         => '',
-  'Incorrect password!.'        => '',
-  'Incorrect username or password!' => '',
+  'Inconsistency in database'   => '',
+  'Incorrect password!        => '',
+  'Incorrect username or password or no access to selected client!' => '',
   'Increase'                    => '',
   'Individual Items'            => '',
   'Information'                 => '',
+  'Insert with new customer/vendor number' => '',
+  'Insert with new database ID' => '',
   'Insert with new part number' => '',
   'Interest'                    => '',
   'Interest Rate'               => '',
   'Internal Notes'              => '',
-  'International'               => '',
   'Internet'                    => '',
-  'Introduction of Buchungsgruppen' => '',
-  'Introduction of units'       => '',
+  'Introduction of clients'     => '',
   'Inv. Duedate'                => '',
   'Invalid'                     => '',
   'Invalid follow-up ID.'       => '',
   'Invalid quantity.'           => '',
+  'Invalid request type \'#1\'' => '',
+  'Invalid transactions'        => '',
   'Invdate'                     => '',
   'Invdate from'                => '',
   'Inventory'                   => '',
@@ -1036,13 +1153,13 @@ $self->{texts} = {
   'Invoice total less discount' => '',
   'Invoice with Storno (abbreviation)' => '',
   'Invoices'                    => '',
+  'Invoices, Credit Notes & AR Transactions' => '',
   'Is Searchable'               => '',
   'Is this a summary account to record' => '',
+  'It can be changed later but must be unique within the installation.' => '',
+  'It is not allowed that a summary account occurs in a drop-down menu!' => '',
   'It is possible that even after such a correction there is something wrong with this transaction (e.g. taxes that don\'t match the selected taxkey). Therefore you should re-run the general ledger analysis.' => '',
-  'It is possible to do this automatically for some Buchungsgruppen, but not for all.' => '',
-  'It is possible to do this automatically for some units, but for others the user has to chose the new unit.' => '',
   'It is possible to make a quick DATEV export everytime you post a record to ensure things work nicely with their data requirements. This will result in a slight overhead though you can enable this for each type of record independantly.' => '',
-  'It may optionally be compressed with &quot;gzip&quot;.' => '',
   'It will simply set the taxkey to 0 (meaning "no taxes") which is the correct value for such inventory transactions.' => '',
   'Item deleted!'               => '',
   'Item mode'                   => '',
@@ -1053,6 +1170,7 @@ $self->{texts} = {
   'Jan'                         => '',
   'January'                     => '',
   'Journal'                     => '',
+  'Journal of Last 10 Transfers' => '',
   'Jul'                         => '',
   'July'                        => '',
   'Jump to'                     => '',
@@ -1061,14 +1179,13 @@ $self->{texts} = {
   'KNE-Export erfolgreich!'     => '',
   'KNr. beim Kunden'            => '',
   'Keine Suchergebnisse gefunden!' => '',
-  'kivitendo needs to update the authentication database before you can proceed.' => '',
-  'kivitendo will then update the database automatically.' => '',
+  'Knowledge'                   => '',
   'Konten'                      => '',
   'L'                           => '',
   'LIABILITIES'                 => '',
   'LP'                          => '',
-  'Label'                       => '',
   'LaTeX Templates'             => '',
+  'Label'                       => '',
   'Landscape'                   => '',
   'Language'                    => '',
   'Language (database ID)'      => '',
@@ -1077,9 +1194,11 @@ $self->{texts} = {
   'Language deleted!'           => '',
   'Language missing!'           => '',
   'Language saved!'             => '',
+  'Language settings'           => '',
   'Languages'                   => '',
-  'Last Action'                 => '',
+  'Languages and translations'  => '',
   'Last Article Number'         => '',
+  'Last Assembly Number'        => '',
   'Last Cost'                   => '',
   'Last Credit Note Number'     => '',
   'Last Customer Number'        => '',
@@ -1093,29 +1212,28 @@ $self->{texts} = {
   'Last Service Number'         => '',
   'Last Transaction'            => '',
   'Last Vendor Number'          => '',
+  'Last command output'         => '',
+  'Last run at'                 => '',
+  'Lastcost'                    => '',
+  'Lastcost (with X being a number)' => '',
   'Lead'                        => '',
-  'Leave host and port field empty unless you want to make a remote connection.' => '',
+  'Leads'                       => '',
   'Left'                        => '',
   'Liability'                   => '',
   'Limit part selection'        => '',
   'Line Total'                  => '',
   'Line and column'             => '',
   'Line endings'                => '',
-  'List'                        => '',
-  'List Accounting Groups'      => '',
+  'Link direction'              => '',
+  'Link to'                     => '',
+  'Linked Records'              => '',
   'List Accounts'               => '',
-  'List Businesses'             => '',
-  'List Departments'            => '',
-  'List Groups'                 => '',
   'List Languages'              => '',
-  'List Lead'                   => '',
-  'List Payment Terms'          => '',
   'List Price'                  => '',
-  'List Price Factors'          => '',
-  'List Pricegroups'            => '',
+  'List Printers'               => '',
   'List Transactions'           => '',
-  'List Warehouses'             => '',
-  'List bank accounts'          => '',
+  'List Users, Clients and User Groups' => '',
+  'List current background jobs' => '',
   'List export'                 => '',
   'List of bank accounts'       => '',
   'List of bank collections'    => '',
@@ -1124,30 +1242,33 @@ $self->{texts} = {
   'List open SEPA exports'      => '',
   'Load draft'                  => '',
   'Load profile'                => '',
+  'Loading...'                  => '',
   'Local Tax Office Preferences' => '',
   'Lock System'                 => '',
+  'Lock and unlock installation' => '',
+  'Lock file handling failed. Please verify that the directory "#1" is writeable by the webserver.' => '',
   'Lockfile created!'           => '',
   'Lockfile removed!'           => '',
   'Login'                       => '',
   'Login Name'                  => '',
-  'Login name missing!'         => '',
   'Login of User'               => '',
   'Logout'                      => '',
   'Logout now'                  => '',
   'Long Dates'                  => '',
   'Long Description'            => '',
   'MAILED'                      => '',
+  'MD'                          => '',
   'Machine'                     => '',
-  'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => '',
   'Main Preferences'            => '',
   'Main sorting'                => '',
   'Make'                        => '',
-  'Make (with X being a number)' => '',
+  'Make (vendor\'s database ID, number or name; with X being a number)' => '',
   'Make compatible for import'  => '',
   'Make default profile'        => '',
   'Manage Custom Variables'     => '',
   'Mandantennummer'             => '',
   'Mandatory Departments'       => '',
+  'Map'                         => '',
   'Mar'                         => '',
   'March'                       => '',
   'Margepercent'                => '',
@@ -1160,7 +1281,10 @@ $self->{texts} = {
   'Marked as paid'              => '',
   'Marked entries printed!'     => '',
   'Master Data'                 => '',
+  'Master Data Bin Text Deleted' => '',
   'Max. Dunning Level'          => '',
+  'Maximal amount difference'   => '',
+  'Maximum future booking interval' => '',
   'May'                         => '',
   'May '                        => '',
   'May set the BCC field when sending emails' => '',
@@ -1180,9 +1304,8 @@ $self->{texts} = {
   'Missing amount'              => '',
   'Missing parameter #1 in call to sub #2.' => '',
   'Missing parameter (at least one of #1) in call to sub #2.' => '',
-  'Missing qty'                 => '',
+  'Missing parameter for WebDAV file copy' => '',
   'Missing taxkeys in invoices with taxes.' => '',
-  'Missing user id!'            => '',
   'Mitarbeiter'                 => '',
   'Mixed (requires column "type")' => '',
   'Mobile'                      => '',
@@ -1199,71 +1322,75 @@ $self->{texts} = {
   'More than one #1 found matching, please be more specific.' => '',
   'More than one control file with the tag \'%s\' exist.' => '',
   'Multi mode not supported.'   => '',
-  'Multibyte Encoding'          => '',
   'MwSt. inkl.'                 => '',
   'Name'                        => '',
+  'Name and Street'             => '',
   'Name missing!'               => '',
-  'National'                    => '',
   'National Expenses'           => '',
   'National Revenues'           => '',
   'Net amount'                  => '',
+  'Net amount (for verification)' => '',
   'Netto Terms'                 => '',
-  'New Buchungsgruppe #1'       => '',
-  'New Templates'               => '',
-  'New Win/Tab'                 => '',
+  'New Password'                => '',
   'New assembly'                => '',
   'New bank account'            => '',
+  'New client #1: The database configuration fields "host", "port", "name" and "user" must not be empty.' => '',
+  'New client #1: The name must be unique and not empty.' => '',
   'New contact'                 => '',
   'New customer'                => '',
+  'New filter for tax accounts' => '',
   'New invoice'                 => '',
+  'New name'                    => '',
   'New part'                    => '',
   'New sales order'             => '',
   'New service'                 => '',
   'New shipto'                  => '',
-  'New unit'                    => '',
   'New vendor'                  => '',
+  'New window/tab'              => '',
   'Next Dunning Level'          => '',
+  'Next run at'                 => '',
   'No'                          => '',
   'No %s was found matching the search parameters.' => '',
   'No Company Address given'    => '',
   'No Company Name given'       => '',
   'No Customer was found matching the search parameters.' => '',
-  'No Database Drivers available!' => '',
-  'No Dataset selected!'        => '',
   'No Vendor was found matching the search parameters.' => '',
   'No action defined.'          => '',
-  'No backup file has been uploaded.' => '',
+  'No background job has been created yet.' => '',
   'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' => '',
   'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' => '',
   'No bins have been added to this warehouse yet.' => '',
   'No business has been created yet.' => '',
+  'No clients have been created yet.' => '',
   'No contact selected to delete' => '',
   'No customer has been selected yet.' => '',
   'No data was found.'          => '',
-  'No databases have been found on this server.' => '',
-  'No datasets have been selected.' => '',
+  'No default currency'         => '',
+  'No delivery term has been created yet.' => '',
   'No department has been created yet.' => '',
   'No dunnings have been selected for printing.' => '',
-  'No entries were found which had no unit assigned to them.' => '',
   'No file has been uploaded yet.' => '',
-  'No group has been selected, or the group does not exist anymore.' => '',
-  'No groups have been added yet.' => '',
-  'No or an unknown authenticantion module specified in "config/lx_office.conf".' => '',
+  'No groups have been created yet.' => '',
+  'No or an unknown authenticantion module specified in "config/kivitendo.conf".' => '',
   'No part was found matching the search parameters.' => '',
   'No payment term has been created yet.' => '',
   'No prices will be updated because no prices have been entered.' => '',
+  'No print templates have been created for this client yet. Please do so in the client configuration.' => '',
+  'No printers have been created yet.' => '',
   'No problems were recognized.' => '',
+  'No report with id #1'        => '',
   'No shipto selected to delete' => '',
+  'No summary account'          => '',
   'No transaction selected!'    => '',
+  'No transactions yet.'        => '',
   'No transfers were executed in this export.' => '',
-  'No unknown units where found.' => '',
+  'No users have been created yet.' => '',
   'No valid number entered for pricegroup "#1".' => '',
   'No vendor has been selected yet.' => '',
   'No warehouse has been created yet or the quantity of the bins is not configured yet.' => '',
   'No.'                         => '',
-  'Non-taxable Purchases'       => '',
-  'Non-taxable Sales'           => '',
   'None'                        => '',
+  'Normal users cannot log in.' => '',
   'Not Discountable'            => '',
   'Not delivered'               => '',
   'Not done yet'                => '',
@@ -1273,13 +1400,15 @@ $self->{texts} = {
   'Notes'                       => '',
   'Notes (translation for #1)'  => '',
   'Notes (will appear on hard copy)' => '',
+  'Notes for customer'          => '',
+  'Notes for vendor'            => '',
   'Nothing has been selected for removal.' => '',
   'Nothing has been selected for transfer.' => '',
   'Nothing selected!'           => '',
-  'Nothing to delete!'          => '',
+  'Nothing stocked yet.'        => '',
+  'Nothing will be created or deleted at this stage!' => '',
   'Nov'                         => '',
   'November'                    => '',
-  'Now the user must select a single Buchungsgruppe for each part instead of three distinct accounts.' => '',
   'Number'                      => '',
   'Number Format'               => '',
   'Number missing in Row'       => '',
@@ -1303,18 +1432,19 @@ $self->{texts} = {
   'One or more Perl modules missing' => '',
   'Only Warnings and Errors'    => '',
   'Only due follow-ups'         => '',
+  'Only groups that have been configured for the client the user logs in to will be considered.' => '',
   'Only shown in item mode'     => '',
-  'Oops. No valid action found to dispatch. Please report this case to the Lx-Office team.' => '',
+  'Oops. No valid action found to dispatch. Please report this case to the kivitendo team.' => '',
   'Open'                        => '',
   'Open Amount'                 => '',
-  'Open a further kivitendo Window or Tab' => '',
+  'Open a further kivitendo window or tab' => '',
   'Open amount'                 => '',
   'Open in new window'          => '',
   'Open this Website'           => '',
   'OpenDocument/OASIS'          => '',
   'Openings'                    => '',
-  'Optional comment'            => '',
   'Opportunity'                 => '',
+  'Optional comment'            => '',
   'Options'                     => '',
   'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => '',
   'Order'                       => '',
@@ -1323,15 +1453,20 @@ $self->{texts} = {
   'Order Number'                => '',
   'Order Number missing!'       => '',
   'Order deleted!'              => '',
+  'Order/Item row name'         => '',
+  'OrderItem'                   => '',
   'Ordered'                     => '',
+  'Orders'                      => '',
   'Orders / Delivery Orders deleteable' => '',
   'Orientation'                 => '',
   'Orphaned'                    => '',
+  'Orphaned currencies'         => '',
+  'Other'                       => '',
   'Other users\' follow-ups'    => '',
   'Other values are ignored.'   => '',
   'Others'                      => '',
-  'Otherwise all users will only have access to their own settings.' => '',
   'Otherwise the variable is only available for printing.' => '',
+  'Otherwise you can simply check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => '',
   'Out of balance transaction!' => '',
   'Out of balance!'             => '',
   'Output Number Format'        => '',
@@ -1345,20 +1480,25 @@ $self->{texts} = {
   'POSTED'                      => '',
   'POSTED AS NEW'               => '',
   'PRINTED'                     => '',
+  'Package name'                => '',
   'Packing Lists'               => '',
   'Page'                        => '',
   'Page #1/#2'                  => '',
   'Paid'                        => '',
   'Part'                        => '',
+  'Part (database ID)'          => '',
   'Part Description'            => '',
   'Part Description missing!'   => '',
   'Part Notes'                  => '',
   'Part Number'                 => '',
   'Part Number missing!'        => '',
+  'Part picker'                 => '',
+  'Partnumber'                  => '',
   'Partnumber must not be set to empty!' => '',
   'Partnumber not unique!'      => '',
   'Parts'                       => '',
   'Parts Inventory'             => '',
+  'Parts Master Data'           => '',
   'Parts must have an entry type.' => '',
   'Parts with existing part numbers' => '',
   'Parts, services and assemblies' => '',
@@ -1367,6 +1507,7 @@ $self->{texts} = {
   'Password'                    => '',
   'Payables'                    => '',
   'Payment'                     => '',
+  'Payment / Delivery Options'  => '',
   'Payment Reminder'            => '',
   'Payment Terms'               => '',
   'Payment Terms missing in row ' => '',
@@ -1389,25 +1530,36 @@ $self->{texts} = {
   'Period'                      => '',
   'Period:'                     => '',
   'Periodic Invoices'           => '',
+  'Periodic inventory'          => '',
   'Periodic invoices active'    => '',
   'Periodic invoices inactive'  => '',
   'Periodicity'                 => '',
+  'Perpetual inventory'         => '',
+  'Person'                      => '',
   'Personal settings'           => '',
-  'Pg Database Administration'  => '',
   'Phone'                       => '',
   'Phone1'                      => '',
   'Phone2'                      => '',
   'Pick List'                   => '',
+  'Pictures for parts'          => '',
+  'Pictures for search parts'   => '',
   'Please Check the bank information for each customer:' => '',
   'Please Check the bank information for each vendor:' => '',
   'Please ask your administrator to create warehouses and bins.' => '',
+  'Please change the partnumber of the following parts and run the update again:' => '',
+  'Please choose for which categories the taxes should be displayed (otherwise remove the ticks):' => '',
+  'Please contact your administrator or a service provider.' => '',
   'Please contact your administrator.' => '',
+  'Please correct the settings and try again or deactivate that client.' => '',
+  'Please define a taxkey for the following taxes and run the update again:' => '',
+  'Please do so in the administration area.' => '',
   'Please enter a profile name.' => '',
-  'Please enter the login for the new user.' => '',
+  'Please enter the currency you are working with.' => '',
+  'Please enter the name for the new client.' => '',
+  'Please enter the name for the new group.' => '',
   'Please enter the name of the database that will be used as the template for the new database:' => '',
-  'Please enter the name of the dataset you want to restore the backup in.' => '',
   'Please enter the sales tax identification number.' => '',
-  'Please enter the taxnumber in the administration menu user preferences' => '',
+  'Please enter the taxnumber in the client configuration.' => '',
   'Please enter values'         => '',
   'Please insert object dimensions below.' => '',
   'Please insert your language values below' => '',
@@ -1418,15 +1570,13 @@ $self->{texts} = {
   'Please read the file'        => '',
   'Please select a customer from the list below.' => '',
   'Please select a part from the list below.' => '',
-  'Please select a user'        => '',
   'Please select a vendor from the list below.' => '',
-  'Please select the chart of accounts this installation is using from the list below.' => '',
-  'Please select the database you want to backup' => '',
+  'Please select the dataset you want to delete:' => '',
   'Please select the destination bank account for the collections:' => '',
   'Please select the source bank account for the transfers:' => '',
-  'Please seletct the dataset you want to delete:' => '',
+  'Please select which client configurations you want to create.' => '',
+  'Please set another taxnumber for the following taxes and run the update again:' => '',
   'Please specify a description for the warehouse designated for these goods.' => '',
-  'Please wait...'              => '',
   'Plural'                      => '',
   'Port'                        => '',
   'Portrait'                    => '',
@@ -1455,6 +1605,8 @@ $self->{texts} = {
   'Price factor (name)'         => '',
   'Price factor deleted!'       => '',
   'Price factor saved!'         => '',
+  'Price group (database ID)'   => '',
+  'Price group (name)'          => '',
   'Price information'           => '',
   'Pricegroup'                  => '',
   'Pricegroup deleted!'         => '',
@@ -1467,14 +1619,14 @@ $self->{texts} = {
   'Print dunnings'              => '',
   'Print list'                  => '',
   'Print options'               => '',
+  'Print templates'             => '',
+  'Print templates to use'      => '',
   'Printer'                     => '',
   'Printer Command'             => '',
-  'Printer Command missing!'    => '',
+  'Printer Description'         => '',
   'Printer Management'          => '',
-  'Printers are created for a user database. Please select a user. The associated database will be edited.' => '',
+  'Printer management'          => '',
   'Printing ... '               => '',
-  'Prior to version v2.4.0 the user could enter arbitrary strings as units for parts, services and in invoices, sales quotations etc.' => '',
-  'Prior to version v2.4.0 the user had to chose the accounts for each part and service.' => '',
   'Private E-mail'              => '',
   'Private Phone'               => '',
   'Problem'                     => '',
@@ -1484,19 +1636,20 @@ $self->{texts} = {
   'Proforma Invoice'            => '',
   'Program'                     => '',
   'Project'                     => '',
+  'Project (database ID)'       => '',
+  'Project (description)'       => '',
+  'Project (number)'            => '',
   'Project Description'         => '',
   'Project Number'              => '',
-  'Project Number missing!'     => '',
   'Project Numbers'             => '',
   'Project Transactions'        => '',
-  'Project deleted!'            => '',
-  'Project not on file!'        => '',
-  'Project saved!'              => '',
   'Projects'                    => '',
   'Projecttransactions'         => '',
   'Prozentual/Absolut'          => '',
+  'Purchase Delivery Orders'    => '',
   'Purchase Delivery Orders deleteable' => '',
   'Purchase Invoice'            => '',
+  'Purchase Invoices'           => '',
   'Purchase Order'              => '',
   'Purchase Orders'             => '',
   'Purchase Orders deleteable'  => '',
@@ -1536,7 +1689,6 @@ $self->{texts} = {
   'RFQs'                        => '',
   'ROP'                         => '',
   'Ranges of numbers'           => '',
-  'Ranges of numbers and default accounts' => '',
   'Re-run analysis'             => '',
   'Receipt'                     => '',
   'Receipt posted!'             => '',
@@ -1551,6 +1703,7 @@ $self->{texts} = {
   'Recorded taxkey'             => '',
   'Reference'                   => '',
   'Reference / Invoice Number'  => '',
+  'Reference day'               => '',
   'Reference missing!'          => '',
   'Release From Stock'          => '',
   'Remaining'                   => '',
@@ -1564,7 +1717,7 @@ $self->{texts} = {
   'Remove draft when posting'   => '',
   'Removed spoolfiles!'         => '',
   'Removing marked entries from queue ...' => '',
-  'Rename the group'            => '',
+  'Replace the orphaned currencies by other not orphaned currencies. To do so, please delete the currency in the textfields above and replace it by another currency. You could loose or change unintentionally exchangerates. Go on very carefully since you could destroy transactions.' => '',
   'Report Positions'            => '',
   'Report about warehouse contents' => '',
   'Report about warehouse transactions' => '',
@@ -1572,8 +1725,11 @@ $self->{texts} = {
   'Report for'                  => '',
   'Reports'                     => '',
   'Representative'              => '',
+  'Representative for Customer' => '',
   'Reqdate'                     => '',
+  'Request Quotations'          => '',
   'Request for Quotation'       => '',
+  'Request for Quotation Number' => '',
   'Request for Quotations'      => '',
   'Request quotation'           => '',
   'Requested execution date'    => '',
@@ -1581,13 +1737,18 @@ $self->{texts} = {
   'Requested execution date to' => '',
   'Required by'                 => '',
   'Reset'                       => '',
-  'Restore Dataset'             => '',
+  'Result'                      => '',
   'Revenue'                     => '',
   'Revenue Account'             => '',
   'Revenues EU with UStId'      => '',
   'Revenues EU without UStId'   => '',
   'Review of Aging list'        => '',
   'Right'                       => '',
+  'Row #1: amount has to be different from zero.' => '',
+  'Row number'                  => '',
+  'Row was created from current record' => '',
+  'Row was source for current record' => '',
+  'Run at'                      => '',
   'SAVED'                       => '',
   'SAVED FOR DUNNING'           => '',
   'SCREENED'                    => '',
@@ -1600,6 +1761,7 @@ $self->{texts} = {
   'Saldo neu'                   => '',
   'Saldo per'                   => '',
   'Sale Prices'                 => '',
+  'Sales Delivery Orders'       => '',
   'Sales Delivery Orders deleteable' => '',
   'Sales Invoice'               => '',
   'Sales Invoices'              => '',
@@ -1607,6 +1769,7 @@ $self->{texts} = {
   'Sales Orders'                => '',
   'Sales Orders deleteable'     => '',
   'Sales Price information'     => '',
+  'Sales Quotations'            => '',
   'Sales Report'                => '',
   'Sales and purchase invoices with inventory transactions with taxkeys' => '',
   'Sales delivery order'        => '',
@@ -1620,6 +1783,7 @@ $self->{texts} = {
   'Sales price total'           => '',
   'Sales quotation'             => '',
   'Salesman'                    => '',
+  'Salesman (database ID)'      => '',
   'Salesperson'                 => '',
   'Same as the quote character' => '',
   'Sat. Fax'                    => '',
@@ -1627,7 +1791,6 @@ $self->{texts} = {
   'Satz %'                      => '',
   'Save'                        => '',
   'Save Draft'                  => '',
-  'Save account first to insert taxkeys' => '',
   'Save and AP Transaction'     => '',
   'Save and AR Transaction'     => '',
   'Save and Close'              => '',
@@ -1636,18 +1799,23 @@ $self->{texts} = {
   'Save and Quotation'          => '',
   'Save and RFQ'                => '',
   'Save and close'              => '',
+  'Save and execute'            => '',
   'Save as new'                 => '',
+  'Save document in WebDAV repository' => '',
   'Save draft'                  => '',
   'Save profile'                => '',
   'Save settings as'            => '',
   'Saving the file \'%s\' failed. OS error message: %s' => '',
   'Screen'                      => '',
+  'Search'                      => '',
   'Search AP Aging'             => '',
   'Search AR Aging'             => '',
   'Search contacts'             => '',
+  'Search projects'             => '',
   'Search term'                 => '',
   'Searchable'                  => '',
   'Secondary sorting'           => '',
+  'Section "#1"'                => '',
   'Select'                      => '',
   'Select a Customer'           => '',
   'Select a customer'           => '',
@@ -1662,8 +1830,6 @@ $self->{texts} = {
   'Select from one of the projects below' => '',
   'Select postscript or PDF!'   => '',
   'Select tax office...'        => '',
-  'Select the chart of accounts in use' => '',
-  'Select the checkboxes that match users to the groups they should belong to.' => '',
   'Select type of removal'      => '',
   'Select type of transfer'     => '',
   'Selected'                    => '',
@@ -1675,7 +1841,6 @@ $self->{texts} = {
   'Sellprice for price group \'#1\'' => '',
   'Sellprice significant places' => '',
   'Semicolon'                   => '',
-  'Send the backup via Email'   => '',
   'Sep'                         => '',
   'Separator'                   => '',
   'Separator chararacter'       => '',
@@ -1686,14 +1851,14 @@ $self->{texts} = {
   'Service Contract'            => '',
   'Service Items'               => '',
   'Service Number missing!'     => '',
-  'Service unit'                => '',
+  'Service, assembly or part'   => '',
   'Services'                    => '',
   'Set Language Values'         => '',
   'Set eMail text'              => '',
   'Settings'                    => '',
   'Setup Menu'                  => '',
-  'Setup Templates'             => '',
   'Ship to'                     => '',
+  'Ship to (database ID)'       => '',
   'Ship via'                    => '',
   'Shipping Address'            => '',
   'Shipping Point'              => '',
@@ -1717,10 +1882,15 @@ $self->{texts} = {
   'Show "mark as paid" in ar transactions' => '',
   'Show "mark as paid" in purchase invoices' => '',
   'Show "mark as paid" in sales invoices' => '',
+  'Show AP transactions as part of AP invoice report' => '',
+  'Show AR transactions as part of AR invoice report' => '',
   'Show Bestbefore'             => '',
   'Show Filter'                 => '',
   'Show Salesman'               => '',
   'Show TODO list'              => '',
+  'Show Transfer via default'   => '',
+  'Show administration link'    => '',
+  'Show all parts'              => '',
   'Show by default'             => '',
   'Show custom variable search inputs' => '',
   'Show delete button in purchase delivery orders?' => '',
@@ -1728,20 +1898,30 @@ $self->{texts} = {
   'Show delete button in sales delivery orders?' => '',
   'Show delete button in sales orders?' => '',
   'Show details'                => '',
+  'Show details and reports of parts, services, assemblies' => '',
   'Show fields used for the best before date?' => '',
   'Show follow ups...'          => '',
   'Show help text'              => '',
   'Show items from invoices individually' => '',
   'Show old dunnings'           => '',
   'Show overdue sales quotations and requests for quotations...' => '',
+  'Show parts'                  => '',
+  'Show settings'               => '',
+  'Show the picture in the part form' => '',
+  'Show the pictures in the result for search parts' => '',
+  'Show the weights of articles and the total weight in orders, invoices and delivery notes?' => '',
+  'Show weights'                => '',
   'Show your TODO list after loggin in' => '',
   'Signature'                   => '',
   'Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.' => '',
   'Single quotes'               => '',
   'Single values in item mode, cumulated values in invoice mode' => '',
   'Skip'                        => '',
+  'Skip entry'                  => '',
+  'Skipping due to existing entry in database' => '',
   'Skonto'                      => '',
   'Skonto Terms'                => '',
+  'So far you could use one partnumber for severel parts, for example a service and an article.' => '',
   'Sold'                        => '',
   'Solution'                    => '',
   'Sort By'                     => '',
@@ -1751,34 +1931,36 @@ $self->{texts} = {
   'Source bank account'         => '',
   'Source bin'                  => '',
   'Space'                       => '',
-  'Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. Due to known problems involving accounting software Lx-Office does not allow these.' => '',
+  'Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. Due to known problems involving accounting software kivitendo does not allow these.' => '',
   'Spoolfile'                   => '',
   'Start Dunning Process'       => '',
   'Start analysis'              => '',
   'Start date'                  => '',
+  'Start task server'           => '',
   'Start the correction assistant' => '',
   'Startdate_coa'               => '',
   'Starting Balance'            => '',
+  'Starting the task server failed.' => '',
   'Starting with version 2.6.3 the configuration files in "config" have been consolidated.' => '',
   'Statement'                   => '',
   'Statement Balance'           => '',
   'Statement sent to'           => '',
   'Statements sent to printer!' => '',
   'Status'                      => '',
-  'Step 1 of 3: Parts'          => '',
   'Step 2'                      => '',
-  'Step 2 of 3: Services'       => '',
-  'Step 3 of 3: Assemblies'     => '',
-  'Step 3 of 3: Default units'  => '',
   'Steuersatz'                  => '',
   'Stock'                       => '',
   'Stock Qty for Date'          => '',
+  'Stock for part #1'           => '',
   'Stock value'                 => '',
   'Stocked Qty'                 => '',
+  'Stop task server'            => '',
+  'Stopping the task server failed. Output:' => '',
   'Storno'                      => '',
   'Storno (one letter abbreviation)' => '',
   'Storno Invoice'              => '',
   'Street'                      => '',
+  'Style the picture with the following CSS code' => '',
   'Stylesheet'                  => '',
   'Subject'                     => '',
   'Subject:'                    => '',
@@ -1802,8 +1984,12 @@ $self->{texts} = {
   'Tab'                         => '',
   'Target bank account'         => '',
   'Target table'                => '',
+  'Task Server is not running, starting it now. If this does not change, please check your task server config' => '',
+  'Task server control'         => '',
+  'Task server status'          => '',
   'Tax'                         => '',
   'Tax Consultant'              => '',
+  'Tax ID number'               => '',
   'Tax Included'                => '',
   'Tax Number'                  => '',
   'Tax Number / SSN'            => '',
@@ -1816,7 +2002,10 @@ $self->{texts} = {
   'Tax deleted!'                => '',
   'Tax number'                  => '',
   'Tax paid'                    => '',
+  'Tax rate'                    => '',
   'Tax saved!'                  => '',
+  'Tax zone (database ID)'      => '',
+  'Tax zone (description)'      => '',
   'Tax-O-Matic'                 => '',
   'Tax-o-matic Account'         => '',
   'Taxaccount_coa'              => '',
@@ -1842,104 +2031,137 @@ $self->{texts} = {
   'Templates'                   => '',
   'Terms missing in row '       => '',
   'Test and preview'            => '',
-  'Test connection'             => '',
+  'Test database connectivity'  => '',
   'Text field'                  => '',
   'Text field variables: \'WIDTH=w HEIGHT=h\' sets the width and height of the text field. They default to 30 and 5 respectively.' => '',
   'Text variables: \'MAXLENGTH=n\' sets the maximum entry length to \'n\'.' => '',
   'Text, text field and number variables: The default value will be used as-is.' => '',
   'That export does not exist.' => '',
+  'That is why kivitendo could not find a default currency.' => '',
+  'The \'name\' is the field shown to the user during login.' => '',
   'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => '',
   'The AP transaction #1 has been deleted.' => '',
   'The AR transaction #1 has been deleted.' => '',
+  'The Bins in Inventory were only a information text field.' => '',
+  'The Bins in master data were only a information text field.' => '',
   'The GL transaction #1 has been deleted.' => '',
-  'The LDAP server "#1:#2" is unreachable. Please check config/lx_office.conf.' => '',
+  'The LDAP server "#1:#2" is unreachable. Please check config/kivitendo.conf.' => '',
   'The SEPA export has been created.' => '',
   'The SEPA strings have been saved.' => '',
+  'The WebDAV feature has been used.' => '',
+  'The access rights a user has within a client instance is still governed by his group membership.' => '',
   'The access rights have been saved.' => '',
   'The account 3804 already exists, the update will be skipped.' => '',
   'The account 3804 will not be added automatically.' => '',
+  'The action you\'ve chosen has not been executed because the document does not contain any item yet.' => '',
+  'The administration area is always accessible.' => '',
   'The application "#1" was not found on the system.' => '',
   'The assembly has been created.' => '',
   'The assistant could not find anything wrong with #1. Maybe the problem has been solved in the meantime.' => '',
-  'The authentication configuration file &quot;config/lx_office.conf&quot; does not exist. This kivitendo installation has probably not been updated correctly yet. Please contact your administrator.' => '',
   'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' => '',
   'The available options depend on the varibale type:' => '',
-  'The backup you upload here has to be a file created with &quot;pg_dump -o -Ft&quot;.' => '',
+  'The background job could not be destroyed.' => '',
+  'The background job has been created.' => '',
+  'The background job has been deleted.' => '',
+  'The background job has been saved.' => '',
+  'The background job was executed successfully.' => '',
   'The bank information must not be empty.' => '',
   'The base unit does not exist or it is about to be deleted in row %d.' => '',
   'The base unit does not exist.' => '',
   '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.' => '',
+  'The basic client tables have not been created for this client\'s database yet.' => '',
   'The business has been created.' => '',
   'The business has been deleted.' => '',
   'The business has been saved.' => '',
   'The business is in use and cannot be deleted.' => '',
   'The changing of tax-o-matic account is NOT recommended, but if you do so please also (re)configure buchungsgruppen and reconfigure ALL charts which point to this tax-o-matic account. ' => '',
+  'The client could not be deleted.' => '',
+  'The client has been created.' => '',
+  'The client has been deleted.' => '',
+  'The client has been saved.'  => '',
+  'The column "datatype" must be present and must be the first column. The values must be the row names (see settings) for order and item data respectively.' => '',
+  'The column "make_X" can contain either a vendor\'s database ID, a vendor number or a vendor\'s name.' => '',
+  'The column triplets can occur multiple times with different numbers "X" each time (e.g. "make_1", "model_1", "lastcost_1", "make_2", "model_2", "lastcost_2", "make_3", "model_3", "lastcost_3" etc).' => '',
   'The columns &quot;Dunning Duedate&quot;, &quot;Total Fees&quot; and &quot;Interest&quot; show data for the previous dunning created for this invoice.' => '',
-  'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/lx_office.conf.' => '',
+  'The combination of database host, port and name is not unique.' => '',
+  'The command is missing.'     => '',
+  'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/kivitendo.conf.' => '',
   'The connection to the authentication database failed:' => '',
+  'The connection to the configured client database "#1" on host "#2:#3" failed.' => '',
   'The connection to the database could not be established.' => '',
   'The connection to the template database failed:' => '',
   'The connection was established successfully.' => '',
+  'The contact person attribute "birthday" is converted from a free-form text field into a date field.' => '',
   'The creation of the authentication database failed:' => '',
+  'The custom variable has been created.' => '',
   'The custom variable has been deleted.' => '',
   'The custom variable has been saved.' => '',
-  'The database #1 has been successfully deleted.' => '',
+  'The custom variable is in use and cannot be deleted.' => '',
   'The database for user management and authentication does not exist. You can create let kivitendo create it with the following parameters:' => '',
+  'The database host is missing.' => '',
+  'The database name is missing.' => '',
+  'The database port is missing.' => '',
   'The database update/creation did not succeed. The file #1 contained the following error:' => '',
-  'The database upgrade for the introduction of Buchungsgruppen is now complete.' => '',
-  'The database upgrade for the introduction of units is now complete.' => '',
-  'The dataset #1 has been successfully created.' => '',
-  'The dataset backup has been sent via email to #1.' => '',
-  'The dataset has to exist before a restoration can be started.' => '',
-  'The dataset name is missing.' => '',
+  'The database user is missing.' => '',
+  'The dataset #1 has been created.' => '',
+  'The dataset #1 has been deleted.' => '',
   'The deductible amount'       => '',
   'The default value depends on the variable type:' => '',
   'The delivery order has not been marked as delivered. The warehouse contents have not changed.' => '',
+  'The delivery term has been created.' => '',
+  'The delivery term has been deleted.' => '',
+  'The delivery term has been saved.' => '',
+  'The delivery term is in use and cannot be deleted.' => '',
   'The department has been created.' => '',
   'The department has been deleted.' => '',
   'The department has been saved.' => '',
   'The department is in use and cannot be deleted.' => '',
   'The description is missing.' => '',
+  'The description is not unique.' => '',
   'The description is shown on the form. Chose something short and descriptive.' => '',
-  'The directory "%s" could not be created:\n%s' => '',
   'The directory %s does not exist.' => '',
   'The discount in percent'     => '',
   'The discount must be less than 100%.' => '',
   'The discount must not be negative.' => '',
   'The dunning process started' => '',
   'The dunnings have been printed.' => '',
-  'The email address is missing.' => '',
   'The end date is the last day for which invoices will possibly be created.' => '',
+  'The execution schedule is invalid.' => '',
+  'The execution type is invalid.' => '',
+  'The existing record has been created from the link target to add.' => '',
   'The factor is missing in row %d.' => '',
   'The factor is missing.'      => '',
   'The first reason is that kivitendo contained a bug which resulted in the wrong taxkeys being recorded for transactions in which two entries are posted for the same chart with different taxkeys.' => '',
   'The follow-up date is missing.' => '',
-  'The following Buchungsgruppen have already been created:' => '',
-  'The following Datasets need to be updated' => '',
+  'The following currencies have been used, but they are not defined:' => '',
   'The following drafts have been saved and can be loaded.' => '',
-  'The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:' => '',
+  'The following groups are valid for this client' => '',
+  'The following list has been generated automatically from existing users collapsing users with identical settings into a single entry.' => '',
+  'The following old files whose settings have to be merged manually into the new configuration file "config/kivitendo.conf" still exist:' => '',
   'The following transaction contains wrong taxes:' => '',
   'The following transaction contains wrong taxkeys:' => '',
-  'The following units are unknown.' => '',
-  'The following units exist already:' => '',
-  'The following users have been migrated into the authentication database:' => '',
-  'The following warnings occured during an upgrade to the document templates:' => '',
+  'The following transactions are concerned:' => '',
+  'The following users are a member of this group' => '',
+  'The following users will have access to this client' => '',
   '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>' => '',
   'The greetings have been saved.' => '',
-  'The group has been added.'   => '',
-  'The group has been deleted.' => '',
-  'The group has been saved.'   => '',
-  'The group memberships have been saved.' => '',
-  'The group name is missing.'  => '',
+  'The installation is currently locked.' => '',
+  'The installation is currently unlocked.' => '',
+  'The items are imported accoring do their number "X" regardless of the column order inside the file.' => '',
+  'The link target to add has been created from the existing record.' => '',
   'The list has been printed.'  => '',
+  'The login is missing.'       => '',
+  'The login is not unique.'    => '',
   'The long description is missing.' => '',
+  'The master templates where not found.' => '',
   'The name in row %d has already been used before.' => '',
   'The name is missing in row %d.' => '',
   'The name is missing.'        => '',
+  'The name is not unique.'     => '',
   'The name must only consist of letters, numbers and underscores and start with a letter.' => '',
   'The number of days for full payment' => '',
-  'The old file containing the user information is still present (&quot;#1&quot;). Do you want to migrate these users into the database? If not then you will not be able to log in with any of the users present in the old file.' => '',
   'The option field is empty.'  => '',
+  'The package name is invalid.' => '',
   'The parts for this delivery order have already been transferred in.' => '',
   'The parts for this delivery order have already been transferred out.' => '',
   'The parts have been removed.' => '',
@@ -1953,25 +2175,29 @@ $self->{texts} = {
   'The payment term has been saved.' => '',
   'The payment term is in use and cannot be deleted.' => '',
   'The payments have been posted.' => '',
-  'The pg_dump process could not be started.' => '',
-  'The pg_restore process could not be started.' => '',
   'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => '',
+  'The printer could not be deleted.' => '',
+  'The printer has been created.' => '',
+  'The printer has been deleted.' => '',
+  'The printer has been saved.' => '',
   'The profile \'#1\' has been deleted.' => '',
   'The profile has been saved under the name \'#1\'.' => '',
-  'The program\'s exit code was #1 (&quot;0&quot; usually means that everything went OK).' => '',
-  'The project has been added.' => '',
+  'The project has been created.' => '',
+  'The project has been deleted.' => '',
   'The project has been saved.' => '',
-  'The restoration process has started. Here\'s the output of the &quot;pg_restore&quot; command:' => '',
-  'The restoration process is complete. Please review &quot;pg_restore&quot;\'s output to find out if the restoration was successful.' => '',
+  'The project is in use and cannot be deleted.' => '',
+  'The project number is already in use.' => '',
+  'The project number is missing.' => '',
   'The second reason is that kivitendo allowed the user to enter the tax amount manually regardless of the taxkey used.' => '',
   'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => '',
-  'The selected  PostgreSQL installation uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => '',
   'The selected bank account does not exist anymore.' => '',
   'The selected bin does not exist.' => '',
   'The selected currency'       => '',
+  'The selected database is still configured for client "#1". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?' => '',
   'The selected exports have been closed.' => '',
   'The selected warehouse does not exist.' => '',
   'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => '',
+  'The session has expired. Please log in again.' => '',
   'The session is invalid or has expired.' => '',
   'The settings were saved, but the password was not changed.' => '',
   'The source warehouse does not contain any bins.' => '',
@@ -1979,14 +2205,29 @@ $self->{texts} = {
   'The subject is missing.'     => '',
   'The tables for user management and authentication do not exist. They will be created in the next step in the following database:' => '',
   'The tabulator character'     => '',
+  'The task server does not appear to be running.' => '',
+  'The task server is already running.' => '',
+  'The task server is not running at the moment but needed for this module' => '',
+  'The task server is not running.' => '',
+  'The task server was started successfully.' => '',
+  'The task server was stopped successfully.' => '',
   'The third way is to download the module from the above mentioned URL and to install the module manually following the installations instructions contained in the source archive.' => '',
+  'The three columns "make_X", "model_X" and "lastcost_X" with the same number "X" are used to import vendor part numbers and vendor prices.' => '',
   'The transaction is shown below in its current state.' => '',
+  'The type is missing.'        => '',
   'The unit has been saved.'    => '',
   'The unit in row %d has been deleted in the meantime.' => '',
   'The unit in row %d has been used in the meantime and cannot be changed anymore.' => '',
   'The units have been saved.'  => '',
-  'The user is a member in the following group(s):' => '',
-  'The user migration process is complete.' => '',
+  'The user can chose which client to connect to during login.' => '',
+  'The user could not be deleted.' => '',
+  'The user group could not be deleted.' => '',
+  'The user group has been created.' => '',
+  'The user group has been deleted.' => '',
+  'The user group has been saved.' => '',
+  'The user has been created.'  => '',
+  'The user has been deleted.'  => '',
+  'The user has been saved.'    => '',
   'The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present' => '',
   'The warehouse could not be deleted because it has already been used.' => '',
   'The warehouse does not contain any bins.' => '',
@@ -1994,18 +2235,23 @@ $self->{texts} = {
   'The wrong taxkeys for AP and AR transactions have been fixed.' => '',
   'The wrong taxkeys for inventory transactions for sales and purchase invoices have been fixed.' => '',
   'The wrong taxkeys have been fixed.' => '',
+  'Then go to the database administration and chose "create database".' => '',
   'There are #1 more open invoices for this customer with other currencies.' => '',
   'There are #1 more open invoices from this vendor with other currencies.' => '',
   'There are #1 unfinished follow-ups of which #2 are due.' => '',
+  'There are Bins defined in your Inventory.' => '',
+  'There are Bins defined in your master data.' => '',
   'There are bookings to the account 3803 after 01.01.2007. If you didn\'t change this account manually to 19% the bookings are probably incorrect.' => '',
+  'There are double partnumbers in your database.' => '',
   'There are entries in tax where taxkey is NULL.' => '',
-  'There are four tax zones.'   => '',
   'There are invalid taxnumbers in use.' => '',
+  'There are invalid transactions in your database.' => '',
   'There are no entries in the background job history.' => '',
   'There are no items in stock.' => '',
   'There are no items on your TODO list at the moment.' => '',
-  'There are still entries in the database for which no unit has been assigned.' => '',
+  'There are several options you can handle this problem, please select one:' => '',
   'There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?' => '',
+  'There are undefined currencies in your system.' => '',
   'There are usually three ways to install Perl modules.' => '',
   'There is already a taxkey 0 with tax rate not 0.' => '',
   'There is an inconsistancy in your database.' => '',
@@ -2014,49 +2260,59 @@ $self->{texts} = {
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => '',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => '',
   'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => '',
-  'There is nothing to do in this step.' => '',
+  'There was an error executing the background job.' => '',
+  'There was an error parsing the csv file: #1 in line #2.' => '',
+  'There you can let kivitendo create the basic tables for you, even in an already existing database.' => '',
+  'Therefore several settings that had to be made for each user in the past have been consolidated into the client configuration.' => '',
   'Therefore the definition of "kg" with the base unit "g" and a factor of 1000 is valid while defining "g" with a base unit of "kg" and a factor of "0.001" is not.' => '',
-  'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => '',
-  'These units can be based on other units so that kivitendo can convert prices when the user switches from one unit to another.' => '',
   'These wrong entries cannot be fixed automatically.' => '',
   'This can be done with the following query:' => '',
-  'This corresponds to kivitendo\'s behavior prior to version 2.4.4.' => '',
   'This could have happened for two reasons:' => '',
   'This customer number is already in use.' => '',
-  'This group will be called &quot;Full Access&quot;.' => '',
-  'This installation uses an unknown chart of accounts (&quot;#1&quot;). This database upgrade cannot create standard buchungsgruppen automatically.' => '',
-  'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => '',
+  'This feature especially prevents mistakes by mixing up prior tax and sales tax.' => '',
+  'This group is valid for the following clients' => '',
+  'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' => '',
+  'This has been changed in this version.' => '',
+  'This is a very critical problem.' => '',
+  'This is the client to be selected by default on the login screen.' => '',
+  'This is the default bin for ignoring onhand' => '',
+  'This is the default bin for parts' => '',
   'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' => '',
   'This means that the user has created an AP transaction and chosen a taxkey for sales taxes, or that he has created an AR transaction and chosen a taxkey for input taxes.' => '',
   'This module can help you identify and correct such entries by analyzing the general ledger and presenting you likely solutions but also allowing you to fix problems yourself.' => '',
   'This option controls the inventory system.' => '',
   'This option controls the method used for profit determination.' => '',
   'This option controls the posting and calculation behavior for the accounting method.' => '',
+  'This partnumber is not unique. You should change it.' => '',
+  'This requires you to manually correct entries for which an automatic conversion failed and to check those for which it succeeded.' => '',
   'This transaction has to be split into several transactions manually.' => '',
   'This update will change the nature the onhand of goods is tracked.' => '',
-  'This upgrade script tries to map all existing parts in the database to the newly created Buchungsgruppen.' => '',
-  'This upgrade script tries to map all existing units in the database to the newly created units.' => '',
+  'This user is a member in the following groups' => '',
+  'This user will have access to the following clients' => '',
   'This vendor number is already in use.' => '',
+  'Three Options:'              => '',
+  'Time Format'                 => '',
+  'Time Tracking'               => '',
   'Time period for the analysis:' => '',
-  'Time Track'                  => '',
   'Timestamp'                   => '',
   'Title'                       => '',
   'To'                          => '',
   'To (email)'                  => '',
   'To (time)'                   => '',
   'To Date'                     => '',
-  'To add a user to a group edit a name, change the login name and save.  A new user with the same variables will then be saved under the new login name.' => '',
+  'To continue please change the taxkey 0 to another value.' => '',
+  'To user login'               => '',
   'Top'                         => '',
   'Top (CSS)'                   => '',
-  'Top (CSS) new'               => '',
   'Top (Javascript)'            => '',
   'Top 100'                     => '',
   'Top 100 hinzufuegen'         => '',
-  'Top Level'                   => '',
+  'Top Level Designation only'  => '',
   'Total'                       => '',
   'Total Fees'                  => '',
   'Total stock value'           => '',
   'Total sum'                   => '',
+  'Total weight'                => '',
   'Totals'                      => '',
   'Trade Discount'              => '',
   'Trans Id'                    => '',
@@ -2070,6 +2326,8 @@ $self->{texts} = {
   'Transaction has already been cancelled!' => '',
   'Transaction has been split on both the credit and the debit side' => '',
   'Transaction posted!'         => '',
+  'Transactions without account:' => '',
+  'Transactions without reference:' => '',
   'Transactions, AR transactions, AP transactions' => '',
   'Transdate'                   => '',
   'Transfer'                    => '',
@@ -2077,8 +2335,11 @@ $self->{texts} = {
   'Transfer To Stock'           => '',
   'Transfer from warehouse'     => '',
   'Transfer in'                 => '',
+  'Transfer in via default'     => '',
   'Transfer out'                => '',
+  'Transfer out via default'    => '',
   'Transfer qty'                => '',
+  'Transfer successful'         => '',
   'Translation'                 => '',
   'Trial Balance'               => '',
   'Trial balance between %s and %s' => '',
@@ -2088,6 +2349,7 @@ $self->{texts} = {
   'Type of Business'            => '',
   'Type of Customer'            => '',
   'Type of Vendor'              => '',
+  'Types of Business'           => '',
   'USTVA'                       => '',
   'USTVA 2004'                  => '',
   'USTVA 2005'                  => '',
@@ -2104,6 +2366,7 @@ $self->{texts} = {
   'Unbalanced Ledger'           => '',
   'Unchecked custom variables will not appear in orders and invoices.' => '',
   'Unfinished follow-ups'       => '',
+  'Unfortunately you have no warehouse defined.' => '',
   'Unit'                        => '',
   'Unit (if missing or empty default unit will be used)' => '',
   'Unit missing.'               => '',
@@ -2112,46 +2375,53 @@ $self->{texts} = {
   'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' => '',
   'Unknown Category'            => '',
   'Unknown Link'                => '',
-  'Unknown chart of accounts'   => '',
   'Unknown dependency \'%s\'.'  => '',
   'Unknown problem type.'       => '',
   'Unlock System'               => '',
   'Until'                       => '',
   'Update'                      => '',
-  'Update Dataset'              => '',
   'Update Prices'               => '',
   'Update SKR04: new tax account 3804 (19%)' => '',
-  'Update complete'             => '',
   'Update prices'               => '',
   'Update prices of existing entries' => '',
-  'Update?'                     => '',
+  'Update properties of existing entries' => '',
   'Updated'                     => '',
+  'Updating existing entry in database' => '',
   'Updating prices of existing entry in database' => '',
+  'Updating the client fields in the database "#1" on host "#2:#3" failed.' => '',
   'Uploaded on #1, size #2 kB'  => '',
-  'Use As Template'             => '',
-  'Use Templates'               => '',
+  'Use As New'                  => '',
+  'Use WebDAV Repository'       => '',
+  'Use existing templates'      => '',
+  'Use master default bin for Default Transfer, if no default bin for the part is configured' => '',
   'User'                        => '',
   'User Config'                 => '',
   'User Groups'                 => '',
-  'User Login'                  => '',
-  'User data migration'         => '',
-  'User deleted!'               => '',
-  'User migration complete'     => '',
+  'User Preferences'            => '',
+  'User access'                 => '',
+  'User list'                   => '',
+  'User login'                  => '',
   'User name'                   => '',
-  'User saved!'                 => '',
   'Username'                    => '',
-  'Users in this group'         => '',
-  'Ust-IDNr'                    => '',
+  'Users that are a member in this group' => '',
+  'Users that have access to this client' => '',
+  'Users with access'           => '',
+  'Users with access to this client' => '',
+  'Users, Clients and User Groups' => '',
+  'VAT ID'                      => '',
+  'Valid'                       => '',
   'Valid from'                  => '',
   'Valid until'                 => '',
+  'Valid/Obsolete'              => '',
   'Value'                       => '',
   'Variable'                    => '',
   'Variable Description'        => '',
   'Variable Name'               => '',
   'Vendor'                      => '',
+  'Vendor (database ID)'        => '',
   'Vendor (name)'               => '',
   'Vendor Invoice'              => '',
-  'Vendor Invoices'             => '',
+  'Vendor Invoices & AP Transactions' => '',
   'Vendor Name'                 => '',
   'Vendor Number'               => '',
   'Vendor Order Number'         => '',
@@ -2160,13 +2430,16 @@ $self->{texts} = {
   'Vendor missing!'             => '',
   'Vendor not on file or locked!' => '',
   'Vendor not on file!'         => '',
+  'Vendor saved'                => '',
   'Vendor saved!'               => '',
   'Vendor type'                 => '',
   'Vendors'                     => '',
   'Verrechnungseinheit'         => '',
   'Version'                     => '',
-  'Version 2.4.0 introduces two new concepts: tax zones and Buchungsgruppen.' => '',
   'View SEPA export'            => '',
+  'View background job execution result' => '',
+  'View background job history' => '',
+  'View background jobs'        => '',
   'View warehouse content'      => '',
   'View/edit all employees sales documents' => '',
   'Von Konto: '                 => '',
@@ -2176,13 +2449,16 @@ $self->{texts} = {
   'Warehouse Migration'         => '',
   'Warehouse To'                => '',
   'Warehouse content'           => '',
+  'Warehouse correction'        => '',
   'Warehouse deleted.'          => '',
+  'Warehouse list'              => '',
   'Warehouse management'        => '',
   'Warehouse saved.'            => '',
   'Warehouses'                  => '',
   'Warning'                     => '',
-  'Warnings during template upgrade' => '',
+  'WebDAV'                      => '',
   'WebDAV link'                 => '',
+  'WebDAV save documents'       => '',
   'Webserver interface'         => '',
   'Weight'                      => '',
   'Weight unit'                 => '',
@@ -2190,13 +2466,14 @@ $self->{texts} = {
   'What type of item is this?'  => '',
   'Which is located at doc/kivitendo-Dokumentation.pdf. Click here: ' => '',
   'With Extension Of Time'      => '',
+  'With the introduction of clients each client gets its own WebDAV folder.' => '',
   'Workflow Delivery Order'     => '',
   'Workflow purchase_order'     => '',
   'Workflow request_quotation'  => '',
   'Workflow sales_order'        => '',
   'Workflow sales_quotation'    => '',
+  'Write bin to default bin in part?' => '',
   'Wrong Period'                => '',
-  'Wrong date format!'          => '',
   'Wrong tax keys recorded'     => '',
   'Wrong taxes recorded'        => '',
   'YYYY'                        => '',
@@ -2207,51 +2484,50 @@ $self->{texts} = {
   'Yes, included by default'    => '',
   'Yes/No (Checkbox)'           => '',
   'You are logged out!'         => '',
-  'You can also create new units now.' => '',
   'You can also delete this transaction and re-enter it manually.' => '',
+  'You can choose account categories for taxes. Depending on these categories taxes will be displayed for transfers in the general ledger or not.' => '',
   'You can correct this transaction by chosing the correct taxkeys from the drop down boxes and hitting the button "Fix transaction" afterwards.' => '',
-  'You can create a missing dataset by going back and chosing &quot;Create Dataset&quot;.' => '',
   'You can create warehouses and bins via the menu "System -> Warehouses".' => '',
   'You can declare different translations for singular and plural for each unit (e.g. &quot;day&quot; and &quot;days).' => '',
   'You can either create a new database or chose an existing database.' => '',
   'You can find information on the migration in the upgrade chapter of the documentation.' => '',
   'You can only delete datasets that are not in use.' => '',
+  'You can update existing contacts by providing the \'cp_id\' column with their database IDs. Otherwise: ' => '',
   'You can use the following strings in the long description and all translations. They will be replaced by their actual values by kivitendo before they\'re output.' => '',
   'You cannot adjust the price for pricegroup "#1" by a negative percentage.' => '',
   'You cannot continue before all required modules are installed.' => '',
-  'You cannot continue until all unknown units have been mapped to known ones.' => '',
   'You cannot create an invoice for delivery orders for different customers.' => '',
   'You cannot create an invoice for delivery orders from different vendors.' => '',
-  'You did not enter a name!'   => '',
   'You do not have the permissions to access this function.' => '',
   'You have entered or selected the following shipping address for this customer:' => '',
+  'You have never worked with currencies.' => '',
   'You have not added bank accounts yet.' => '',
   'You have not selected any delivery order.' => '',
   'You have not selected any export.' => '',
   'You have not selected any item.' => '',
   'You have selected none of the invoices.' => '',
-  'You have to chose a dimension unit and a service unit which will then be assigned to those entries.' => '',
-  'You have to chose which unit to save for each of them.' => '',
-  'You have to create at least one group, grant it access to kivitendo\'s functions and assign users to it.' => '',
-  'You have to create new Buchungsgruppen for all the combinations of inventory, income and expense accounts that have been used already.' => '',
   'You have to define a unit as a multiple of a smaller unit.' => '',
-  'You have to enter a company name in your user preferences (see the "Program" menu, "Preferences").' => '',
-  'You have to enter the SEPA creditor ID in your user preferences (see the "Program" menu, "Preferences").' => '',
+  'You have to enter a company name in the client configuration.' => '',
+  'You have to enter the SEPA creditor ID in the client configuration.' => '',
   'You have to fill in at least an account number, the bank code, the IBAN and the BIC.' => '',
+  'You have to grant users access to one or more clients.' => '',
   'You have to specify a department.' => '',
   'You have to specify an execution date for each antry.' => '',
   'You must chose a user.'      => '',
+  'You must enter a name for your new print templates.' => '',
+  'You must select existing print templates or create a new set.' => '',
   'You should create a backup of the database before proceeding because the backup might not be reversible.' => '',
-  'You will now be forwarded to the administration panel.' => '',
   'You\'re not editing a file.' => '',
   'You\'ve already chosen the following limitations:' => '',
-  'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => '',
+  'Your PostgreSQL installationen does not use Unicode as its encoding. This is not supported anymore.' => '',
   'Your TODO list'              => '',
   'Your account number'         => '',
   'Your bank'                   => '',
   'Your bank code'              => '',
   'Your browser does not currently support Javascript.' => '',
   'Your download does not exist anymore. Please re-run the DATEV export assistant.' => '',
+  'Your import is beig processed.' => '',
+  'ZM'                          => '',
   'Zeitpunkt'                   => '',
   'Zeitraum'                    => '',
   'Zero amount posting!'        => '',
@@ -2265,9 +2541,11 @@ $self->{texts} = {
   'action= not defined!'        => '',
   'active'                      => '',
   'all entries'                 => '',
+  'and'                         => '',
   'ap_aging_list'               => '',
   'ar_aging_list'               => '',
   'as at'                       => '',
+  'assembly'                    => '',
   'assembly_list'               => '',
   'averaged values, in invoice mode only useful when filtered by a part' => '',
   'back'                        => '',
@@ -2279,7 +2557,8 @@ $self->{texts} = {
   'bestbefore #1'               => '',
   'bin_list'                    => '',
   'bis'                         => '',
-  'button'                      => '',
+  'building data'               => '',
+  'building report'             => '',
   'cash'                        => '',
   'chargenumber #1'             => '',
   'chart_of_accounts'           => '',
@@ -2289,10 +2568,10 @@ $self->{texts} = {
   'close'                       => '',
   'closed'                      => '',
   'companylogo_subtitle'        => '',
-  'config/lx_office.conf: Key "DB_config" is missing.' => '',
-  'config/lx_office.conf: Key "authentication/ldap" is missing.' => '',
-  'config/lx_office.conf: Missing parameters in "authentication/database". Required parameters are "host", "db" and "user".' => '',
-  'config/lx_office.conf: Missing parameters in "authentication/ldap". Required parameters are "host", "attribute" and "base_dn".' => '',
+  'config/kivitendo.conf: Key "DB_config" is missing.' => '',
+  'config/kivitendo.conf: Key "authentication/ldap" is missing.' => '',
+  'config/kivitendo.conf: Missing parameters in "authentication/database". Required parameters are "host", "db" and "user".' => '',
+  'config/kivitendo.conf: Missing parameters in "authentication/ldap". Required parameters are "host", "attribute" and "base_dn".' => '',
   'contact_list'                => '',
   'continue'                    => '',
   'correction'                  => '',
@@ -2309,20 +2588,25 @@ $self->{texts} = {
   'done'                        => '',
   'down'                        => '',
   'dunning_list'                => '',
+  'eBayImporter'                => '',
   'eMail Send?'                 => '',
   'eMail?'                      => '',
   'ea'                          => '',
   'emailed to'                  => '',
   'empty'                       => '',
+  'every third month'           => '',
   'every time'                  => '',
   'executed'                    => '',
+  'failed'                      => '',
   'female'                      => '',
   'follow_up_list'              => '',
   'for'                         => '',
   'for Period'                  => '',
+  'for date'                    => '',
   'found'                       => '',
   'from (time)'                 => '',
   'general_ledger_list'         => '',
+  'h'                           => '',
   'history'                     => '',
   'history search engine'       => '',
   'inactive'                    => '',
@@ -2333,18 +2617,21 @@ $self->{texts} = {
   'kivitendo'                   => '',
   'kivitendo Homepage'          => '',
   'kivitendo can fix these problems automatically.' => '',
-  'kivitendo has been switched to group-based access restrictions.' => '',
+  'kivitendo has been extended to handle multiple clients within a single installation.' => '',
   'kivitendo has found one or more problems in the general ledger.' => '',
   'kivitendo is about to update the database [ #1 ].' => '',
   'kivitendo is now able to manage warehouses instead of just tracking the amount of goods in your system.' => '',
-  'Knowledge'                   => '',
+  'kivitendo needs to update the authentication database before you can proceed.' => '',
+  'kivitendo v#1'               => '',
+  'kivitendo v#1 administration' => '',
+  'kivitendo website (external)' => '',
+  'kivitendo will then update the database automatically.' => '',
   'lead deleted!'               => '',
   'lead saved!'                 => '',
   'list'                        => '',
   'list_of_payments'            => '',
   'list_of_receipts'            => '',
   'list_of_transactions'        => '',
-  'loading'                     => '',
   'logout'                      => '',
   'male'                        => '',
   'mark as paid'                => '',
@@ -2361,17 +2648,22 @@ $self->{texts} = {
   'not configured'              => '',
   'not delivered'               => '',
   'not executed'                => '',
-  'not logged in'               => '',
+  'not running'                 => '',
+  'not set'                     => '',
+  'not shipped'                 => '',
   'not transferred in yet'      => '',
   'not transferred out yet'     => '',
   'not yet executed'            => '',
   'number'                      => '',
   'oe.pl::search called with unknown type' => '',
   'on the same day'             => '',
+  'one-time execution'          => '',
   'only OB Transactions'        => '',
   'open'                        => '',
   'order'                       => '',
   'our vendor number at customer' => '',
+  'parsing csv'                 => '',
+  'part'                        => '',
   'part_list'                   => '',
   'percental'                   => '',
   'periodic'                    => '',
@@ -2386,21 +2678,21 @@ $self->{texts} = {
   'prev'                        => '',
   'print'                       => '',
   'proforma'                    => '',
-  'project_list'                => '',
   'purchase_delivery_order_list' => '',
   'purchase_order'              => '',
   'purchase_order_list'         => '',
   'quarter'                     => '',
-  'quarterly'                   => '',
   'quotation_list'              => '',
   'release_material'            => '',
   'reorder item'                => '',
+  'repeated execution'          => '',
   'report_generator_dispatch_to is not defined.' => '',
   'report_generator_nextsub is not defined.' => '',
   'request_quotation'           => '',
   'reset'                       => '',
   'return_material'             => '',
   'rfq_list'                    => '',
+  'running'                     => '',
   'sales tax identification number' => '',
   'sales_delivery_order_list'   => '',
   'sales_order'                 => '',
@@ -2408,19 +2700,25 @@ $self->{texts} = {
   'sales_quotation'             => '',
   'saved'                       => '',
   'saved!'                      => '',
+  'saving data'                 => '',
   'sent'                        => '',
   'sent to printer'             => '',
+  'service'                     => '',
   'service_list'                => '',
   'shipped'                     => '',
   'singular first char'         => '',
   'soldtotal'                   => '',
   'stock'                       => '',
   'submit'                      => '',
+  'succeeded'                   => '',
   'tax_chartaccno'              => '',
   'tax_percent'                 => '',
   'tax_rate'                    => '',
   'tax_taxdescription'          => '',
   'tax_taxkey'                  => '',
+  'taxincluded checked'         => '',
+  'taxkey 0 is already allocated.' => '',
+  'taxkey 0 with taxrate 0 was created.' => '',
   'taxnumber'                   => '',
   'terminated'                  => '',
   'to (date)'                   => '',
@@ -2429,8 +2727,10 @@ $self->{texts} = {
   'transferred in'              => '',
   'transferred out'             => '',
   'trial_balance'               => '',
+  'unconfigured'                => '',
   'up'                          => '',
   'use program settings'        => '',
+  'use user config'             => '',
   'used'                        => '',
   'valid from'                  => '',
   'vendor'                      => '',
@@ -2441,6 +2741,7 @@ $self->{texts} = {
   'wrongformat'                 => '',
   'yearly'                      => '',
   'yes'                         => '',
+  'you can find professional help.' => '',
 };
 
 1;
index b0bff61..8de2f0c 100644 (file)
@@ -165,10 +165,15 @@ module=dn.pl
 action=search
 
 [AR--Reports--Delivery Plan]
-ACCESS=sales_order_edit
+ACCESS=delivery_plan
 module=controller.pl
 action=DeliveryPlan/list
 
+[AR--Reports--Financial Controlling]
+ACCESS=sales_order_edit
+module=controller.pl
+action=FinancialControllingReport/list
+
 [AP]
 
 [AP--Add RFQ]
@@ -414,6 +419,11 @@ module=rp.pl
 action=report
 report=projects
 
+[Reports--Financial Overview]
+ACCESS=report
+module=controller.pl
+action=FinancialOverview/list
+
 
 [Batch Printing]
 ACCESS=batch_printing
@@ -571,6 +581,10 @@ action=Business/list
 module=am.pl
 action=list_lead
 
+[System--Project Types]
+module=controller.pl
+action=ProjectType/list
+
 [System--Languages and translations]
 module=menu.pl
 action=acc_menu
@@ -597,6 +611,10 @@ action=edit_sepa_strings
 module=controller.pl
 action=PaymentTerm/list
 
+[System--Delivery Terms]
+module=controller.pl
+action=DeliveryTerm/list
+
 [System--Manage Custom Variables]
 module=controller.pl
 action=CustomVariableConfig/list
@@ -636,6 +654,11 @@ module=controller.pl
 action=CsvImport/new
 profile.type=projects
 
+[System--Import CSV--Orders]
+module=controller.pl
+action=CsvImport/new
+profile.type=orders
+
 [System--Templates]
 ACCESS=admin
 module=menu.pl
index 113344d..81bf5d3 100644 (file)
@@ -596,7 +596,7 @@ sub table {
         if ($remaining_header_rows) {
           $remaining_header_rows--;
         } else {
-          $row_cnt++;
+          $row_cnt++ unless $do_leftovers;
         }
       }# End of while(scalar(@{$data}) and $cur_y-$row_h > $bot_marg)
 
index e6a47d9..f025340 100755 (executable)
@@ -81,7 +81,12 @@ for (@gd_images) {
 
   for (@gd_images) {
     my $name = fileparse($_->{filename}, ".png");
-    $name =~ s/ /-/g;
+
+    # the full grammar for valid css class names is completely bonkers (to put it mildly).
+    # so instead of trying to punch filenames into those class names, we'll
+    # just reduce them to a nice minimal set of lower case /[a-z0-9_-]*/
+    $name = lc $name;
+    $name =~ s/[^a-z0-9_-]/-/g;
     print $file ".$class_for_map.$name { background-position: -$_->{h_offset}px 0px; }\n";
   }
 }
index 6f76e3f..6a65ec5 100755 (executable)
@@ -4,6 +4,7 @@ use strict;
 use Getopt::Long;
 use Pod::Usage;
 use Term::ANSIColor;
+use Text::Wrap;
 our $master_templates;
 BEGIN {
   unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML).
@@ -21,9 +22,10 @@ unless (eval { require Config::Std; 1 }){
   Debian: you may install the needed *.deb package with:
     apt-get install libconfig-std-perl
 
-  RPM: There is a rpm package "perl-Config-Std"
+  Red Hat/Fedora/CentOS: you may install the needed *.rpm package with:
+    yum install perl-Config-Std
 
-  Suse: you may install the needed *.rpm package with:
+  SUSE: you may install the needed *.rpm package with:
     zypper install perl-Config-Std
 
 +------------------------------------------------------------------------------+
@@ -35,7 +37,7 @@ EOL
 use SL::InstallationCheck;
 use SL::LxOfficeConf;
 
-
+my @missing_modules;
 my %check;
 Getopt::Long::Configure ("bundling");
 GetOptions(
@@ -47,6 +49,14 @@ GetOptions(
   "r|required!" => \ $check{r},
   "h|help"      => sub { pod2usage(-verbose => 2) },
   "c|color!"    => \ ( my $c = 1 ),
+  "i|install-command!"  => \ my $apt,
+);
+
+my %install_methods = (
+  apt    => { key => 'debian', install => 'sudo apt-get install', system => "Debian, Ubuntu" },
+  yum    => { key => 'fedora', install => 'sudo yum install',     system => "RHEL, Fedora, CentOS" },
+  zypper => { key => 'suse',   install => 'sudo zypper install',  system => "SLES, openSUSE" },
+  cpan   => { key => 'name',   install => "sudo cpan",            system => "CPAN" },
 );
 
 # if nothing is requested check "required"
@@ -77,7 +87,6 @@ if (!SL::LxOfficeConf->read(undef, 'may fail')) {
 if ($check{r}) {
   print_header('Checking Required Modules');
   check_module($_, required => 1) for @SL::InstallationCheck::required_modules;
-  print_header('Standard check for required modules done. See additional parameters for more checks (--help)') if $default_run;
 }
 if ($check{o}) {
   print_header('Checking Optional Modules');
@@ -91,6 +100,42 @@ if ($check{l}) {
   check_latex();
 }
 
+my $fail = @missing_modules;
+print_header('Result');
+print_line('All', $fail ? 'NOT ok' : 'OK', $fail ? 'red' : 'green');
+
+if ($default_run) {
+  if (@missing_modules) {
+    $apt = 1;
+  print <<"EOL";
+
+HEY! It seems there are modules MISSING! Look for the red lines with "NOT ok"
+above. You'll want to fix those, I've enabled --install-command for you...
+EOL
+  } else {
+  print <<"EOL";
+
+Standard check done, everything is OK and up to date. Have a look at the --help
+section of this script to see some more advanced checks for developer and
+optional dependancies, as well as LaTeX packages you might need.
+EOL
+  }
+}
+
+if (@missing_modules && $apt) {
+  print "\nHere are some sample installation lines, choose one appropriate for your system:\n\n";
+  local $Text::Wrap::separator = " \\\n";
+
+  for (keys %install_methods) {
+    my $method = $install_methods{$_};
+    if (my @install_candidates = grep $_, map { $_->{$method->{key}} } @missing_modules) {
+      print "$method->{system}:\n";
+      print wrap("  ", "    ",  $method->{install}, @install_candidates);
+      print $/;
+    }
+  }
+}
+
 sub check_latex {
   my ($res) = check_kpsewhich();
   print_result("Looking for LaTeX kpsewhich", $res);
@@ -167,6 +212,8 @@ sub check_module {
 
   return if $res;
 
+  push @missing_modules, $module;
+
   my $needed_text =
       $role{optional} ? 'It is OPTIONAL for kivitendo but RECOMMENDED for improved functionality.'
     : $role{required} ? 'It is NEEDED by kivitendo and must be installed.'
@@ -192,20 +239,17 @@ EOL
 sub module_source_texts {
   my ($module) = @_;
   my @texts;
-  push @texts, <<EOL;
-  - You can get it from CPAN:
-      perl -MCPAN -e "install $module->{name}"
+  for my $key (keys %install_methods) {
+    my $method = $install_methods{$key};
+    push @texts, <<"EOL" if $module->{$method->{key}};
+  - Using $method->{system} you can install it with $key:
+      $method->{install} $module->{$method->{key}}
 EOL
+  }
   push @texts, <<EOL if $module->{url};
   - You can download it from this URL and install it manually:
       $module->{url}
 EOL
-  push @texts, <<EOL if $module->{debian};
-  - On Debian, Ubuntu and other distros you can install it with apt-get:
-      sudo apt-get install $module->{debian}
-    Note: These may be out of date as well if your system is old.
-EOL
- # TODO: SuSE and Fedora packaging. Windows packaging.
 
   return @texts;
 }
@@ -312,6 +356,12 @@ Don't probe for LaTeX document classes and packages in master templates. (Useful
 
 Print additional info for missing dependancies
 
+=item C<-i, --install-command>
+
+Tries to generate installation commands for the most common package managers.
+Note that these lists can be slightly off, but it should still save you a lot
+of typing.
+
 =back
 
 =head1 BUGS, CAVEATS and TODO
index 7149531..cd5fe41 100755 (executable)
@@ -9,6 +9,11 @@
 use utf8;
 use strict;
 
+BEGIN {
+  unshift(@INC, 'modules/override'); # Use our own versions of various modules (e.g. YAML).
+  push   (@INC, 'modules/fallback'); # Only use our own versions of modules if there's no system version.
+}
+
 use Carp;
 use Cwd;
 use Data::Dumper;
index 09f4961..de7df3b 100755 (executable)
@@ -53,6 +53,7 @@ our %foreign_key_name_map = (
   orderitems           => { parts => 'part', trans => 'order', },
   delivery_order_items => { parts => 'part' },
   invoice              => { parts => 'part' },
+  follow_ups           => { 'employee_obj' => 'created_for' },
 
   periodic_invoices_configs => { oe => 'order' },
 );
@@ -331,20 +332,20 @@ rose_auto_create_model - mana Rose::DB::Object classes for kivitendo
 
 =head1 SYNOPSIS
 
-  scripts/rose_create_model.pl --client name-or-id table1 [table2 ...]
-  scripts/rose_create_model.pl --client name-or-id [--all|-a]
+  scripts/rose_auto_create_model.pl --client name-or-id table1 [table2 ...]
+  scripts/rose_auto_create_model.pl --client name-or-id [--all|-a]
 
   # updates all models
-  scripts/rose_create_model.pl --client name-or-id --all
+  scripts/rose_auto_create_model.pl --client name-or-id --all
 
   # updates only customer table, login taken from config
-  scripts/rose_create_model.pl customer
+  scripts/rose_auto_create_model.pl customer
 
   # updates only parts table, package will be Part
-  scripts/rose_create_model.pl parts=Part
+  scripts/rose_auto_create_model.pl parts=Part
 
   # try to update parts, but don't do it. tell what would happen in detail
-  scripts/rose_create_model.pl --no-commit parts
+  scripts/rose_auto_create_model.pl --no-commit parts
 
 =head1 DESCRIPTION
 
diff --git a/sql/Austria-chart.sql b/sql/Austria-chart.sql
deleted file mode 100644 (file)
index 255d866..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
--- Kontoplan für Österreich
--- Ferdinand Gassauer, Tue, 5 Feb 2002
--- checked and completed, Thu, 7 Feb 2002, Dieter Simader
---
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0000','AUFWENDUNGEN FÜR INGANGSETZEN UND ERWEITERN DES BETRIEBES','H','00','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0010','Firmenwert','A','015','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0100','IMMATERIELLE VERMÖGENSGEGENSTÄNDE','H','01','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0110','Rechte','A','011','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0200','GRUNDSTÜCKE','H','02-03','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0210','unbebaute Grundstücke','A','020','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0220','bebaute Grundstücke','A','021','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0229','kum. Abschreibung bebaute Grundstücke','A','039','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0400','MASCHINEN','H','04-05','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0410','Maschinen','A','041','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0419','kum. Abschreibung Maschinen','A','069','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0500','FAHRZEUGE','H','06','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0510','Fahrzeuge','A','063','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0519','kum. Abschreibung Fahrzeuge','A','069','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0600','BETRIEBS- UND GESCHÄFTSAUSSTATTUNG','H','06','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0620','Büroeinrichtungen','A','066','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0625','kum. Abschreibung Betriebs- und Geschäftsausstattung','A','069','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0700','GELEISTETE ANZAHLUNGEN','H','07','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0800','FINANZANLAGEN','H','08-09','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0810','Beteiligungen','A','081','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0820','Wertpapiere','A','080','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1100','ROHSTOFFE','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1120','Vorräte - Rohstoffe','A','110-119','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','BEZOGENE TEILE','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1220','Vorräte - bezogene Teile','A','120-129','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1300','HILFS- UND BETRIEBSSTOFFE','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1320','Hilfsstoffe','A','130-134','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1350','Betriebssstoffe','A','135-139','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1400','UNFERTIGE ERZEUGNISSE','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1420','Vorräte - unfertige Erzeugnisse','A','140-149','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','FERTIGE ERZEUGNISSE','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1520','Vorräte - Hardware','A','150-159','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1530','Vorräte - Software','A','150-159','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1540','Vorräte - Ersatzteile','A','150-159','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1600','WAREN','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1700','NOCH NICHT ABGERECHNETE LEISTUNGEN','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','GELEISTETE ANZAHLUNGEN','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1900','WERTBERICHTIGUNGEN','H','1','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','FORDEUNGEN AUS LIEFERUNGEN UND LEISTUNGEN','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2010','Forderungen Lieferung & Leistung','A','200-207','A','AR');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2019','Wertberichtigung uneinbringliche Forderungen','A','20-21','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2300','SONSTIGE FORDERUNGEN','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2320','sonstige Forderungen','A','23-24','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2500','FORDERUNGEN AUS ABGABENVERRECHNUNG','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2520','sonstige Forderungen aus Abgebenverrechnung','A','25','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','WERTPAPIERE UND ANTEILE','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','Wertpapiere Umlaufvermögen','A','26','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2700','KASSABESTAND','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2701','Kassa','A','27-28','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2800','SCHECKS, GUTHABEN BEI KREDITINSTITUTEN','H','2','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2810','Schecks','A','27-28','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2820','Bankguthaben','A','280-288','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3100','LANGFRISTIGE VERBINDLICHKEITEN','H','3','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3110','Bank Verbindlichkeiten','A','31','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3120','Kredite von Eigentümern','A','310','L','AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','VERBINDLICHKEITEN AUS LIEFERUNGEN UND LEISTUNGEN','H','33','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3310','Verbindlichkeiten aus Lieferungen und Leistungen','A','330-335','L','AP');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','VERBINDLICHKEITEN FINANZAMT','H','35','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3510','Finanzamt Verrechnung Körperschaftssteuer','A','350-359','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3520','Finanzamt Verrechnung Umsatzsteuer','A','350-359','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3530','Mehrwertsteuer 0%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3531','Mehrwertsteuer 10%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3532','Mehrwertsteuer 20%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3540','Vorsteuer 0%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3541','Vorsteuer 10%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3542','Vorsteuer 20%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','UMSATZ','H','4','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4020','Verkauf - Hardware','A','40-44','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4030','Verkauf - Software ','A','40-44','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4040','Verkauf - Ersatzteile','A','40-44','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4300','UMSATZ BERATUNG','H','4','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4320','Erlöse Beratung','A','40-44','I','AR_amount:IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4330','Erlöse Programmierung','A','40-44','I','AR_amount:IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4600','SONSTIGE ERLÖSE','H','4','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4630','Frachterlöse','A','46-49','I','IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','WARENEINSATZ','H','5','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5020','Wareneinsatz / Hardware','A','500-509','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5030','Wareneinsatz / Software','A','500-509','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5040','Wareneinsatz / Ersatzteile','A','520-529','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','VERBRAUCH BRENN- UND TREIBSTOFFEN, ENERGIE UND WASSER','H','5','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','Energie, Wasser','A','560-569','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6000','LOHNAUFWAND','H','6','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6010','Lohn ','A','600-619','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6200','GEAHLTSAUFWAND','H','6','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6210','Gehalt ','A','620-639','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6500','GESETZLICHER SOZIALAUFWAND','H','6','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6510','Dienstgeberanteile','A','645-649','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6700','FREIWILLIGER SOZIALAUFWAND','H','6','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6710','freiwilliger Sozialaufwand','A','660-665','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7000','ABSCHREIBUNGEN','H','7','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7010','Abschreibungen','A','700','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7020','geringwertige Wirtschaftsgüter','A','701-708','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7100','SONSTIGE STEUERN','H','71','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7110','Ertragssteuern','A','710-719','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7120','Grundsteuern','A','710-719','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7200','INSTANDHALTUNGSAUFWAND','H','7','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7210','Reparatur und Instandhaltung','A','720-729','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7300','TRANSPORTKOSTEN','H','73','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7310','Frachtaufwand','A','730-731','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7400','MIET-,PACHT-,LEASING-, LIZENZAUFWAND','H','74','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7410','Miete','A','740-743','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7411','Lizenzen','A','748-749','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7600','VERWALTUNGSKOSTEN','H','76','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7610','Beratungsaufwand','A','775-776','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7611','Büromaterialien','A','760','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7615','Werbung und Marketing','A','765-768','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7620','uneinbringliche Forderungen','A','799','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7630','Telephonkosten','A','738-739','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7631','Internetkosten','A','738-739','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7632','Reise- und Repräsentationsaufwand','A','734-735','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7634','Registrierungsgebühren','A','748-749','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7700','VERSICHERUNGEN','H','77-78','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7710','Versicherung','A','770-774','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8000','FINANZERTRÄGE UND FINANZAUFWENDUNGEN','H','8','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8020','Bankzinsen und Gebühren','A','80-83','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8100','BETEILIGUNGSERTRÄGE','H','8','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8110','Erträge aus Beteiligungen','A','800-804','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9000','KAPITAL','H','9','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9010','Aktien, Geschäftsanteile','A','900-918','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9020','nicht einbezahltes Kapital','A','919','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9200','KAPITALRÜCKLAGEN','H','9','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9210','freie Rücklage','A','920-929','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9300','GEWINN','H','939','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9310','Gewinnvortrag Vorjahr','A','980','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9320','Jahresgewinn','A','985','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9400','RÜCKSTELLUNGEN','H','3','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9420','Abfertigungsrückstellung','A','300','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9430','Urlaubsrückstellung','A','304-309','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9700','EINLAGEN STILLER GESELLSCHAFTER','H','9','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9800','EB,SB,G+V KONTEN','H','9','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4640','Devisengewinne','A','80-83','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8050','Devisenverluste','A','80-83','E','');
---
-insert into tax (chart_id,rate) values ((select id from chart where accno = '3530'),0.00);
-insert into tax (chart_id,rate) values ((select id from chart where accno = '3531'),0.10);
-insert into tax (chart_id,rate) values ((select id from chart where accno = '3532'),0.20);
---
-update defaults set inventory_accno_id = (select id from chart where accno = '1520'), income_accno_id = (select id from chart where accno = '4020'), expense_accno_id = (select id from chart where accno = '7610'), fxgain_accno_id = (select id from chart where accno = '4640'), fxloss_accno_id = (select id from chart where accno = '8050'), invnumber = '1000', sonumber = '1000', ponumber = '1000', curr = 'EUR:USD', weightunit = 'kg';
---
index 9af9e2c..80833c1 100644 (file)
@@ -386,8 +386,8 @@ INSERT INTO tax                                                     VALUES ((SEL
 INSERT INTO tax                                                     VALUES ((SELECT id FROM chart WHERE accno = '1401'),'0.07','1401','8','Vorsteuer');
 INSERT INTO tax                                                     VALUES ((SELECT id FROM chart WHERE accno = '1405'),'0.16','1405','7','Vorsteuer');
 INSERT INTO tax (chart_id, rate, taxnumber, taxkey, taxdescription) VALUES ((SELECT id FROM CHART WHERE accno='1406'), 0.19, '1406', 9, 'Vorsteuer');
-INSERT INTO tax (taxkey, taxdescription)                            VALUES ('10','Im anderen EG-Staat steuerpfl. Lieferung');
-INSERT INTO tax (taxkey, taxdescription)                            VALUES ('11','Steuerfreie EG-Lief. an Abn. mit UStIdNr');
+INSERT INTO tax (rate, taxkey, taxdescription)                      VALUES (0, '10','Im anderen EG-Staat steuerpfl. Lieferung');
+INSERT INTO tax (rate, taxkey, taxdescription)                      VALUES (0, '11','Steuerfreie EG-Lief. an Abn. mit UStIdNr');
 INSERT INTO tax (chart_id, rate,taxnumber, taxkey, taxdescription)  VALUES ((SELECT id FROM chart WHERE accno = '3802'),'0.07','3802','12','Steuerpflicht. EG-Lieferungen');
 INSERT INTO tax (chart_id,rate,taxnumber, taxkey, taxdescription)   VALUES ((SELECT id FROM chart WHERE accno = '3804'),'0.19','3804','13','Steuerpflicht. EG-Lieferungen%');
 INSERT INTO tax (chart_id,rate,taxnumber, taxkey, taxdescription)   VALUES ((SELECT id FROM chart WHERE accno = '3803'),'0.16','3803','15','Steuerpflicht. EG-Lieferungen%');
diff --git a/sql/Pg-upgrade2-auth/delivery_plan_rights.pl b/sql/Pg-upgrade2-auth/delivery_plan_rights.pl
new file mode 100644 (file)
index 0000000..3d58ee5
--- /dev/null
@@ -0,0 +1,26 @@
+# @tag: delivery_plan_rights
+# @description: Setzt das neue Recht den Lieferplan anzuzeigen
+# @depends: release_3_0_0
+package SL::DBUpgrade2::delivery_plan_rights;
+
+use strict;
+use utf8;
+
+use parent qw(SL::DBUpgrade2::Base);
+
+use SL::DBUtils;
+
+sub run {
+  my ($self) = @_;
+
+  my $groups = $main::auth->read_groups();
+
+  foreach my $group (values %{$groups}) {
+    $group->{rights}->{delivery_plan} = $group->{rights}->{sales_order_edit};
+    $main::auth->save_group($group);
+  }
+
+  return 1;
+} # end run
+
+1;
diff --git a/sql/Pg-upgrade2/add_customer_mandator_id.sql b/sql/Pg-upgrade2/add_customer_mandator_id.sql
new file mode 100644 (file)
index 0000000..99a788e
--- /dev/null
@@ -0,0 +1,18 @@
+-- @tag: add_customer_mandator_id
+-- @description: Einführen einer Mandanten-ID- und Signatur-Datums-Spalte bei Kunden.
+-- @depends: release_3_0_0
+
+ALTER TABLE customer          ADD COLUMN mandator_id                  text;
+ALTER TABLE customer          ADD COLUMN mandate_date_of_signature    date;
+ALTER TABLE sepa_export_items ADD COLUMN vc_mandator_id               text;
+ALTER TABLE sepa_export_items ADD COLUMN vc_mandate_date_of_signature date;
+
+UPDATE sepa_export_items
+SET vc_mandator_id = (
+  SELECT c.customernumber
+  FROM ar
+  LEFT JOIN customer c ON (ar.customer_id = c.id)
+  WHERE ar.id = sepa_export_items.ar_id
+),
+vc_mandate_date_of_signature = '2010-01-01'::date
+WHERE ar_id IS NOT NULL;
diff --git a/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql b/sql/Pg-upgrade2/add_depositor_for_customer_vendor.sql
new file mode 100644 (file)
index 0000000..cba51d7
--- /dev/null
@@ -0,0 +1,11 @@
+-- @tag: add_depositor_for_customer_vendor
+-- @description: Einführen einer Depositor (Kontoinhaber) Spalte bei Customer bzw. Vendor
+-- @depends: sepa
+
+ALTER TABLE customer          ADD depositor     text;
+ALTER TABLE vendor            ADD depositor     text;
+ALTER TABLE sepa_export_items ADD our_depositor text;
+ALTER TABLE sepa_export_items ADD vc_depositor  text;
+
+UPDATE customer SET depositor = name;
+UPDATE vendor   SET depositor = name;
diff --git a/sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql b/sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql
new file mode 100644 (file)
index 0000000..b68b668
--- /dev/null
@@ -0,0 +1,8 @@
+-- @tag: csv_import_reports_add_numheaders
+-- @description: Anzahl der Header-Zeilen in Csv Import Report speichern
+-- @depends: csv_import_report_cache
+-- @encoding: utf-8
+
+ALTER TABLE csv_import_reports ADD COLUMN numheaders INTEGER;
+UPDATE csv_import_reports SET numheaders = 1;
+ALTER TABLE csv_import_reports ALTER COLUMN numheaders SET NOT NULL;
diff --git a/sql/Pg-upgrade2/custom_variables_delete_via_trigger.pl b/sql/Pg-upgrade2/custom_variables_delete_via_trigger.pl
new file mode 100644 (file)
index 0000000..7eda9de
--- /dev/null
@@ -0,0 +1,70 @@
+# @tag: custom_variables_delete_via_trigger
+# @description: Benutzerdefinierte Variablen werden nun via Trigger gelöscht.
+# @depends: custom_variable_configs_column_type_text custom_variables custom_variables_indices custom_variables_indices_2 custom_variables_parts_services_assemblies custom_variables_sub_module_not_null custom_variables_valid
+
+package SL::DBUpgrade2::custom_variables_delete_via_trigger;
+
+use utf8;
+use strict;
+
+use parent qw(SL::DBUpgrade2::Base);
+
+sub run {
+  my ($self) = @_;
+
+  my @queries = (
+    #Delete orphaned entries
+    q|DELETE FROM custom_variables WHERE sub_module = 'orderitems' AND trans_id NOT IN (SELECT id FROM orderitems)|,
+    q|DELETE FROM custom_variables WHERE sub_module = 'delivery_order_items' AND trans_id NOT IN (SELECT id FROM delivery_order_items)|,
+    q|DELETE FROM custom_variables WHERE sub_module = 'invoice' AND trans_id NOT IN (SELECT id FROM invoice)|,
+
+    #Create trigger
+    q|CREATE OR REPLACE FUNCTION orderitems_before_delete_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE sub_module = 'orderitems' AND trans_id = OLD.id;
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_orderitems_dependencies ON orderitems|,
+
+    q|CREATE TRIGGER delete_orderitems_dependencies
+      BEFORE DELETE ON orderitems
+      FOR EACH ROW EXECUTE PROCEDURE orderitems_before_delete_trigger()|,
+
+    q|CREATE OR REPLACE FUNCTION delivery_order_items_before_delete_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE sub_module = 'delivery_order_items' AND trans_id = OLD.id;
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_delivery_order_items_dependencies ON delivery_order_items|,
+
+    q|CREATE TRIGGER delete_delivery_order_items_dependencies
+      BEFORE DELETE ON delivery_order_items
+      FOR EACH ROW EXECUTE PROCEDURE delivery_order_items_before_delete_trigger()|,
+
+    q|CREATE OR REPLACE FUNCTION invoice_before_delete_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE sub_module = 'invoice' AND trans_id = OLD.id;
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_invoice_dependencies ON invoice|,
+
+    q|CREATE TRIGGER delete_invoice_dependencies
+      BEFORE DELETE ON invoice
+      FOR EACH ROW EXECUTE PROCEDURE invoice_before_delete_trigger()|
+    );
+
+  $self->db_query($_) for @queries;
+
+  return 1;
+}
+
+1;
diff --git a/sql/Pg-upgrade2/custom_variables_delete_via_trigger_2.pl b/sql/Pg-upgrade2/custom_variables_delete_via_trigger_2.pl
new file mode 100644 (file)
index 0000000..d97493d
--- /dev/null
@@ -0,0 +1,109 @@
+# @tag: custom_variables_delete_via_trigger_2
+# @description: Benutzerdefinierte Variablen werden nun via Trigger gelöscht (beim Löschen von Kunden, Lieferanten, Kontaktpersonen, Waren, Dienstleistungen, Erzeugnissen und Projekten).
+# @depends: custom_variables_delete_via_trigger
+
+package SL::DBUpgrade2::custom_variables_delete_via_trigger_2;
+
+use utf8;
+use strict;
+
+use parent qw(SL::DBUpgrade2::Base);
+
+sub run {
+  my ($self) = @_;
+
+  my @queries = (
+    #Delete orphaned entries
+    q|DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id NOT IN (SELECT id FROM customer UNION SELECT id FROM vendor)
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'CT'|,
+    q|DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id NOT IN (SELECT id FROM contacts)
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'Contacts'|,
+    q|DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id NOT IN (SELECT id FROM parts)
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'IC'|,
+    q|DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id NOT IN (SELECT id FROM project)
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'Projects'|,
+
+    #Create trigger
+    q|CREATE OR REPLACE FUNCTION delete_cv_custom_variables_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id = OLD.id
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'CT';
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_cv_custom_variables ON customer|,
+    q|DROP TRIGGER IF EXISTS delete_cv_custom_variables ON vendor|,
+
+    q|CREATE TRIGGER delete_cv_custom_variables
+      BEFORE DELETE ON customer
+      FOR EACH ROW EXECUTE PROCEDURE delete_cv_custom_variables_trigger()|,
+    q|CREATE TRIGGER delete_cv_custom_variables
+      BEFORE DELETE ON vendor
+      FOR EACH ROW EXECUTE PROCEDURE delete_cv_custom_variables_trigger()|,
+
+    #Create trigger
+    q|CREATE OR REPLACE FUNCTION delete_contact_custom_variables_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id = OLD.cp_id
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'Contacts';
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_contact_custom_variables ON contacts|,
+
+    q|CREATE TRIGGER delete_contact_custom_variables
+      BEFORE DELETE ON contacts
+      FOR EACH ROW EXECUTE PROCEDURE delete_contact_custom_variables_trigger()|,
+
+    #Create trigger
+    q|CREATE OR REPLACE FUNCTION delete_part_custom_variables_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id = OLD.id
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'IC';
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_part_custom_variables ON parts|,
+
+    q|CREATE TRIGGER delete_part_custom_variables
+      BEFORE DELETE ON parts
+      FOR EACH ROW EXECUTE PROCEDURE delete_part_custom_variables_trigger()|,
+
+    #Create trigger
+    q|CREATE OR REPLACE FUNCTION delete_project_custom_variables_trigger() RETURNS trigger AS $$
+        BEGIN
+          DELETE FROM custom_variables WHERE (sub_module = '' OR sub_module IS NULL)
+                                         AND trans_id = OLD.id
+                                         AND (SELECT module FROM custom_variable_configs WHERE id = config_id) = 'Projects';
+
+          RETURN OLD;
+        END;
+      $$ LANGUAGE plpgsql|,
+
+    q|DROP TRIGGER IF EXISTS delete_project_custom_variables ON project|,
+
+    q|CREATE TRIGGER delete_project_custom_variables
+      BEFORE DELETE ON project
+      FOR EACH ROW EXECUTE PROCEDURE delete_project_custom_variables_trigger()|,
+
+    );
+
+  $self->db_query($_) for @queries;
+
+  return 1;
+}
+
+1;
diff --git a/sql/Pg-upgrade2/defaults_feature2.pl b/sql/Pg-upgrade2/defaults_feature2.pl
new file mode 100644 (file)
index 0000000..3abcf46
--- /dev/null
@@ -0,0 +1,20 @@
+# @tag: defaults_feature2
+# @description: Normalisieren von vc-Namen, als auch part.notes und part.descriptions als Feature konfigurierbar machen
+# @depends: release_3_0_0
+package SL::DBUpgrade2::defaults_feature2;
+
+use utf8;
+
+use parent qw(SL::DBUpgrade2::Base);
+use strict;
+
+sub run {
+  my ($self) = @_;
+
+  # this query will fail if column already exist (new database)
+  $self->db_query(qq|ALTER TABLE defaults ADD COLUMN normalize_vc_names  boolean DEFAULT true|);
+  $self->db_query(qq|ALTER TABLE defaults ADD COLUMN normalize_part_descriptions  boolean DEFAULT true|);
+  return 1;
+}
+
+1;
diff --git a/sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed.sql b/sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed.sql
new file mode 100644 (file)
index 0000000..f2963f5
--- /dev/null
@@ -0,0 +1,108 @@
+-- @tag: delete_close_follow_ups_when_order_is_deleted_closed
+-- @description: Wiedervorlagen löschen/schließen, wenn dazugehörige Belege gelöscht/geschlossen werden
+-- @depends: delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion
+
+ALTER TABLE follow_up_links ADD CONSTRAINT follow_up_links_follow_up_id_fkey FOREIGN KEY (follow_up_id) REFERENCES follow_ups (id) ON DELETE CASCADE;
+
+CREATE OR REPLACE FUNCTION follow_up_delete_notes_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM notes
+    WHERE (trans_id     = OLD.id)
+      AND (trans_module = 'fu');
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION follow_up_delete_when_oe_is_deleted_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM follow_ups
+    WHERE id IN (
+      SELECT follow_up_id
+      FROM follow_up_links
+      WHERE (trans_id   = OLD.id)
+        AND (trans_type IN ('sales_quotation',   'sales_order',    'sales_delivery_order',    'sales_invoice',
+                            'request_quotation', 'purchase_order', 'purchase_delivery_order', 'purchase_invoice'))
+    );
+
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION follow_up_delete_when_customer_vendor_is_deleted_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM follow_ups
+    WHERE id IN (
+      SELECT follow_up_id
+      FROM follow_up_links
+      WHERE (trans_id   = OLD.id)
+        AND (trans_type IN ('customer', 'vendor'))
+    );
+
+    DELETE FROM notes
+    WHERE (trans_id     = OLD.id)
+      AND (trans_module = 'ct');
+
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+-- ============================================================
+
+DROP TRIGGER IF EXISTS follow_up_delete_notes ON follow_ups;
+
+CREATE TRIGGER follow_up_delete_notes
+AFTER DELETE ON follow_ups
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_delete_notes_trigger();
+
+DROP TRIGGER IF EXISTS oe_before_delete_clear_follow_ups ON oe;
+
+CREATE TRIGGER oe_before_delete_clear_follow_ups
+BEFORE DELETE ON oe
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_delete_when_oe_is_deleted_trigger();
+
+DROP TRIGGER IF EXISTS customer_before_delete_clear_follow_ups ON customer;
+DROP TRIGGER IF EXISTS vendor_before_delete_clear_follow_ups   ON vendor;
+
+CREATE TRIGGER customer_before_delete_clear_follow_ups
+AFTER DELETE ON customer
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_delete_when_customer_vendor_is_deleted_trigger();
+
+CREATE TRIGGER vendor_before_delete_clear_follow_ups
+AFTER DELETE ON vendor
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_delete_when_customer_vendor_is_deleted_trigger();
+
+-- ============================================================
+
+CREATE OR REPLACE FUNCTION follow_up_close_when_oe_closed_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    IF COALESCE(NEW.closed, FALSE) AND NOT COALESCE(OLD.closed, FALSE) THEN
+      UPDATE follow_ups
+      SET done = TRUE
+      WHERE id IN (
+        SELECT follow_up_id
+        FROM follow_up_links
+        WHERE (trans_id   = NEW.id)
+          AND (trans_type IN ('sales_quotation',   'sales_order',    'sales_delivery_order',
+                              'request_quotation', 'purchase_order', 'purchase_delivery_order'))
+      );
+    END IF;
+
+    RETURN NEW;
+  END;
+$$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS oe_on_update_close_follow_up ON oe;
+
+CREATE TRIGGER  oe_on_update_close_follow_up
+AFTER UPDATE ON oe
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_close_when_oe_closed_trigger();
+
+DROP TRIGGER IF EXISTS delivery_orders_on_update_close_follow_up ON delivery_orders;
+
+CREATE TRIGGER  delivery_orders_on_update_close_follow_up
+AFTER UPDATE ON delivery_orders
+FOR EACH ROW  EXECUTE PROCEDURE follow_up_close_when_oe_closed_trigger();
diff --git a/sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion.pl b/sql/Pg-upgrade2/delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion.pl
new file mode 100644 (file)
index 0000000..f3f3c22
--- /dev/null
@@ -0,0 +1,19 @@
+# @tag: delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion
+# @description: Wiedervorlagen löschen/schließen, wenn dazugehörige Belege gelöscht/geschlossen werden Teil 1: Fremdschlüssel löschen
+# @depends: release_3_0_0
+package SL::DBUpgrade2::delete_close_follow_ups_when_order_is_deleted_closed_fkey_deletion;
+
+use strict;
+use utf8;
+
+use parent qw(SL::DBUpgrade2::Base);
+
+sub run {
+  my ($self) = @_;
+
+  $self->drop_constraints(table => "follow_up_links");
+
+  return 1;
+}
+
+1;
diff --git a/sql/Pg-upgrade2/delete_translations_on_delivery_term_delete.sql b/sql/Pg-upgrade2/delete_translations_on_delivery_term_delete.sql
new file mode 100644 (file)
index 0000000..c4a40a9
--- /dev/null
@@ -0,0 +1,24 @@
+-- @tag: delete_translations_on_delivery_term_delete
+-- @description: Übersetzungen löschen, wenn Lieferbedingung gelöscht wird
+-- @depends: delivery_terms
+-- @encoding: utf-8
+
+CREATE OR REPLACE FUNCTION generic_translations_delete_on_delivery_terms_delete_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM generic_translations
+      WHERE translation_id = OLD.id AND translation_type LIKE 'SL::DB::DeliveryTerm/description_long';
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS after_delete_delivery_term_trigger ON delivery_terms;
+
+CREATE TRIGGER after_delete_delivery_term_trigger
+  AFTER DELETE ON delivery_terms
+  FOR EACH ROW EXECUTE PROCEDURE generic_translations_delete_on_delivery_terms_delete_trigger();
+
+-- delete orphaned translations
+DELETE FROM generic_translations
+  WHERE translation_type LIKE 'SL::DB::DeliveryTerm/description_long'
+  AND   translation_id NOT IN (SELECT id FROM delivery_terms);
diff --git a/sql/Pg-upgrade2/delete_translations_on_payment_term_delete.sql b/sql/Pg-upgrade2/delete_translations_on_payment_term_delete.sql
new file mode 100644 (file)
index 0000000..9502452
--- /dev/null
@@ -0,0 +1,24 @@
+-- @tag: delete_translations_on_payment_term_delete
+-- @description: Übersetzungen löschen, wenn Lieferbedingung gelöscht wird
+-- @depends: payment_terms_translation2
+-- @encoding: utf-8
+
+CREATE OR REPLACE FUNCTION generic_translations_delete_on_payment_terms_delete_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM generic_translations
+      WHERE translation_id = OLD.id AND translation_type LIKE 'SL::DB::PaymentTerm/description_long';
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS after_delete_payment_term_trigger ON payment_terms;
+
+CREATE TRIGGER after_delete_payment_term_trigger
+  AFTER DELETE ON payment_terms
+  FOR EACH ROW EXECUTE PROCEDURE generic_translations_delete_on_payment_terms_delete_trigger();
+
+-- delete orphaned translations
+DELETE FROM generic_translations
+  WHERE translation_type LIKE 'SL::DB::PaymentTerm/description_long'
+  AND   translation_id NOT IN (SELECT id FROM payment_terms);
diff --git a/sql/Pg-upgrade2/delete_translations_on_tax_delete.sql b/sql/Pg-upgrade2/delete_translations_on_tax_delete.sql
new file mode 100644 (file)
index 0000000..5243ace
--- /dev/null
@@ -0,0 +1,24 @@
+-- @tag: delete_translations_on_tax_delete
+-- @description: Übersetzungen löschen, wenn Steuer gelöscht wird
+-- @depends: release_3_0_0
+-- @encoding: utf-8
+
+CREATE OR REPLACE FUNCTION generic_translations_delete_on_tax_delete_trigger()
+RETURNS TRIGGER AS $$
+  BEGIN
+    DELETE FROM generic_translations
+      WHERE translation_id = OLD.id AND translation_type LIKE 'SL::DB::Tax/taxdescription';
+    RETURN OLD;
+  END;
+$$ LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS after_delete_tax_trigger ON tax;
+
+CREATE TRIGGER after_delete_tax_trigger
+  AFTER DELETE ON tax
+  FOR EACH ROW EXECUTE PROCEDURE generic_translations_delete_on_tax_delete_trigger();
+
+-- delete orphaned translations
+DELETE FROM generic_translations
+  WHERE translation_type LIKE 'SL::DB::Tax/taxdescription'
+  AND   translation_id NOT IN (SELECT id FROM tax);
diff --git a/sql/Pg-upgrade2/delivery_terms.sql b/sql/Pg-upgrade2/delivery_terms.sql
new file mode 100644 (file)
index 0000000..fa7400c
--- /dev/null
@@ -0,0 +1,39 @@
+-- @tag: delivery_terms
+-- @description: Neue Tabelle und Spalten für Lieferbedingungen
+-- @depends: release_3_0_0
+-- @encoding: utf-8
+
+CREATE TABLE delivery_terms (
+       id                        integer        NOT NULL DEFAULT nextval('id'),
+       description               text,
+       description_long          text,
+       sortkey                   integer        NOT NULL,
+       itime                     timestamp      DEFAULT now(),
+       mtime                     timestamp,
+
+       PRIMARY KEY (id)
+);
+
+CREATE TRIGGER mtime_delivery_terms
+    BEFORE UPDATE ON delivery_terms
+    FOR EACH ROW
+    EXECUTE PROCEDURE set_mtime();
+
+
+ALTER TABLE oe                ADD COLUMN delivery_term_id integer;
+ALTER TABLE oe                ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
+
+ALTER TABLE delivery_orders   ADD COLUMN delivery_term_id integer;
+ALTER TABLE delivery_orders   ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
+
+ALTER TABLE ar                ADD COLUMN delivery_term_id integer;
+ALTER TABLE ar                ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
+
+ALTER TABLE ap                ADD COLUMN delivery_term_id integer;
+ALTER TABLE ap                ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
+
+ALTER TABLE customer          ADD COLUMN delivery_term_id integer;
+ALTER TABLE customer          ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
+
+ALTER TABLE vendor            ADD COLUMN delivery_term_id integer;
+ALTER TABLE vendor            ADD FOREIGN KEY (delivery_term_id) REFERENCES delivery_terms(id);
diff --git a/sql/Pg-upgrade2/employee_drop_columns.sql b/sql/Pg-upgrade2/employee_drop_columns.sql
new file mode 100644 (file)
index 0000000..a87cf05
--- /dev/null
@@ -0,0 +1,16 @@
+-- @tag: employee_drop_columns
+-- @description: Obsolete Felder in employee entfernt und Datenfelder zum Speichern für die Historie der Mitarbeiter (nach Löschen eines Benutzer) hinzugefügt. Aktuell alle Felder die der Benutzer unter persönliche Einstellungen ändern kann
+-- @depends: release_3_0_0
+-- @ignore: 0
+-- @charset: utf-8
+ALTER TABLE employee DROP COLUMN addr1;
+ALTER TABLE employee DROP COLUMN addr2;
+ALTER TABLE employee DROP COLUMN addr3;
+ALTER TABLE employee DROP COLUMN addr4;
+ALTER TABLE employee DROP COLUMN homephone;
+ALTER TABLE employee DROP COLUMN workphone;
+ALTER TABLE employee DROP COLUMN notes;
+ALTER TABLE employee ADD COLUMN deleted_email text;
+ALTER TABLE employee ADD COLUMN deleted_signature text;
+ALTER TABLE employee ADD COLUMN deleted_tel text;
+ALTER TABLE employee ADD COLUMN deleted_fax text;
diff --git a/sql/Pg-upgrade2/fix_datepaid_for_sepa_transfers.sql b/sql/Pg-upgrade2/fix_datepaid_for_sepa_transfers.sql
new file mode 100644 (file)
index 0000000..dd2b06b
--- /dev/null
@@ -0,0 +1,19 @@
+-- @tag: fix_datepaid_for_sepa_transfers
+-- @description: Feld »datepaid« bei via SEPA durchgeführten Transfers richtig setzen
+-- @depends: release_3_0_0
+UPDATE ar
+SET datepaid = (
+  SELECT MAX(acc.transdate)
+  FROM acc_trans acc
+  LEFT JOIN chart c ON (c.id = acc.chart_id)
+  WHERE (acc.trans_id = ar.id)
+    AND (c.link LIKE '%paid%')
+)
+WHERE (ar.amount != 0)
+  AND NOT ar.storno
+  AND ar.id IN (
+    SELECT sei.ar_id
+    FROM sepa_export_items sei
+    WHERE (sei.ar_id IS NOT NULL)
+      AND sei.executed
+  );
diff --git a/sql/Pg-upgrade2/gl_add_employee_foreign_key.sql b/sql/Pg-upgrade2/gl_add_employee_foreign_key.sql
new file mode 100644 (file)
index 0000000..7d96a4d
--- /dev/null
@@ -0,0 +1,5 @@
+-- @tag: gl_add_employee_foreign_key
+-- @description: Dialogbuchungen mit Bearbeiter verknüpfen
+-- @depends: release_3_0_0
+-- @ignore: 0
+ALTER TABLE gl  ADD FOREIGN KEY (employee_id) REFERENCES employee(id);
diff --git a/sql/Pg-upgrade2/project_types.sql b/sql/Pg-upgrade2/project_types.sql
new file mode 100644 (file)
index 0000000..7d2c319
--- /dev/null
@@ -0,0 +1,25 @@
+-- @tag: project_types
+-- @description: Tabelle für Projekttypen
+-- @depends: release_3_0_0
+-- @charset: utf-8
+CREATE TABLE project_types (
+       id                       SERIAL,
+       position                 INTEGER NOT NULL,
+       description              TEXT,
+
+       PRIMARY KEY (id)
+);
+
+INSERT INTO project_types (position, description) VALUES (1, 'Standard');
+INSERT INTO project_types (position, description) VALUES (2, 'Festpreis');
+INSERT INTO project_types (position, description) VALUES (3, 'Support');
+
+ALTER TABLE project ADD COLUMN project_type_id INTEGER;
+ALTER TABLE project ADD FOREIGN KEY (project_type_id) REFERENCES project_types (id);
+
+UPDATE project SET project_type_id = (SELECT id FROM project_types WHERE description = 'Festpreis') WHERE type = 'Festpreis';
+UPDATE project SET project_type_id = (SELECT id FROM project_types WHERE description = 'Support')   WHERE type = 'Support';
+UPDATE project SET project_type_id = (SELECT id FROM project_types WHERE description = 'Standard')  WHERE project_type_id IS NULL;
+
+ALTER TABLE project ALTER COLUMN project_type_id SET NOT NULL;
+ALTER TABLE project DROP COLUMN type;
index 2588f90..856ae2e 100644 (file)
@@ -1,6 +1,6 @@
 use lib 't';
 
-use Test::More tests => 27;
+use Test::More tests => 28;
 use Test::Deep;
 use Data::Dumper;
 
@@ -281,3 +281,15 @@ test {
   query => [ 'customer.description' => 'test' ],
   with_objects => [ 'customer' ]
 }, 'with_objects: no duplicates', with_objects => [ 'customer' ];
+
+test {
+  part => {
+   'partnumber:substr::ilike' => '1',
+  },
+}, {
+  query => [
+   'part.partnumber', {
+     ilike => '%1%'
+   }
+ ]
+}, 'Regression check: prefixing of fallback filtering in relation with custom filters', class => 'SL::DB::Manager::OrderItem';
index 088ed68..809dfb1 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 47;
+use Test::More tests => 71;
 
 use lib 't';
 use utf8;
@@ -11,9 +11,9 @@ use_ok 'SL::Helper::Csv';
 Support::TestSetup::login();
 
 my $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee\n",
-  header => [ 'description' ],
-  class  => 'SL::DB::Part',
+  file    => \"Kaffee\n",       # " # make emacs happy
+  header  => [ 'description' ],
+  profile => [{ class  => 'SL::DB::Part', }],
 );
 
 isa_ok $csv->_csv, 'Text::CSV_XS';
@@ -28,10 +28,10 @@ $::myconfig{numberformat} = '1.000,00';
 $::myconfig{dateformat} = 'dd.mm.yyyy';
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee;0.12;12,2;1,5234\n",
-  header => [ 'description', 'sellprice', 'lastcost_as_number', 'listprice' ],
-  profile => { listprice => 'listprice_as_number' },
-  class  => 'SL::DB::Part',
+  file    => \"Kaffee;0.12;12,2;1,5234\n",            # " # make emacs happy
+  header  => [ 'description', 'sellprice', 'lastcost_as_number', 'listprice' ],
+  profile => [{profile => { listprice => 'listprice_as_number' },
+               class   => 'SL::DB::Part',}],
 );
 $csv->parse;
 
@@ -49,8 +49,8 @@ Kaffee,0.12,'12,2','1,5234'
 EOL
   sep_char => ',',
   quote_char => "'",
-  profile => { listprice => 'listprice_as_number' },
-  class  => 'SL::DB::Part',
+  profile => [{profile => { listprice => 'listprice_as_number' },
+               class   => 'SL::DB::Part',}]
 );
 $csv->parse;
 is scalar @{ $csv->get_objects }, 1, 'auto header works';
@@ -64,7 +64,7 @@ $csv = SL::Helper::Csv->new(
 ;;description;sellprice;lastcost_as_number;
 #####;Puppy;Kaffee;0.12;12,2;1,5234
 EOL
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is scalar @{ $csv->get_objects }, 1, 'bozo header doesn\'t blow things up';
@@ -77,7 +77,7 @@ description;partnumber;sellprice;lastcost_as_number;
 Kaffee;;0.12;12,2;1,5234
 Beer;1123245;0.12;12,2;1,5234
 EOL
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is scalar @{ $csv->get_objects }, 2, 'multiple objects work';
@@ -93,7 +93,7 @@ Kaffee;;0.12;1,221.52
 Beer;1123245;0.12;1.5234
 EOL
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is $csv->get_objects->[0]->lastcost, '1221.52', 'formatnumber';
@@ -106,8 +106,9 @@ $csv = SL::Helper::Csv->new(
 Kaffee;;0.12;1,221.52
 Beer;1123245;0.12;1.5234
 EOL
+# " # make emacs happy
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 is $csv->parse, undef, 'broken csv header won\'t get parsed';
 
@@ -119,8 +120,9 @@ description;partnumber;sellprice;lastcost_as_number;
 "Kaf"fee";;0.12;1,221.52
 Beer;1123245;0.12;1.5234
 EOL
+# " # make emacs happy
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 is $csv->parse, undef, 'broken csv content won\'t get parsed';
 is_deeply $csv->errors, [ '"Kaf"fee";;0.12;1,221.52'."\n", 2023, 'EIQ - QUO character not allowed', 5, 2 ], 'error';
@@ -136,7 +138,7 @@ Beer;1123245;0.12;1.5234;nein kein wieder
 EOL
   numberformat => '1,000.00',
   ignore_unknown_columns => 1,
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is $csv->get_objects->[0]->lastcost, '1221.52', 'ignore_unkown_columns works';
@@ -150,10 +152,10 @@ Kaffee;;0.12;1,221.52;Standard 7%
 Beer;1123245;0.12;1.5234;16 %
 EOL
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
-  profile => {
-    buchungsgruppe => "buchungsgruppen.description",
-  }
+  profile => [{
+    profile => {buchungsgruppe => "buchungsgruppen.description"},
+    class  => 'SL::DB::Part',
+  }]
 );
 $csv->parse;
 isa_ok $csv->get_objects->[0]->buchungsgruppe, 'SL::DB::Buchungsgruppe', 'deep dispatch auto vivify works';
@@ -169,11 +171,13 @@ description;partnumber;sellprice;lastcost_as_number;make_1;model_1;
 Beer;1123245;0.12;1.5234;
 EOL
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
-  profile => {
-    make_1 => "makemodels.0.make",
-    model_1 => "makemodels.0.model",
-  }
+  profile => [{
+    profile => {
+      make_1 => "makemodels.0.make",
+      model_1 => "makemodels.0.model",
+    },
+    class  => 'SL::DB::Part',
+  }],
 );
 $csv->parse;
 my @mm = $csv->get_objects->[0]->makemodel;
@@ -189,13 +193,15 @@ description;partnumber;sellprice;lastcost_as_number;make_1;model_1;make_2;model_
  Kaffee;;0.12;1,221.52;213;Chair 0815;523;Table 15
 EOL
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
-  profile => {
-    make_1 => "makemodels.0.make",
-    model_1 => "makemodels.0.model",
-    make_2 => "makemodels.1.make",
-    model_2 => "makemodels.1.model",
-  }
+  profile => [{
+    profile => {
+      make_1 => "makemodels.0.make",
+      model_1 => "makemodels.0.model",
+      make_2 => "makemodels.1.make",
+      model_2 => "makemodels.1.model",
+    },
+    class  => 'SL::DB::Part',
+  }]
 );
 $csv->parse;
 
@@ -215,10 +221,10 @@ $csv = SL::Helper::Csv->new(
 description;partnumber;sellprice;lastcost_as_number;buchungsgruppe;
 EOL
   numberformat => '1,000.00',
-  class  => 'SL::DB::Part',
-  profile => {
-    buchungsgruppe => "buchungsgruppen.1.description",
-  }
+  profile => [{
+    profile => {buchungsgruppe => "buchungsgruppen.1.description"},
+    class  => 'SL::DB::Part',
+  }]
 );
 is $csv->parse, undef, 'wrong profile gets rejected';
 is_deeply $csv->errors, [ 'buchungsgruppen.1.description', undef, "Profile path error. Indexed relationship is not OneToMany around here: 'buchungsgruppen.1'", undef ,0 ], 'error indicates wrong header';
@@ -235,10 +241,10 @@ EOL
   numberformat => '1,000.00',
   ignore_unknown_columns => 1,
   strict_profile => 1,
-  class  => 'SL::DB::Part',
-  profile => {
-    lastcost => 'lastcost_as_number',
-  }
+  profile => [{
+    profile => {lastcost => 'lastcost_as_number'},
+    class  => 'SL::DB::Part',
+  }]
 );
 $csv->parse;
 is $csv->get_objects->[0]->lastcost, '1221.52', 'strict_profile with ignore';
@@ -254,10 +260,10 @@ Beer;1123245;0.12;1.5234;nein kein wieder
 EOL
   numberformat => '1,000.00',
   strict_profile => 1,
-  class  => 'SL::DB::Part',
-  profile => {
-    lastcost => 'lastcost_as_number',
-  }
+  profile => [{
+    profile => {lastcost => 'lastcost_as_number'},
+    class  => 'SL::DB::Part',
+  }]
 );
 $csv->parse;
 
@@ -266,9 +272,9 @@ is_deeply( ($csv->errors)[0], [ 'description', undef, 'header field \'descriptio
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee",
-  header => [ 'description' ],
-  class  => 'SL::DB::Part',
+  file   => \"Kaffee",       # " # make emacs happy
+  header =>  [ 'description' ],
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'eol bug at the end of files';
@@ -276,10 +282,12 @@ is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'eol bug at the end o
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Description\nKaffee",
-  class  => 'SL::DB::Part',
+  file   => \"Description\nKaffee",        # " # make emacs happy
   case_insensitive_header => 1,
-  profile => { description => 'description' },
+  profile => [{
+    profile => { description => 'description' },
+    class  => 'SL::DB::Part'
+  }],
 );
 $csv->parse;
 is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive header from csv works';
@@ -287,11 +295,13 @@ is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive hea
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee",
-  header => [ 'Description' ],
-  class  => 'SL::DB::Part',
+  file   => \"Kaffee",          # " # make emacs happy
+  header =>  [ 'Description' ],
   case_insensitive_header => 1,
-  profile => { description => 'description' },
+  profile => [{
+    profile => { description => 'description' },
+    class  => 'SL::DB::Part'
+  }],
 );
 $csv->parse;
 is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive header as param works';
@@ -299,8 +309,8 @@ is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive hea
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"\x{EF}\x{BB}\x{BF}description\nKaffee",
-  class  => 'SL::DB::Part',
+  file   => \"\x{EF}\x{BB}\x{BF}description\nKaffee",           # " # make emacs happy
+  profile => [{class  => 'SL::DB::Part'}],
   encoding => 'utf8',
 );
 $csv->parse;
@@ -309,9 +319,9 @@ is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'utf8 BOM works (bug
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee",
+  file   => \"Kaffee",            # " # make emacs happy
   header => [ 'Description' ],
-  class  => 'SL::DB::Part',
+  profile => [{class  => 'SL::DB::Part'}],
 );
 $csv->parse;
 is_deeply $csv->get_data, undef, 'case insensitive header without flag ignores';
@@ -319,10 +329,12 @@ is_deeply $csv->get_data, undef, 'case insensitive header without flag ignores';
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee",
+  file   => \"Kaffee",            # " # make emacs happy
   header => [ 'foo' ],
-  class  => 'SL::DB::Part',
-  profile => { foo => '' },
+  profile => [{
+    profile => { foo => '' },
+    class  => 'SL::DB::Part',
+  }],
 );
 $csv->parse;
 
@@ -332,11 +344,13 @@ ok $csv->get_objects->[0], 'empty path gets ignored in object creation';
 #####
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Kaffee",
+  file   => \"Kaffee",            # " # make emacs happy
   header => [ 'foo' ],
-  class  => 'SL::DB::Part',
   strict_profile => 1,
-  profile => { foo => '' },
+  profile => [{
+    profile => { foo => '' },
+    class  => 'SL::DB::Part',
+  }],
 );
 $csv->parse;
 
@@ -344,16 +358,329 @@ is_deeply $csv->get_data, [ { foo => 'Kaffee' } ], 'empty path still gets parsed
 ok $csv->get_objects->[0], 'empty path gets ignored in object creation (strict profile)';
 
 $csv = SL::Helper::Csv->new(
-  file   => \"Phil",
+  file   => \"Phil",            # " # make emacs happy
   header => [ 'CVAR_grOUnDHog' ],
-  class  => 'SL::DB::Part',
   strict_profile => 1,
   case_insensitive_header => 1,
-  profile => { cvar_Groundhog => '' },
+  profile => [{
+    profile => { cvar_Groundhog => '' },
+    class  => 'SL::DB::Part',
+  }],
+
 );
 $csv->parse;
 
 is_deeply $csv->get_data, [ { cvar_Groundhog => 'Phil' } ], 'using empty path to get cvars working';
 ok $csv->get_objects->[0], '...and not destorying the objects';
 
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \"description\nKaffee",            # " # make emacs happy
+);
+$csv->parse;
+is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'without profile and class works';
+
+#####
+$csv = SL::Helper::Csv->new(
+  file    => \"Kaffee;1,50\nSchoke;0,89\n",
+  header  => [
+    [ 'datatype', 'description', 'sellprice' ],
+  ],
+  profile => [
+    { profile   => { sellprice => 'sellprice_as_number' },
+      class     => 'SL::DB::Part',}
+  ],
+);
+
+ok $csv->_check_multiplexed, 'multiplex check works on not-multiplexed data';
+ok !$csv->is_multiplexed, 'not-multiplexed data is recognized';
+
+#####
+$csv = SL::Helper::Csv->new(
+  file    => \"P;Kaffee;1,50\nC;Meier\n",
+  header  => [
+    [ 'datatype', 'description', 'listprice' ],
+    [ 'datatype', 'name' ],
+  ],
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P' },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+);
+
+ok $csv->_check_multiplexed, 'multiplex check works on multiplexed data';
+ok $csv->is_multiplexed, 'multiplexed data is recognized';
+
+#####
+$csv = SL::Helper::Csv->new(
+  file    => \"P;Kaffee;1,50\nC;Meier\n",
+  header  => [
+    [ 'datatype', 'description', 'listprice' ],
+    [ 'datatype', 'name' ],
+  ],
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      class     => 'SL::DB::Part', },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+);
+
+ok !$csv->_check_multiplexed, 'multiplex check works on multiplexed data and detects missing row_ident';
+
+#####
+$csv = SL::Helper::Csv->new(
+  file    => \"P;Kaffee;1,50\nC;Meier\n",
+  header  => [
+    [ 'datatype', 'description', 'listprice' ],
+    [ 'datatype', 'name' ],
+  ],
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      row_ident => 'P' },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+);
+
+ok !$csv->_check_multiplexed, 'multiplex check works on multiplexed data and detects missing class';
+
+#####
+$csv = SL::Helper::Csv->new(
+  file    => \"P;Kaffee;1,50\nC;Meier\n",  # " # make emacs happy
+  header  => [
+    [ 'datatype', 'description', 'listprice' ],
+  ],
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P' },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+);
+
+ok !$csv->_check_multiplexed, 'multiplex check works on multiplexed data and detects missing header';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file    => \"P;Kaffee;1,50\nC;Meier\n",  # " # make emacs happy
+  header  => [
+    [ 'datatype', 'description', 'listprice' ],
+    [ 'datatype', 'name' ],
+  ],
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P' },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+  ignore_unknown_columns => 1,
+);
+
+$csv->parse;
+is_deeply $csv->get_data,
+    [ { datatype => 'P', description => 'Kaffee', listprice => '1,50' }, { datatype => 'C', name => 'Meier' } ],
+    'multiplex: simple case works';
+is scalar @{ $csv->get_objects }, 2, 'multiplex: multiple objects work';
+is $csv->get_objects->[0]->description, 'Kaffee', 'multiplex: first object';
+is $csv->get_objects->[1]->name,        'Meier',  'multiplex: second object';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file    => \"datatype;description;listprice\ndatatype;name\nP;Kaffee;1,50\nC;Meier\n",  # " # make emacs happy
+  profile => [
+    { profile   => { listprice => 'listprice_as_number' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P' },
+    { class  => 'SL::DB::Customer',
+      row_ident => 'C' }
+  ],
+  ignore_unknown_columns => 1,
+);
+
+$csv->parse;
+is scalar @{ $csv->get_objects }, 2, 'multiplex: auto header works';
+is $csv->get_objects->[0]->description, 'Kaffee', 'multiplex: auto header first object';
+is $csv->get_objects->[1]->name,        'Meier',  'multiplex: auto header second object';
+
+######
+
+$csv = SL::Helper::Csv->new(
+  file   => \<<EOL,
+datatype;description
+"datatype;name
+P;Kaffee
+C;Meier
+P;Beer
+EOL
+# " # make emacs happy
+  profile => [
+              {class  => 'SL::DB::Part',     row_ident => 'P'},
+              {class  => 'SL::DB::Customer', row_ident => 'C'},
+             ],
+  ignore_unknown_columns => 1,
+);
+is $csv->parse, undef, 'multiplex: broken csv header won\'t get parsed';
+
+######
+
+$csv = SL::Helper::Csv->new(
+  file   => \<<EOL,
+datatype;description
+P;Kaffee
+C;Meier
+P;Beer
+EOL
+# " # make emacs happy
+  profile => [
+              {class  => 'SL::DB::Part',     row_ident => 'P'},
+              {class  => 'SL::DB::Customer', row_ident => 'C'},
+             ],
+  header  => [ [], ['name'] ],
+  ignore_unknown_columns => 1,
+);
+ok !$csv->_check_multiplexed, 'multiplex check detects empty header';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \"Datatype;Description\nDatatype;Name\nP;Kaffee\nC;Meier",        # " # make emacs happy
+  case_insensitive_header => 1,
+  ignore_unknown_columns => 1,
+  profile => [
+    {
+      profile   => { datatype => 'datatype', description => 'description' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P'
+    },
+    {
+      profile   => { datatype => 'datatype', name => 'name' },
+      class     => 'SL::DB::Customer',
+      row_ident => 'C'
+    }
+  ],
+);
+$csv->parse;
+is_deeply $csv->get_data, [ { datatype => 'P', description => 'Kaffee' },
+                            { datatype => 'C', name => 'Meier'} ],
+                          'multiplex: case insensitive header from csv works';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \"P;Kaffee\nC;Meier",          # " # make emacs happy
+  header =>  [[ 'Datatype', 'Description' ], [ 'Datatype', 'Name']],
+  case_insensitive_header => 1,
+  ignore_unknown_columns => 1,
+  profile => [
+    {
+      profile   => { datatype => 'datatype', description => 'description' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P'
+    },
+    {
+      profile => { datatype => 'datatype', name => 'name' },
+      class  => 'SL::DB::Customer',
+      row_ident => 'C'
+    }
+  ],
+);
+$csv->parse;
+is_deeply $csv->get_data, [ { datatype => 'P', description => 'Kaffee' },
+                            { datatype => 'C', name => 'Meier' } ],
+                          'multiplex: case insensitive header as param works';
+
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \"P;Kaffee\nC;Meier",          # " # make emacs happy
+  header =>  [[ 'Datatype', 'Description' ], [ 'Datatype', 'Name']],
+  profile => [
+    {
+      profile   => { datatype => 'datatype', description => 'description' },
+      class     => 'SL::DB::Part',
+      row_ident => 'P'
+    },
+    {
+      profile => { datatype => 'datatype', name => 'name' },
+      class  => 'SL::DB::Customer',
+      row_ident => 'C'
+    }
+  ],
+);
+$csv->parse;
+is_deeply $csv->get_data, undef, 'multiplex: case insensitive header without flag ignores';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \<<EOL,
+P;Kaffee;lecker
+C;Meier;froh
+EOL
+# " # make emacs happy
+  header => [[ 'datatype', 'Afoo', 'Abar' ], [ 'datatype', 'Bfoo', 'Bbar']],
+  profile => [{
+    profile   => { datatype => '', Afoo => '', Abar => '' },
+    class     => 'SL::DB::Part',
+    row_ident => 'P'
+  },
+  {
+    profile   => { datatype => '', Bfoo => '', Bbar => '' },
+    class     => 'SL::DB::Customer',
+    row_ident => 'C'
+  }],
+);
+$csv->parse;
+
+is_deeply $csv->get_data,
+    [ { datatype => 'P', Afoo => 'Kaffee', Abar => 'lecker' }, { datatype => 'C', Bfoo => 'Meier', Bbar => 'froh' } ],
+    'multiplex: empty path still gets parsed into data';
+ok $csv->get_objects->[0], 'multiplex: empty path gets ignored in object creation';
+
+#####
+
+$csv = SL::Helper::Csv->new(
+  file   => \<<EOL,
+P;Kaffee;lecker
+C;Meier;froh
+EOL
+# " # make emacs happy
+  header => [[ 'datatype', 'Afoo', 'Abar' ], [ 'datatype', 'Bfoo', 'Bbar']],
+  strict_profile => 1,
+  profile => [{
+    profile   => { datatype => '', Afoo => '', Abar => '' },
+    class     => 'SL::DB::Part',
+    row_ident => 'P'
+  },
+  {
+    profile   => { datatype => '', Bfoo => '', Bbar => '' },
+    class     => 'SL::DB::Customer',
+    row_ident => 'C'
+  }],
+);
+$csv->parse;
+
+is_deeply $csv->get_data,
+    [ { datatype => 'P', Afoo => 'Kaffee', Abar => 'lecker' }, { datatype => 'C', Bfoo => 'Meier', Bbar => 'froh' } ],
+    'multiplex: empty path still gets parsed into data (strict profile)';
+ok $csv->get_objects->[0], 'multiplex: empty path gets ignored in object creation (strict profile)';
+
+#####
+
+
 # vim: ft=perl
+# set emacs to perl mode
+# Local Variables:
+# mode: perl
+# End:
+
index 89d78a5..635585f 100644 (file)
@@ -23,6 +23,7 @@ my %no_metasetup_ok   = map { ($_ => 1) } qw(Object.pm VC.pm);
 my @dbs               = find_pms('SL/DB');
 my @metasetups        = find_pms('SL/DB/MetaSetup');
 my %metasetup_content = map { ($_ => scalar(read_file("SL/DB/MetaSetup/$_"))) } @metasetups;
+my %db_content        = map { ($_ => scalar(read_file("SL/DB/$_")))           } @dbs;
 my $all_content       = read_file('SL/DB/Helper/ALL.pm');
 my $mapping_content   = read_file('SL/DB/Helper/Mappings.pm');
 
@@ -78,10 +79,17 @@ sub test_metasetup_has_table_to_class_mapping {
   }
 }
 
+sub test_db_contains_meta_initialize {
+  foreach my $pm (grep { !m{^(?:Object|VC)\.pm$} } @dbs) {
+    ok($db_content{$pm} =~ m/\n__PACKAGE__->meta->initialize;/, "$pm contains __PACKAGE__->meta->initialize;");
+  }
+}
+
 test_db_has_metasetup();
 test_metasetup_has_db();
 test_db_included_in_all();
 test_use_in_all_exists_as_db();
 test_metasetup_has_table_to_class_mapping();
+test_db_contains_meta_initialize();
 
 done_testing();
diff --git a/templates/print/French/balance_sheet.html b/templates/print/French/balance_sheet.html
deleted file mode 100644 (file)
index 418f876..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>Bilan</title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>BILAN DE VÉRIFICATION
-<br><%period%>
-</h2>
-
-<table border=0>
-<tr>
-  <th align=left width=400 colspan=2>ACTIF<br><hr align=left width=250 size=5 noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach asset_account%>
-<tr>
-  <td> </td>
-  <td><%asset_account%></td>
-  <td align=right><%asset_this_period%></td>
-  <td align=right><%asset_last_period%></td>
-</tr>
-<%end asset_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>Total Actif</th>
-  <td align=right><%total_assets_this_period%><hr noshade size=2></td>
-  <td align=right><%total_assets_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>PASSIF<b><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach liability_account%>
-<tr>
-  <td></td>
-  <td><%liability_account%></td>
-  <td align=right><%liability_this_period%></td>
-  <td align=right><%liability_last_period%></td>
-</tr>
-<%end liability_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Passif</th>
-  <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>BENEFICES NON DISTRIBUÉS<br><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach equity_account%>
-<tr>
-  <td></td>
-  <td><%equity_account%></td>
-  <td align=right><%equity_this_period%></td>
-  <td align=right><%equity_last_period%></td>
-</tr>
-<%end equity_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Capital</th>
-  <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>TOTAL PASSIF & CAPITAL</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-</table>
-</body>
-</html>
diff --git a/templates/print/French/bin_list.html b/templates/print/French/bin_list.html
deleted file mode 100644 (file)
index d57632d..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         
-         <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
-
-         <th align=right>
-           <h4>
-           Tel: <%tel%>
-           <br>Fax: <%fax%>
-           </h4>
-         </td>
-       </tr>
-       
-       <tr>
-         <th colspan=3>
-           <h4>L A G E R L I S T E</h4>
-         </th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% cellspacing=0 cellpadding=0>
-       <tr bgcolor=000000>
-         <th align=left width=50%><font color=ffffff>Absender</th>
-         <th align=left width=50%><font color=ffffff>Lieferanschrift</th>
-       </tr>
-
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-
-         <%if contact%>
-         <br>Kontakt: <%contact%>
-         <%end contact%>
-
-         <%if vendorphone%>
-         <br>Tel: <%vendorphone%>
-         <%end vendorphone%>
-
-         <%if vendorfax%>
-         <br>Fax: <%vendorfax%>
-         <%end vendorfax%>
-
-         <%if email%>
-         <br><%email%>
-         <%end email%>
-         
-         </td>
-         
-         <td><%shiptoname%>
-         <br><%shiptostreet%>
-         <br><%shiptozipcode%>
-         <br><%shiptocity%>
-         <br><%shiptocountry%>
-
-         <br>
-         <%if shiptocontact%>
-         <br>Kontakt: <%shiptocontact%>
-         <%end shiptocontact%>
-         
-         <%if shiptophone%>
-         <br>Tel: <%shiptophone%>
-         <%end shiptophone%>
-
-         <%if shiptofax%>
-         <br>Fax: <%shiptofax%>
-         <%end shiptofax%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr height=5></tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% border=1>
-       <tr>
-         <th width=17% align=left nowrap>BestellNr. #</th>
-         <th width=17% align=left nowrap>Datum</th>
-         <th width=17% align=left nowrap>Kontakt</th>
-         <%if warehouse%>
-         <th width=17% align=left nowrap>Lager</th>
-         <%end warehouse%>
-         <th width=17% align=left>Versandort</th>
-         <th width=15% align=left>Lieferung durch</th>
-       </tr>
-
-       <tr>
-         <td><%ordnumber%>&nbsp;</td>
-
-         <%if shippingdate%>
-         <td><%shippingdate%></td>
-         <%end shippingdate%>
-
-         <%if not shippingdate%>
-         <td><%orddate%></td>
-         <%end shippingdate%>
-
-         <td><%employee%>&nbsp;</td>
-
-         <%if warehouse%>
-         <td><%warehouse%></td>
-         <%end warehouse%>
-
-         <td><%shippingpoint%>&nbsp;</td>
-         <td><%shipvia%>&nbsp;</td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100%>
-       <tr bgcolor=000000>
-         <th align=left><font color=ffffff>Pos</th>
-         <th align=left><font color=ffffff>ArtNr.</th>
-         <th align=left><font color=ffffff>Beschreibung</th>
-         <th><font color=ffffff>Seriennummer</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Menge</th>
-         <th><font color=ffffff>Erh</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Lagerplatz</th>
-       </tr>
-
-       <%foreach number%>
-       <tr valign=top>
-         <td><%runningnumber%></td>
-         <td><%number%></td>
-         <td><%description%></td>
-         <td><%serialnumber%></td>
-         <td><%deliverydate%></td>
-         <td align=right><%qty%></td>
-         <td align=right><%ship%></td>
-         <td><%unit%></td>
-         <td><%bin%></td>
-       </tr>
-       <%end number%>
-
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td><hr noshade></td>
-  </tr>
-
-</table>
-
diff --git a/templates/print/French/bwa.html b/templates/print/French/bwa.html
deleted file mode 100644 (file)
index 91907d8..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-<body>
-<style type="text/css">
-<!--
-/* Allgemeine Schriftdefinition */
-th,td {
-       font-family: Arial, Verdana, Helvetica, Sans-serif;
-       font-size:small;
-}
-
-@page {
-       size: landscape;
-       margin: 0.5cm;
-}
-
-/* Definition Tabellenueberschrift */
-
-.left  { text-align:left; }
-.center        { text-align:center; }
-.right { text-align:right; }
-
-tr.headline    { border:0; }
-tr.headline td { border:0; }
-h1 { font-size:120%; }
-h2 { font-size:100%; }
-
-/* Tabellenkopf */
-th {
-       font-weight: bold;
-       border-bottom: solid thin black;
-       padding:0 10px;
-       text-align:right;
-}
-
-th.left  { border-left:  solid thin black; }
-th.right { border-right: solid thin black; }
-
-.querkopf th.right { text-align:center; }
-.querkopf th {
-       border-top: solid thin black;
-       border-bottom:0;
-}
-
-/* Tabelleninhalt */
-td {
-       text-align:right;
-       padding:0 0.5em;
-}
-td.left  { border-left:  solid thin black; }
-td.right { border-right: solid thin black; }
-
-
-/* jede zweite Zeile grau hinterlegen */
-tr.grey {
-       background:#f0f0f0;
-}
-
-/* letzte Zeile in der Tabelle */
-#last td{ border-bottom: solid thin black; }
-
-/* Zwischensumme/-ueberschriften */
-tr.subtotal td { font-weight: bold; }
-
-/* Fusszeile unter der Tabelle */
-td.footer {
-       text-align:right;
-       font-size:smaller;
-}
-//-->
-</style>
-
-<table border=0 cellpadding=0 cellspacing=0>
-<tr class="headline">
-       <td class="left"><%company%></td>
-       <td class=center colspan="9">
-               <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
-               <h2>SKR3 &nbsp; BWA</h2>
-       </td>
-       <td class="right">Blatt 1</td>
-</tr>
-       
-       
-</tr>  
-<tr class="querkopf">
-       <th class="left">&nbsp;</th>
-       <th class="center" colspan="5">Im Betrachtungszeitraum</th>
-       <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
-</tr>
-
-<tr>
-       <th class="left">Bezeichnung</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th>Aufschlag</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th class="right">Aufschlag</th>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
-       <td><nobr><%jetzt1%></nobr></td>
-       <td><nobr><%jetztgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm1%></nobr></td>
-       <td><nobr><%kummgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
-       <td><nobr><%jetzt2%></nobr></td>
-       <td><nobr><%jetztgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>       
-       <td><nobr><%kumm2%></nobr></td>
-       <td><nobr><%kummgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
-       <td><nobr><%jetzt3%></nobr></td>
-       <td><nobr><%jetztgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm3%></nobr></td>
-       <td><nobr><%kummgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtleistung</nobr></td>
-       <td><nobr><%jetztgesamtleistung%></nobr></td>
-       <td><nobr><%jetztglgesamtleistung%></nobr></td>
-       <td><nobr><%jetztgkgesamtleistung%></nobr></td>
-       <td><nobr><%jetztpkgesamtleistung%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtleistung%></nobr></td>
-       <td><nobr><%kummglgesamtleistung%></nobr></td>
-       <td><nobr><%kummgkgesamtleistung%></nobr></td>
-       <td><nobr><%kummpkgesamtleistung%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey">
-       <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
-       <td><nobr><%jetzt4%></nobr></td>
-       <td><nobr><%jetztgl4%></nobr></td>
-       <td><nobr><%jetztgk4%></nobr></td>
-       <td><nobr><%jetztpk4%></nobr></td>
-       <td><nobr><%jetztauf4%></nobr></td>
-       <td><nobr><%kumm4%></nobr></td>
-       <td><nobr><%kummgl4%></nobr></td>
-       <td><nobr><%kummgk4%></nobr></td>
-       <td><nobr><%kummpk4%></nobr></td>
-       <td class="right"><nobr><%kummauf4%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Rohertrag</nobr></td>
-       <td><nobr><%jetztrohertrag%></nobr></td>
-       <td><nobr><%jetztglrohertrag%></nobr></td>
-       <td><nobr><%jetztgkrohertrag%></nobr></td>
-       <td><nobr><%jetztpkrohertrag%></nobr></td>
-       <td><nobr><%jetztaufrohertrag%></nobr></td>
-       <td><nobr><%kummrohertrag%></nobr></td>
-       <td><nobr><%kummglrohertrag%></nobr></td>
-       <td><nobr><%kummgkrohertrag%></nobr></td>
-       <td><nobr><%kummpkrohertrag%></nobr></td>
-       <td class="right"><nobr><%kummaufrohertrag%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey">
-       <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
-       <td><nobr><%jetzt5%></nobr></td>
-       <td><nobr><%jetztgl5%></nobr></td>
-       <td><nobr><%jetztgk5%></nobr></td>
-       <td><nobr><%jetztpk5%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm5%></nobr></td>
-       <td><nobr><%kummgl5%></nobr></td>
-       <td><nobr><%kummgk5%></nobr></td>
-       <td><nobr><%kummpk5%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
-       <td><nobr><%jetztbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummglbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
-       <td
-class="right"><nobr><%kummaufbetriebrohertrag%></nobr>&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left">Kostenarten:</td>
-       <td class="right" colspan="10">&nbsp;</td>
-</tr>  
-               
-<tr class="white">
-       <td class="left"><nobr>Personalkosten</nobr></td>
-       <td><nobr><%jetzt10%></nobr></td>
-       <td><nobr><%jetztgl10%></nobr></td>
-       <td><nobr><%jetztgk10%></nobr></td>
-       <td><nobr><%jetztpk10%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm10%></nobr></td>
-       <td><nobr><%kummgl10%></nobr></td>
-       <td><nobr><%kummgk10%></nobr></td>
-       <td><nobr><%kummpk10%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Raumkosten</nobr></td>
-       <td><nobr><%jetzt11%></nobr></td>
-       <td><nobr><%jetztgl11%></nobr></td>
-       <td><nobr><%jetztgk11%></nobr></td>
-       <td><nobr><%jetztpk11%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm11%></nobr></td>
-       <td><nobr><%kummgl11%></nobr></td>
-       <td><nobr><%kummgk11%></nobr></td>
-       <td><nobr><%kummpk11%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Betriebl.Steuern</nobr></td>
-       <td><nobr><%jetzt12%></nobr></td>
-       <td><nobr><%jetztgl12%></nobr></td>
-       <td><nobr><%jetztgk12%></nobr></td>
-       <td><nobr><%jetztpk12%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm12%></nobr></td>
-       <td><nobr><%kummgl12%></nobr></td>
-       <td><nobr><%kummgk12%></nobr></td>
-       <td><nobr><%kummpk12%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
-       <td><nobr><%jetzt13%></nobr></td>
-       <td><nobr><%jetztgl13%></nobr></td>
-       <td><nobr><%jetztgk13%></nobr></td>
-       <td><nobr><%jetztpk13%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm13%></nobr></td>
-       <td><nobr><%kummgl13%></nobr></td>
-       <td><nobr><%kummgk13%></nobr></td>
-       <td><nobr><%kummpk13%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
-       <td><nobr><%jetzt14%></nobr></td>
-       <td><nobr><%jetztgl14%></nobr></td>
-       <td><nobr><%jetztgk14%></nobr></td>
-       <td><nobr><%jetztpk14%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm14%></nobr></td>
-       <td><nobr><%kummgl14%></nobr></td>
-       <td><nobr><%kummgk14%></nobr></td>
-       <td><nobr><%kummpk14%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
-       <td><nobr><%jetzt15%></nobr></td>
-       <td><nobr><%jetztgl15%></nobr></td>
-       <td><nobr><%jetztgk15%></nobr></td>
-       <td><nobr><%jetztpk15%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm15%></nobr></td>
-       <td><nobr><%kummgl15%></nobr></td>
-       <td><nobr><%kummgk15%></nobr></td>
-       <td><nobr><%kummpk15%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
-       <td><nobr><%jetzt16%></nobr></td>
-       <td><nobr><%jetztgl16%></nobr></td>
-       <td><nobr><%jetztgk16%></nobr></td>
-       <td><nobr><%jetztpk16%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm16%></nobr></td>
-       <td><nobr><%kummgl16%></nobr>
-</td>
-       <td><nobr><%kummgk16%></nobr></td>
-       <td><nobr><%kummpk16%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Abschreibungen</nobr></td>
-       <td><nobr><%jetzt17%></nobr></td>
-       <td><nobr><%jetztgl17%></nobr></td>
-       <td><nobr><%jetztgk17%></nobr></td>
-       <td><nobr><%jetztpk17%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm17%></nobr></td>
-       <td><nobr><%kummgl17%></nobr></td>
-       <td><nobr><%kummgk17%></nobr></td>
-       <td><nobr><%kummpk17%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
-       <td><nobr><%jetzt18%></nobr></td>
-       <td><nobr><%jetztgl18%></nobr></td>
-       <td><nobr><%jetztgk18%></nobr></td>
-       <td><nobr><%jetztpk18%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm18%></nobr></td>
-       <td><nobr><%kummgl18%></nobr></td>
-       <td><nobr><%kummgk18%></nobr></td>
-       <td><nobr><%kummpk18%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Sonstige Kosten</nobr></td>
-       <td><nobr><%jetzt20%></nobr></td>
-       <td><nobr><%jetztgl20%></nobr></td>
-       <td><nobr><%jetztgk20%></nobr></td>
-       <td><nobr><%jetztpk20%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm20%></nobr></td>
-       <td><nobr><%kummgl20%></nobr></td>
-       <td><nobr><%kummgk20%></nobr></td>
-       <td><nobr><%kummpk20%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtkosten</nobr></td>
-       <td><nobr><%jetztgesamtkosten%></nobr></td>
-       <td><nobr><%jetztglgesamtkosten%></nobr></td>
-       <td><nobr><%jetztgkgesamtkosten%></nobr></td>
-       <td><nobr><%jetztpkgesamtkosten%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtkosten%></nobr></td>
-       <td><nobr><%kummglgesamtkosten%></nobr></td>
-       <td><nobr><%kummgkgesamtkosten%></nobr></td>
-       <td><nobr><%kummpkgesamtkosten%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-       
-<tr class="grey subtotal">
-<td class="left"><nobr>Betriebsergebnis</nobr></td>
-       <td><nobr><%jetztbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-       </tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Zinsaufwand</nobr></td>
-       <td><nobr><%jetzt30%></nobr></td>
-       <td><nobr><%jetztgl30%></nobr></td>
-       <td><nobr><%jetztgk30%></nobr></td>
-       <td><nobr><%jetztpk30%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm30%></nobr></td>
-       <td><nobr><%kummgl30%></nobr></td>
-       <td><nobr><%kummgk30%></nobr></td>
-       <td><nobr><%kummpk30%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
-       <td><nobr><%jetzt19%></nobr></td>
-       <td><nobr><%jetztgl19%></nobr></td>
-       <td><nobr><%jetztgk19%></nobr></td>
-       <td><nobr><%jetztpk19%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm19%></nobr></td>
-       <td><nobr><%kummg191%></nobr></td>
-       <td><nobr><%kummgk19%></nobr></td>
-       <td><nobr><%kummpk19%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
-       <td><nobr><%jetzt31%></nobr></td>
-       <td><nobr><%jetztgl31%></nobr></td>
-       <td><nobr><%jetztgk31%></nobr></td>
-       <td><nobr><%jetztpk31%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm31%></nobr></td>
-       <td><nobr><%kummgl31%></nobr></td>
-       <td><nobr><%kummgk31%></nobr></td>
-       <td><nobr><%kummpk31%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white subtotal">
-<td class="left"><nobr>Neutraler Aufwand</nobr></td>
-       <td><nobr><%jetztneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztglneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutraleraufwand%></nobr></td>
-       <td><nobr><%kummglneutraleraufwand%></nobr></td>
-       <td><nobr><%kummgkneutraleraufwand%></nobr></td>
-       <td><nobr><%kummpkneutraleraufwand%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="white">
-       <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
-       <td><nobr><%jetzt32%></nobr></td>
-       <td><nobr><%jetztgl32%></nobr></td>
-       <td><nobr><%jetztgk32%></nobr></td>
-       <td><nobr><%jetztpk32%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm32%></nobr></td>
-       <td><nobr><%kummgl32%></nobr></td>
-       <td><nobr><%kummgk32%></nobr></td>
-       <td><nobr><%kummpk32%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
-       <td><nobr><%jetzt33%></nobr></td>
-       <td><nobr><%jetztgl33%></nobr></td>
-       <td><nobr><%jetztgk33%></nobr></td>
-       <td><nobr><%jetztpk33%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm33%></nobr></td>
-       <td><nobr><%kummgl33%></nobr></td>
-       <td><nobr><%kummgk33%></nobr></td>
-       <td><nobr><%kummpk33%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
-       <td><nobr><%jetzt34%></nobr></td>
-       <td><nobr><%jetztgl34%></nobr>
-       <td><nobr><%jetztgk34%></nobr></td>
-       <td><nobr><%jetztpk34%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm34%></nobr></td>
-       <td><nobr><%kummgl34%></nobr></td>
-       <td><nobr><%kummgk34%></nobr></td>
-       <td><nobr><%kummpk34%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Neutraler Ertrag</nobr></td>
-       <td><nobr><%jetztneutralerertrag%></nobr></td>
-       <td><nobr><%jetztglneutralerertrag%></nobr></td>
-       <td><nobr><%jetztgkneutralerertrag%></nobr></td>
-       <td><nobr><%jetztpkneutralerertrag%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutralerertrag%></nobr></td>
-       <td><nobr><%kummglneutralerertrag%></nobr></td>
-       <td><nobr><%kummgkneutralerertrag%></nobr></td>
-       <td><nobr><%kummpkneutralerertrag%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
-       <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
-       <td><nobr><%jetzt35%></nobr></td>
-       <td><nobr><%jetztgl35%></nobr></td>
-       <td><nobr><%jetztgk35%></nobr></td>
-       <td><nobr><%jetztpk35%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm35%></nobr></td>
-       <td><nobr><%kummgl35%></nobr></td>
-       <td><nobr><%kummgk35%></nobr></td>
-       <td><nobr><%kummpk35%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
-       <td><nobr><%jetztergebnis%></nobr></td>
-       <td><nobr><%jetztglergebnis%></nobr></td>
-       <td><nobr><%jetztgkergebnis%></nobr></td>
-       <td><nobr><%jetztpkergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnis%></nobr></td>
-       <td><nobr><%kummglergebnis%></nobr></td>
-       <td><nobr><%kummgkergebnis%></nobr></td>
-       <td><nobr><%kummpkergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white" id=last><td class="left right"
-colspan="11">&nbsp;</td></tr>
-
-<tr>
-       <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: LX Office ERP
-(Version <%version%>) - Formular: 11.01.2007</td>
-</tr>
-
-</table>
-</body>
diff --git a/templates/print/French/check.tex b/templates/print/French/check.tex
deleted file mode 100644 (file)
index 4f97660..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.4cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.0cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-
-\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
-
-\parbox[t]{12cm}{
-  <%company%>
-
-  <%address%>}
-\hfill
-\parbox[t]{6cm}{\hfill <%source%>}
-
-\vspace*{0.6cm}
-
-<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
-
-\vspace{0.5cm}
-
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
-
-\vspace{0.5cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{2.8cm}
-
-<%company%>
-
-\vspace{0.5cm}
-
-<%name%> \hfill <%datepaid%> \hfill <%source%>
-
-\vspace{0.5cm}
-\begin{tabularx}{\textwidth}{lXrr@{}}
-\textbf{Invoice No.} & \textbf{Invoice Date}
-  & \textbf{Due} & \textbf{Applied} \\
-<%foreach invnumber%>
-<%invnumber%> & <%invdate%> \dotfill
-  & <%due%> & <%paid%> \\
-<%end invnumber%>
-\end{tabularx}
-
-\vfill
-
-\end{document}
-
diff --git a/templates/print/French/income_statement.html b/templates/print/French/income_statement.html
deleted file mode 100644 (file)
index 1d20875..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>Compte de Résultat</title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>Compte de Résultat
-<br><%period%>
-</h2>
-
-
-<table width=100% border=0>
-<tr>
-  <th width=400 align=left colspan=2>RECETTES<br><hr width=300 size=5 align=left noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach income_account%>
-<tr>
-  <td width=4> </td>
-  <td><%income_account%></td>
-  <td align=right><%income_this_period%></td>
-  <td align=right><%income_last_period%></td>
-</tr>
-<%end income_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Recettes</th>
-  <td align=right><%total_income_this_period%><hr noshade size=2></td>
-  <td align=right><%total_income_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=2>DÉPENSES<br><hr width=300 size=5 align=left noshade></th>
-</tr>
-
-<%foreach expense_account%>
-<tr>
-  <td> </td>
-  <td><%expense_account%></td>
-  <td align=right><%expenses_this_period%></td>
-  <td align=right><%expenses_last_period%></td>
-</tr>
-<%end expense_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Dépenses</th>
-  <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>BENEFICES / PERTES (en <%currency%> )</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-
-</table>
-</body>
-</html>
diff --git a/templates/print/French/invoice.html b/templates/print/French/invoice.html
deleted file mode 100644 (file)
index 6124e93..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>A2A <%invnumber%> <%name%></title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-<body bgcolor="ffffff">
-
-<table width="100%">
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width="100%">
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Tél&nbsp;: <%tel%>
-      <br>Fax&nbsp;: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>F A C T U R E</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width="100%" cellspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Date de facture</th><td width=10>&nbsp;</td><td><%invdate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Date d'échéance</th><td width=10>&nbsp;</td><td><%duedate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>N° de facture</th><td>&nbsp;</td><td><%invnumber%></td></tr>
-    </tr>
-  
-<!--
-    <tr>
-      <th align=right>Correspondant</th><td>&amp;nbsp;</td><td><%employee%></td>
-    </tr>
--->
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width="100%">
-    <tr bgcolor="000000">
-      <th align=left><font color=ffffff>Adresse de facturation</font></th>
-      <th align=left><font color=ffffff>Adresse d'envoi</font></th>
-    </tr>
-
-<!--
-     d'autres variables pouvant être utilisées ici :
-     contact, shiptocontact, shiptophone, shiptofax
--->
-
-    <tr valign=top>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-      
-      <td><%shiptoname%>
-      <br><%shiptostreet%>
-      <br><%shiptozipcode%>
-      <br><%shiptocity%>
-      <br><%shiptocountry%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width="100%">
-    <tr bgcolor="000000">
-<!--      <th align=right><font color="ffffff">N°</font></th>  -->
-      <th align=left><font color="ffffff">N°</font></th>
-      <th align=left><font color="ffffff">Description</font></th>
-      <th><font color="ffffff">Qté</font></th>
-      <th>&nbsp;</th>
-      <th><font color="ffffff">Prix</font></th>
-      <th><font color="ffffff">Remise</font></th>
-      <th><font color="ffffff">Montant</font></th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-veuillez adapter le colspan si vous comptez inclure ce poste.
-ceci permettra de décaler le poste sous-total vers la gauche.
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%discount%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-<!--
-vous pouvez également utiliser netprice à la place de sellprice
-si vous ne voulez pas afficher la remise
-netprice = sellprice - discount
--->
-
-    <tr>
-      <td colspan=7><hr noshade></td>
-    </tr>
-    
-    <tr>
-<%if taxincluded%>
-      <th colspan=5 align=right>Total</th>
-      <td colspan=2 align=right><%invtotal%></td>
-<%end taxincluded%>
-<%if not taxincluded%>
-      <th colspan=5 align=right>Sous-total</th>
-      <td colspan=2 align=right><%subtotal%></td>
-<%end taxincluded%>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=5 align=right><%taxdescription%></th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-<%if paid%>
-    <tr>
-      <th colspan=5 align=right>Déjà payé</th>
-      <td colspan=2 align=right>- <%paid%></td>
-    </tr>
-<%end paid%>
-
-    <tr>
-      <td colspan=3>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=3>À régler dans <b><%terms%></b> jours au plus tard.</td>
-      <th colspan=2 align=right>Solde à régler</th>
-      <th colspan=2 align=right><%total%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width="100%">
-    <tr valign=top>
-<%if notes%>
-      <td>À noter&nbsp;:</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Tous prix indiqués en <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<%if paid%>
-<tr>
-  <td colspan=7>
-    <table width="60%">
-      <tr>
-        <th align=left>Détail règlements</th>
-      </tr>
-      <tr>
-        <td colspan=4>
-         <hr noshade>
-       </td>
-      </tr>
-      <tr>
-        <th align=left>Date</th>
-       <th align=left>Compte</th>
-       <th align=left>Source</th>
-       <th align=left>Montant</th>
-      </tr>
-<%end paid%>
-
-<%foreach payment%>
-      <tr>
-        <td><%paymentdate%></td>
-       <td><%paymentaccount%></td>
-       <td><%paymentsource%></td>
-       <td><%payment%></td>
-      </tr>
-<%end payment%>
-
-<%if paid%>
-    </table>
-  </td>
-</tr>
-
-<tr>
-  <td>&nbsp;</td>
-</tr>
-<%end paid%>
-
-<tr>
-  <th colspan=7>
-  <!-- <br>Merci beaucoup&amp;nbsp;! -->
-  </th>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<tr>
-  <td>
-  <table width="100%">
-  <tr valign=top>
-    <td><font size=-3>
-    &nbsp;
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-<!-- <%foreach tax%>
-  <tr>
-   <th colspan=7 align=left><font size=-2><%taxdescription%> Numéro de TVA <%taxnumber%></font></th>
-  </tr>
-<%end tax%> -->
-
-<%if taxincluded%>
-  <tr>
-    <th colspan=7 align=left><font size=-2>Les taxes affichés sont inclus dans le prix.</font></th>
-  </tr>
-<%end taxincluded%>
-
-<!-- business number
-  <tr>
-    <th colspan=7 align=left><font size=-2>Régistre de Commerce&amp;nbsp;: <%businessnumber%></font></th>
-  </tr>
--->
-
-<!-- information banquaire -->
-  <tr><td>
-  <h6><center>N° TVA&nbsp;: &nbsp;&nbsp;Banque&nbsp;: &nbsp;&nbsp;N° de compte&nbsp;: &nbsp;&nbsp;Code SWIFT&nbsp;: </center>
-  </h6>
-    </td>
-  </tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
diff --git a/templates/print/French/invoice.tex b/templates/print/French/invoice.tex
deleted file mode 100644 (file)
index d1208f7..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage[frenchb]{babel}
-\usepackage[utf8]{inputenc}
-\usepackage{tabularx}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Téléphone & <%tel%>\\
-    Télécopieur & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{F A C T U R E}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date de facturation} & <%invdate%> \\
-  \textbf{Numéro de facture} & <%invnumber%> \\
-  \textbf{Numéro de client} & <%customer_id%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
-  \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
-    \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Sous-total} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> de <%taxbase%> & <%tax%>\\
-<%end tax%>
-  \hline
-  \textbf{Total} & \textbf{<%total%>}\\
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  Tous les prix indiqués sont en \textbf{<%currency%>}.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-\vfill
-\centerline{\textbf{Merci de faire affaire avec nous!}}
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-Le paiement doit être acquitté au plus tard <%terms%> jours à partir de
-la date de facturation. Des intérêts seront perçus à raison de 1.5\% par
-mois après <%duedate%> jusqu'à ce que le paiement soit complet. Les
-éléments retournés seront sujets à un supplément de remmagasinnage de
-10\%. Une autorisation de renvoi doit être obtenue au préalable auprès de
-<%company%>. Les frais de transports et d'assurance sur les éléments
-retournés devront être couvert par le client de façon appropriée.
-<%company%> ne peut être tenue responsable des dommages survenus pendant
-le transit.}
-
-\end{document}
diff --git a/templates/print/French/purchase_order.html b/templates/print/French/purchase_order.html
deleted file mode 100644 (file)
index 52628e0..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>Commande <%ordnumber%> <%name%></title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Tél&nbsp;: <%tel%>
-      <br>Fax&nbsp;: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>B O N&nbsp;&nbsp;D E&nbsp;&nbsp;C O M M A N D E</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
- <table width=100% cellspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Date commande</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Requis pour</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>N° commande</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>Commandé par</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>N°</th>
-      <th align=left><font color=ffffff>Description</th>
-      <th><font color=ffffff>Qté</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Prix</th>
-      <th><font color=ffffff>Montant</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-veuillez ajuster le colspan si vous voulez inclure ce poste pour décaler le sous-total vers la droite.
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=6><hr noshade></td>
-    </tr>
-    
-    <tr>
-      <th colspan=4 align=right>Sous-total</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=2>À régler dans <b><%terms%></b> jours au plus tard</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%total%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>À noter&nbsp;:</td>
-      <td><pre><%notes%></pre></td>
-<%end notes%>
-      <td align=right>
-      Tous prix indiqués en <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td>
-<!--
-<font size=-3>
-    Payment due NET <%terms%> Days from date of Invoice.
-    Interest on overdue amounts will acrue at the rate of 1.5% per month
-    from due date until paid in full. Items returned are subject to
-    a 10% restocking charge. A return authorization must be obtained
-    from <%company%> before goods are returned. Returns must be shipped
-    prepaid and properly insured. <%company%> will not be responsible
-    for damages during transit.
-    </font>
--->
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
diff --git a/templates/print/French/purchase_order.tex b/templates/print/French/purchase_order.tex
deleted file mode 100644 (file)
index c40b4d8..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage[frenchb]{babel}
-\usepackage[utf8]{inputenc}
-\usepackage{tabularx}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Téléphone & <%tel%>\\
-    Télécopieur & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{B O N} \parbox{0.3cm}{\hfill} \textbf{D E} \parbox{0.3cm}{\hfill}
-\textbf{C O M M A N D E}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date de la commande} & <%orddate%> \\
-<%if reqdate%>
-  \textbf{Livrable le} & <%reqdate%> \\
-<%end reqdate%>
-  \textbf{Numéro de commande} & <%ordnumber%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
-  \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
-    \textbf{Unité} & \textbf{Prix} & \textbf{Montant} \\
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Sous-total} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> de <%taxbase%> & <%tax%>\\
-<%end tax%>
-  \hline
-  \textbf{Total} & \textbf{<%ordtotal%>}\\
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  Tous les prix indiqués sont en \textbf{<%currency%>}.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-
-%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-%\footnotetext[1]{\tiny }
-
-\end{document}
diff --git a/templates/print/French/receipt.tex b/templates/print/French/receipt.tex
deleted file mode 100644 (file)
index 4f97660..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.4cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.0cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-
-\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
-
-\parbox[t]{12cm}{
-  <%company%>
-
-  <%address%>}
-\hfill
-\parbox[t]{6cm}{\hfill <%source%>}
-
-\vspace*{0.6cm}
-
-<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
-
-\vspace{0.5cm}
-
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
-
-\vspace{0.5cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{2.8cm}
-
-<%company%>
-
-\vspace{0.5cm}
-
-<%name%> \hfill <%datepaid%> \hfill <%source%>
-
-\vspace{0.5cm}
-\begin{tabularx}{\textwidth}{lXrr@{}}
-\textbf{Invoice No.} & \textbf{Invoice Date}
-  & \textbf{Due} & \textbf{Applied} \\
-<%foreach invnumber%>
-<%invnumber%> & <%invdate%> \dotfill
-  & <%due%> & <%paid%> \\
-<%end invnumber%>
-\end{tabularx}
-
-\vfill
-
-\end{document}
-
diff --git a/templates/print/French/sales_order.html b/templates/print/French/sales_order.html
deleted file mode 100644 (file)
index 35351e1..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>Commande <%ordnumber%> <%name%></title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-<body bgcolor="ffffff">
-
-<table width="100%">
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width="100%">
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Tél&nbsp;: <%tel%>
-      <br>Fax&nbsp;: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>B O N&nbsp;&nbsp;&nbsp;D E&nbsp;&nbsp;&nbsp;C O M M A N D E</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% cellspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Date commande</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Requis pour</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>N° commande</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width="100%">
-    <tr bgcolor="000000">
-      <th align=left><font color="ffffff">Commandé par</th>
-      <th align=left><font color="ffffff">Adresse d'envoi</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-
-      <td><%shiptoname%>
-      <br><%shiptostreet%>
-      <br><%shiptozipcode%>
-      <br><%shiptocity%>
-      <br><%shiptocountry%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width="100%">
-    <tr bgcolor="000000">
-<!--      <th align=right><font color="ffffff">N°</th>  -->
-      <th align=left><font color="ffffff">N°</th>
-      <th align=left><font color="ffffff">Description</th>
-      <th><font color="ffffff">Qté</th>
-      <th>&nbsp;</th>
-      <th><font color="ffffff">Prix</th>
-      <th><font color="ffffff">Remise</th>
-      <th><font color="ffffff">Montant</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%discount%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=7><hr noshade></td>
-    </tr>
-    
-    <tr>
-<%if taxincluded%>
-      <th colspan=5 align=right>Total</th>
-      <td colspan=2 align=right><%ordtotal%></td>
-<%end taxincluded%>
-
-<%if not taxincluded%>
-      <th colspan=5 align=right>Sous-total</th>
-      <td colspan=2 align=right><%subtotal%></td>
-<%end taxincluded%>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=5 align=right><%taxdescription%></th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=5><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=3>À régler dans <b><%terms%></b> jours au plus tard</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%ordtotal%></th>
-    </tr>
-<%if taxincluded%>
-    <tr>
-      <td colspan=3>Taxe comprise dans Total</td>
-    </tr>
-<%end taxincluded%>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width="100%">
-    <tr valign=top>
-<%if notes%>
-      <td>À noter&nbsp;:</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Tous prix indiqués en <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width="100%">
-  <tr valign=top>
-    <td><font size=-3>
-<!--
-    A 10% order cancellation fee will be applied for any special order
-    products or products that have been customized, enhanced or
-    upgraded at customers request.
--->
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  <tr>
-  <td colspan=5>
-    <h6><center>N° TVA&nbsp;: &nbsp;&nbsp;Banque&nbsp;: &nbsp;&nbsp;N° de compte&nbsp;: &nbsp;&nbsp;Code SWIFT&nbsp;: </center>
-      </h6>
-  </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
diff --git a/templates/print/French/sales_order.tex b/templates/print/French/sales_order.tex
deleted file mode 100644 (file)
index 24a779c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage[frenchb]{babel}
-\usepackage[utf8]{inputenc}
-\usepackage{tabularx}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Téléphone & <%tel%>\\
-    Télécopieur & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{C O M M A N D E} \parbox{0.3cm}{\hfill} \textbf{C L I E N T}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date de la commande} & <%orddate%> \\
-<%if reqdate%>
-  \textbf{Livrable le} & <%reqdate%> \\
-<%end reqdate%>
-  \textbf{Numéro de commande} & <%ordnumber%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
-  \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
-    \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Sous-total} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> de <%taxbase%> & <%tax%>\\
-<%end tax%>
-  \hline
-  \textbf{Total} & \textbf{<%ordtotal%>}\\
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  Tous les prix indiqués sont en \textbf{<%currency%>}.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-Un supplément de 10% sera appliqué à toute commande spécifique et à tout
-produit adapté, amélioré ou mis-à-jour à la demande du client. Les
-éléments non-retournables sont indiqués ci-dessus.
-}
-
-\end{document}
-
diff --git a/templates/print/French/statement.html b/templates/print/French/statement.html
deleted file mode 100644 (file)
index 9ece5ed..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
-
-<html>
-
-<head>
-
-<title>Extrait de compte pour <%name%></title>
-<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-
-</head>
-
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         <th></th>
-         <td align=right>
-         <h4>
-         Tél&nbsp;: <%tel%>
-         <br>Fax&nbsp;: <%fax%>
-         </h4>
-         </td>
-       </tr>
-       <tr>
-         <th colspan=3><h4>E X T R A I T&nbsp;&nbsp;D E&nbsp;&nbsp;C O M P T E</h4></th>
-       </tr>
-       <tr>
-         <td colspan=3 align=right><%statementdate%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-<%if customerphone%>
-         <br>Tél&nbsp;: <%customerphone%>
-<%end customerphone%>
-<%if customerfax%>
-         <br>Fax&nbsp;: <%customerfax%>
-<%end customerfax%>
-<%if email%>
-         <br><%email%>
-<%end email%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-        <tr>
-         <th align=left>Facture n°</th>
-         <th width=15%>Date</th>
-         <th width=15%>Echeance</th>
-         <th width=10%>Actuel</th>
-         <th width=10%>30</th>
-         <th width=10%>60</th>
-         <th width=10%>90+</th>
-       </tr>
-<%foreach invnumber%>
-       <tr>
-         <td><%invnumber%></td>
-         <td><%invdate%></td>
-         <td><%duedate%></td>
-         <td align=right><%c0%></td>
-         <td align=right><%c30%></td>
-         <td align=right><%c60%></td>
-         <td align=right><%c90%></td>
-       </tr>
-<%end invnumber%>
-        <tr>
-         <td colspan=7><hr size=1></td>
-       </tr>
-       <tr>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <th align=right><%c0total%></td>
-         <th align=right><%c30total%></td>
-         <th align=right><%c60total%></td>
-         <th align=right><%c90total%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td align=right>
-      <table width=50%>
-        <tr>
-         <th>Solde impayé</th>
-          <th align=right><%total%></th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td><hr noshade></td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>Tout paiement au nom de <b><%company%></b>
-    </td>
-  </tr>
-  <tr height=20></tr>
-</table>
-</body>
-</html>
diff --git a/templates/print/French/statement.tex b/templates/print/French/statement.tex
deleted file mode 100644 (file)
index 3f67d4b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rrr@{}}
-    Tel & <%tel%>\\
-    Fax & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{1.5cm}
-
-\parbox[t]{1cm}{\hfill}
-\parbox[t]{10.5cm}{
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-}
-\parbox[t]{7.5cm}{
-<%if customerphone%>
-Tel: <%customerphone%>
-<%end customerphone%>
-
-<%if customerfax%>
-Fax: <%customerfax%>
-<%end customerfax%>
-
-<%email%>
-}
-\hfill
-
-\vspace{1cm}
-
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
-
-\vspace{2cm}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
-  \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
-  \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
-<%foreach invnumber%>
-  <%invnumber%> & <%invdate%> & <%duedate%> &
-  <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
-<%end invnumber%>
-\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
-\end{tabular*}
-\rule{\textwidth}{1pt}
-
-\vspace{1cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Total outstanding} & <%total%>
-\end{tabularx}
-
-\vfill
-
-Please make check payable to <%company%>
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
-\end{document}
-
diff --git a/templates/print/French/taxbird.txb b/templates/print/French/taxbird.txb
deleted file mode 100644 (file)
index c1a8a39..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-;; This file was produced by lx-office
-;; for using in taxbird. 
-;; You probably don't want to touch this 
-;; file. In case you do want it anyway, 
-;; be warned: BE CAREFUL!!
-;;
-'("Umsatzsteuervoranmeldung <%year%>" (
-("vend-id" . "74931")
-("land-lieferant" . "<%elsterland%>")
-("name-lieferant" . "<%company%>")
-("berufsbez" . "")
-("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%> ")
-("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "<%co_phone_prefix%>")
-("anschluss" . "<%co_phone%>")
-("land" . "<%taxbird_land_nr%>")
-("zeitraum" . "<%taxbird_period%>")
-("stnr" . "<%taxbird_steuernummer%>")
-
-<%foreach id%>
-("<%id%>" . "<%amount%>")<%end%>
-))
\ No newline at end of file
diff --git a/templates/print/French/ustva-2012.tex b/templates/print/French/ustva-2012.tex
deleted file mode 100644 (file)
index 3a35db9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Marcus Habermehl
-% Based on template by Jacky und Stefan Tenne (German-ustva-2008.tex)
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2012.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2012.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%else%>
-\small{~}
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%else%>
-\small{~}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}&~& & & &\\[-1mm]
-\end{tabular}\\[2.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[9.5mm]
-\multicolumn{2}{r}{<%41%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%44%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%49%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%43%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[1.8mm]
-\multicolumn{2}{r}{<%35%>} & & \multicolumn{2}{r}{<%36%>}\\[1.8mm]
-\multicolumn{2}{r}{<%77%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%76%>} & & \multicolumn{2}{r}{<%80%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%91%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%89%>} & & \multicolumn{2}{r}{<%891%>}\\[1.8mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[1.8mm]
-\multicolumn{2}{r}{<%95%>} & & \multicolumn{2}{r}{<%98%>}\\[1.8mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%42%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%60%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%21%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%45%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[13.5mm]
-\multicolumn{2}{r}{<%46%>} & & \multicolumn{2}{r}{<%47%>}\\[1.8mm]
-\multicolumn{2}{r}{<%52%>} & & \multicolumn{2}{r}{<%53%>}\\[1.8mm]
-\multicolumn{2}{r}{<%73%>} & & \multicolumn{2}{r}{<%74%>}\\[1.8mm]
-\multicolumn{2}{r}{<%84%>} & & \multicolumn{2}{r}{<%85%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%65%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%61%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%67%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%63%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%64%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%59%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%69%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%39%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/French/ustva.html b/templates/print/French/ustva.html
deleted file mode 100644 (file)
index 1f5da1a..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=utf-8" http-equiv="content-type">
-  <title>Vorschau: UStVa</title>
-<!--
-Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
-Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
-Text-Erklärung und unterschiedliche Zeilenfärbung ergänzt: Kai-Martin Knaak <kmk@familieknaak.de>
--->
-  <style>
-table {
-       text-align: right;
-       border:0;
-       border-collapse:collapse;
-}
-td {
-       font-size:100%;
-       vertical-align:top;
-}
-td.text {
-       text-align: left;
-       background-color:#BDBEBD;
-}
-td.text2 {
-       text-align: left;
-       background-color:#ADBEBD;
-}
-td.spalte,
-td.zeile,
-td.betrag {
-       border:solid thin black;
-}
-td.spalte { font-weight:bold; font-size:120%; }
-td.zeile  { font-weight:bold; }
-td.betrag { width:10em; }
-td.summe  { border:solid medium black; }
-td.spacer { border:0 }
-
-tr.uebertrag td { border-top:solid medium black; }
-b.h3 { font-size:120%; }
-.ausfuellen { background-color:#FFFFC0; }
-.nodis { display:none; }
-  </style>
-</head>
-<body>
-<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
-<h2>Zeitraum vom <%fromdate%> bis <%todate%> </h2>
-
-<!-- Diese HTML-Formular ist nicht selbstrechnend.
-<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
-gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
-automatisch berechnet.</small></p>
--->
-
-<table width="100%">
-<tr align="left">
-  <td class="text">Steuernummer: <%steuernummer%></td>
-  <td class="text" width="100px">&nbsp</td>
-  <td class="text" align="right">Datum (<%Datum_heute%>)</td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br /></td>
-</tr>
-<tr align="left">
-  <td class="text">
-    Finanzamt <%FA_Name%><br />
-    <%FA_Strasse%><br />
-    <%FA_PLZ%> <%FA_Ort%><br />
-    Fax: <%FA_FAX%>
-  </td>
-  <td class="text">&nbsp;</td>
-  <td class="text">
-    Firma <%company%><br />
-    <%if company_street%>
-      <%company_street%><br />
-      <%company_city%><br />
-    <%end company_street%>
-    <%if not company_street%>
-    <%address%><!--used Address-->
-    <%end company_street%>
-  </td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br />
-  </td>
-</tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td class="text"><b class="h3">I. Anmeldung der
-Umsatzsteuer-Vorauszahlung </b></td>
-      <td colspan="4"></td>
-    </tr>
-    <tr>
-      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
-      <td colspan="4"></td>
-    </tr>
-        <tr>
-      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%41%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%44%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%49%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%43%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Steuerfreie Ums&auml;tze ohne
-Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%48%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr>
-      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
-      <td colspan="4"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%51%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
-      <td class="betrag"><%511%></td>
-    </tr>
-<%end year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%81%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
-      <td class="betrag"><%811%></td>
-    </tr>
-<%end year2007%>
-
-    <tr>
-      <td class="text">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%86%></td>
-      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
-      <td class="betrag"><%861%></td>
-    </tr>
-    <tr>
-      <td class="text2">andere Steuers&auml;tze</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%35%></td>
-      <td class="spalte">36</td>
-      <td class="betrag ausfuellen"><%36%></td>
-    </tr>
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%77%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%76%></td>
-      <td class="spalte">80</td>
-      <td class="betrag ausfuellen"><%80%></td>
-    </tr>
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-    <tr>
-      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
-      <td colspan="4"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%91%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%97%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
-      <td class="betrag"><%971%></td>
-    </tr>
-<%end if year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%89%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
-      <td class="betrag"><%891%></td>
-    </tr>
-<%end if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%93%></td>
-      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
-      <td class="betrag"><%931%></td>
-    </tr>
-    <tr>
-      <td class="text">zu anderen Steuers&auml;tzen</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%95%></td>
-      <td class="spalte">98</td>
-      <td class="betrag"><%98%></td>
-    </tr>
-    <tr>
-      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
-             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%94%></td>
-      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
-      <td class="betrag"><%96%></td>
-    </tr>
-        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen des ersten Abnehmers bei
-        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
-      <td class="spalte ausfuellen">42</td>
-      <td class="betrag ausfuellen" width="70"><%42%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
-        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
-      <td class="spalte ausfuellen">60</td>
-      <td class="betrag ausfuellen" width="70"><%60%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if year2010%>
-   <tr>
-      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
-      <td class="spalte ausfuellen">21</td>
-      <td class="betrag ausfuellen" width="70"><%21%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%end if year2010%>
-   <tr>
-      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
-      <td class="spalte ausfuellen">45</td>
-      <td class="betrag ausfuellen" width="70"><%45%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
-      <td class="betrag"><%Z43%></td>
-    </tr>
-
-    <tr class="uebertrag">
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
-      <td class="betrag"><%Z45%></td>
-    </tr>
-
-<%if year2010%>
-    <tr>
-      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
-      <td class="spalte ausfuellen">46</td>
-      <td class="betrag ausfuellen"><%46%></td>
-      <td class="spalte">47</td>
-      <td class="betrag"><%47%></td>
-    </tr>
-<%end if year2010%>
-    <tr>
-      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">52</td>
-      <td class="betrag ausfuellen"><%52%></td>
-      <td class="spalte">53</td>
-      <td class="betrag"><%53%></td>
-    </tr>
-    <tr>
-      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
-           Ums&auml;tze, die unter das GrEStG fallen.</td>
-      <td class="spalte ausfuellen">73</td>
-      <td class="betrag ausfuellen"><%73%></td>
-      <td class="spalte">74</td>
-      <td class="betrag"><%74%></td>
-    </tr>
-    <tr>
-      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">84</td>
-      <td class="betrag ausfuellen"><%84%></td>
-      <td class="spalte">85</td>
-      <td class="betrag"><%85%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
-         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
-      <td class="spalte ausfuellen">65</td>
-      <td class="betrag ausfuellen"><%65%></td>
-    </tr>
-
-
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
-      <td class="betrag"><%Z53%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%66%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
-      <td class="spalte ausfuellen">61</td>
-      <td class="betrag ausfuellen"><%61%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
-      <td class="spalte ausfuellen">62</td>
-      <td class="betrag ausfuellen"><%62%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
-          des &sect;13b Abs. 1 UStG</td>
-      <td class="spalte ausfuellen">67</td>
-      <td class="betrag ausfuellen"><%67%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
-           Durchschnitts&auml;stzen berechnet sind </td>
-      <td class="spalte ausfuellen">63</td>
-      <td class="betrag ausfuellen"><%63%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
-      <td class="spalte ausfuellen">64</td>
-      <td class="betrag ausfuellen"><%64%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
-        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
-      <td class="spalte ausfuellen">59</td>
-      <td class="betrag ausfuellen"><%59%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Verbleibender Betrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
-      <td class="betrag"><%Z62%></td>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
-        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
-        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
-      <td class="spalte ausfuellen">69</td>
-      <td class="betrag ausfuellen"><%69%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
-      <td class="betrag"><%Z65%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
-        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
-        Besteuerungszeitraums, ausf&uuml;llen)</td>
-      <td class="spalte ausfuellen">39</td>
-      <td class="betrag ausfuellen"><%39%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr class="noborder">
-      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
-                                      Verbleibender &Uuml;berschuss</b></td>
-      <td class="spalte ausfuellen">83</td>
-      <td class="summe"><%83%></td>
-    </tr>
-
-  </tbody>
-</table>
-<%if FA_steuerberater%>
-<p>
-Steuerberater:<br />
-<%FA_steuerberater_name%><br />
-<%FA_steuerberater_street%><br />
-<%FA_steuerberater_city%><br />
-Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>
-</body>
-</html>
diff --git a/templates/print/French/ustva.tex b/templates/print/French/ustva.tex
deleted file mode 100644 (file)
index da26f47..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[42mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/French/winston.xml b/templates/print/French/winston.xml
deleted file mode 100644 (file)
index ad3effa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- Diese Datei ist mit kivitendo <%version%> generiert -->
-<WinstonAusgang>
-  <Formular Typ="UST"></Formular>
-  <Ordnungsnummer><%elsterFFFF%><%elstersteuernummer%></Ordnungsnummer>
-  <AnmeldeJahr><%year%></AnmeldeJahr>
-  <AnmeldeZeitraum><%period%></AnmeldeZeitraum>
-
-<%foreach id%>
-  <Kennzahl nr="<%id%>"><%amount%></Kennzahl>
-<%end%>
-
-</WinstonAusgang>
-
diff --git a/templates/print/RB/balance_sheet.html b/templates/print/RB/balance_sheet.html
deleted file mode 100644 (file)
index 985b6ef..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-
-<body bgcolor="#ffffff">
-
-<h2 align="center">
-<%company%>
-<br><%address%>
-
-<p>BILANZ
-<br><%period%>
-</h2>
-
-<table border="0">
-<tr>
-  <th align="left" width="400" colspan="2">AKTIVA<br><hr align="left" width="250" size="5" noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach asset_account%>
-<tr>
-  <td> </td>
-  <td><%asset_account%></td>
-  <td align="right"><%asset_this_period%></td>
-  <td align="right"><%asset_last_period%></td>
-</tr>
-<%end asset_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <th align="left" colspan="2">TOTAL</th>
-  <td align="right"><%total_assets_this_period%><hr noshade size="2"></td>
-  <td align="right"><%total_assets_last_period%><hr noshade size="2"></td>
-</tr>
-
-<tr>
-  <th align="left" colspan="4">PASSIVA<b><hr align="left" width="250" size="5" noshade></th>
-</tr>
-
-<%foreach liability_account%>
-<tr>
-  <td></td>
-  <td><%liability_account%></td>
-  <td align="right"><%liability_this_period%></td>
-  <td align="right"><%liability_last_period%></td>
-</tr>
-<%end liability_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <td></td>
-  <th align="left">TOTAL</th>
-  <td align="right"><%total_liabilities_this_period%><br><hr noshade size="2"</td>
-  <td align="right"><%total_liabilities_last_period%><br><hr noshade size="2"</td>
-</tr>
-
-<tr>
-  <th align="left" colspan="4">EIGENTUM<br><hr align="left" width="250" size="5" noshade></th>
-</tr>
-
-<%foreach equity_account%>
-<tr>
-  <td></td>
-  <td><%equity_account%></td>
-  <td align="right"><%equity_this_period%></td>
-  <td align="right"><%equity_last_period%></td>
-</tr>
-<%end equity_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <td></td>
-  <th align="left">TOTAL</th>
-  <td align="right"><%total_equity_this_period%><br><hr noshade size="2"</td>
-  <td align="right"><%total_equity_last_period%><br><hr noshade size="2"</td>
-</tr>
-
-<tr valign="top">
-  <th align="left" colspan="2">TOTAL PASSIVA &amp; EIGENTUM</th>
-  <td align="right"><%total_this_period%><br><hr noshade size="2"></td>
-  <td align="right"><%total_last_period%><br><hr noshade size="2"></td>
-</tr>
-</table>
-
-
-
diff --git a/templates/print/RB/bwa.html b/templates/print/RB/bwa.html
deleted file mode 100644 (file)
index 91907d8..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-<body>
-<style type="text/css">
-<!--
-/* Allgemeine Schriftdefinition */
-th,td {
-       font-family: Arial, Verdana, Helvetica, Sans-serif;
-       font-size:small;
-}
-
-@page {
-       size: landscape;
-       margin: 0.5cm;
-}
-
-/* Definition Tabellenueberschrift */
-
-.left  { text-align:left; }
-.center        { text-align:center; }
-.right { text-align:right; }
-
-tr.headline    { border:0; }
-tr.headline td { border:0; }
-h1 { font-size:120%; }
-h2 { font-size:100%; }
-
-/* Tabellenkopf */
-th {
-       font-weight: bold;
-       border-bottom: solid thin black;
-       padding:0 10px;
-       text-align:right;
-}
-
-th.left  { border-left:  solid thin black; }
-th.right { border-right: solid thin black; }
-
-.querkopf th.right { text-align:center; }
-.querkopf th {
-       border-top: solid thin black;
-       border-bottom:0;
-}
-
-/* Tabelleninhalt */
-td {
-       text-align:right;
-       padding:0 0.5em;
-}
-td.left  { border-left:  solid thin black; }
-td.right { border-right: solid thin black; }
-
-
-/* jede zweite Zeile grau hinterlegen */
-tr.grey {
-       background:#f0f0f0;
-}
-
-/* letzte Zeile in der Tabelle */
-#last td{ border-bottom: solid thin black; }
-
-/* Zwischensumme/-ueberschriften */
-tr.subtotal td { font-weight: bold; }
-
-/* Fusszeile unter der Tabelle */
-td.footer {
-       text-align:right;
-       font-size:smaller;
-}
-//-->
-</style>
-
-<table border=0 cellpadding=0 cellspacing=0>
-<tr class="headline">
-       <td class="left"><%company%></td>
-       <td class=center colspan="9">
-               <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
-               <h2>SKR3 &nbsp; BWA</h2>
-       </td>
-       <td class="right">Blatt 1</td>
-</tr>
-       
-       
-</tr>  
-<tr class="querkopf">
-       <th class="left">&nbsp;</th>
-       <th class="center" colspan="5">Im Betrachtungszeitraum</th>
-       <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
-</tr>
-
-<tr>
-       <th class="left">Bezeichnung</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th>Aufschlag</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th class="right">Aufschlag</th>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
-       <td><nobr><%jetzt1%></nobr></td>
-       <td><nobr><%jetztgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm1%></nobr></td>
-       <td><nobr><%kummgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
-       <td><nobr><%jetzt2%></nobr></td>
-       <td><nobr><%jetztgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>       
-       <td><nobr><%kumm2%></nobr></td>
-       <td><nobr><%kummgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
-       <td><nobr><%jetzt3%></nobr></td>
-       <td><nobr><%jetztgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm3%></nobr></td>
-       <td><nobr><%kummgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtleistung</nobr></td>
-       <td><nobr><%jetztgesamtleistung%></nobr></td>
-       <td><nobr><%jetztglgesamtleistung%></nobr></td>
-       <td><nobr><%jetztgkgesamtleistung%></nobr></td>
-       <td><nobr><%jetztpkgesamtleistung%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtleistung%></nobr></td>
-       <td><nobr><%kummglgesamtleistung%></nobr></td>
-       <td><nobr><%kummgkgesamtleistung%></nobr></td>
-       <td><nobr><%kummpkgesamtleistung%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey">
-       <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
-       <td><nobr><%jetzt4%></nobr></td>
-       <td><nobr><%jetztgl4%></nobr></td>
-       <td><nobr><%jetztgk4%></nobr></td>
-       <td><nobr><%jetztpk4%></nobr></td>
-       <td><nobr><%jetztauf4%></nobr></td>
-       <td><nobr><%kumm4%></nobr></td>
-       <td><nobr><%kummgl4%></nobr></td>
-       <td><nobr><%kummgk4%></nobr></td>
-       <td><nobr><%kummpk4%></nobr></td>
-       <td class="right"><nobr><%kummauf4%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Rohertrag</nobr></td>
-       <td><nobr><%jetztrohertrag%></nobr></td>
-       <td><nobr><%jetztglrohertrag%></nobr></td>
-       <td><nobr><%jetztgkrohertrag%></nobr></td>
-       <td><nobr><%jetztpkrohertrag%></nobr></td>
-       <td><nobr><%jetztaufrohertrag%></nobr></td>
-       <td><nobr><%kummrohertrag%></nobr></td>
-       <td><nobr><%kummglrohertrag%></nobr></td>
-       <td><nobr><%kummgkrohertrag%></nobr></td>
-       <td><nobr><%kummpkrohertrag%></nobr></td>
-       <td class="right"><nobr><%kummaufrohertrag%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey">
-       <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
-       <td><nobr><%jetzt5%></nobr></td>
-       <td><nobr><%jetztgl5%></nobr></td>
-       <td><nobr><%jetztgk5%></nobr></td>
-       <td><nobr><%jetztpk5%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm5%></nobr></td>
-       <td><nobr><%kummgl5%></nobr></td>
-       <td><nobr><%kummgk5%></nobr></td>
-       <td><nobr><%kummpk5%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
-       <td><nobr><%jetztbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummglbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
-       <td
-class="right"><nobr><%kummaufbetriebrohertrag%></nobr>&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left">Kostenarten:</td>
-       <td class="right" colspan="10">&nbsp;</td>
-</tr>  
-               
-<tr class="white">
-       <td class="left"><nobr>Personalkosten</nobr></td>
-       <td><nobr><%jetzt10%></nobr></td>
-       <td><nobr><%jetztgl10%></nobr></td>
-       <td><nobr><%jetztgk10%></nobr></td>
-       <td><nobr><%jetztpk10%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm10%></nobr></td>
-       <td><nobr><%kummgl10%></nobr></td>
-       <td><nobr><%kummgk10%></nobr></td>
-       <td><nobr><%kummpk10%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Raumkosten</nobr></td>
-       <td><nobr><%jetzt11%></nobr></td>
-       <td><nobr><%jetztgl11%></nobr></td>
-       <td><nobr><%jetztgk11%></nobr></td>
-       <td><nobr><%jetztpk11%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm11%></nobr></td>
-       <td><nobr><%kummgl11%></nobr></td>
-       <td><nobr><%kummgk11%></nobr></td>
-       <td><nobr><%kummpk11%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Betriebl.Steuern</nobr></td>
-       <td><nobr><%jetzt12%></nobr></td>
-       <td><nobr><%jetztgl12%></nobr></td>
-       <td><nobr><%jetztgk12%></nobr></td>
-       <td><nobr><%jetztpk12%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm12%></nobr></td>
-       <td><nobr><%kummgl12%></nobr></td>
-       <td><nobr><%kummgk12%></nobr></td>
-       <td><nobr><%kummpk12%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
-       <td><nobr><%jetzt13%></nobr></td>
-       <td><nobr><%jetztgl13%></nobr></td>
-       <td><nobr><%jetztgk13%></nobr></td>
-       <td><nobr><%jetztpk13%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm13%></nobr></td>
-       <td><nobr><%kummgl13%></nobr></td>
-       <td><nobr><%kummgk13%></nobr></td>
-       <td><nobr><%kummpk13%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
-       <td><nobr><%jetzt14%></nobr></td>
-       <td><nobr><%jetztgl14%></nobr></td>
-       <td><nobr><%jetztgk14%></nobr></td>
-       <td><nobr><%jetztpk14%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm14%></nobr></td>
-       <td><nobr><%kummgl14%></nobr></td>
-       <td><nobr><%kummgk14%></nobr></td>
-       <td><nobr><%kummpk14%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
-       <td><nobr><%jetzt15%></nobr></td>
-       <td><nobr><%jetztgl15%></nobr></td>
-       <td><nobr><%jetztgk15%></nobr></td>
-       <td><nobr><%jetztpk15%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm15%></nobr></td>
-       <td><nobr><%kummgl15%></nobr></td>
-       <td><nobr><%kummgk15%></nobr></td>
-       <td><nobr><%kummpk15%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
-       <td><nobr><%jetzt16%></nobr></td>
-       <td><nobr><%jetztgl16%></nobr></td>
-       <td><nobr><%jetztgk16%></nobr></td>
-       <td><nobr><%jetztpk16%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm16%></nobr></td>
-       <td><nobr><%kummgl16%></nobr>
-</td>
-       <td><nobr><%kummgk16%></nobr></td>
-       <td><nobr><%kummpk16%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Abschreibungen</nobr></td>
-       <td><nobr><%jetzt17%></nobr></td>
-       <td><nobr><%jetztgl17%></nobr></td>
-       <td><nobr><%jetztgk17%></nobr></td>
-       <td><nobr><%jetztpk17%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm17%></nobr></td>
-       <td><nobr><%kummgl17%></nobr></td>
-       <td><nobr><%kummgk17%></nobr></td>
-       <td><nobr><%kummpk17%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
-       <td><nobr><%jetzt18%></nobr></td>
-       <td><nobr><%jetztgl18%></nobr></td>
-       <td><nobr><%jetztgk18%></nobr></td>
-       <td><nobr><%jetztpk18%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm18%></nobr></td>
-       <td><nobr><%kummgl18%></nobr></td>
-       <td><nobr><%kummgk18%></nobr></td>
-       <td><nobr><%kummpk18%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Sonstige Kosten</nobr></td>
-       <td><nobr><%jetzt20%></nobr></td>
-       <td><nobr><%jetztgl20%></nobr></td>
-       <td><nobr><%jetztgk20%></nobr></td>
-       <td><nobr><%jetztpk20%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm20%></nobr></td>
-       <td><nobr><%kummgl20%></nobr></td>
-       <td><nobr><%kummgk20%></nobr></td>
-       <td><nobr><%kummpk20%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtkosten</nobr></td>
-       <td><nobr><%jetztgesamtkosten%></nobr></td>
-       <td><nobr><%jetztglgesamtkosten%></nobr></td>
-       <td><nobr><%jetztgkgesamtkosten%></nobr></td>
-       <td><nobr><%jetztpkgesamtkosten%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtkosten%></nobr></td>
-       <td><nobr><%kummglgesamtkosten%></nobr></td>
-       <td><nobr><%kummgkgesamtkosten%></nobr></td>
-       <td><nobr><%kummpkgesamtkosten%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-       
-<tr class="grey subtotal">
-<td class="left"><nobr>Betriebsergebnis</nobr></td>
-       <td><nobr><%jetztbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-       </tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Zinsaufwand</nobr></td>
-       <td><nobr><%jetzt30%></nobr></td>
-       <td><nobr><%jetztgl30%></nobr></td>
-       <td><nobr><%jetztgk30%></nobr></td>
-       <td><nobr><%jetztpk30%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm30%></nobr></td>
-       <td><nobr><%kummgl30%></nobr></td>
-       <td><nobr><%kummgk30%></nobr></td>
-       <td><nobr><%kummpk30%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
-       <td><nobr><%jetzt19%></nobr></td>
-       <td><nobr><%jetztgl19%></nobr></td>
-       <td><nobr><%jetztgk19%></nobr></td>
-       <td><nobr><%jetztpk19%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm19%></nobr></td>
-       <td><nobr><%kummg191%></nobr></td>
-       <td><nobr><%kummgk19%></nobr></td>
-       <td><nobr><%kummpk19%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
-       <td><nobr><%jetzt31%></nobr></td>
-       <td><nobr><%jetztgl31%></nobr></td>
-       <td><nobr><%jetztgk31%></nobr></td>
-       <td><nobr><%jetztpk31%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm31%></nobr></td>
-       <td><nobr><%kummgl31%></nobr></td>
-       <td><nobr><%kummgk31%></nobr></td>
-       <td><nobr><%kummpk31%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white subtotal">
-<td class="left"><nobr>Neutraler Aufwand</nobr></td>
-       <td><nobr><%jetztneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztglneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutraleraufwand%></nobr></td>
-       <td><nobr><%kummglneutraleraufwand%></nobr></td>
-       <td><nobr><%kummgkneutraleraufwand%></nobr></td>
-       <td><nobr><%kummpkneutraleraufwand%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="white">
-       <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
-       <td><nobr><%jetzt32%></nobr></td>
-       <td><nobr><%jetztgl32%></nobr></td>
-       <td><nobr><%jetztgk32%></nobr></td>
-       <td><nobr><%jetztpk32%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm32%></nobr></td>
-       <td><nobr><%kummgl32%></nobr></td>
-       <td><nobr><%kummgk32%></nobr></td>
-       <td><nobr><%kummpk32%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
-       <td><nobr><%jetzt33%></nobr></td>
-       <td><nobr><%jetztgl33%></nobr></td>
-       <td><nobr><%jetztgk33%></nobr></td>
-       <td><nobr><%jetztpk33%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm33%></nobr></td>
-       <td><nobr><%kummgl33%></nobr></td>
-       <td><nobr><%kummgk33%></nobr></td>
-       <td><nobr><%kummpk33%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
-       <td><nobr><%jetzt34%></nobr></td>
-       <td><nobr><%jetztgl34%></nobr>
-       <td><nobr><%jetztgk34%></nobr></td>
-       <td><nobr><%jetztpk34%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm34%></nobr></td>
-       <td><nobr><%kummgl34%></nobr></td>
-       <td><nobr><%kummgk34%></nobr></td>
-       <td><nobr><%kummpk34%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Neutraler Ertrag</nobr></td>
-       <td><nobr><%jetztneutralerertrag%></nobr></td>
-       <td><nobr><%jetztglneutralerertrag%></nobr></td>
-       <td><nobr><%jetztgkneutralerertrag%></nobr></td>
-       <td><nobr><%jetztpkneutralerertrag%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutralerertrag%></nobr></td>
-       <td><nobr><%kummglneutralerertrag%></nobr></td>
-       <td><nobr><%kummgkneutralerertrag%></nobr></td>
-       <td><nobr><%kummpkneutralerertrag%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
-       <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
-       <td><nobr><%jetzt35%></nobr></td>
-       <td><nobr><%jetztgl35%></nobr></td>
-       <td><nobr><%jetztgk35%></nobr></td>
-       <td><nobr><%jetztpk35%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm35%></nobr></td>
-       <td><nobr><%kummgl35%></nobr></td>
-       <td><nobr><%kummgk35%></nobr></td>
-       <td><nobr><%kummpk35%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
-       <td><nobr><%jetztergebnis%></nobr></td>
-       <td><nobr><%jetztglergebnis%></nobr></td>
-       <td><nobr><%jetztgkergebnis%></nobr></td>
-       <td><nobr><%jetztpkergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnis%></nobr></td>
-       <td><nobr><%kummglergebnis%></nobr></td>
-       <td><nobr><%kummgkergebnis%></nobr></td>
-       <td><nobr><%kummpkergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white" id=last><td class="left right"
-colspan="11">&nbsp;</td></tr>
-
-<tr>
-       <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: LX Office ERP
-(Version <%version%>) - Formular: 11.01.2007</td>
-</tr>
-
-</table>
-</body>
index 9427020..75bee25 100644 (file)
@@ -40,6 +40,7 @@
 \newcommand{\weiteraufnaechsterseite} {weiter auf der nächsten Seite ...}
 
 \newcommand{\zahlung} {Zahlungsbedingungen:}
+\newcommand{\lieferung} {Lieferbedingungen:}
 \newcommand{\textTelefon} {Tel.:}
 \newcommand{\textFax} {Fax:}
 
index efed0a7..2812389 100644 (file)
@@ -39,6 +39,7 @@
 \newcommand{\weiteraufnaechsterseite} {to be continued on next page  ..}
 
 \newcommand{\zahlung} {Payment terms:}
+\newcommand{\lieferung} {Delivery terms:}
 \newcommand{\textTelefon} {Tel.:}
 \newcommand{\textFax} {Fax:}
 
diff --git a/templates/print/RB/income_statement.html b/templates/print/RB/income_statement.html
deleted file mode 100644 (file)
index 36b612b..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-<body>
-
-<h2 align=center>
-Einnahmen&uuml;berschu&szlig;rechnung</h2>
-<h3 align=center>-E&Uuml;R- (Gewinnermittlung nach &sect;4 Abs. 3 EStG)
-<br><%period%>
-</h3>
-
-<table width=100% border=0>
-<tr>
-  <td width=75% align=left colspan=2><font size="+1"><b>A. Betriebseinnahmen</font></b><br></td>
-  <td></td>
-</tr>
-
-<tr>
-  <td>
-       Umsatzerl&ouml;se  
-  </td>
-  <td>
-       <%eur1%>
-  </td>
-</tr>
-<tr>
-  <td>
-       sonstige Erl&ouml;se  
-  </td>
-  <td>
-       <%eur2%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Privatanteile
-  </td>
-  <td>
-       <%eur3%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Zinsertr&auml;ge
-  </td>
-  <td>
-       <%eur4%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Au&szlig;erordentliche Ertr&auml;ge
-  </td>
-  <td>
-       <%eur5%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Vereinnahmte Umsatzsteuer
-  </td>
-  <td>
-       <%eur6%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Umsatzsteuererstattungen
-  </td>
-  <td>
-       <%eur7%>  
-  </td>
-</tr>
-
-
-<tr>
-  <td> </td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left><b>Summe Einnahmen</b></th>
-  <td align=right><%sumeura%><hr noshade size=2></td>
-</tr>
-<tr>
-  <td></td>
-  <td><br><br></td>
-</tr>
-<tr>
-  <td align=left><font size="+1"><b>B. Betriebsausgaben</font></b><br></td>
-  <td></td>
-</tr>
-
-<tr>
-  <td>
-       Wareneing&auml;nge
-  </td>
-  <td>
-       <%eur8%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       L&ouml;hne und Geh&auml;ter
-  </td>
-  <td>
-       <%eur9%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Gesetzlicher sozialer Aufwand
-  </td>
-  <td>
-       <%eur10%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Mieten
-  </td>
-  <td>
-       <%eur11%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Gas, Strom, Wasser
-  </td>
-  <td>
-       <%eur12%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Instandhaltung
-  </td>
-  <td>
-       <%eur13%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Steuern, Versicherungen, Beitr&auml;ge
-  </td>
-  <td>
-       <%eur14%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Kfz-Steuern
-  </td>
-  <td>
-       <%eur15%>  
-  </td>
-</tr><tr>
-  <td>
-       Kfz-Versicherungen
-  </td>
-  <td>
-       <%eur16%>  
-  </td>
-</tr><tr>
-  <td>
-       Sonstige Fahrzeugkosten
-  </td>
-  <td>
-       <%eur17%>  
-  </td>
-</tr><tr>
-  <td>
-       Werbe- und Reisekosten
-  </td>
-  <td>
-       <%eur18%>  
-  </td>
-</tr><tr>
-  <td>
-       Instandhaltung und Werkzeuge
-  </td>
-  <td>
-       <%eur19%>  
-  </td>
-</tr><tr>
-  <td>
-       Fachzeitschriften, B&uuml;cher
-  </td>
-  <td>
-       <%eur20%>  
-  </td>
-</tr><tr>
-  <td>
-       Miete f&uuml;r Einrichtungen
-  </td>
-  <td>
-       <%eur21%>  
-  </td>
-</tr><tr>
-  <td>
-       Rechts- und Beratungskosten
-  </td>
-  <td>
-       <%eur22%>  
-  </td>
-</tr><tr>
-  <td>
-       B&uuml;robedarf, Porto, Telefon
-  </td>
-  <td>
-       <%eur23%>  
-  </td>
-</tr><tr>
-  <td>
-       Sonstige Aufwendungen
-  </td>
-  <td>
-       <%eur24%>  
-  </td>
-</tr><tr>
-  <td>
-       Abschreibungen auf Anlageverm&ouml;gen
-  </td>
-  <td>
-       <%eur25%>  
-  </td>
-</tr><tr>
-  <td>
-       Abschreibungen auf GWG
-  </td>
-  <td>
-       <%eur26%>  
-  </td>
-</tr><tr>
-  <td>
-       Vorsteuer
-  </td>
-  <td>
-       <%eur27%>  
-  </td>
-</tr><tr>
-  <td>
-       Umsatzsteuerzahlungen
-  </td>
-  <td>
-       <%eur28%>  
-  </td>
-</tr><tr>
-  <td>
-       Zinsaufwand
-  </td>
-  <td>
-       <%eur29%>  
-  </td>
-</tr><tr>
-  <td>
-       Au&szlig;erordentlicher Aufwand
-  </td>
-  <td>
-       <%eur30%>  
-  </td>
-</tr><tr>
-  <td>
-       Betriebliche Steuern
-  </td>
-  <td>
-       <%eur31%>  
-  </td>
-</tr>
-
-
-<tr>
-  <td> </td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left><b>Summe Ausgaben</b></th>
-  <td align=right><%sumeurb%> <br><hr noshade size=2</td>
-</tr>
-<tr>
-  <td></td>
-  <td><br><br></td>
-</tr>
-<tr valign=top>
-  <td align=left>GEWINN / VERLUST</td>
-  <td align=right><%guvsumme%><br><hr noshade size=2></td>
-</tr>
-
-</table>
-
-</body>
-</html>
-
index 097f90d..9959c45 100644 (file)
   \zahlung ~<%payment_terms%>\\
 <%end payment_terms%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 <%if ustid%>\ihreustid ~<%ustid%>.\\<%end if%>
 
 \ifthenelse{\equal{<%taxzone_id%>}{1}}
index 5f4a674..09833b8 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 \end{document}
 
index e1a737a..bd820ee 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 \gruesse \\ \\ \\
   <%employee_name%>
 
index ceb554b..5e02682 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 <%if reqdate%>
 \anfrageBenoetigtBis~<%reqdate%>.
 <%end if%>
index 690fd13..2f18eef 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 \end{document}
 
index 0e15a1a..b86f159 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 <%if reqdate%>
 \lieferungErfolgtAm ~<%reqdate%>. \\
 <%end if%>
index 277eb07..8ef6b5b 100644 (file)
         \vspace{5mm}
 <%end if%>
 
+<%if delivery_term%>
+  \lieferung ~<%delivery_term.description_long%>\\
+<%end delivery_term%>
+
 \angebotdanke\\
 <%if reqdate%>
 \angebotgueltig~<%reqdate%>.
diff --git a/templates/print/RB/taxbird.txb b/templates/print/RB/taxbird.txb
deleted file mode 100644 (file)
index c1a8a39..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-;; This file was produced by lx-office
-;; for using in taxbird. 
-;; You probably don't want to touch this 
-;; file. In case you do want it anyway, 
-;; be warned: BE CAREFUL!!
-;;
-'("Umsatzsteuervoranmeldung <%year%>" (
-("vend-id" . "74931")
-("land-lieferant" . "<%elsterland%>")
-("name-lieferant" . "<%company%>")
-("berufsbez" . "")
-("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%> ")
-("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "<%co_phone_prefix%>")
-("anschluss" . "<%co_phone%>")
-("land" . "<%taxbird_land_nr%>")
-("zeitraum" . "<%taxbird_period%>")
-("stnr" . "<%taxbird_steuernummer%>")
-
-<%foreach id%>
-("<%id%>" . "<%amount%>")<%end%>
-))
\ No newline at end of file
diff --git a/templates/print/RB/ustva-2004.tex b/templates/print/RB/ustva-2004.tex
deleted file mode 100644 (file)
index fb4b40c..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva-2004-2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva-2004-1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[22mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[14.5mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%511%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[39.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[26.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/RB/ustva-2005.tex b/templates/print/RB/ustva-2005.tex
deleted file mode 100644 (file)
index 30de7cf..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.06}[1.07]{\protect\includegraphics[viewport = 64 700 700 743]{ustva-2005-2.pdf}}}
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790]{ustva-2005-1.pdf}}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[22.5mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[7.5mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%511%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[39mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[40mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[26.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/RB/ustva-2006.tex b/templates/print/RB/ustva-2006.tex
deleted file mode 100644 (file)
index 7a54edb..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790]{ustva-2006-2.pdf}}}
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790]{ustva-2006-1.pdf}}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[29.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[24.5mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[7.5mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%511%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[42mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[8.5mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[48mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[8.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[42mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[28mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/RB/ustva-2007.tex b/templates/print/RB/ustva-2007.tex
deleted file mode 100644 (file)
index 1965fa1..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790]{ustva-2007-2.pdf}}}
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790]{ustva-2007-1.pdf}}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{}}& & & & &\\[-1mm]
-\end{tabular}\\[29.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[20.5mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[7.5mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[42mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[8.5mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[48mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[8.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[42mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[28mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
-
-
-
-
-
-
-
-
-
-
diff --git a/templates/print/RB/ustva-2008.tex b/templates/print/RB/ustva-2008.tex
deleted file mode 100644 (file)
index 2a50d36..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Jacky und Stefan Tenne 
-% Based on template by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2008.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2008.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[29.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[15.6mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[8.5mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[41.7mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[8.5mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\[0.75mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[48.3mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[8.4mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[41.7mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[28.4mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
-
-
-
-
-
-
-
-
-
-
diff --git a/templates/print/RB/ustva-2012.tex b/templates/print/RB/ustva-2012.tex
deleted file mode 100644 (file)
index 3a35db9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Marcus Habermehl
-% Based on template by Jacky und Stefan Tenne (German-ustva-2008.tex)
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2012.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2012.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%else%>
-\small{~}
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%else%>
-\small{~}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}&~& & & &\\[-1mm]
-\end{tabular}\\[2.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[9.5mm]
-\multicolumn{2}{r}{<%41%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%44%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%49%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%43%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[1.8mm]
-\multicolumn{2}{r}{<%35%>} & & \multicolumn{2}{r}{<%36%>}\\[1.8mm]
-\multicolumn{2}{r}{<%77%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%76%>} & & \multicolumn{2}{r}{<%80%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%91%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%89%>} & & \multicolumn{2}{r}{<%891%>}\\[1.8mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[1.8mm]
-\multicolumn{2}{r}{<%95%>} & & \multicolumn{2}{r}{<%98%>}\\[1.8mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%42%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%60%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%21%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%45%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[13.5mm]
-\multicolumn{2}{r}{<%46%>} & & \multicolumn{2}{r}{<%47%>}\\[1.8mm]
-\multicolumn{2}{r}{<%52%>} & & \multicolumn{2}{r}{<%53%>}\\[1.8mm]
-\multicolumn{2}{r}{<%73%>} & & \multicolumn{2}{r}{<%74%>}\\[1.8mm]
-\multicolumn{2}{r}{<%84%>} & & \multicolumn{2}{r}{<%85%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%65%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%61%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%67%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%63%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%64%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%59%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%69%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%39%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/RB/ustva.html b/templates/print/RB/ustva.html
deleted file mode 100644 (file)
index 1f5da1a..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=utf-8" http-equiv="content-type">
-  <title>Vorschau: UStVa</title>
-<!--
-Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
-Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
-Text-Erklärung und unterschiedliche Zeilenfärbung ergänzt: Kai-Martin Knaak <kmk@familieknaak.de>
--->
-  <style>
-table {
-       text-align: right;
-       border:0;
-       border-collapse:collapse;
-}
-td {
-       font-size:100%;
-       vertical-align:top;
-}
-td.text {
-       text-align: left;
-       background-color:#BDBEBD;
-}
-td.text2 {
-       text-align: left;
-       background-color:#ADBEBD;
-}
-td.spalte,
-td.zeile,
-td.betrag {
-       border:solid thin black;
-}
-td.spalte { font-weight:bold; font-size:120%; }
-td.zeile  { font-weight:bold; }
-td.betrag { width:10em; }
-td.summe  { border:solid medium black; }
-td.spacer { border:0 }
-
-tr.uebertrag td { border-top:solid medium black; }
-b.h3 { font-size:120%; }
-.ausfuellen { background-color:#FFFFC0; }
-.nodis { display:none; }
-  </style>
-</head>
-<body>
-<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
-<h2>Zeitraum vom <%fromdate%> bis <%todate%> </h2>
-
-<!-- Diese HTML-Formular ist nicht selbstrechnend.
-<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
-gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
-automatisch berechnet.</small></p>
--->
-
-<table width="100%">
-<tr align="left">
-  <td class="text">Steuernummer: <%steuernummer%></td>
-  <td class="text" width="100px">&nbsp</td>
-  <td class="text" align="right">Datum (<%Datum_heute%>)</td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br /></td>
-</tr>
-<tr align="left">
-  <td class="text">
-    Finanzamt <%FA_Name%><br />
-    <%FA_Strasse%><br />
-    <%FA_PLZ%> <%FA_Ort%><br />
-    Fax: <%FA_FAX%>
-  </td>
-  <td class="text">&nbsp;</td>
-  <td class="text">
-    Firma <%company%><br />
-    <%if company_street%>
-      <%company_street%><br />
-      <%company_city%><br />
-    <%end company_street%>
-    <%if not company_street%>
-    <%address%><!--used Address-->
-    <%end company_street%>
-  </td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br />
-  </td>
-</tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td class="text"><b class="h3">I. Anmeldung der
-Umsatzsteuer-Vorauszahlung </b></td>
-      <td colspan="4"></td>
-    </tr>
-    <tr>
-      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
-      <td colspan="4"></td>
-    </tr>
-        <tr>
-      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%41%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%44%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%49%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%43%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Steuerfreie Ums&auml;tze ohne
-Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%48%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr>
-      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
-      <td colspan="4"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%51%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
-      <td class="betrag"><%511%></td>
-    </tr>
-<%end year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%81%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
-      <td class="betrag"><%811%></td>
-    </tr>
-<%end year2007%>
-
-    <tr>
-      <td class="text">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%86%></td>
-      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
-      <td class="betrag"><%861%></td>
-    </tr>
-    <tr>
-      <td class="text2">andere Steuers&auml;tze</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%35%></td>
-      <td class="spalte">36</td>
-      <td class="betrag ausfuellen"><%36%></td>
-    </tr>
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%77%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%76%></td>
-      <td class="spalte">80</td>
-      <td class="betrag ausfuellen"><%80%></td>
-    </tr>
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-    <tr>
-      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
-      <td colspan="4"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%91%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%97%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
-      <td class="betrag"><%971%></td>
-    </tr>
-<%end if year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%89%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
-      <td class="betrag"><%891%></td>
-    </tr>
-<%end if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%93%></td>
-      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
-      <td class="betrag"><%931%></td>
-    </tr>
-    <tr>
-      <td class="text">zu anderen Steuers&auml;tzen</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%95%></td>
-      <td class="spalte">98</td>
-      <td class="betrag"><%98%></td>
-    </tr>
-    <tr>
-      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
-             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%94%></td>
-      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
-      <td class="betrag"><%96%></td>
-    </tr>
-        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen des ersten Abnehmers bei
-        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
-      <td class="spalte ausfuellen">42</td>
-      <td class="betrag ausfuellen" width="70"><%42%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
-        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
-      <td class="spalte ausfuellen">60</td>
-      <td class="betrag ausfuellen" width="70"><%60%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if year2010%>
-   <tr>
-      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
-      <td class="spalte ausfuellen">21</td>
-      <td class="betrag ausfuellen" width="70"><%21%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%end if year2010%>
-   <tr>
-      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
-      <td class="spalte ausfuellen">45</td>
-      <td class="betrag ausfuellen" width="70"><%45%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
-      <td class="betrag"><%Z43%></td>
-    </tr>
-
-    <tr class="uebertrag">
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
-      <td class="betrag"><%Z45%></td>
-    </tr>
-
-<%if year2010%>
-    <tr>
-      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
-      <td class="spalte ausfuellen">46</td>
-      <td class="betrag ausfuellen"><%46%></td>
-      <td class="spalte">47</td>
-      <td class="betrag"><%47%></td>
-    </tr>
-<%end if year2010%>
-    <tr>
-      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">52</td>
-      <td class="betrag ausfuellen"><%52%></td>
-      <td class="spalte">53</td>
-      <td class="betrag"><%53%></td>
-    </tr>
-    <tr>
-      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
-           Ums&auml;tze, die unter das GrEStG fallen.</td>
-      <td class="spalte ausfuellen">73</td>
-      <td class="betrag ausfuellen"><%73%></td>
-      <td class="spalte">74</td>
-      <td class="betrag"><%74%></td>
-    </tr>
-    <tr>
-      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">84</td>
-      <td class="betrag ausfuellen"><%84%></td>
-      <td class="spalte">85</td>
-      <td class="betrag"><%85%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
-         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
-      <td class="spalte ausfuellen">65</td>
-      <td class="betrag ausfuellen"><%65%></td>
-    </tr>
-
-
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
-      <td class="betrag"><%Z53%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%66%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
-      <td class="spalte ausfuellen">61</td>
-      <td class="betrag ausfuellen"><%61%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
-      <td class="spalte ausfuellen">62</td>
-      <td class="betrag ausfuellen"><%62%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
-          des &sect;13b Abs. 1 UStG</td>
-      <td class="spalte ausfuellen">67</td>
-      <td class="betrag ausfuellen"><%67%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
-           Durchschnitts&auml;stzen berechnet sind </td>
-      <td class="spalte ausfuellen">63</td>
-      <td class="betrag ausfuellen"><%63%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
-      <td class="spalte ausfuellen">64</td>
-      <td class="betrag ausfuellen"><%64%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
-        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
-      <td class="spalte ausfuellen">59</td>
-      <td class="betrag ausfuellen"><%59%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Verbleibender Betrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
-      <td class="betrag"><%Z62%></td>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
-        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
-        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
-      <td class="spalte ausfuellen">69</td>
-      <td class="betrag ausfuellen"><%69%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
-      <td class="betrag"><%Z65%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
-        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
-        Besteuerungszeitraums, ausf&uuml;llen)</td>
-      <td class="spalte ausfuellen">39</td>
-      <td class="betrag ausfuellen"><%39%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr class="noborder">
-      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
-                                      Verbleibender &Uuml;berschuss</b></td>
-      <td class="spalte ausfuellen">83</td>
-      <td class="summe"><%83%></td>
-    </tr>
-
-  </tbody>
-</table>
-<%if FA_steuerberater%>
-<p>
-Steuerberater:<br />
-<%FA_steuerberater_name%><br />
-<%FA_steuerberater_street%><br />
-<%FA_steuerberater_city%><br />
-Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>
-</body>
-</html>
diff --git a/templates/print/RB/ustva.tex b/templates/print/RB/ustva.tex
deleted file mode 100644 (file)
index da26f47..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[42mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/RB/winston.xml b/templates/print/RB/winston.xml
deleted file mode 100644 (file)
index ad3effa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- Diese Datei ist mit kivitendo <%version%> generiert -->
-<WinstonAusgang>
-  <Formular Typ="UST"></Formular>
-  <Ordnungsnummer><%elsterFFFF%><%elstersteuernummer%></Ordnungsnummer>
-  <AnmeldeJahr><%year%></AnmeldeJahr>
-  <AnmeldeZeitraum><%period%></AnmeldeZeitraum>
-
-<%foreach id%>
-  <Kennzahl nr="<%id%>"><%amount%></Kennzahl>
-<%end%>
-
-</WinstonAusgang>
-
diff --git a/templates/print/Service/balance_sheet.html b/templates/print/Service/balance_sheet.html
deleted file mode 100644 (file)
index 478caab..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>BALANCE SHEET
-<br><%period%>
-</h2>
-
-<table border=0>
-<tr>
-  <th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach asset_account%>
-<tr>
-  <td> </td>
-  <td><%asset_account%></td>
-  <td align=right><%asset_this_period%></td>
-  <td align=right><%asset_last_period%></td>
-</tr>
-<%end asset_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>TOTAL ASSETS</th>
-  <td align=right><%total_assets_this_period%><hr noshade size=2></td>
-  <td align=right><%total_assets_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>LIABILITIES<b><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach liability_account%>
-<tr>
-  <td></td>
-  <td><%liability_account%></td>
-  <td align=right><%liability_this_period%></td>
-  <td align=right><%liability_last_period%></td>
-</tr>
-<%end liability_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Liabilities</th>
-  <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>SHAREHOLDER'S EQUITY<br><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach equity_account%>
-<tr>
-  <td></td>
-  <td><%equity_account%></td>
-  <td align=right><%equity_this_period%></td>
-  <td align=right><%equity_last_period%></td>
-</tr>
-<%end equity_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Equity</th>
-  <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>TOTAL LIABILITIES & EQUITY</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-</table>
-
-
-
diff --git a/templates/print/Service/bin_list.html b/templates/print/Service/bin_list.html
deleted file mode 100644 (file)
index d57632d..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         
-         <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
-
-         <th align=right>
-           <h4>
-           Tel: <%tel%>
-           <br>Fax: <%fax%>
-           </h4>
-         </td>
-       </tr>
-       
-       <tr>
-         <th colspan=3>
-           <h4>L A G E R L I S T E</h4>
-         </th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% cellspacing=0 cellpadding=0>
-       <tr bgcolor=000000>
-         <th align=left width=50%><font color=ffffff>Absender</th>
-         <th align=left width=50%><font color=ffffff>Lieferanschrift</th>
-       </tr>
-
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-
-         <%if contact%>
-         <br>Kontakt: <%contact%>
-         <%end contact%>
-
-         <%if vendorphone%>
-         <br>Tel: <%vendorphone%>
-         <%end vendorphone%>
-
-         <%if vendorfax%>
-         <br>Fax: <%vendorfax%>
-         <%end vendorfax%>
-
-         <%if email%>
-         <br><%email%>
-         <%end email%>
-         
-         </td>
-         
-         <td><%shiptoname%>
-         <br><%shiptostreet%>
-         <br><%shiptozipcode%>
-         <br><%shiptocity%>
-         <br><%shiptocountry%>
-
-         <br>
-         <%if shiptocontact%>
-         <br>Kontakt: <%shiptocontact%>
-         <%end shiptocontact%>
-         
-         <%if shiptophone%>
-         <br>Tel: <%shiptophone%>
-         <%end shiptophone%>
-
-         <%if shiptofax%>
-         <br>Fax: <%shiptofax%>
-         <%end shiptofax%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr height=5></tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% border=1>
-       <tr>
-         <th width=17% align=left nowrap>BestellNr. #</th>
-         <th width=17% align=left nowrap>Datum</th>
-         <th width=17% align=left nowrap>Kontakt</th>
-         <%if warehouse%>
-         <th width=17% align=left nowrap>Lager</th>
-         <%end warehouse%>
-         <th width=17% align=left>Versandort</th>
-         <th width=15% align=left>Lieferung durch</th>
-       </tr>
-
-       <tr>
-         <td><%ordnumber%>&nbsp;</td>
-
-         <%if shippingdate%>
-         <td><%shippingdate%></td>
-         <%end shippingdate%>
-
-         <%if not shippingdate%>
-         <td><%orddate%></td>
-         <%end shippingdate%>
-
-         <td><%employee%>&nbsp;</td>
-
-         <%if warehouse%>
-         <td><%warehouse%></td>
-         <%end warehouse%>
-
-         <td><%shippingpoint%>&nbsp;</td>
-         <td><%shipvia%>&nbsp;</td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100%>
-       <tr bgcolor=000000>
-         <th align=left><font color=ffffff>Pos</th>
-         <th align=left><font color=ffffff>ArtNr.</th>
-         <th align=left><font color=ffffff>Beschreibung</th>
-         <th><font color=ffffff>Seriennummer</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Menge</th>
-         <th><font color=ffffff>Erh</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Lagerplatz</th>
-       </tr>
-
-       <%foreach number%>
-       <tr valign=top>
-         <td><%runningnumber%></td>
-         <td><%number%></td>
-         <td><%description%></td>
-         <td><%serialnumber%></td>
-         <td><%deliverydate%></td>
-         <td align=right><%qty%></td>
-         <td align=right><%ship%></td>
-         <td><%unit%></td>
-         <td><%bin%></td>
-       </tr>
-       <%end number%>
-
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td><hr noshade></td>
-  </tr>
-
-</table>
-
diff --git a/templates/print/Service/bwa.html b/templates/print/Service/bwa.html
deleted file mode 100644 (file)
index 91907d8..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-<body>
-<style type="text/css">
-<!--
-/* Allgemeine Schriftdefinition */
-th,td {
-       font-family: Arial, Verdana, Helvetica, Sans-serif;
-       font-size:small;
-}
-
-@page {
-       size: landscape;
-       margin: 0.5cm;
-}
-
-/* Definition Tabellenueberschrift */
-
-.left  { text-align:left; }
-.center        { text-align:center; }
-.right { text-align:right; }
-
-tr.headline    { border:0; }
-tr.headline td { border:0; }
-h1 { font-size:120%; }
-h2 { font-size:100%; }
-
-/* Tabellenkopf */
-th {
-       font-weight: bold;
-       border-bottom: solid thin black;
-       padding:0 10px;
-       text-align:right;
-}
-
-th.left  { border-left:  solid thin black; }
-th.right { border-right: solid thin black; }
-
-.querkopf th.right { text-align:center; }
-.querkopf th {
-       border-top: solid thin black;
-       border-bottom:0;
-}
-
-/* Tabelleninhalt */
-td {
-       text-align:right;
-       padding:0 0.5em;
-}
-td.left  { border-left:  solid thin black; }
-td.right { border-right: solid thin black; }
-
-
-/* jede zweite Zeile grau hinterlegen */
-tr.grey {
-       background:#f0f0f0;
-}
-
-/* letzte Zeile in der Tabelle */
-#last td{ border-bottom: solid thin black; }
-
-/* Zwischensumme/-ueberschriften */
-tr.subtotal td { font-weight: bold; }
-
-/* Fusszeile unter der Tabelle */
-td.footer {
-       text-align:right;
-       font-size:smaller;
-}
-//-->
-</style>
-
-<table border=0 cellpadding=0 cellspacing=0>
-<tr class="headline">
-       <td class="left"><%company%></td>
-       <td class=center colspan="9">
-               <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
-               <h2>SKR3 &nbsp; BWA</h2>
-       </td>
-       <td class="right">Blatt 1</td>
-</tr>
-       
-       
-</tr>  
-<tr class="querkopf">
-       <th class="left">&nbsp;</th>
-       <th class="center" colspan="5">Im Betrachtungszeitraum</th>
-       <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
-</tr>
-
-<tr>
-       <th class="left">Bezeichnung</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th>Aufschlag</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th class="right">Aufschlag</th>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
-       <td><nobr><%jetzt1%></nobr></td>
-       <td><nobr><%jetztgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm1%></nobr></td>
-       <td><nobr><%kummgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
-       <td><nobr><%jetzt2%></nobr></td>
-       <td><nobr><%jetztgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>       
-       <td><nobr><%kumm2%></nobr></td>
-       <td><nobr><%kummgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
-       <td><nobr><%jetzt3%></nobr></td>
-       <td><nobr><%jetztgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm3%></nobr></td>
-       <td><nobr><%kummgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtleistung</nobr></td>
-       <td><nobr><%jetztgesamtleistung%></nobr></td>
-       <td><nobr><%jetztglgesamtleistung%></nobr></td>
-       <td><nobr><%jetztgkgesamtleistung%></nobr></td>
-       <td><nobr><%jetztpkgesamtleistung%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtleistung%></nobr></td>
-       <td><nobr><%kummglgesamtleistung%></nobr></td>
-       <td><nobr><%kummgkgesamtleistung%></nobr></td>
-       <td><nobr><%kummpkgesamtleistung%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey">
-       <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
-       <td><nobr><%jetzt4%></nobr></td>
-       <td><nobr><%jetztgl4%></nobr></td>
-       <td><nobr><%jetztgk4%></nobr></td>
-       <td><nobr><%jetztpk4%></nobr></td>
-       <td><nobr><%jetztauf4%></nobr></td>
-       <td><nobr><%kumm4%></nobr></td>
-       <td><nobr><%kummgl4%></nobr></td>
-       <td><nobr><%kummgk4%></nobr></td>
-       <td><nobr><%kummpk4%></nobr></td>
-       <td class="right"><nobr><%kummauf4%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Rohertrag</nobr></td>
-       <td><nobr><%jetztrohertrag%></nobr></td>
-       <td><nobr><%jetztglrohertrag%></nobr></td>
-       <td><nobr><%jetztgkrohertrag%></nobr></td>
-       <td><nobr><%jetztpkrohertrag%></nobr></td>
-       <td><nobr><%jetztaufrohertrag%></nobr></td>
-       <td><nobr><%kummrohertrag%></nobr></td>
-       <td><nobr><%kummglrohertrag%></nobr></td>
-       <td><nobr><%kummgkrohertrag%></nobr></td>
-       <td><nobr><%kummpkrohertrag%></nobr></td>
-       <td class="right"><nobr><%kummaufrohertrag%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey">
-       <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
-       <td><nobr><%jetzt5%></nobr></td>
-       <td><nobr><%jetztgl5%></nobr></td>
-       <td><nobr><%jetztgk5%></nobr></td>
-       <td><nobr><%jetztpk5%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm5%></nobr></td>
-       <td><nobr><%kummgl5%></nobr></td>
-       <td><nobr><%kummgk5%></nobr></td>
-       <td><nobr><%kummpk5%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
-       <td><nobr><%jetztbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummglbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
-       <td
-class="right"><nobr><%kummaufbetriebrohertrag%></nobr>&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left">Kostenarten:</td>
-       <td class="right" colspan="10">&nbsp;</td>
-</tr>  
-               
-<tr class="white">
-       <td class="left"><nobr>Personalkosten</nobr></td>
-       <td><nobr><%jetzt10%></nobr></td>
-       <td><nobr><%jetztgl10%></nobr></td>
-       <td><nobr><%jetztgk10%></nobr></td>
-       <td><nobr><%jetztpk10%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm10%></nobr></td>
-       <td><nobr><%kummgl10%></nobr></td>
-       <td><nobr><%kummgk10%></nobr></td>
-       <td><nobr><%kummpk10%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Raumkosten</nobr></td>
-       <td><nobr><%jetzt11%></nobr></td>
-       <td><nobr><%jetztgl11%></nobr></td>
-       <td><nobr><%jetztgk11%></nobr></td>
-       <td><nobr><%jetztpk11%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm11%></nobr></td>
-       <td><nobr><%kummgl11%></nobr></td>
-       <td><nobr><%kummgk11%></nobr></td>
-       <td><nobr><%kummpk11%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Betriebl.Steuern</nobr></td>
-       <td><nobr><%jetzt12%></nobr></td>
-       <td><nobr><%jetztgl12%></nobr></td>
-       <td><nobr><%jetztgk12%></nobr></td>
-       <td><nobr><%jetztpk12%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm12%></nobr></td>
-       <td><nobr><%kummgl12%></nobr></td>
-       <td><nobr><%kummgk12%></nobr></td>
-       <td><nobr><%kummpk12%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
-       <td><nobr><%jetzt13%></nobr></td>
-       <td><nobr><%jetztgl13%></nobr></td>
-       <td><nobr><%jetztgk13%></nobr></td>
-       <td><nobr><%jetztpk13%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm13%></nobr></td>
-       <td><nobr><%kummgl13%></nobr></td>
-       <td><nobr><%kummgk13%></nobr></td>
-       <td><nobr><%kummpk13%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
-       <td><nobr><%jetzt14%></nobr></td>
-       <td><nobr><%jetztgl14%></nobr></td>
-       <td><nobr><%jetztgk14%></nobr></td>
-       <td><nobr><%jetztpk14%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm14%></nobr></td>
-       <td><nobr><%kummgl14%></nobr></td>
-       <td><nobr><%kummgk14%></nobr></td>
-       <td><nobr><%kummpk14%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
-       <td><nobr><%jetzt15%></nobr></td>
-       <td><nobr><%jetztgl15%></nobr></td>
-       <td><nobr><%jetztgk15%></nobr></td>
-       <td><nobr><%jetztpk15%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm15%></nobr></td>
-       <td><nobr><%kummgl15%></nobr></td>
-       <td><nobr><%kummgk15%></nobr></td>
-       <td><nobr><%kummpk15%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
-       <td><nobr><%jetzt16%></nobr></td>
-       <td><nobr><%jetztgl16%></nobr></td>
-       <td><nobr><%jetztgk16%></nobr></td>
-       <td><nobr><%jetztpk16%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm16%></nobr></td>
-       <td><nobr><%kummgl16%></nobr>
-</td>
-       <td><nobr><%kummgk16%></nobr></td>
-       <td><nobr><%kummpk16%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Abschreibungen</nobr></td>
-       <td><nobr><%jetzt17%></nobr></td>
-       <td><nobr><%jetztgl17%></nobr></td>
-       <td><nobr><%jetztgk17%></nobr></td>
-       <td><nobr><%jetztpk17%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm17%></nobr></td>
-       <td><nobr><%kummgl17%></nobr></td>
-       <td><nobr><%kummgk17%></nobr></td>
-       <td><nobr><%kummpk17%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
-       <td><nobr><%jetzt18%></nobr></td>
-       <td><nobr><%jetztgl18%></nobr></td>
-       <td><nobr><%jetztgk18%></nobr></td>
-       <td><nobr><%jetztpk18%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm18%></nobr></td>
-       <td><nobr><%kummgl18%></nobr></td>
-       <td><nobr><%kummgk18%></nobr></td>
-       <td><nobr><%kummpk18%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Sonstige Kosten</nobr></td>
-       <td><nobr><%jetzt20%></nobr></td>
-       <td><nobr><%jetztgl20%></nobr></td>
-       <td><nobr><%jetztgk20%></nobr></td>
-       <td><nobr><%jetztpk20%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm20%></nobr></td>
-       <td><nobr><%kummgl20%></nobr></td>
-       <td><nobr><%kummgk20%></nobr></td>
-       <td><nobr><%kummpk20%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtkosten</nobr></td>
-       <td><nobr><%jetztgesamtkosten%></nobr></td>
-       <td><nobr><%jetztglgesamtkosten%></nobr></td>
-       <td><nobr><%jetztgkgesamtkosten%></nobr></td>
-       <td><nobr><%jetztpkgesamtkosten%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtkosten%></nobr></td>
-       <td><nobr><%kummglgesamtkosten%></nobr></td>
-       <td><nobr><%kummgkgesamtkosten%></nobr></td>
-       <td><nobr><%kummpkgesamtkosten%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-       
-<tr class="grey subtotal">
-<td class="left"><nobr>Betriebsergebnis</nobr></td>
-       <td><nobr><%jetztbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-       </tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Zinsaufwand</nobr></td>
-       <td><nobr><%jetzt30%></nobr></td>
-       <td><nobr><%jetztgl30%></nobr></td>
-       <td><nobr><%jetztgk30%></nobr></td>
-       <td><nobr><%jetztpk30%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm30%></nobr></td>
-       <td><nobr><%kummgl30%></nobr></td>
-       <td><nobr><%kummgk30%></nobr></td>
-       <td><nobr><%kummpk30%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
-       <td><nobr><%jetzt19%></nobr></td>
-       <td><nobr><%jetztgl19%></nobr></td>
-       <td><nobr><%jetztgk19%></nobr></td>
-       <td><nobr><%jetztpk19%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm19%></nobr></td>
-       <td><nobr><%kummg191%></nobr></td>
-       <td><nobr><%kummgk19%></nobr></td>
-       <td><nobr><%kummpk19%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
-       <td><nobr><%jetzt31%></nobr></td>
-       <td><nobr><%jetztgl31%></nobr></td>
-       <td><nobr><%jetztgk31%></nobr></td>
-       <td><nobr><%jetztpk31%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm31%></nobr></td>
-       <td><nobr><%kummgl31%></nobr></td>
-       <td><nobr><%kummgk31%></nobr></td>
-       <td><nobr><%kummpk31%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white subtotal">
-<td class="left"><nobr>Neutraler Aufwand</nobr></td>
-       <td><nobr><%jetztneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztglneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutraleraufwand%></nobr></td>
-       <td><nobr><%kummglneutraleraufwand%></nobr></td>
-       <td><nobr><%kummgkneutraleraufwand%></nobr></td>
-       <td><nobr><%kummpkneutraleraufwand%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="white">
-       <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
-       <td><nobr><%jetzt32%></nobr></td>
-       <td><nobr><%jetztgl32%></nobr></td>
-       <td><nobr><%jetztgk32%></nobr></td>
-       <td><nobr><%jetztpk32%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm32%></nobr></td>
-       <td><nobr><%kummgl32%></nobr></td>
-       <td><nobr><%kummgk32%></nobr></td>
-       <td><nobr><%kummpk32%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
-       <td><nobr><%jetzt33%></nobr></td>
-       <td><nobr><%jetztgl33%></nobr></td>
-       <td><nobr><%jetztgk33%></nobr></td>
-       <td><nobr><%jetztpk33%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm33%></nobr></td>
-       <td><nobr><%kummgl33%></nobr></td>
-       <td><nobr><%kummgk33%></nobr></td>
-       <td><nobr><%kummpk33%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
-       <td><nobr><%jetzt34%></nobr></td>
-       <td><nobr><%jetztgl34%></nobr>
-       <td><nobr><%jetztgk34%></nobr></td>
-       <td><nobr><%jetztpk34%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm34%></nobr></td>
-       <td><nobr><%kummgl34%></nobr></td>
-       <td><nobr><%kummgk34%></nobr></td>
-       <td><nobr><%kummpk34%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Neutraler Ertrag</nobr></td>
-       <td><nobr><%jetztneutralerertrag%></nobr></td>
-       <td><nobr><%jetztglneutralerertrag%></nobr></td>
-       <td><nobr><%jetztgkneutralerertrag%></nobr></td>
-       <td><nobr><%jetztpkneutralerertrag%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutralerertrag%></nobr></td>
-       <td><nobr><%kummglneutralerertrag%></nobr></td>
-       <td><nobr><%kummgkneutralerertrag%></nobr></td>
-       <td><nobr><%kummpkneutralerertrag%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
-       <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
-       <td><nobr><%jetzt35%></nobr></td>
-       <td><nobr><%jetztgl35%></nobr></td>
-       <td><nobr><%jetztgk35%></nobr></td>
-       <td><nobr><%jetztpk35%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm35%></nobr></td>
-       <td><nobr><%kummgl35%></nobr></td>
-       <td><nobr><%kummgk35%></nobr></td>
-       <td><nobr><%kummpk35%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
-       <td><nobr><%jetztergebnis%></nobr></td>
-       <td><nobr><%jetztglergebnis%></nobr></td>
-       <td><nobr><%jetztgkergebnis%></nobr></td>
-       <td><nobr><%jetztpkergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnis%></nobr></td>
-       <td><nobr><%kummglergebnis%></nobr></td>
-       <td><nobr><%kummgkergebnis%></nobr></td>
-       <td><nobr><%kummpkergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white" id=last><td class="left right"
-colspan="11">&nbsp;</td></tr>
-
-<tr>
-       <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: LX Office ERP
-(Version <%version%>) - Formular: 11.01.2007</td>
-</tr>
-
-</table>
-</body>
diff --git a/templates/print/Service/check.tex b/templates/print/Service/check.tex
deleted file mode 100644 (file)
index 4f97660..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.4cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.0cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-
-\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
-
-\parbox[t]{12cm}{
-  <%company%>
-
-  <%address%>}
-\hfill
-\parbox[t]{6cm}{\hfill <%source%>}
-
-\vspace*{0.6cm}
-
-<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
-
-\vspace{0.5cm}
-
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
-
-\vspace{0.5cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{2.8cm}
-
-<%company%>
-
-\vspace{0.5cm}
-
-<%name%> \hfill <%datepaid%> \hfill <%source%>
-
-\vspace{0.5cm}
-\begin{tabularx}{\textwidth}{lXrr@{}}
-\textbf{Invoice No.} & \textbf{Invoice Date}
-  & \textbf{Due} & \textbf{Applied} \\
-<%foreach invnumber%>
-<%invnumber%> & <%invdate%> \dotfill
-  & <%due%> & <%paid%> \\
-<%end invnumber%>
-\end{tabularx}
-
-\vfill
-
-\end{document}
-
diff --git a/templates/print/Service/income_statement.html b/templates/print/Service/income_statement.html
deleted file mode 100644 (file)
index e9d6a40..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>INCOME STATEMENT
-<br><%period%>
-</h2>
-
-
-<table width=100% border=0>
-<tr>
-  <th width=400 align=left colspan=2>INCOME<br><hr width=300 size=5 align=left noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach income_account%>
-<tr>
-  <td width=4> </td>
-  <td><%income_account%></td>
-  <td align=right><%income_this_period%></td>
-  <td align=right><%income_last_period%></td>
-</tr>
-<%end income_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Income</th>
-  <td align=right><%total_income_this_period%><hr noshade size=2></td>
-  <td align=right><%total_income_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=2>EXPENSES<br><hr width=300 size=5 align=left noshade></th>
-</tr>
-
-<%foreach expense_account%>
-<tr>
-  <td> </td>
-  <td><%expense_account%></td>
-  <td align=right><%expenses_this_period%></td>
-  <td align=right><%expenses_last_period%></td>
-</tr>
-<%end expense_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Expenses</th>
-  <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>INCOME / (LOSS)</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-
-</table>
-
-
-
-
-
-
-
-
diff --git a/templates/print/Service/invoice.html b/templates/print/Service/invoice.html
deleted file mode 100644 (file)
index 47493ed..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr>
-  <td width=10>
-  </td> 
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      <br>Tel/Fax <%tel%> / <%fax%>
-      </h4>
-    </td>
-
-    <th colspan=2>
-      <h4 align=center>I N V O I C E</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Date</th><td width=10> </td><td><%invdate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Number</th><td></td><td><%invnumber%></td></tr>
-    </tr>
-
-<!-- prepared by: <%username%>
--->
-
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>To:</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-      
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td> 
-    </td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>Description</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Amount</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-      <td><%description%></td>
-      <td>&nbsp;</td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=3><hr noshade></td>
-    </tr>
-    
-    <tr>
-<%if taxincluded%>
-      <td>&nbsp;</td>
-      <th align=right>Total</th>
-      <td align=right><%invtotal%></td>
-<%end taxincluded%>
-<%if not taxincluded%>
-      <td>&nbsp;</td>
-      <th align=right>Subtotal</th>
-      <td align=right><%subtotal%></td>
-<%end taxincluded%>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=2 align=right><%taxdescription%></th>
-      <td align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-<!--
-  <%taxbase%> = total netamount for each tax bracket
-  <%taxrate%> = taxrate in percent
--->
-     
-<%if paid%>
-    <tr>
-      <td>&nbsp;</td>
-      <th align=right>Paid</th>
-      <td align=right><%paid%></td>
-    </tr>
-<%end paid%>
-
-    <tr>
-      <td>&nbsp;</td>
-      <td colspan=2><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td>
-<%if terms%>
-Terms &nbsp;Net <b><%terms%></b> days
-<%end terms%>
-</td>
-      <th align=right>Total</th>
-      <th align=right><%total%></th>
-    </tr>
-    
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<%if notes%>
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-      <td>Notes</td>
-      <td><pre><%notes%></pre></td>
-      <td align=right>
-      &nbsp;
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-<%end notes%>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <th colspan=3>
-  Please make check payable to <%company%>
-  <br>Thank you for your valued business!
-  </th>
-</tr>
-
-
-<tr><td>&nbsp;</td></tr>
-
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    Payment due NET <%terms%> Days from date of Invoice.
-    Interest on overdue amounts will acrue at the rate of 1.5% per month
-    from due date until paid in full.
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=3 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
-    </tr>
-<%end tax%>
-
-<!--
-  %username% = user name
-  %businessnumber% = business number
--->
-
-<!-- banking information
-    <tr>
-      <th colspan=3 align=left><font size=-2>Banking Information:
-      <br>Bank
-      <br>Transit No.
-      <br>Account No.
-      </th>
-    </tr>
--->
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
diff --git a/templates/print/Service/invoice.tex b/templates/print/Service/invoice.tex
deleted file mode 100644 (file)
index d81b837..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Telephone & <%tel%>\\
-    Facsimile & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{I N V O I C E}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date} & <%invdate%> \\
-  \textbf{Number} & <%invnumber%> \\
-  \textbf{Customer} & <%customer_id%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
-  \textbf{Description} & \textbf{Qt'y} &
-    \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
-<%foreach number%>
-  <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Subtotal} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> on <%taxbase%> & <%tax%> \\
-<%end tax%>
-<%if paid%>
-  \textbf{Paid} & - <%paid%> \\
-<%end paid%>
-  \hline
-  \textbf{Balance Owing} & \textbf{<%total%>} \\
-
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  All prices in \textbf{<%currency%>} funds.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-\vfill
-\centerline{\textbf{Thank You for your valued business!}}
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-Payment due NET <%terms%> Days from date of Invoice. Interest on overdue
-amounts will acrue at the rate of 1.5\% per month starting <%duedate%>
-until paid in full.
-}
-
-\end{document}
-
-
diff --git a/templates/print/Service/purchase_order.html b/templates/print/Service/purchase_order.html
deleted file mode 100644 (file)
index 30d7521..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Telephone: <%tel%>
-      <br>Facsimile: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>P U R C H A S E &nbsp;&nbsp; O R D E R</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Order Date</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Required by</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>Number</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>To:</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>Number</th>
-      <th align=left><font color=ffffff>Description</th>
-      <th><font color=ffffff>Qt'y</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Price</th>
-      <th><font color=ffffff>Amount</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=6><hr noshade></td>
-    </tr>
-    
-    <tr>
-      <th colspan=4 align=right>Subtotal</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=2>Terms Net <b><%terms%></b> days</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%total%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Notes</td>
-      <td><pre><%notes%></pre></td>
-<%end notes%>
-      <td align=right>
-      All prices in <b><%currency%></b> Funds
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    Payment due NET <%terms%> Days from date of Invoice.
-    Interest on overdue amounts will acrue at the rate of 1.5% per month
-    from due date until paid in full. Items returned are subject to
-    a 10% restocking charge. A return authorization must be obtained
-    from <%company%> before goods are returned. Returns must be shipped
-    prepaid and properly insured. <%company%> will not be responsible
-    for damages during transit.
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
diff --git a/templates/print/Service/purchase_order.tex b/templates/print/Service/purchase_order.tex
deleted file mode 100644 (file)
index dd96e43..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Telephone & <%tel%>\\
-    Facsimile & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{P U R C H A S E} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date} & <%orddate%> \\
-<%if reqdate%>
-  \textbf{Required by} & <%reqdate%> \\
-<%end reqdate%>
-  \textbf{Number} & <%ordnumber%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
-  \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
-    \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Subtotal} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> on <%taxbase%> & <%tax%>\\
-<%end tax%>
-  \hline
-  \textbf{Total} & \textbf{<%ordtotal%>}\\
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  All prices in \textbf{<%currency%>} funds.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-
-%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-%\footnotetext[1]{\tiny }
-
-\end{document}
-
-
diff --git a/templates/print/Service/receipt.tex b/templates/print/Service/receipt.tex
deleted file mode 100644 (file)
index 4f97660..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.4cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.0cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-
-\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
-
-\parbox[t]{12cm}{
-  <%company%>
-
-  <%address%>}
-\hfill
-\parbox[t]{6cm}{\hfill <%source%>}
-
-\vspace*{0.6cm}
-
-<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
-
-\vspace{0.5cm}
-
-\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
-
-\vspace{0.5cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{2.8cm}
-
-<%company%>
-
-\vspace{0.5cm}
-
-<%name%> \hfill <%datepaid%> \hfill <%source%>
-
-\vspace{0.5cm}
-\begin{tabularx}{\textwidth}{lXrr@{}}
-\textbf{Invoice No.} & \textbf{Invoice Date}
-  & \textbf{Due} & \textbf{Applied} \\
-<%foreach invnumber%>
-<%invnumber%> & <%invdate%> \dotfill
-  & <%due%> & <%paid%> \\
-<%end invnumber%>
-\end{tabularx}
-
-\vfill
-
-\end{document}
-
diff --git a/templates/print/Service/sales_order.html b/templates/print/Service/sales_order.html
deleted file mode 100644 (file)
index 0a2ffe8..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Telelephone: <%tel%>
-      <br>Facsimile: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>S A L E S &nbsp;&nbsp; O R D E R</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Order Date</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Required by</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>Number</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>To:</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-<%if contact%>
-      <p>Attn: <%contact%>
-%end contact%>
-
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>Number</th>
-      <th align=left><font color=ffffff>Description</th>
-      <th><font color=ffffff>Qt'y</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Price</th>
-      <th><font color=ffffff>Amount</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=6><hr noshade></td>
-    </tr>
-    
-    <tr>
-      <th colspan=4 align=right>Subtotal</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=2>Terms Net <b><%terms%></b> days</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%total%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Notes</td>
-      <td><pre><%notes%></pre></td>
-<%end notes%>
-      <td align=right>
-      All prices in <b><%currency%></b> Funds
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    Payment due NET <%terms%> Days from date of Invoice.
-    Interest on overdue amounts will acrue at the rate of 1.5% per month
-    from due date until paid in full. Items returned are subject to
-    a 10% restocking charge. A return authorization must be obtained
-    from <%company%> before goods are returned. Returns must be shipped
-    prepaid and properly insured. <%company%> will not be responsible
-    for damages during transit.
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
diff --git a/templates/print/Service/sales_order.tex b/templates/print/Service/sales_order.tex
deleted file mode 100644 (file)
index ff65581..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rr@{}}
-    Telephone & <%tel%>\\
-    Facsimile & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{3.5cm}
-
-\textbf{S A L E S} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
-\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
-  \textbf{Date} & <%orddate%> \\
-<%if reqdate%>
-  \textbf{Required by} & <%reqdate%> \\
-<%end reqdate%>
-  \textbf{Number} & <%ordnumber%>
-\end{tabular}
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
-  \textbf{Description} & \textbf{Qt'y} &
-    \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
-<%foreach number%>
-  <%description%> & <%qty%> &
-    <%unit%> & <%sellprice%> & <%linetotal%> \\
-<%end number%>
-\end{tabular*}
-
-
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
-
-\vspace{0.2cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Subtotal} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
-  <%taxdescription%> on <%taxbase%> & <%tax%>\\
-<%end tax%>
-  \hline
-  \textbf{Total} & \textbf{<%ordtotal%>}\\
-\end{tabularx}
-
-\vspace{0.3cm}
-
-\hfill
-  All prices in \textbf{<%currency%>} funds.
-
-\vspace{12pt}
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
-}
-
-
-%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-%\footnotetext[1]{\tiny }
-
-\end{document}
-
diff --git a/templates/print/Service/statement.html b/templates/print/Service/statement.html
deleted file mode 100644 (file)
index 441e6e0..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
-         <td align=right>
-         <h4>
-         Tel: <%tel%>
-         <br>Fax: <%fax%>
-         </h4>
-         </td>
-       </tr>
-       <tr>
-         <th colspan=3><h4>S T A T E M E N T</h4></th>
-       </tr>
-       <tr>
-         <td colspan=3 align=right><%statementdate%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-<%if customerphone%>
-         <br>Tel: <%customerphone%>
-<%end customerphone%>
-<%if customerfax%>
-         <br>Fax: <%customerfax%>
-<%end customerfax%>
-<%if email%>
-         <br><%email%>
-<%end email%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-        <tr>
-         <th align=left>Invoice #</th>
-         <th width=15%>Date</th>
-         <th width=15%>Due</th>
-         <th width=10%>Current</th>
-         <th width=10%>30</th>
-         <th width=10%>60</th>
-         <th width=10%>90+</th>
-       </tr>
-<%foreach invnumber%>
-       <tr>
-         <td><%invnumber%></td>
-         <td><%invdate%></td>
-         <td><%duedate%></td>
-         <td align=right><%c0%></td>
-         <td align=right><%c30%></td>
-         <td align=right><%c60%></td>
-         <td align=right><%c90%></td>
-       </tr>
-<%end invnumber%>
-        <tr>
-         <td colspan=7><hr size=1></td>
-       </tr>
-       <tr>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <th align=right><%c0total%></td>
-         <th align=right><%c30total%></td>
-         <th align=right><%c60total%></td>
-         <th align=right><%c90total%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td align=right>
-      <table width=50%>
-        <tr>
-         <th>Total Outstanding</th>
-          <th align=right><%total%></th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td><hr noshade></td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>Please make check payable to <b><%company%></b>.
-    </td>
-  </tr>
-  <tr height=20></tr>
-</table>
-
diff --git a/templates/print/Service/statement.tex b/templates/print/Service/statement.tex
deleted file mode 100644 (file)
index 3f67d4b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{19.2cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\newsavebox{\hdr}
-\sbox{\hdr}{
-  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-  \parbox{\textwidth}{
-    \parbox[b]{12cm}{
-      <%company%>
-
-      <%address%>}\hfill
-    \begin{tabular}[b]{rrr@{}}
-    Tel & <%tel%>\\
-    Fax & <%fax%>
-    \end{tabular}
-
-    \rule[1.5ex]{\textwidth}{0.5pt}
-  }
-}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
-
-\pagestyle{myheadings}
-%\thispagestyle{empty}     use this with letterhead paper
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{1.5cm}
-
-\parbox[t]{1cm}{\hfill}
-\parbox[t]{10.5cm}{
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-}
-\parbox[t]{7.5cm}{
-<%if customerphone%>
-Tel: <%customerphone%>
-<%end customerphone%>
-
-<%if customerfax%>
-Fax: <%customerfax%>
-<%end customerfax%>
-
-<%email%>
-}
-\hfill
-
-\vspace{1cm}
-
-\textbf{S T A T E M E N T} \hfill
-
-\hfill <%statementdate%>
-
-\vspace{2cm}
-
-\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
-  \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
-  \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
-<%foreach invnumber%>
-  <%invnumber%> & <%invdate%> & <%duedate%> &
-  <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
-<%end invnumber%>
-\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
-\end{tabular*}
-\rule{\textwidth}{1pt}
-
-\vspace{1cm}
-
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
-  \textbf{Total outstanding} & <%total%>
-\end{tabularx}
-
-\vfill
-
-Please make check payable to <%company%>
-
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
-
-\footnotetext[1]{\tiny
-}
-
-\end{document}
-
diff --git a/templates/print/Service/taxbird.txb b/templates/print/Service/taxbird.txb
deleted file mode 100644 (file)
index c1a8a39..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-;; This file was produced by lx-office
-;; for using in taxbird. 
-;; You probably don't want to touch this 
-;; file. In case you do want it anyway, 
-;; be warned: BE CAREFUL!!
-;;
-'("Umsatzsteuervoranmeldung <%year%>" (
-("vend-id" . "74931")
-("land-lieferant" . "<%elsterland%>")
-("name-lieferant" . "<%company%>")
-("berufsbez" . "")
-("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%> ")
-("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "<%co_phone_prefix%>")
-("anschluss" . "<%co_phone%>")
-("land" . "<%taxbird_land_nr%>")
-("zeitraum" . "<%taxbird_period%>")
-("stnr" . "<%taxbird_steuernummer%>")
-
-<%foreach id%>
-("<%id%>" . "<%amount%>")<%end%>
-))
\ No newline at end of file
diff --git a/templates/print/Service/ustva-2012.tex b/templates/print/Service/ustva-2012.tex
deleted file mode 100644 (file)
index 3a35db9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Marcus Habermehl
-% Based on template by Jacky und Stefan Tenne (German-ustva-2008.tex)
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2012.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2012.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%else%>
-\small{~}
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%else%>
-\small{~}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}&~& & & &\\[-1mm]
-\end{tabular}\\[2.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[9.5mm]
-\multicolumn{2}{r}{<%41%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%44%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%49%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%43%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[1.8mm]
-\multicolumn{2}{r}{<%35%>} & & \multicolumn{2}{r}{<%36%>}\\[1.8mm]
-\multicolumn{2}{r}{<%77%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%76%>} & & \multicolumn{2}{r}{<%80%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%91%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%89%>} & & \multicolumn{2}{r}{<%891%>}\\[1.8mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[1.8mm]
-\multicolumn{2}{r}{<%95%>} & & \multicolumn{2}{r}{<%98%>}\\[1.8mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%42%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%60%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%21%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%45%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[13.5mm]
-\multicolumn{2}{r}{<%46%>} & & \multicolumn{2}{r}{<%47%>}\\[1.8mm]
-\multicolumn{2}{r}{<%52%>} & & \multicolumn{2}{r}{<%53%>}\\[1.8mm]
-\multicolumn{2}{r}{<%73%>} & & \multicolumn{2}{r}{<%74%>}\\[1.8mm]
-\multicolumn{2}{r}{<%84%>} & & \multicolumn{2}{r}{<%85%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%65%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%61%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%67%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%63%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%64%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%59%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%69%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%39%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/Service/ustva.html b/templates/print/Service/ustva.html
deleted file mode 100644 (file)
index 1f5da1a..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=utf-8" http-equiv="content-type">
-  <title>Vorschau: UStVa</title>
-<!--
-Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
-Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
-Text-Erklärung und unterschiedliche Zeilenfärbung ergänzt: Kai-Martin Knaak <kmk@familieknaak.de>
--->
-  <style>
-table {
-       text-align: right;
-       border:0;
-       border-collapse:collapse;
-}
-td {
-       font-size:100%;
-       vertical-align:top;
-}
-td.text {
-       text-align: left;
-       background-color:#BDBEBD;
-}
-td.text2 {
-       text-align: left;
-       background-color:#ADBEBD;
-}
-td.spalte,
-td.zeile,
-td.betrag {
-       border:solid thin black;
-}
-td.spalte { font-weight:bold; font-size:120%; }
-td.zeile  { font-weight:bold; }
-td.betrag { width:10em; }
-td.summe  { border:solid medium black; }
-td.spacer { border:0 }
-
-tr.uebertrag td { border-top:solid medium black; }
-b.h3 { font-size:120%; }
-.ausfuellen { background-color:#FFFFC0; }
-.nodis { display:none; }
-  </style>
-</head>
-<body>
-<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
-<h2>Zeitraum vom <%fromdate%> bis <%todate%> </h2>
-
-<!-- Diese HTML-Formular ist nicht selbstrechnend.
-<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
-gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
-automatisch berechnet.</small></p>
--->
-
-<table width="100%">
-<tr align="left">
-  <td class="text">Steuernummer: <%steuernummer%></td>
-  <td class="text" width="100px">&nbsp</td>
-  <td class="text" align="right">Datum (<%Datum_heute%>)</td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br /></td>
-</tr>
-<tr align="left">
-  <td class="text">
-    Finanzamt <%FA_Name%><br />
-    <%FA_Strasse%><br />
-    <%FA_PLZ%> <%FA_Ort%><br />
-    Fax: <%FA_FAX%>
-  </td>
-  <td class="text">&nbsp;</td>
-  <td class="text">
-    Firma <%company%><br />
-    <%if company_street%>
-      <%company_street%><br />
-      <%company_city%><br />
-    <%end company_street%>
-    <%if not company_street%>
-    <%address%><!--used Address-->
-    <%end company_street%>
-  </td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br />
-  </td>
-</tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td class="text"><b class="h3">I. Anmeldung der
-Umsatzsteuer-Vorauszahlung </b></td>
-      <td colspan="4"></td>
-    </tr>
-    <tr>
-      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
-      <td colspan="4"></td>
-    </tr>
-        <tr>
-      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%41%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%44%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%49%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%43%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Steuerfreie Ums&auml;tze ohne
-Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%48%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr>
-      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
-      <td colspan="4"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%51%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
-      <td class="betrag"><%511%></td>
-    </tr>
-<%end year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%81%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
-      <td class="betrag"><%811%></td>
-    </tr>
-<%end year2007%>
-
-    <tr>
-      <td class="text">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%86%></td>
-      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
-      <td class="betrag"><%861%></td>
-    </tr>
-    <tr>
-      <td class="text2">andere Steuers&auml;tze</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%35%></td>
-      <td class="spalte">36</td>
-      <td class="betrag ausfuellen"><%36%></td>
-    </tr>
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%77%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%76%></td>
-      <td class="spalte">80</td>
-      <td class="betrag ausfuellen"><%80%></td>
-    </tr>
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-    <tr>
-      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
-      <td colspan="4"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%91%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%97%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
-      <td class="betrag"><%971%></td>
-    </tr>
-<%end if year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%89%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
-      <td class="betrag"><%891%></td>
-    </tr>
-<%end if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%93%></td>
-      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
-      <td class="betrag"><%931%></td>
-    </tr>
-    <tr>
-      <td class="text">zu anderen Steuers&auml;tzen</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%95%></td>
-      <td class="spalte">98</td>
-      <td class="betrag"><%98%></td>
-    </tr>
-    <tr>
-      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
-             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%94%></td>
-      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
-      <td class="betrag"><%96%></td>
-    </tr>
-        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen des ersten Abnehmers bei
-        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
-      <td class="spalte ausfuellen">42</td>
-      <td class="betrag ausfuellen" width="70"><%42%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
-        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
-      <td class="spalte ausfuellen">60</td>
-      <td class="betrag ausfuellen" width="70"><%60%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if year2010%>
-   <tr>
-      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
-      <td class="spalte ausfuellen">21</td>
-      <td class="betrag ausfuellen" width="70"><%21%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%end if year2010%>
-   <tr>
-      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
-      <td class="spalte ausfuellen">45</td>
-      <td class="betrag ausfuellen" width="70"><%45%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
-      <td class="betrag"><%Z43%></td>
-    </tr>
-
-    <tr class="uebertrag">
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
-      <td class="betrag"><%Z45%></td>
-    </tr>
-
-<%if year2010%>
-    <tr>
-      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
-      <td class="spalte ausfuellen">46</td>
-      <td class="betrag ausfuellen"><%46%></td>
-      <td class="spalte">47</td>
-      <td class="betrag"><%47%></td>
-    </tr>
-<%end if year2010%>
-    <tr>
-      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">52</td>
-      <td class="betrag ausfuellen"><%52%></td>
-      <td class="spalte">53</td>
-      <td class="betrag"><%53%></td>
-    </tr>
-    <tr>
-      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
-           Ums&auml;tze, die unter das GrEStG fallen.</td>
-      <td class="spalte ausfuellen">73</td>
-      <td class="betrag ausfuellen"><%73%></td>
-      <td class="spalte">74</td>
-      <td class="betrag"><%74%></td>
-    </tr>
-    <tr>
-      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">84</td>
-      <td class="betrag ausfuellen"><%84%></td>
-      <td class="spalte">85</td>
-      <td class="betrag"><%85%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
-         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
-      <td class="spalte ausfuellen">65</td>
-      <td class="betrag ausfuellen"><%65%></td>
-    </tr>
-
-
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
-      <td class="betrag"><%Z53%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%66%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
-      <td class="spalte ausfuellen">61</td>
-      <td class="betrag ausfuellen"><%61%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
-      <td class="spalte ausfuellen">62</td>
-      <td class="betrag ausfuellen"><%62%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
-          des &sect;13b Abs. 1 UStG</td>
-      <td class="spalte ausfuellen">67</td>
-      <td class="betrag ausfuellen"><%67%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
-           Durchschnitts&auml;stzen berechnet sind </td>
-      <td class="spalte ausfuellen">63</td>
-      <td class="betrag ausfuellen"><%63%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
-      <td class="spalte ausfuellen">64</td>
-      <td class="betrag ausfuellen"><%64%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
-        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
-      <td class="spalte ausfuellen">59</td>
-      <td class="betrag ausfuellen"><%59%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Verbleibender Betrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
-      <td class="betrag"><%Z62%></td>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
-        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
-        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
-      <td class="spalte ausfuellen">69</td>
-      <td class="betrag ausfuellen"><%69%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
-      <td class="betrag"><%Z65%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
-        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
-        Besteuerungszeitraums, ausf&uuml;llen)</td>
-      <td class="spalte ausfuellen">39</td>
-      <td class="betrag ausfuellen"><%39%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr class="noborder">
-      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
-                                      Verbleibender &Uuml;berschuss</b></td>
-      <td class="spalte ausfuellen">83</td>
-      <td class="summe"><%83%></td>
-    </tr>
-
-  </tbody>
-</table>
-<%if FA_steuerberater%>
-<p>
-Steuerberater:<br />
-<%FA_steuerberater_name%><br />
-<%FA_steuerberater_street%><br />
-<%FA_steuerberater_city%><br />
-Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>
-</body>
-</html>
diff --git a/templates/print/Service/ustva.tex b/templates/print/Service/ustva.tex
deleted file mode 100644 (file)
index da26f47..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[42mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/Service/winston.xml b/templates/print/Service/winston.xml
deleted file mode 100644 (file)
index ad3effa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- Diese Datei ist mit kivitendo <%version%> generiert -->
-<WinstonAusgang>
-  <Formular Typ="UST"></Formular>
-  <Ordnungsnummer><%elsterFFFF%><%elstersteuernummer%></Ordnungsnummer>
-  <AnmeldeJahr><%year%></AnmeldeJahr>
-  <AnmeldeZeitraum><%period%></AnmeldeZeitraum>
-
-<%foreach id%>
-  <Kennzahl nr="<%id%>"><%amount%></Kennzahl>
-<%end%>
-
-</WinstonAusgang>
-
diff --git a/templates/print/Standard/balance_sheet.html b/templates/print/Standard/balance_sheet.html
deleted file mode 100644 (file)
index 985b6ef..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-
-<body bgcolor="#ffffff">
-
-<h2 align="center">
-<%company%>
-<br><%address%>
-
-<p>BILANZ
-<br><%period%>
-</h2>
-
-<table border="0">
-<tr>
-  <th align="left" width="400" colspan="2">AKTIVA<br><hr align="left" width="250" size="5" noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach asset_account%>
-<tr>
-  <td> </td>
-  <td><%asset_account%></td>
-  <td align="right"><%asset_this_period%></td>
-  <td align="right"><%asset_last_period%></td>
-</tr>
-<%end asset_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <th align="left" colspan="2">TOTAL</th>
-  <td align="right"><%total_assets_this_period%><hr noshade size="2"></td>
-  <td align="right"><%total_assets_last_period%><hr noshade size="2"></td>
-</tr>
-
-<tr>
-  <th align="left" colspan="4">PASSIVA<b><hr align="left" width="250" size="5" noshade></th>
-</tr>
-
-<%foreach liability_account%>
-<tr>
-  <td></td>
-  <td><%liability_account%></td>
-  <td align="right"><%liability_this_period%></td>
-  <td align="right"><%liability_last_period%></td>
-</tr>
-<%end liability_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <td></td>
-  <th align="left">TOTAL</th>
-  <td align="right"><%total_liabilities_this_period%><br><hr noshade size="2"</td>
-  <td align="right"><%total_liabilities_last_period%><br><hr noshade size="2"</td>
-</tr>
-
-<tr>
-  <th align="left" colspan="4">EIGENTUM<br><hr align="left" width="250" size="5" noshade></th>
-</tr>
-
-<%foreach equity_account%>
-<tr>
-  <td></td>
-  <td><%equity_account%></td>
-  <td align="right"><%equity_this_period%></td>
-  <td align="right"><%equity_last_period%></td>
-</tr>
-<%end equity_account%>
-
-<tr>
-  <td colspan="2"> </td>
-  <td><hr noshade size="1"></td>
-  <td><hr noshade size="1"></td>
-</tr>
-
-<tr valign="top">
-  <td></td>
-  <th align="left">TOTAL</th>
-  <td align="right"><%total_equity_this_period%><br><hr noshade size="2"</td>
-  <td align="right"><%total_equity_last_period%><br><hr noshade size="2"</td>
-</tr>
-
-<tr valign="top">
-  <th align="left" colspan="2">TOTAL PASSIVA &amp; EIGENTUM</th>
-  <td align="right"><%total_this_period%><br><hr noshade size="2"></td>
-  <td align="right"><%total_last_period%><br><hr noshade size="2"></td>
-</tr>
-</table>
-
-
-
diff --git a/templates/print/Standard/bwa.html b/templates/print/Standard/bwa.html
deleted file mode 100644 (file)
index 91907d8..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-<body>
-<style type="text/css">
-<!--
-/* Allgemeine Schriftdefinition */
-th,td {
-       font-family: Arial, Verdana, Helvetica, Sans-serif;
-       font-size:small;
-}
-
-@page {
-       size: landscape;
-       margin: 0.5cm;
-}
-
-/* Definition Tabellenueberschrift */
-
-.left  { text-align:left; }
-.center        { text-align:center; }
-.right { text-align:right; }
-
-tr.headline    { border:0; }
-tr.headline td { border:0; }
-h1 { font-size:120%; }
-h2 { font-size:100%; }
-
-/* Tabellenkopf */
-th {
-       font-weight: bold;
-       border-bottom: solid thin black;
-       padding:0 10px;
-       text-align:right;
-}
-
-th.left  { border-left:  solid thin black; }
-th.right { border-right: solid thin black; }
-
-.querkopf th.right { text-align:center; }
-.querkopf th {
-       border-top: solid thin black;
-       border-bottom:0;
-}
-
-/* Tabelleninhalt */
-td {
-       text-align:right;
-       padding:0 0.5em;
-}
-td.left  { border-left:  solid thin black; }
-td.right { border-right: solid thin black; }
-
-
-/* jede zweite Zeile grau hinterlegen */
-tr.grey {
-       background:#f0f0f0;
-}
-
-/* letzte Zeile in der Tabelle */
-#last td{ border-bottom: solid thin black; }
-
-/* Zwischensumme/-ueberschriften */
-tr.subtotal td { font-weight: bold; }
-
-/* Fusszeile unter der Tabelle */
-td.footer {
-       text-align:right;
-       font-size:smaller;
-}
-//-->
-</style>
-
-<table border=0 cellpadding=0 cellspacing=0>
-<tr class="headline">
-       <td class="left"><%company%></td>
-       <td class=center colspan="9">
-               <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
-               <h2>SKR3 &nbsp; BWA</h2>
-       </td>
-       <td class="right">Blatt 1</td>
-</tr>
-       
-       
-</tr>  
-<tr class="querkopf">
-       <th class="left">&nbsp;</th>
-       <th class="center" colspan="5">Im Betrachtungszeitraum</th>
-       <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
-</tr>
-
-<tr>
-       <th class="left">Bezeichnung</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th>Aufschlag</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th class="right">Aufschlag</th>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
-       <td><nobr><%jetzt1%></nobr></td>
-       <td><nobr><%jetztgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm1%></nobr></td>
-       <td><nobr><%kummgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
-       <td><nobr><%jetzt2%></nobr></td>
-       <td><nobr><%jetztgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>       
-       <td><nobr><%kumm2%></nobr></td>
-       <td><nobr><%kummgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
-       <td><nobr><%jetzt3%></nobr></td>
-       <td><nobr><%jetztgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm3%></nobr></td>
-       <td><nobr><%kummgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtleistung</nobr></td>
-       <td><nobr><%jetztgesamtleistung%></nobr></td>
-       <td><nobr><%jetztglgesamtleistung%></nobr></td>
-       <td><nobr><%jetztgkgesamtleistung%></nobr></td>
-       <td><nobr><%jetztpkgesamtleistung%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtleistung%></nobr></td>
-       <td><nobr><%kummglgesamtleistung%></nobr></td>
-       <td><nobr><%kummgkgesamtleistung%></nobr></td>
-       <td><nobr><%kummpkgesamtleistung%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey">
-       <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
-       <td><nobr><%jetzt4%></nobr></td>
-       <td><nobr><%jetztgl4%></nobr></td>
-       <td><nobr><%jetztgk4%></nobr></td>
-       <td><nobr><%jetztpk4%></nobr></td>
-       <td><nobr><%jetztauf4%></nobr></td>
-       <td><nobr><%kumm4%></nobr></td>
-       <td><nobr><%kummgl4%></nobr></td>
-       <td><nobr><%kummgk4%></nobr></td>
-       <td><nobr><%kummpk4%></nobr></td>
-       <td class="right"><nobr><%kummauf4%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Rohertrag</nobr></td>
-       <td><nobr><%jetztrohertrag%></nobr></td>
-       <td><nobr><%jetztglrohertrag%></nobr></td>
-       <td><nobr><%jetztgkrohertrag%></nobr></td>
-       <td><nobr><%jetztpkrohertrag%></nobr></td>
-       <td><nobr><%jetztaufrohertrag%></nobr></td>
-       <td><nobr><%kummrohertrag%></nobr></td>
-       <td><nobr><%kummglrohertrag%></nobr></td>
-       <td><nobr><%kummgkrohertrag%></nobr></td>
-       <td><nobr><%kummpkrohertrag%></nobr></td>
-       <td class="right"><nobr><%kummaufrohertrag%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey">
-       <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
-       <td><nobr><%jetzt5%></nobr></td>
-       <td><nobr><%jetztgl5%></nobr></td>
-       <td><nobr><%jetztgk5%></nobr></td>
-       <td><nobr><%jetztpk5%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm5%></nobr></td>
-       <td><nobr><%kummgl5%></nobr></td>
-       <td><nobr><%kummgk5%></nobr></td>
-       <td><nobr><%kummpk5%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
-       <td><nobr><%jetztbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummglbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
-       <td
-class="right"><nobr><%kummaufbetriebrohertrag%></nobr>&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left">Kostenarten:</td>
-       <td class="right" colspan="10">&nbsp;</td>
-</tr>  
-               
-<tr class="white">
-       <td class="left"><nobr>Personalkosten</nobr></td>
-       <td><nobr><%jetzt10%></nobr></td>
-       <td><nobr><%jetztgl10%></nobr></td>
-       <td><nobr><%jetztgk10%></nobr></td>
-       <td><nobr><%jetztpk10%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm10%></nobr></td>
-       <td><nobr><%kummgl10%></nobr></td>
-       <td><nobr><%kummgk10%></nobr></td>
-       <td><nobr><%kummpk10%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Raumkosten</nobr></td>
-       <td><nobr><%jetzt11%></nobr></td>
-       <td><nobr><%jetztgl11%></nobr></td>
-       <td><nobr><%jetztgk11%></nobr></td>
-       <td><nobr><%jetztpk11%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm11%></nobr></td>
-       <td><nobr><%kummgl11%></nobr></td>
-       <td><nobr><%kummgk11%></nobr></td>
-       <td><nobr><%kummpk11%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Betriebl.Steuern</nobr></td>
-       <td><nobr><%jetzt12%></nobr></td>
-       <td><nobr><%jetztgl12%></nobr></td>
-       <td><nobr><%jetztgk12%></nobr></td>
-       <td><nobr><%jetztpk12%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm12%></nobr></td>
-       <td><nobr><%kummgl12%></nobr></td>
-       <td><nobr><%kummgk12%></nobr></td>
-       <td><nobr><%kummpk12%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
-       <td><nobr><%jetzt13%></nobr></td>
-       <td><nobr><%jetztgl13%></nobr></td>
-       <td><nobr><%jetztgk13%></nobr></td>
-       <td><nobr><%jetztpk13%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm13%></nobr></td>
-       <td><nobr><%kummgl13%></nobr></td>
-       <td><nobr><%kummgk13%></nobr></td>
-       <td><nobr><%kummpk13%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
-       <td><nobr><%jetzt14%></nobr></td>
-       <td><nobr><%jetztgl14%></nobr></td>
-       <td><nobr><%jetztgk14%></nobr></td>
-       <td><nobr><%jetztpk14%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm14%></nobr></td>
-       <td><nobr><%kummgl14%></nobr></td>
-       <td><nobr><%kummgk14%></nobr></td>
-       <td><nobr><%kummpk14%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
-       <td><nobr><%jetzt15%></nobr></td>
-       <td><nobr><%jetztgl15%></nobr></td>
-       <td><nobr><%jetztgk15%></nobr></td>
-       <td><nobr><%jetztpk15%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm15%></nobr></td>
-       <td><nobr><%kummgl15%></nobr></td>
-       <td><nobr><%kummgk15%></nobr></td>
-       <td><nobr><%kummpk15%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
-       <td><nobr><%jetzt16%></nobr></td>
-       <td><nobr><%jetztgl16%></nobr></td>
-       <td><nobr><%jetztgk16%></nobr></td>
-       <td><nobr><%jetztpk16%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm16%></nobr></td>
-       <td><nobr><%kummgl16%></nobr>
-</td>
-       <td><nobr><%kummgk16%></nobr></td>
-       <td><nobr><%kummpk16%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Abschreibungen</nobr></td>
-       <td><nobr><%jetzt17%></nobr></td>
-       <td><nobr><%jetztgl17%></nobr></td>
-       <td><nobr><%jetztgk17%></nobr></td>
-       <td><nobr><%jetztpk17%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm17%></nobr></td>
-       <td><nobr><%kummgl17%></nobr></td>
-       <td><nobr><%kummgk17%></nobr></td>
-       <td><nobr><%kummpk17%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
-       <td><nobr><%jetzt18%></nobr></td>
-       <td><nobr><%jetztgl18%></nobr></td>
-       <td><nobr><%jetztgk18%></nobr></td>
-       <td><nobr><%jetztpk18%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm18%></nobr></td>
-       <td><nobr><%kummgl18%></nobr></td>
-       <td><nobr><%kummgk18%></nobr></td>
-       <td><nobr><%kummpk18%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Sonstige Kosten</nobr></td>
-       <td><nobr><%jetzt20%></nobr></td>
-       <td><nobr><%jetztgl20%></nobr></td>
-       <td><nobr><%jetztgk20%></nobr></td>
-       <td><nobr><%jetztpk20%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm20%></nobr></td>
-       <td><nobr><%kummgl20%></nobr></td>
-       <td><nobr><%kummgk20%></nobr></td>
-       <td><nobr><%kummpk20%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtkosten</nobr></td>
-       <td><nobr><%jetztgesamtkosten%></nobr></td>
-       <td><nobr><%jetztglgesamtkosten%></nobr></td>
-       <td><nobr><%jetztgkgesamtkosten%></nobr></td>
-       <td><nobr><%jetztpkgesamtkosten%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtkosten%></nobr></td>
-       <td><nobr><%kummglgesamtkosten%></nobr></td>
-       <td><nobr><%kummgkgesamtkosten%></nobr></td>
-       <td><nobr><%kummpkgesamtkosten%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-       
-<tr class="grey subtotal">
-<td class="left"><nobr>Betriebsergebnis</nobr></td>
-       <td><nobr><%jetztbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-       </tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Zinsaufwand</nobr></td>
-       <td><nobr><%jetzt30%></nobr></td>
-       <td><nobr><%jetztgl30%></nobr></td>
-       <td><nobr><%jetztgk30%></nobr></td>
-       <td><nobr><%jetztpk30%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm30%></nobr></td>
-       <td><nobr><%kummgl30%></nobr></td>
-       <td><nobr><%kummgk30%></nobr></td>
-       <td><nobr><%kummpk30%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
-       <td><nobr><%jetzt19%></nobr></td>
-       <td><nobr><%jetztgl19%></nobr></td>
-       <td><nobr><%jetztgk19%></nobr></td>
-       <td><nobr><%jetztpk19%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm19%></nobr></td>
-       <td><nobr><%kummg191%></nobr></td>
-       <td><nobr><%kummgk19%></nobr></td>
-       <td><nobr><%kummpk19%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
-       <td><nobr><%jetzt31%></nobr></td>
-       <td><nobr><%jetztgl31%></nobr></td>
-       <td><nobr><%jetztgk31%></nobr></td>
-       <td><nobr><%jetztpk31%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm31%></nobr></td>
-       <td><nobr><%kummgl31%></nobr></td>
-       <td><nobr><%kummgk31%></nobr></td>
-       <td><nobr><%kummpk31%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white subtotal">
-<td class="left"><nobr>Neutraler Aufwand</nobr></td>
-       <td><nobr><%jetztneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztglneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutraleraufwand%></nobr></td>
-       <td><nobr><%kummglneutraleraufwand%></nobr></td>
-       <td><nobr><%kummgkneutraleraufwand%></nobr></td>
-       <td><nobr><%kummpkneutraleraufwand%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="white">
-       <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
-       <td><nobr><%jetzt32%></nobr></td>
-       <td><nobr><%jetztgl32%></nobr></td>
-       <td><nobr><%jetztgk32%></nobr></td>
-       <td><nobr><%jetztpk32%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm32%></nobr></td>
-       <td><nobr><%kummgl32%></nobr></td>
-       <td><nobr><%kummgk32%></nobr></td>
-       <td><nobr><%kummpk32%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
-       <td><nobr><%jetzt33%></nobr></td>
-       <td><nobr><%jetztgl33%></nobr></td>
-       <td><nobr><%jetztgk33%></nobr></td>
-       <td><nobr><%jetztpk33%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm33%></nobr></td>
-       <td><nobr><%kummgl33%></nobr></td>
-       <td><nobr><%kummgk33%></nobr></td>
-       <td><nobr><%kummpk33%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
-       <td><nobr><%jetzt34%></nobr></td>
-       <td><nobr><%jetztgl34%></nobr>
-       <td><nobr><%jetztgk34%></nobr></td>
-       <td><nobr><%jetztpk34%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm34%></nobr></td>
-       <td><nobr><%kummgl34%></nobr></td>
-       <td><nobr><%kummgk34%></nobr></td>
-       <td><nobr><%kummpk34%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Neutraler Ertrag</nobr></td>
-       <td><nobr><%jetztneutralerertrag%></nobr></td>
-       <td><nobr><%jetztglneutralerertrag%></nobr></td>
-       <td><nobr><%jetztgkneutralerertrag%></nobr></td>
-       <td><nobr><%jetztpkneutralerertrag%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutralerertrag%></nobr></td>
-       <td><nobr><%kummglneutralerertrag%></nobr></td>
-       <td><nobr><%kummgkneutralerertrag%></nobr></td>
-       <td><nobr><%kummpkneutralerertrag%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
-       <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
-       <td><nobr><%jetzt35%></nobr></td>
-       <td><nobr><%jetztgl35%></nobr></td>
-       <td><nobr><%jetztgk35%></nobr></td>
-       <td><nobr><%jetztpk35%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm35%></nobr></td>
-       <td><nobr><%kummgl35%></nobr></td>
-       <td><nobr><%kummgk35%></nobr></td>
-       <td><nobr><%kummpk35%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
-       <td><nobr><%jetztergebnis%></nobr></td>
-       <td><nobr><%jetztglergebnis%></nobr></td>
-       <td><nobr><%jetztgkergebnis%></nobr></td>
-       <td><nobr><%jetztpkergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnis%></nobr></td>
-       <td><nobr><%kummglergebnis%></nobr></td>
-       <td><nobr><%kummgkergebnis%></nobr></td>
-       <td><nobr><%kummpkergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white" id=last><td class="left right"
-colspan="11">&nbsp;</td></tr>
-
-<tr>
-       <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: LX Office ERP
-(Version <%version%>) - Formular: 11.01.2007</td>
-</tr>
-
-</table>
-</body>
index 3dd8b58..12538f4 100755 (executable)
@@ -37,7 +37,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -208,7 +207,7 @@ $(foreach number)$
        \ifthenelse{\isempty{$(sellprice)$}}{&}{
                \numprint{$(sellprice)$}
                \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
-               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}  
+               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
        }\\ %
   $(end number)$
 
@@ -229,7 +228,7 @@ $(foreach number)$
 %       {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
                {$(taxdescription)$}:  & \numprint{$(tax)$}& \currency\\
    $(end tax)$
-   \midrule 
+   \midrule
    {\textbf{Rechnungsbetrag:}} & \bfseries\numprint{\invtotal} & \textbf{\currency}\\
 % ---------- Wenn bereits etwas gezahlt wurde ----------
 $(if invtotal != total)$
diff --git a/templates/print/Standard/income_statement.html b/templates/print/Standard/income_statement.html
deleted file mode 100644 (file)
index 36b612b..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-<body>
-
-<h2 align=center>
-Einnahmen&uuml;berschu&szlig;rechnung</h2>
-<h3 align=center>-E&Uuml;R- (Gewinnermittlung nach &sect;4 Abs. 3 EStG)
-<br><%period%>
-</h3>
-
-<table width=100% border=0>
-<tr>
-  <td width=75% align=left colspan=2><font size="+1"><b>A. Betriebseinnahmen</font></b><br></td>
-  <td></td>
-</tr>
-
-<tr>
-  <td>
-       Umsatzerl&ouml;se  
-  </td>
-  <td>
-       <%eur1%>
-  </td>
-</tr>
-<tr>
-  <td>
-       sonstige Erl&ouml;se  
-  </td>
-  <td>
-       <%eur2%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Privatanteile
-  </td>
-  <td>
-       <%eur3%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Zinsertr&auml;ge
-  </td>
-  <td>
-       <%eur4%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Au&szlig;erordentliche Ertr&auml;ge
-  </td>
-  <td>
-       <%eur5%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Vereinnahmte Umsatzsteuer
-  </td>
-  <td>
-       <%eur6%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Umsatzsteuererstattungen
-  </td>
-  <td>
-       <%eur7%>  
-  </td>
-</tr>
-
-
-<tr>
-  <td> </td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left><b>Summe Einnahmen</b></th>
-  <td align=right><%sumeura%><hr noshade size=2></td>
-</tr>
-<tr>
-  <td></td>
-  <td><br><br></td>
-</tr>
-<tr>
-  <td align=left><font size="+1"><b>B. Betriebsausgaben</font></b><br></td>
-  <td></td>
-</tr>
-
-<tr>
-  <td>
-       Wareneing&auml;nge
-  </td>
-  <td>
-       <%eur8%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       L&ouml;hne und Geh&auml;ter
-  </td>
-  <td>
-       <%eur9%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Gesetzlicher sozialer Aufwand
-  </td>
-  <td>
-       <%eur10%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Mieten
-  </td>
-  <td>
-       <%eur11%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Gas, Strom, Wasser
-  </td>
-  <td>
-       <%eur12%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Instandhaltung
-  </td>
-  <td>
-       <%eur13%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Steuern, Versicherungen, Beitr&auml;ge
-  </td>
-  <td>
-       <%eur14%>  
-  </td>
-</tr>
-<tr>
-  <td>
-       Kfz-Steuern
-  </td>
-  <td>
-       <%eur15%>  
-  </td>
-</tr><tr>
-  <td>
-       Kfz-Versicherungen
-  </td>
-  <td>
-       <%eur16%>  
-  </td>
-</tr><tr>
-  <td>
-       Sonstige Fahrzeugkosten
-  </td>
-  <td>
-       <%eur17%>  
-  </td>
-</tr><tr>
-  <td>
-       Werbe- und Reisekosten
-  </td>
-  <td>
-       <%eur18%>  
-  </td>
-</tr><tr>
-  <td>
-       Instandhaltung und Werkzeuge
-  </td>
-  <td>
-       <%eur19%>  
-  </td>
-</tr><tr>
-  <td>
-       Fachzeitschriften, B&uuml;cher
-  </td>
-  <td>
-       <%eur20%>  
-  </td>
-</tr><tr>
-  <td>
-       Miete f&uuml;r Einrichtungen
-  </td>
-  <td>
-       <%eur21%>  
-  </td>
-</tr><tr>
-  <td>
-       Rechts- und Beratungskosten
-  </td>
-  <td>
-       <%eur22%>  
-  </td>
-</tr><tr>
-  <td>
-       B&uuml;robedarf, Porto, Telefon
-  </td>
-  <td>
-       <%eur23%>  
-  </td>
-</tr><tr>
-  <td>
-       Sonstige Aufwendungen
-  </td>
-  <td>
-       <%eur24%>  
-  </td>
-</tr><tr>
-  <td>
-       Abschreibungen auf Anlageverm&ouml;gen
-  </td>
-  <td>
-       <%eur25%>  
-  </td>
-</tr><tr>
-  <td>
-       Abschreibungen auf GWG
-  </td>
-  <td>
-       <%eur26%>  
-  </td>
-</tr><tr>
-  <td>
-       Vorsteuer
-  </td>
-  <td>
-       <%eur27%>  
-  </td>
-</tr><tr>
-  <td>
-       Umsatzsteuerzahlungen
-  </td>
-  <td>
-       <%eur28%>  
-  </td>
-</tr><tr>
-  <td>
-       Zinsaufwand
-  </td>
-  <td>
-       <%eur29%>  
-  </td>
-</tr><tr>
-  <td>
-       Au&szlig;erordentlicher Aufwand
-  </td>
-  <td>
-       <%eur30%>  
-  </td>
-</tr><tr>
-  <td>
-       Betriebliche Steuern
-  </td>
-  <td>
-       <%eur31%>  
-  </td>
-</tr>
-
-
-<tr>
-  <td> </td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left><b>Summe Ausgaben</b></th>
-  <td align=right><%sumeurb%> <br><hr noshade size=2</td>
-</tr>
-<tr>
-  <td></td>
-  <td><br><br></td>
-</tr>
-<tr valign=top>
-  <td align=left>GEWINN / VERLUST</td>
-  <td align=right><%guvsumme%><br><hr noshade size=2></td>
-</tr>
-
-</table>
-
-</body>
-</html>
-
index 78710fd..be93079 100644 (file)
@@ -37,7 +37,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
 % ---------- Begrüßung und Bemerkungen ----------
 \vspace{ 5mm}
 \lettergreeting
-Hiermit erlauben wir uns, Ihnen die nachfolgenden Positionen $(if orddate)$gemäß 
+Hiermit erlauben wir uns, Ihnen die nachfolgenden Positionen $(if orddate)$gemäß
 Ihrem Auftrag vom \orddate{ }$(end)$in Rechnung zu stellen.\\
 
-Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) 
+Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel)
 oder per E-Mail (\employeeemail) gerne zur Verfügung.\\[1\baselineskip]
 \ifthenelse{\isempty{$(notes)$}}{}{
       $(notes)$\\[1\baselineskip]
@@ -207,7 +206,7 @@ $(foreach number)$
        \ifthenelse{\isempty{$(sellprice)$}}{&}{
                \numprint{$(sellprice)$}
                \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
-               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}  
+               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
        }\\ %
   $(end number)$
 
@@ -228,7 +227,7 @@ $(foreach number)$
 %       {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
                {$(taxdescription)$}:  & \numprint{$(tax)$}& \currency\\
    $(end tax)$
-   \midrule  
+   \midrule
    {\textbf{Rechnungsbetrag:}} & \bfseries\numprint{\invtotal} & \textbf{\currency}\\
 % ---------- Wenn bereits etwas gezahlt wurde ----------
 $(if invtotal != total)$
@@ -270,7 +269,7 @@ $(end)$
 % ---------- Nachbemerkung mit max. Abstand nach unten ----------
 $(if payment_terms)$
 \vspace*{0.5em}
-\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\ 
+\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\
 $(end)$
 \vspace*{0.5em}
 %Bitte überweisen Sie den Rechnungsbetrag in Höhe von
index d534769..5da19ac 100644 (file)
@@ -36,7 +36,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -164,7 +163,7 @@ $(foreach dn_invnumber)$
   $(dn_amount)$ \euro & $(dn_fee)$  \euro & $(dn_interest)$  \euro & $(dn_linetotal)$   \euro \\[1pt]
 $(end dn_invnumber)$
 \cline{1-7}\\
- Insgesamt: & & & $(total_open_amount)$ \euro & $(fee)$ \euro & $(total_interest)$ \euro & \textbf{$(total_amount)$  \euro} 
+ Insgesamt: & & & $(total_open_amount)$ \euro & $(fee)$ \euro & $(total_interest)$ \euro & \textbf{$(total_amount)$  \euro}
 \end{tabular*}
 \rule{\textwidth}{0.5pt}
 
index a60b698..182db66 100644 (file)
@@ -36,7 +36,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
index adefdde..b71f1d3 100644 (file)
@@ -37,7 +37,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- eigene Bankverbindung falls nicht im Briefkopf ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währung setzen  ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -199,7 +198,7 @@ nachfolgend aufgeführte Bestellung auf das unten angegebene Konto.
        \ifthenelse{\isempty{$(sellprice)$}}{&}{
                \numprint{$(sellprice)$}
                \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
-               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}  
+               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
        }\\ %
   $(end number)$
 
index 3abc871..8315e1c 100644 (file)
@@ -35,7 +35,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -221,7 +220,7 @@ Bei Fragen zur Bestellung, steht Ihnen \employeename \ per Telefon (\employeetel
 \end{tabular}
 }
 \vfill
-Grundlage dieses Auftrages sind unsere Einkaufsbedingungen. 
+Grundlage dieses Auftrages sind unsere Einkaufsbedingungen.
 Wir bitten um gleichlautende Auftragsbestätigung.\\
 \vspace{1.5\baselineskip}
 
index 913df1e..d70cd11 100644 (file)
@@ -36,7 +36,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Adressat ----------
 \newcommand{\name}{$(name)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
index bcad78b..51842a8 100644 (file)
@@ -4,7 +4,7 @@
 % Version 2.5 vom 15.Oktober 2011
 % Basiert auf der Arbeit von kmk@lilalaser.de / 2007
 % Diese Vorlage steht unter der GPL-Lizenz, Version 3
-% siehe http://www.gnu.de/licenses/gpl-3.0.html             
+% siehe http://www.gnu.de/licenses/gpl-3.0.html
 % ----------
 % config: tag-style=$( )$
 % ----------
@@ -12,9 +12,9 @@
 \usepackage{fancyhdr}       % Für den Seitenkopf und -Fuß
 \usepackage{ifpdf}          % Erlaubt eine Code-Weiche für PDF, oder DVI Ausgabe
 \usepackage{xifthen}        % Allgemeine Code-Weiche
-\usepackage{graphicx}       % Fuer die Einbindung der Logo-Graphik 
+\usepackage{graphicx}       % Fuer die Einbindung der Logo-Graphik
 \usepackage{german}         % Deutsche Trenn-Tabelle
-\usepackage[utf8]{inputenc} % Umlaute direkt eingeben 
+\usepackage[utf8]{inputenc} % Umlaute direkt eingeben
 \usepackage{textcomp}       % Sonderzeichen
 \usepackage{lastpage}       % Fuer die Angabe "Seite 2 von 5"
 \usepackage{filecontents}   % Um von latex aus eine Datei schreiben zu koennen
@@ -24,8 +24,8 @@
 \newcommand*{\sperren}[1]{\normalsize\textls*[200]{#1}} %Sperrung Überrschriften
 
 
-% ---------- Report-Variablen zur Verwendung in kivitendobriefkopf.tex ---------- 
-% ----------  Die eigenen Daten ---------- 
+% ---------- Report-Variablen zur Verwendung in kivitendobriefkopf.tex ----------
+% ----------  Die eigenen Daten ----------
 \newcommand{\employeename}{$(employee_name)$}
 \newcommand{\employeecompany}{$(employee_company)$}
 \newcommand{\employeeaddress}{$(employee_address)$}
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
-% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ---------- 
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 % \newcommand{\companybankcode}{$(company_bank_code)$}
 % \newcommand{\companyaccountnumber}{$(company_account_number)$}
 
-% ---------- Adressat ---------- 
+% ---------- Adressat ----------
 \newcommand{\name}{$(name)$}
 \newcommand{\departmentone}{$(department_1)$}
 \newcommand{\departmenttwo}{$(department_2)$}
@@ -56,7 +56,7 @@
 \newcommand{\phone}{$(customerphone)$}
 \newcommand{\fax}{$(customerfax)$}
 \newcommand{\lettergreeting}{
-       \ifthenelse{\equal{$(cp_gender)$}{f}} 
+       \ifthenelse{\equal{$(cp_gender)$}{f}}
         {Sehr geehrte Frau $(cp_name)$,}
        {\ifthenelse{\equal{$(cp_gender)$}{m}}
          {Sehr geehrter Herr $(cp_name)$,}
@@ -64,7 +64,7 @@
        }\\[0.3em]
 }
 
-% ---------- Bestellvariablen ---------- 
+% ---------- Bestellvariablen ----------
 \newcommand{\ordnumber}{$(ordnumber)$}
 \newcommand{\donumber}{$(donumber)$}
 %\newcommand{\donumber}{Lieferschein zu Auftrag Nr. \ordnumber}
@@ -74,7 +74,7 @@
 \newcommand{\reqdate}{$(reqdate)$}
 \newcommand{\kundennummer}{$(customernumber)$}
 
-% ---------- Lieferadresse ---------- 
+% ---------- Lieferadresse ----------
 \newcommand{\shiptoname}{$(shiptoname)$}
 \newcommand{\shiptocontact}{$(shiptocontact)$}
 \newcommand{\shiptodepartmentone}{$(shiptodepartment_1)$}
 \newcommand{\shiptozipcode}{$(shiptozipcode)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
-% ---------- Währungszeichen ---------- 
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+% ---------- Währungszeichen ----------
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
-% ---------- Briefkopf dazuladen ---------- 
+% ---------- Briefkopf dazuladen ----------
 \input{kivitendobriefkopf}
 
 \begin{document}
-% ---------- Schrift Hauptdokuments (Computermodern-sanserif)  ---------- 
+% ---------- Schrift Hauptdokuments (Computermodern-sanserif)  ----------
 % \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
 % ---------- Schrift Helvetica ------------------------
 \fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
-% ---------- Firmenlogo nur erste Seite ---------- 
-\thispagestyle{briefkopf}                              
-% ---------- Datum und Nummern ---------- 
+% ---------- Firmenlogo nur erste Seite ----------
+\thispagestyle{briefkopf}
+% ---------- Datum und Nummern ----------
 % Position unterhalb des Briefkopfs
-\vspace*{\vlogospacing}        
+\vspace*{\vlogospacing}
 \renewcommand{\arraystretch}{0.9}
 \begin{minipage}[b]{177mm}
 \sperren{\textbf{Lieferschein Nr. \donumber}}
                \textbf{Auftrag Nr.} & \ordnumber\\
                \textbf{Lieferschein Nr.} & \donumber\\
                \nonemptyline{\textbf{Vorraussichtl. Lieferdatum:} &}{\reqdate}
-               \textbf{Ansprechpartner} & \employeename\\              
+               \textbf{Ansprechpartner} & \employeename\\
                \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
-               \nonemptyline{\textbf{E-Mail} &}{\employeeemail}                                                
+               \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
        \end{tabular}\\[10mm plus 20mm minus 10mm]
 \end{minipage}
-\renewcommand{\arraystretch}{1}        
+\renewcommand{\arraystretch}{1}
 \normalsize
-% ---------- Begrüßung und Bemerkungen ---------- 
+% ---------- Begrüßung und Bemerkungen ----------
 \vspace{ 5mm}
 %\lettergreeting
 Wir liefern Ihnen gemäß Ihrem Auftrag %
-\ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{ }}% 
+\ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{ }}%
 die unten aufgeführten Positionen.\\
 Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügnung.\par
-      
-% ---------- Die eigentliche-Tabelle ---------- 
-% ---------- Tabelle puffern ---------- 
+
+% ---------- Die eigentliche-Tabelle ----------
+% ---------- Tabelle puffern ----------
 \begin{filecontents}{\employeetable}
-% ---------- Spaltendefinition ---------- 
+% ---------- Spaltendefinition ----------
 \begin{longtable}{@{}rlX@{ }rl@{}}
-% ---------- Kopfzeile der Tabelle ---------- 
+% ---------- Kopfzeile der Tabelle ----------
                \textbf{Pos} &
        \textbf{Art.Nr.} &
        \textbf{Bezeichnung} &
@@ -148,7 +147,7 @@ Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per
        \textbf{ME}  \\
        \midrule
   \endfirsthead
-% ---------- Tabellenkopf nach dem Umbruch ---------- 
+% ---------- Tabellenkopf nach dem Umbruch ----------
                \textbf{Pos} &
        \textbf{Art.Nr.} &
        \textbf{Bezeichnung} &
@@ -156,25 +155,25 @@ Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per
        \textbf{ME} \\
         \midrule
   \endhead
-% ---------- Fuss der Teiltabellen ---------- 
+% ---------- Fuss der Teiltabellen ----------
         \midrule
   \endfoot
-% ---------- Das Ende der Tabelle ---------- 
+% ---------- Das Ende der Tabelle ----------
        \midrule
   \endlastfoot
-% ---------- Positionen ---------- 
+% ---------- Positionen ----------
   $(foreach number)$
        $(runningnumber)$ &
        $(number)$ &
        $(description)$ &
        $(qty)$ &
-       $(unit)$ 
-       \\ %       
+       $(unit)$
+       \\ %
   $(end number)$
 \end{longtable}
-% ----------  Ende der Hilfsdatei ---------- 
-\end{filecontents} 
-% ---------- Puffertabelle öffnen ---------- 
+% ----------  Ende der Hilfsdatei ----------
+\end{filecontents}
+% ---------- Puffertabelle öffnen ----------
 \LTXtable{\textwidth}{\employeetable}
 
 \vfill
index 048a560..672b802 100644 (file)
@@ -38,7 +38,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -198,7 +197,7 @@ und bestätigen Ihnen diesen wie folgt.\\
        \ifthenelse{\isempty{$(sellprice)$}}{&}{
                \numprint{$(sellprice)$}
                \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
-               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}  
+               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
        }\\ %
   $(end number)$
 
index f608ca0..356f685 100644 (file)
@@ -38,7 +38,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
@@ -190,7 +189,7 @@ wir bedanken uns für Ihre Anfrage und bieten Ihnen gemäß unserer Liefer- und
        \ifthenelse{\isempty{$(sellprice)$}}{&}{
                \numprint{$(sellprice)$}
                \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
-               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}  
+               \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
        }\\ %
   $(end number)$
 
diff --git a/templates/print/Standard/taxbird.txb b/templates/print/Standard/taxbird.txb
deleted file mode 100644 (file)
index c1a8a39..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-;; This file was produced by lx-office
-;; for using in taxbird. 
-;; You probably don't want to touch this 
-;; file. In case you do want it anyway, 
-;; be warned: BE CAREFUL!!
-;;
-'("Umsatzsteuervoranmeldung <%year%>" (
-("vend-id" . "74931")
-("land-lieferant" . "<%elsterland%>")
-("name-lieferant" . "<%company%>")
-("berufsbez" . "")
-("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%> ")
-("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "<%co_phone_prefix%>")
-("anschluss" . "<%co_phone%>")
-("land" . "<%taxbird_land_nr%>")
-("zeitraum" . "<%taxbird_period%>")
-("stnr" . "<%taxbird_steuernummer%>")
-
-<%foreach id%>
-("<%id%>" . "<%amount%>")<%end%>
-))
\ No newline at end of file
diff --git a/templates/print/Standard/ustva-2012.tex b/templates/print/Standard/ustva-2012.tex
deleted file mode 100644 (file)
index 3a35db9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Marcus Habermehl
-% Based on template by Jacky und Stefan Tenne (German-ustva-2008.tex)
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2012.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2012.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%else%>
-\small{~}
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%else%>
-\small{~}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}&~& & & &\\[-1mm]
-\end{tabular}\\[2.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[9.5mm]
-\multicolumn{2}{r}{<%41%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%44%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%49%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%43%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[1.8mm]
-\multicolumn{2}{r}{<%35%>} & & \multicolumn{2}{r}{<%36%>}\\[1.8mm]
-\multicolumn{2}{r}{<%77%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%76%>} & & \multicolumn{2}{r}{<%80%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%91%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%89%>} & & \multicolumn{2}{r}{<%891%>}\\[1.8mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[1.8mm]
-\multicolumn{2}{r}{<%95%>} & & \multicolumn{2}{r}{<%98%>}\\[1.8mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%42%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%60%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%21%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%45%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[13.5mm]
-\multicolumn{2}{r}{<%46%>} & & \multicolumn{2}{r}{<%47%>}\\[1.8mm]
-\multicolumn{2}{r}{<%52%>} & & \multicolumn{2}{r}{<%53%>}\\[1.8mm]
-\multicolumn{2}{r}{<%73%>} & & \multicolumn{2}{r}{<%74%>}\\[1.8mm]
-\multicolumn{2}{r}{<%84%>} & & \multicolumn{2}{r}{<%85%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%65%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%61%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%67%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%63%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%64%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%59%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%69%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%39%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/Standard/ustva.html b/templates/print/Standard/ustva.html
deleted file mode 100644 (file)
index 21d6bf8..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=utf-8" http-equiv="content-type">
-  <title>Vorschau: UStVa</title>
-<!--
-Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
-Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
-Text-Erklärung und unterschiedliche Zeilenfärbung ergänzt: Kai-Martin Knaak <kmk@familieknaak.de>
--->
-  <style>
-table {
-       text-align: right;
-       border:0;
-       border-collapse:collapse;
-}
-td {
-       font-size:100%;
-       vertical-align:top;
-}
-td.text {
-       text-align: left;
-       background-color:#BDBEBD;
-}
-td.text2 {
-       text-align: left;
-       background-color:#ADBEBD;
-}
-td.spalte,
-td.zeile,
-td.betrag {
-       border:solid thin black;
-}
-td.spalte { font-weight:bold; font-size:120%; }
-td.zeile  { font-weight:bold; }
-td.betrag { width:10em; }
-td.summe  { border:solid medium black; }
-td.spacer { border:0 }
-
-tr.uebertrag td { border-top:solid medium black; }
-b.h3 { font-size:120%; }
-.ausfuellen { background-color:#FFFFC0; }
-.nodis { display:none; }
-  </style>
-</head>
-<body>
-<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
-<h2>Zeitraum vom <%fromdate%> bis <%todate%> </h2>
-
-<!-- Diese HTML-Formular ist nicht selbstrechnend.
-<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
-gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
-automatisch berechnet.</small></p>
--->
-
-<table width="100%">
-<tr align="left">
-  <td class="text">Steuernummer: <%steuernummer%></td>
-  <td class="text" width="100px">&nbsp;</td>
-  <td class="text" align="right">Datum (<%Datum_heute%>)</td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br></td>
-</tr>
-<tr align="left">
-  <td class="text">
-    Finanzamt <%FA_Name%><br>
-    <%FA_Strasse%><br>
-    <%FA_PLZ%> <%FA_Ort%><br>
-    Fax: <%FA_FAX%>
-  </td>
-  <td class="text">&nbsp;</td>
-  <td class="text">
-    Firma <%company%><br>
-    <%if company_street%>
-      <%company_street%><br>
-      <%company_city%><br>
-    <%end company_street%>
-    <%if not company_street%>
-    <%address%><!--used Address-->
-    <%end company_street%>
-  </td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br>
-  </td>
-</tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td class="text"><b class="h3">I. Anmeldung der
-Umsatzsteuer-Vorauszahlung </b></td>
-      <td colspan="4"></td>
-    </tr>
-    <tr>
-      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
-      <td colspan="4"></td>
-    </tr>
-        <tr>
-      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%41%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%44%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%49%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%43%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Steuerfreie Ums&auml;tze ohne
-Vorsteuerabzug. </b><br>Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%48%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr>
-      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
-      <td colspan="4"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%51%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
-      <td class="betrag"><%511%></td>
-    </tr>
-<%end year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%81%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
-      <td class="betrag"><%811%></td>
-    </tr>
-<%end year2007%>
-
-    <tr>
-      <td class="text">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%86%></td>
-      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
-      <td class="betrag"><%861%></td>
-    </tr>
-    <tr>
-      <td class="text2">andere Steuers&auml;tze</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%35%></td>
-      <td class="spalte">36</td>
-      <td class="betrag ausfuellen"><%36%></td>
-    </tr>
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%77%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%76%></td>
-      <td class="spalte">80</td>
-      <td class="betrag ausfuellen"><%80%></td>
-    </tr>
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-    <tr>
-      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
-      <td colspan="4"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%91%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%97%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
-      <td class="betrag"><%971%></td>
-    </tr>
-<%end if year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%89%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
-      <td class="betrag"><%891%></td>
-    </tr>
-<%end if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%93%></td>
-      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
-      <td class="betrag"><%931%></td>
-    </tr>
-    <tr>
-      <td class="text">zu anderen Steuers&auml;tzen</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%95%></td>
-      <td class="spalte">98</td>
-      <td class="betrag"><%98%></td>
-    </tr>
-    <tr>
-      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
-             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%94%></td>
-      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
-      <td class="betrag"><%96%></td>
-    </tr>
-        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen des ersten Abnehmers bei
-        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
-      <td class="spalte ausfuellen">42</td>
-      <td class="betrag ausfuellen" width="70"><%42%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
-        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
-      <td class="spalte ausfuellen">60</td>
-      <td class="betrag ausfuellen" width="70"><%60%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if year2010%>
-   <tr>
-      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
-      <td class="spalte ausfuellen">21</td>
-      <td class="betrag ausfuellen" width="70"><%21%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%end if year2010%>
-   <tr>
-      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
-      <td class="spalte ausfuellen">45</td>
-      <td class="betrag ausfuellen" width="70"><%45%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
-      <td class="betrag"><%Z43%></td>
-    </tr>
-
-    <tr class="uebertrag">
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
-      <td class="betrag"><%Z45%></td>
-    </tr>
-
-<%if year2010%>
-    <tr>
-      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
-      <td class="spalte ausfuellen">46</td>
-      <td class="betrag ausfuellen"><%46%></td>
-      <td class="spalte">47</td>
-      <td class="betrag"><%47%></td>
-    </tr>
-<%end if year2010%>
-    <tr>
-      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">52</td>
-      <td class="betrag ausfuellen"><%52%></td>
-      <td class="spalte">53</td>
-      <td class="betrag"><%53%></td>
-    </tr>
-    <tr>
-      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
-           Ums&auml;tze, die unter das GrEStG fallen.</td>
-      <td class="spalte ausfuellen">73</td>
-      <td class="betrag ausfuellen"><%73%></td>
-      <td class="spalte">74</td>
-      <td class="betrag"><%74%></td>
-    </tr>
-    <tr>
-      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">84</td>
-      <td class="betrag ausfuellen"><%84%></td>
-      <td class="spalte">85</td>
-      <td class="betrag"><%85%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
-         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
-      <td class="spalte ausfuellen">65</td>
-      <td class="betrag ausfuellen"><%65%></td>
-    </tr>
-
-
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
-      <td class="betrag"><%Z53%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%66%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
-      <td class="spalte ausfuellen">61</td>
-      <td class="betrag ausfuellen"><%61%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
-      <td class="spalte ausfuellen">62</td>
-      <td class="betrag ausfuellen"><%62%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
-          des &sect;13b Abs. 1 UStG</td>
-      <td class="spalte ausfuellen">67</td>
-      <td class="betrag ausfuellen"><%67%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
-           Durchschnitts&auml;stzen berechnet sind </td>
-      <td class="spalte ausfuellen">63</td>
-      <td class="betrag ausfuellen"><%63%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
-      <td class="spalte ausfuellen">64</td>
-      <td class="betrag ausfuellen"><%64%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
-        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
-      <td class="spalte ausfuellen">59</td>
-      <td class="betrag ausfuellen"><%59%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Verbleibender Betrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
-      <td class="betrag"><%Z62%></td>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
-        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
-        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
-      <td class="spalte ausfuellen">69</td>
-      <td class="betrag ausfuellen"><%69%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
-      <td class="betrag"><%Z65%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
-        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
-        Besteuerungszeitraums, ausf&uuml;llen)</td>
-      <td class="spalte ausfuellen">39</td>
-      <td class="betrag ausfuellen"><%39%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr class="noborder">
-      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
-                                      Verbleibender &Uuml;berschuss</b></td>
-      <td class="spalte ausfuellen">83</td>
-      <td class="summe"><%83%></td>
-    </tr>
-
-  </tbody>
-</table>
-<%if FA_steuerberater%>
-<p>
-Steuerberater:<br>
-<%FA_steuerberater_name%><br>
-<%FA_steuerberater_street%><br>
-<%FA_steuerberater_city%><br>
-Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>
-</body>
-</html>
diff --git a/templates/print/Standard/ustva.tex b/templates/print/Standard/ustva.tex
deleted file mode 100644 (file)
index da26f47..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[42mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/Standard/winston.xml b/templates/print/Standard/winston.xml
deleted file mode 100644 (file)
index ad3effa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- Diese Datei ist mit kivitendo <%version%> generiert -->
-<WinstonAusgang>
-  <Formular Typ="UST"></Formular>
-  <Ordnungsnummer><%elsterFFFF%><%elstersteuernummer%></Ordnungsnummer>
-  <AnmeldeJahr><%year%></AnmeldeJahr>
-  <AnmeldeZeitraum><%period%></AnmeldeZeitraum>
-
-<%foreach id%>
-  <Kennzahl nr="<%id%>"><%amount%></Kennzahl>
-<%end%>
-
-</WinstonAusgang>
-
index f98f1a5..65d5b39 100644 (file)
@@ -37,7 +37,7 @@
 \newcommand{\employeeemail}{$(employee_email)$}
 \newcommand{\employeecoustid}{$(employee_co_ustid)$}
 \newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
-\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+\newcommand{\employeetable}{$(template_meta.tmpfile NOESCAPE)$.table.tex}
 
 % ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
 % \newcommand{\companybank}{$(company_bank)$}
 \newcommand{\shiptofax}{$(shiptofax)$}
 
 % ---------- Währungszeichen ----------
-\newcommand{\currency}{$(currency)$}
-\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
-\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
-\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
-\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+\newcommand{\currency}{\euro}
+\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{}
 
 % ---------- Ende Reportvariablen-Umsetzung ----------
 
diff --git a/templates/print/f-tex/balance_sheet.html b/templates/print/f-tex/balance_sheet.html
deleted file mode 100644 (file)
index 478caab..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>BALANCE SHEET
-<br><%period%>
-</h2>
-
-<table border=0>
-<tr>
-  <th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach asset_account%>
-<tr>
-  <td> </td>
-  <td><%asset_account%></td>
-  <td align=right><%asset_this_period%></td>
-  <td align=right><%asset_last_period%></td>
-</tr>
-<%end asset_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>TOTAL ASSETS</th>
-  <td align=right><%total_assets_this_period%><hr noshade size=2></td>
-  <td align=right><%total_assets_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>LIABILITIES<b><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach liability_account%>
-<tr>
-  <td></td>
-  <td><%liability_account%></td>
-  <td align=right><%liability_this_period%></td>
-  <td align=right><%liability_last_period%></td>
-</tr>
-<%end liability_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Liabilities</th>
-  <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr>
-  <th align=left colspan=4>SHAREHOLDER'S EQUITY<br><hr align=left width=250 size=5 noshade></th>
-</tr>
-
-<%foreach equity_account%>
-<tr>
-  <td></td>
-  <td><%equity_account%></td>
-  <td align=right><%equity_this_period%></td>
-  <td align=right><%equity_last_period%></td>
-</tr>
-<%end equity_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td></td>
-  <th align=left>Total Equity</th>
-  <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>TOTAL LIABILITIES & EQUITY</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-</table>
-
-
-
diff --git a/templates/print/f-tex/bwa.html b/templates/print/f-tex/bwa.html
deleted file mode 100644 (file)
index 91907d8..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-<body>
-<style type="text/css">
-<!--
-/* Allgemeine Schriftdefinition */
-th,td {
-       font-family: Arial, Verdana, Helvetica, Sans-serif;
-       font-size:small;
-}
-
-@page {
-       size: landscape;
-       margin: 0.5cm;
-}
-
-/* Definition Tabellenueberschrift */
-
-.left  { text-align:left; }
-.center        { text-align:center; }
-.right { text-align:right; }
-
-tr.headline    { border:0; }
-tr.headline td { border:0; }
-h1 { font-size:120%; }
-h2 { font-size:100%; }
-
-/* Tabellenkopf */
-th {
-       font-weight: bold;
-       border-bottom: solid thin black;
-       padding:0 10px;
-       text-align:right;
-}
-
-th.left  { border-left:  solid thin black; }
-th.right { border-right: solid thin black; }
-
-.querkopf th.right { text-align:center; }
-.querkopf th {
-       border-top: solid thin black;
-       border-bottom:0;
-}
-
-/* Tabelleninhalt */
-td {
-       text-align:right;
-       padding:0 0.5em;
-}
-td.left  { border-left:  solid thin black; }
-td.right { border-right: solid thin black; }
-
-
-/* jede zweite Zeile grau hinterlegen */
-tr.grey {
-       background:#f0f0f0;
-}
-
-/* letzte Zeile in der Tabelle */
-#last td{ border-bottom: solid thin black; }
-
-/* Zwischensumme/-ueberschriften */
-tr.subtotal td { font-weight: bold; }
-
-/* Fusszeile unter der Tabelle */
-td.footer {
-       text-align:right;
-       font-size:smaller;
-}
-//-->
-</style>
-
-<table border=0 cellpadding=0 cellspacing=0>
-<tr class="headline">
-       <td class="left"><%company%></td>
-       <td class=center colspan="9">
-               <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
-               <h2>SKR3 &nbsp; BWA</h2>
-       </td>
-       <td class="right">Blatt 1</td>
-</tr>
-       
-       
-</tr>  
-<tr class="querkopf">
-       <th class="left">&nbsp;</th>
-       <th class="center" colspan="5">Im Betrachtungszeitraum</th>
-       <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
-</tr>
-
-<tr>
-       <th class="left">Bezeichnung</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th>Aufschlag</th>
-       <th>Wert</th>
-       <th>% Ges.- Leistg.</th>
-       <th>% Ges.- Kosten</th>
-       <th>% Pers.- Kosten</th>
-       <th class="right">Aufschlag</th>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
-       <td><nobr><%jetzt1%></nobr></td>
-       <td><nobr><%jetztgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm1%></nobr></td>
-       <td><nobr><%kummgl1%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
-       <td><nobr><%jetzt2%></nobr></td>
-       <td><nobr><%jetztgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>       
-       <td><nobr><%kumm2%></nobr></td>
-       <td><nobr><%kummgl2%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
-       <td><nobr><%jetzt3%></nobr></td>
-       <td><nobr><%jetztgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td></td>
-       <td><nobr><%kumm3%></nobr></td>
-       <td><nobr><%kummgl3%></nobr></td>
-       <td></td>
-       <td></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtleistung</nobr></td>
-       <td><nobr><%jetztgesamtleistung%></nobr></td>
-       <td><nobr><%jetztglgesamtleistung%></nobr></td>
-       <td><nobr><%jetztgkgesamtleistung%></nobr></td>
-       <td><nobr><%jetztpkgesamtleistung%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtleistung%></nobr></td>
-       <td><nobr><%kummglgesamtleistung%></nobr></td>
-       <td><nobr><%kummgkgesamtleistung%></nobr></td>
-       <td><nobr><%kummpkgesamtleistung%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-       
-<tr class="grey">
-       <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
-       <td><nobr><%jetzt4%></nobr></td>
-       <td><nobr><%jetztgl4%></nobr></td>
-       <td><nobr><%jetztgk4%></nobr></td>
-       <td><nobr><%jetztpk4%></nobr></td>
-       <td><nobr><%jetztauf4%></nobr></td>
-       <td><nobr><%kumm4%></nobr></td>
-       <td><nobr><%kummgl4%></nobr></td>
-       <td><nobr><%kummgk4%></nobr></td>
-       <td><nobr><%kummpk4%></nobr></td>
-       <td class="right"><nobr><%kummauf4%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Rohertrag</nobr></td>
-       <td><nobr><%jetztrohertrag%></nobr></td>
-       <td><nobr><%jetztglrohertrag%></nobr></td>
-       <td><nobr><%jetztgkrohertrag%></nobr></td>
-       <td><nobr><%jetztpkrohertrag%></nobr></td>
-       <td><nobr><%jetztaufrohertrag%></nobr></td>
-       <td><nobr><%kummrohertrag%></nobr></td>
-       <td><nobr><%kummglrohertrag%></nobr></td>
-       <td><nobr><%kummgkrohertrag%></nobr></td>
-       <td><nobr><%kummpkrohertrag%></nobr></td>
-       <td class="right"><nobr><%kummaufrohertrag%></nobr>&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey">
-       <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
-       <td><nobr><%jetzt5%></nobr></td>
-       <td><nobr><%jetztgl5%></nobr></td>
-       <td><nobr><%jetztgk5%></nobr></td>
-       <td><nobr><%jetztpk5%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm5%></nobr></td>
-       <td><nobr><%kummgl5%></nobr></td>
-       <td><nobr><%kummgk5%></nobr></td>
-       <td><nobr><%kummpk5%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-               
-<tr class="grey subtotal">
-       <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
-       <td><nobr><%jetztbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
-       <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummglbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
-       <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
-       <td
-class="right"><nobr><%kummaufbetriebrohertrag%></nobr>&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left">Kostenarten:</td>
-       <td class="right" colspan="10">&nbsp;</td>
-</tr>  
-               
-<tr class="white">
-       <td class="left"><nobr>Personalkosten</nobr></td>
-       <td><nobr><%jetzt10%></nobr></td>
-       <td><nobr><%jetztgl10%></nobr></td>
-       <td><nobr><%jetztgk10%></nobr></td>
-       <td><nobr><%jetztpk10%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm10%></nobr></td>
-       <td><nobr><%kummgl10%></nobr></td>
-       <td><nobr><%kummgk10%></nobr></td>
-       <td><nobr><%kummpk10%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Raumkosten</nobr></td>
-       <td><nobr><%jetzt11%></nobr></td>
-       <td><nobr><%jetztgl11%></nobr></td>
-       <td><nobr><%jetztgk11%></nobr></td>
-       <td><nobr><%jetztpk11%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm11%></nobr></td>
-       <td><nobr><%kummgl11%></nobr></td>
-       <td><nobr><%kummgk11%></nobr></td>
-       <td><nobr><%kummpk11%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Betriebl.Steuern</nobr></td>
-       <td><nobr><%jetzt12%></nobr></td>
-       <td><nobr><%jetztgl12%></nobr></td>
-       <td><nobr><%jetztgk12%></nobr></td>
-       <td><nobr><%jetztpk12%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm12%></nobr></td>
-       <td><nobr><%kummgl12%></nobr></td>
-       <td><nobr><%kummgk12%></nobr></td>
-       <td><nobr><%kummpk12%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
-       <td><nobr><%jetzt13%></nobr></td>
-       <td><nobr><%jetztgl13%></nobr></td>
-       <td><nobr><%jetztgk13%></nobr></td>
-       <td><nobr><%jetztpk13%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm13%></nobr></td>
-       <td><nobr><%kummgl13%></nobr></td>
-       <td><nobr><%kummgk13%></nobr></td>
-       <td><nobr><%kummpk13%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
-       <td><nobr><%jetzt14%></nobr></td>
-       <td><nobr><%jetztgl14%></nobr></td>
-       <td><nobr><%jetztgk14%></nobr></td>
-       <td><nobr><%jetztpk14%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm14%></nobr></td>
-       <td><nobr><%kummgl14%></nobr></td>
-       <td><nobr><%kummgk14%></nobr></td>
-       <td><nobr><%kummpk14%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
-       <td><nobr><%jetzt15%></nobr></td>
-       <td><nobr><%jetztgl15%></nobr></td>
-       <td><nobr><%jetztgk15%></nobr></td>
-       <td><nobr><%jetztpk15%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm15%></nobr></td>
-       <td><nobr><%kummgl15%></nobr></td>
-       <td><nobr><%kummgk15%></nobr></td>
-       <td><nobr><%kummpk15%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
-       <td><nobr><%jetzt16%></nobr></td>
-       <td><nobr><%jetztgl16%></nobr></td>
-       <td><nobr><%jetztgk16%></nobr></td>
-       <td><nobr><%jetztpk16%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm16%></nobr></td>
-       <td><nobr><%kummgl16%></nobr>
-</td>
-       <td><nobr><%kummgk16%></nobr></td>
-       <td><nobr><%kummpk16%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Abschreibungen</nobr></td>
-       <td><nobr><%jetzt17%></nobr></td>
-       <td><nobr><%jetztgl17%></nobr></td>
-       <td><nobr><%jetztgk17%></nobr></td>
-       <td><nobr><%jetztpk17%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm17%></nobr></td>
-       <td><nobr><%kummgl17%></nobr></td>
-       <td><nobr><%kummgk17%></nobr></td>
-       <td><nobr><%kummpk17%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
-       <td><nobr><%jetzt18%></nobr></td>
-       <td><nobr><%jetztgl18%></nobr></td>
-       <td><nobr><%jetztgk18%></nobr></td>
-       <td><nobr><%jetztpk18%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm18%></nobr></td>
-       <td><nobr><%kummgl18%></nobr></td>
-       <td><nobr><%kummgk18%></nobr></td>
-       <td><nobr><%kummpk18%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Sonstige Kosten</nobr></td>
-       <td><nobr><%jetzt20%></nobr></td>
-       <td><nobr><%jetztgl20%></nobr></td>
-       <td><nobr><%jetztgk20%></nobr></td>
-       <td><nobr><%jetztpk20%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm20%></nobr></td>
-       <td><nobr><%kummgl20%></nobr></td>
-       <td><nobr><%kummgk20%></nobr></td>
-       <td><nobr><%kummpk20%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Gesamtkosten</nobr></td>
-       <td><nobr><%jetztgesamtkosten%></nobr></td>
-       <td><nobr><%jetztglgesamtkosten%></nobr></td>
-       <td><nobr><%jetztgkgesamtkosten%></nobr></td>
-       <td><nobr><%jetztpkgesamtkosten%></nobr></td>
-       <td></td>
-       <td><nobr><%kummgesamtkosten%></nobr></td>
-       <td><nobr><%kummglgesamtkosten%></nobr></td>
-       <td><nobr><%kummgkgesamtkosten%></nobr></td>
-       <td><nobr><%kummpkgesamtkosten%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-       
-<tr class="grey subtotal">
-<td class="left"><nobr>Betriebsergebnis</nobr></td>
-       <td><nobr><%jetztbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummglbetriebsergebnis%></nobr>
-</td>
-       <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
-       <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-       </tr>
-
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Zinsaufwand</nobr></td>
-       <td><nobr><%jetzt30%></nobr></td>
-       <td><nobr><%jetztgl30%></nobr></td>
-       <td><nobr><%jetztgk30%></nobr></td>
-       <td><nobr><%jetztpk30%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm30%></nobr></td>
-       <td><nobr><%kummgl30%></nobr></td>
-       <td><nobr><%kummgk30%></nobr></td>
-       <td><nobr><%kummpk30%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
-       <td><nobr><%jetzt19%></nobr></td>
-       <td><nobr><%jetztgl19%></nobr></td>
-       <td><nobr><%jetztgk19%></nobr></td>
-       <td><nobr><%jetztpk19%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm19%></nobr></td>
-       <td><nobr><%kummg191%></nobr></td>
-       <td><nobr><%kummgk19%></nobr></td>
-       <td><nobr><%kummpk19%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
-       <td><nobr><%jetzt31%></nobr></td>
-       <td><nobr><%jetztgl31%></nobr></td>
-       <td><nobr><%jetztgk31%></nobr></td>
-       <td><nobr><%jetztpk31%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm31%></nobr></td>
-       <td><nobr><%kummgl31%></nobr></td>
-       <td><nobr><%kummgk31%></nobr></td>
-       <td><nobr><%kummpk31%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white subtotal">
-<td class="left"><nobr>Neutraler Aufwand</nobr></td>
-       <td><nobr><%jetztneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztglneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
-       <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutraleraufwand%></nobr></td>
-       <td><nobr><%kummglneutraleraufwand%></nobr></td>
-       <td><nobr><%kummgkneutraleraufwand%></nobr></td>
-       <td><nobr><%kummpkneutraleraufwand%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="white">
-       <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
-       <td><nobr><%jetzt32%></nobr></td>
-       <td><nobr><%jetztgl32%></nobr></td>
-       <td><nobr><%jetztgk32%></nobr></td>
-       <td><nobr><%jetztpk32%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm32%></nobr></td>
-       <td><nobr><%kummgl32%></nobr></td>
-       <td><nobr><%kummgk32%></nobr></td>
-       <td><nobr><%kummpk32%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
-       <td><nobr><%jetzt33%></nobr></td>
-       <td><nobr><%jetztgl33%></nobr></td>
-       <td><nobr><%jetztgk33%></nobr></td>
-       <td><nobr><%jetztpk33%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm33%></nobr></td>
-       <td><nobr><%kummgl33%></nobr></td>
-       <td><nobr><%kummgk33%></nobr></td>
-       <td><nobr><%kummpk33%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="white">
-       <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
-       <td><nobr><%jetzt34%></nobr></td>
-       <td><nobr><%jetztgl34%></nobr>
-       <td><nobr><%jetztgk34%></nobr></td>
-       <td><nobr><%jetztpk34%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm34%></nobr></td>
-       <td><nobr><%kummgl34%></nobr></td>
-       <td><nobr><%kummgk34%></nobr></td>
-       <td><nobr><%kummpk34%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Neutraler Ertrag</nobr></td>
-       <td><nobr><%jetztneutralerertrag%></nobr></td>
-       <td><nobr><%jetztglneutralerertrag%></nobr></td>
-       <td><nobr><%jetztgkneutralerertrag%></nobr></td>
-       <td><nobr><%jetztpkneutralerertrag%></nobr></td>
-       <td></td>
-       <td><nobr><%kummneutralerertrag%></nobr></td>
-       <td><nobr><%kummglneutralerertrag%></nobr></td>
-       <td><nobr><%kummgkneutralerertrag%></nobr></td>
-       <td><nobr><%kummpkneutralerertrag%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
-       <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
-       <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey">
-       <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
-       <td><nobr><%jetzt35%></nobr></td>
-       <td><nobr><%jetztgl35%></nobr></td>
-       <td><nobr><%jetztgk35%></nobr></td>
-       <td><nobr><%jetztpk35%></nobr></td>
-       <td></td>
-       <td><nobr><%kumm35%></nobr></td>
-       <td><nobr><%kummgl35%></nobr></td>
-       <td><nobr><%kummgk35%></nobr></td>
-       <td><nobr><%kummpk35%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
-
-<tr class="grey subtotal">
-       <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
-       <td><nobr><%jetztergebnis%></nobr></td>
-       <td><nobr><%jetztglergebnis%></nobr></td>
-       <td><nobr><%jetztgkergebnis%></nobr></td>
-       <td><nobr><%jetztpkergebnis%></nobr></td>
-       <td></td>
-       <td><nobr><%kummergebnis%></nobr></td>
-       <td><nobr><%kummglergebnis%></nobr></td>
-       <td><nobr><%kummgkergebnis%></nobr></td>
-       <td><nobr><%kummpkergebnis%></nobr></td>
-       <td class="right">&nbsp;</td>
-</tr>
-       
-<tr class="white" id=last><td class="left right"
-colspan="11">&nbsp;</td></tr>
-
-<tr>
-       <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: LX Office ERP
-(Version <%version%>) - Formular: 11.01.2007</td>
-</tr>
-
-</table>
-</body>
diff --git a/templates/print/f-tex/income_statement.html b/templates/print/f-tex/income_statement.html
deleted file mode 100644 (file)
index e9d6a40..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<h2 align=center>
-<%company%>
-<br><%address%>
-
-<p>INCOME STATEMENT
-<br><%period%>
-</h2>
-
-
-<table width=100% border=0>
-<tr>
-  <th width=400 align=left colspan=2>INCOME<br><hr width=300 size=5 align=left noshade></th>
-  <th><%this_period%></th>
-  <th><%last_period%></th>
-</tr>
-
-<%foreach income_account%>
-<tr>
-  <td width=4> </td>
-  <td><%income_account%></td>
-  <td align=right><%income_this_period%></td>
-  <td align=right><%income_last_period%></td>
-</tr>
-<%end income_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Income</th>
-  <td align=right><%total_income_this_period%><hr noshade size=2></td>
-  <td align=right><%total_income_last_period%><hr noshade size=2></td>
-</tr>
-
-<tr>
-  <th align=left colspan=2>EXPENSES<br><hr width=300 size=5 align=left noshade></th>
-</tr>
-
-<%foreach expense_account%>
-<tr>
-  <td> </td>
-  <td><%expense_account%></td>
-  <td align=right><%expenses_this_period%></td>
-  <td align=right><%expenses_last_period%></td>
-</tr>
-<%end expense_account%>
-
-<tr>
-  <td colspan=2> </td>
-  <td><hr noshade size=1></td>
-  <td><hr noshade size=1></td>
-</tr>
-
-<tr valign=top>
-  <td> </td>
-  <th align=left>Total Expenses</th>
-  <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
-  <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
-</tr>
-
-<tr valign=top>
-  <th align=left colspan=2>INCOME / (LOSS)</th>
-  <td align=right><%total_this_period%><br><hr noshade size=2></td>
-  <td align=right><%total_last_period%><br><hr noshade size=2></td>
-</tr>
-
-</table>
-
-
-
-
-
-
-
-
diff --git a/templates/print/f-tex/taxbird.txb b/templates/print/f-tex/taxbird.txb
deleted file mode 100644 (file)
index c1a8a39..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-;; This file was produced by lx-office
-;; for using in taxbird. 
-;; You probably don't want to touch this 
-;; file. In case you do want it anyway, 
-;; be warned: BE CAREFUL!!
-;;
-'("Umsatzsteuervoranmeldung <%year%>" (
-("vend-id" . "74931")
-("land-lieferant" . "<%elsterland%>")
-("name-lieferant" . "<%company%>")
-("berufsbez" . "")
-("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%> ")
-("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "<%co_phone_prefix%>")
-("anschluss" . "<%co_phone%>")
-("land" . "<%taxbird_land_nr%>")
-("zeitraum" . "<%taxbird_period%>")
-("stnr" . "<%taxbird_steuernummer%>")
-
-<%foreach id%>
-("<%id%>" . "<%amount%>")<%end%>
-))
\ No newline at end of file
diff --git a/templates/print/f-tex/ustva-2012.tex b/templates/print/f-tex/ustva-2012.tex
deleted file mode 100644 (file)
index 3a35db9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-% German USTVA template for taxreports
-% Contributed by Marcus Habermehl
-% Based on template by Jacky und Stefan Tenne (German-ustva-2008.tex)
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.7cm} %hier wird die Höhenverschiebung
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{1mm}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790,page=2]{ustva-2012.pdf}}}%Seite 2
-{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790,page=1]{ustva-2012.pdf}}}%Seite 1
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%else%>
-\small{~}
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%else%>
-\small{~}
-<%end fax%>
-}& & & & &\\[1.8mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}&~& & & &\\[-1mm]
-\end{tabular}\\[2.5mm]
-\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
-&&&&\\[9.5mm]
-\multicolumn{2}{r}{<%41%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%44%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%49%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%43%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%81%>} & & \multicolumn{2}{r}{<%811%>}\\[1.8mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[1.8mm]
-\multicolumn{2}{r}{<%35%>} & & \multicolumn{2}{r}{<%36%>}\\[1.8mm]
-\multicolumn{2}{r}{<%77%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%76%>} & & \multicolumn{2}{r}{<%80%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%91%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%89%>} & & \multicolumn{2}{r}{<%891%>}\\[1.8mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[1.8mm]
-\multicolumn{2}{r}{<%95%>} & & \multicolumn{2}{r}{<%98%>}\\[1.8mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%42%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%60%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%21%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{<%45%>} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
-\end{tabular}
-\newpage
-
-\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
-\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[13.5mm]
-\multicolumn{2}{r}{<%46%>} & & \multicolumn{2}{r}{<%47%>}\\[1.8mm]
-\multicolumn{2}{r}{<%52%>} & & \multicolumn{2}{r}{<%53%>}\\[1.8mm]
-\multicolumn{2}{r}{<%73%>} & & \multicolumn{2}{r}{<%74%>}\\[1.8mm]
-\multicolumn{2}{r}{<%84%>} & & \multicolumn{2}{r}{<%85%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%65%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%61%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%67%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%63%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%64%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%59%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%69%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%39%>}\\[1.8mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[25.6mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/f-tex/ustva.html b/templates/print/f-tex/ustva.html
deleted file mode 100644 (file)
index 1f5da1a..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <meta content="text/html; charset=utf-8" http-equiv="content-type">
-  <title>Vorschau: UStVa</title>
-<!--
-Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
-Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
-Text-Erklärung und unterschiedliche Zeilenfärbung ergänzt: Kai-Martin Knaak <kmk@familieknaak.de>
--->
-  <style>
-table {
-       text-align: right;
-       border:0;
-       border-collapse:collapse;
-}
-td {
-       font-size:100%;
-       vertical-align:top;
-}
-td.text {
-       text-align: left;
-       background-color:#BDBEBD;
-}
-td.text2 {
-       text-align: left;
-       background-color:#ADBEBD;
-}
-td.spalte,
-td.zeile,
-td.betrag {
-       border:solid thin black;
-}
-td.spalte { font-weight:bold; font-size:120%; }
-td.zeile  { font-weight:bold; }
-td.betrag { width:10em; }
-td.summe  { border:solid medium black; }
-td.spacer { border:0 }
-
-tr.uebertrag td { border-top:solid medium black; }
-b.h3 { font-size:120%; }
-.ausfuellen { background-color:#FFFFC0; }
-.nodis { display:none; }
-  </style>
-</head>
-<body>
-<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
-<h2>Zeitraum vom <%fromdate%> bis <%todate%> </h2>
-
-<!-- Diese HTML-Formular ist nicht selbstrechnend.
-<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
-gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
-automatisch berechnet.</small></p>
--->
-
-<table width="100%">
-<tr align="left">
-  <td class="text">Steuernummer: <%steuernummer%></td>
-  <td class="text" width="100px">&nbsp</td>
-  <td class="text" align="right">Datum (<%Datum_heute%>)</td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br /></td>
-</tr>
-<tr align="left">
-  <td class="text">
-    Finanzamt <%FA_Name%><br />
-    <%FA_Strasse%><br />
-    <%FA_PLZ%> <%FA_Ort%><br />
-    Fax: <%FA_FAX%>
-  </td>
-  <td class="text">&nbsp;</td>
-  <td class="text">
-    Firma <%company%><br />
-    <%if company_street%>
-      <%company_street%><br />
-      <%company_city%><br />
-    <%end company_street%>
-    <%if not company_street%>
-    <%address%><!--used Address-->
-    <%end company_street%>
-  </td>
-</tr>
-<tr>
-  <td class="text" colspan="3"><br />
-  </td>
-</tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="2">
-  <tbody>
-    <tr>
-      <td class="text"><b class="h3">I. Anmeldung der
-Umsatzsteuer-Vorauszahlung </b></td>
-      <td colspan="4"></td>
-    </tr>
-    <tr>
-      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
-      <td colspan="4"></td>
-    </tr>
-        <tr>
-      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%41%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%44%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%49%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%43%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Steuerfreie Ums&auml;tze ohne
-Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%48%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr>
-      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
-      <td colspan="4"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%51%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
-      <td class="betrag"><%511%></td>
-    </tr>
-<%end year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%81%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
-      <td class="betrag"><%811%></td>
-    </tr>
-<%end year2007%>
-
-    <tr>
-      <td class="text">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%86%></td>
-      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
-      <td class="betrag"><%861%></td>
-    </tr>
-    <tr>
-      <td class="text2">andere Steuers&auml;tze</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%35%></td>
-      <td class="spalte">36</td>
-      <td class="betrag ausfuellen"><%36%></td>
-    </tr>
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%77%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-    <tr>
-      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
-      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
-      <td class="betrag ausfuellen"><%76%></td>
-      <td class="spalte">80</td>
-      <td class="betrag ausfuellen"><%80%></td>
-    </tr>
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-    <tr>
-      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
-      <td colspan="4"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen" width="70"><%91%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if not year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%97%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
-      <td class="betrag"><%971%></td>
-    </tr>
-<%end if year2007%>
-<%if year2007%>
-    <tr>
-      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%89%><br></td>
-      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
-      <td class="betrag"><%891%></td>
-    </tr>
-<%end if year2007%>
-    <tr>
-      <td class="text2">zum Steuersatz von 7 v.H.</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%93%></td>
-      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
-      <td class="betrag"><%931%></td>
-    </tr>
-    <tr>
-      <td class="text">zu anderen Steuers&auml;tzen</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%95%></td>
-      <td class="spalte">98</td>
-      <td class="betrag"><%98%></td>
-    </tr>
-    <tr>
-      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
-             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%94%></td>
-      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
-      <td class="betrag"><%96%></td>
-    </tr>
-        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
-   <tr>
-      <td class="text">Lieferungen des ersten Abnehmers bei
-        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
-      <td class="spalte ausfuellen">42</td>
-      <td class="betrag ausfuellen" width="70"><%42%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-   <tr>
-      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
-        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
-      <td class="spalte ausfuellen">60</td>
-      <td class="betrag ausfuellen" width="70"><%60%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%if year2010%>
-   <tr>
-      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
-      <td class="spalte ausfuellen">21</td>
-      <td class="betrag ausfuellen" width="70"><%21%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-<%end if year2010%>
-   <tr>
-      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
-      <td class="spalte ausfuellen">45</td>
-      <td class="betrag ausfuellen" width="70"><%45%><br></td>
-      <td class="spalte"><span class="nodis"></span></td>
-      <td class="betrag"></td>
-    </tr>
-
-    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
-      <td class="betrag"><%Z43%></td>
-    </tr>
-
-    <tr class="uebertrag">
-      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
-      <td class="betrag"><%Z45%></td>
-    </tr>
-
-<%if year2010%>
-    <tr>
-      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
-      <td class="spalte ausfuellen">46</td>
-      <td class="betrag ausfuellen"><%46%></td>
-      <td class="spalte">47</td>
-      <td class="betrag"><%47%></td>
-    </tr>
-<%end if year2010%>
-    <tr>
-      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">52</td>
-      <td class="betrag ausfuellen"><%52%></td>
-      <td class="spalte">53</td>
-      <td class="betrag"><%53%></td>
-    </tr>
-    <tr>
-      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
-           Ums&auml;tze, die unter das GrEStG fallen.</td>
-      <td class="spalte ausfuellen">73</td>
-      <td class="betrag ausfuellen"><%73%></td>
-      <td class="spalte">74</td>
-      <td class="betrag"><%74%></td>
-    </tr>
-    <tr>
-      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
-      <td class="spalte ausfuellen">84</td>
-      <td class="betrag ausfuellen"><%84%></td>
-      <td class="spalte">85</td>
-      <td class="betrag"><%85%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
-         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
-      <td class="spalte ausfuellen">65</td>
-      <td class="betrag ausfuellen"><%65%></td>
-    </tr>
-
-
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
-      <td class="betrag"><%Z53%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
-
-    <tr>
-      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
-      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
-      <td class="betrag ausfuellen"><%66%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
-      <td class="spalte ausfuellen">61</td>
-      <td class="betrag ausfuellen"><%61%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
-      <td class="spalte ausfuellen">62</td>
-      <td class="betrag ausfuellen"><%62%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
-          des &sect;13b Abs. 1 UStG</td>
-      <td class="spalte ausfuellen">67</td>
-      <td class="betrag ausfuellen"><%67%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
-           Durchschnitts&auml;stzen berechnet sind </td>
-      <td class="spalte ausfuellen">63</td>
-      <td class="betrag ausfuellen"><%63%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
-      <td class="spalte ausfuellen">64</td>
-      <td class="betrag ausfuellen"><%64%></td>
-    </tr>
-    <tr>
-      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
-        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
-      <td class="spalte ausfuellen">59</td>
-      <td class="betrag ausfuellen"><%59%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Verbleibender Betrag</td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
-      <td class="betrag"><%Z62%></td>
-    </tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
-      <td colspan="2"></td></tr>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
-        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
-        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
-      <td class="spalte ausfuellen">69</td>
-      <td class="betrag ausfuellen"><%69%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr>
-      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
-      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
-      <td class="betrag"><%Z65%></td>
-    </tr>
-    <tr>
-      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
-        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
-        Besteuerungszeitraums, ausf&uuml;llen)</td>
-      <td class="spalte ausfuellen">39</td>
-      <td class="betrag ausfuellen"><%39%></td>
-    </tr>
-
-    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
-
-    <tr class="noborder">
-      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
-                                      Verbleibender &Uuml;berschuss</b></td>
-      <td class="spalte ausfuellen">83</td>
-      <td class="summe"><%83%></td>
-    </tr>
-
-  </tbody>
-</table>
-<%if FA_steuerberater%>
-<p>
-Steuerberater:<br />
-<%FA_steuerberater_name%><br />
-<%FA_steuerberater_street%><br />
-<%FA_steuerberater_city%><br />
-Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>
-</body>
-</html>
diff --git a/templates/print/f-tex/ustva.tex b/templates/print/f-tex/ustva.tex
deleted file mode 100644 (file)
index da26f47..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-% German USTVA template for taxreports
-%
-% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
-%
-%
-\documentclass[twoside]{scrartcl}
-\usepackage{a4,german}
-\usepackage[frame]{xy}
-\usepackage[utf8]{inputenc}
-\usepackage[german]{babel}
-\usepackage{graphicx}
-\usepackage{tabularx}
-\usepackage{times, german}
-\usepackage{german}
-\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getÀtigt
-\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwÀrts
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0cm}
-\setlength{\headsep}{0cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{0cm}
-\setlength{\evensidemargin}{0cm}
-\setlength{\textwidth}{20.9cm}
-\setlength{\textheight}{29.6cm}
-\setlength{\footskip}{-0cm}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\fontfamily{cmss}\fontshape{n}\large\selectfont
-\pagestyle{myheadings}
-\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
-{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
-\hspace{1mm}
-\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
-\multicolumn{7}{c}{}\\[-2mm]
- &  \multicolumn{6}{l}{<%steuernummer%>}\\
-\multicolumn{7}{c}{}\\[15mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
-\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
-\multicolumn{2}{p{7.5cm}}{
-<%if tel%>
-\small{Tel: <%tel%>}~--~
-<%end tel%>
-<%if fax%>
-\small{Fax: <%fax%>}
-<%end fax%>
-}& & & &<%FA_10%> &\\[-1mm]
-\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
-\end{tabular}\\[28.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\[42mm]
-\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
-\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
-\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
-\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
-%\multicolumn{2}{||r|}{1000} & & & \\
-%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
-%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
-\end{tabular}
-
-\newpage
-
-\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
-\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
-&&&&\\
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
-\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
-\end{tabular}\\[35mm]
-<%if FA_steuerberater%>
-\vspace{11mm}
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item <%FA_steuerberater_name%>
-\item <%FA_steuerberater_street%>
-\item <%FA_steuerberater_city%>
-\item Tel:~<%FA_steuerberater_tel%>
-\end{small}\\[15mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-<%if not FA_steuerberater%>
-\begin{list}{}{
-\setlength{\leftmargin}{2mm}
-\setlength{\itemsep}{0mm}
-\setlength{\parsep}{0mm}
-%\setlength{\topsep}{0mm}
-%\setlength{\parskip}{0mm}
-%\setlength{\partopsep}{0mm}
-}
-\begin{small}
-\item ~
-\item ~
-\item ~
-\item ~
-\end{small}\\[26mm]
-\item  <%Datum_heute%>,
-\end{list}
-<%end FA_steuerberater%>
-\end{document}
diff --git a/templates/print/f-tex/winston.xml b/templates/print/f-tex/winston.xml
deleted file mode 100644 (file)
index ad3effa..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- Diese Datei ist mit kivitendo <%version%> generiert -->
-<WinstonAusgang>
-  <Formular Typ="UST"></Formular>
-  <Ordnungsnummer><%elsterFFFF%><%elstersteuernummer%></Ordnungsnummer>
-  <AnmeldeJahr><%year%></AnmeldeJahr>
-  <AnmeldeZeitraum><%period%></AnmeldeZeitraum>
-
-<%foreach id%>
-  <Kennzahl nr="<%id%>"><%amount%></Kennzahl>
-<%end%>
-
-</WinstonAusgang>
-
index 94db96b..5ecd926 100644 (file)
 
   function save_as_new() {
     $("#user_id").val("");
-    submit_with_action("save_user");
+    submit_with_action("save_newuser");
   }
    -->
 </script>
index a219130..6ca175a 100644 (file)
 
     <tr>
      <td align="right">[% 'Factor' | $T8 %]</td>
+[% IF orphaned %]
      <td><input name="factor" value="[% HTML.escape(factor) %]"></td>
+[% ELSE %]
+     <td><input type="hidden" name="factor" value="[% HTML.escape(factor) %]">
+         [% HTML.escape(factor) %] [% ' (in use so no change allowed)' | $T8 %]</td>
+[% END %]
     </tr>
    </table>
   </p>
index 83a10c4..cb86eb2 100644 (file)
@@ -41,7 +41,7 @@
 
    <tr>
     <td>[% 'tax_chartaccno' | $T8 %]</td>
-    <td><select name="chart_id"><option value="0">[% 'None' | $T8 %]</option>[% FOREACH row = ACCOUNTS %]<option value="[% HTML.escape(row.id) %]" [% IF row.selected %]selected[% END %]>[% HTML.escape(row.taxaccount) %]</option>[% END %]</select></td>
+    <td><select name="chart_id"><option value="">[% 'None' | $T8 %]</option>[% FOREACH row = ACCOUNTS %]<option value="[% HTML.escape(row.id) %]" [% IF row.selected %]selected[% END %]>[% HTML.escape(row.taxaccount) %]</option>[% END %]</select></td>
    </tr>
 
     <td>[% 'Account categories' | $T8 %]</td>
index c8d6ae7..db3ae65 100644 (file)
@@ -83,7 +83,7 @@
  <table id="unit_list">
   <thead>
   <tr class="listheading">
-   <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+   <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
    <th>[% 'Delete' | $T8 %]</th>
    <th>[% 'Unit' | $T8 %]</th>
    <th>[% 'Base unit' | $T8 %]</th>
@@ -97,7 +97,7 @@
   <tbody>
   [% FOREACH row = UNITS %]
    <tr class="listrow[% loop.count % 2 %]" id="unit_id_[% row.id %]">
-    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
     [% IF row.in_use %]
      <td>
       <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
index 6b3757b..4e91ca3 100644 (file)
@@ -9,7 +9,7 @@
   <table width="100%" id="price_factor_list">
    <thead>
    <tr class="listheading">
-    <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+    <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
     <th width="80%">[% 'Description' | $T8 %]</th>
     <th width="20%">[% 'Factor' | $T8 %]</th>
    </tr>
@@ -18,7 +18,7 @@
    <tbody>
    [% FOREACH factor = PRICE_FACTORS %]
    <tr class="listrow[% loop.count % 2 %]" id="price_factor_id_[% factor.id %]">
-    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
     <td><a href="[% url_base %]&action=edit_price_factor&id=[% HTML.url(factor.id) %]">[% HTML.escape(factor.description) %]</a></td>
     <td>[% HTML.escape(factor.factor) %]</td>
    </tr>
index 958913a..dde162c 100644 (file)
@@ -8,7 +8,7 @@
  <p>
   <table width="100%" id="warehouse_list">
    <tr class="listheading">
-    <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+    <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
     <th width="70%">[% 'Description' | $T8 %]</th>
     <th width="20%">[% 'Number of bins' | $T8 %]</th>
     <th width="10%">[% 'Invalid' | $T8 %]</th>
@@ -16,7 +16,7 @@
 
    [% FOREACH warehouse = WAREHOUSES %]
    <tr class="listrow[% loop.count % 2 %]" id="warehouse_id_[% warehouse.id %]">
-    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
     <td><a href="[% url_base %]&action=edit_warehouse&id=[% HTML.url(warehouse.id) %]">[% HTML.escape(warehouse.description) %]</a></td>
     <td>[% HTML.escape(warehouse.number_of_bins) %]</td>
     <td>[% IF warehouse.invalid %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]</td>
index c518134..3363503 100644 (file)
@@ -41,7 +41,7 @@
 [%- END %]
 
 [%- IF id %]
-  <input type="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
+  <input type=button class=submit onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
   [% IF INSTANCE_CONF.get_ap_show_mark_as_paid %]
     <input type="submit" name="action" value="[% 'mark as paid' | $T8 %]">
   [% END %]
index e779a66..1bd5ff6 100644 (file)
@@ -5,7 +5,7 @@
 <form method=post action="[% script %]">
 
 [% L.hidden_tag('accno', accno) %]
-[% L.hidden_tag('decription', description) %]
+[% L.hidden_tag('description', description) %]
 [% L.hidden_tag('sort', 'transdate') %]
 [% L.hidden_tag('accounttype', accounttype) %]
 
index c260ce8..28a00ec 100644 (file)
    <td>[% L.yes_no_tag('defaults.vertreter', SELF.defaults.vertreter) %]</td>
    <td>[% LxERP.t8('Representative for Customer') %]</td>
   </tr>
+ <tr>
+   <td align="right">[% LxERP.t8('Normalize Customer / Vendor names') %]</td>
+   <td>   [% L.yes_no_tag('defaults.normalize_vc_names', SELF.defaults.normalize_vc_names) %]</td>
+   <td>[% LxERP.t8('Automatic deletion of leading, trailing and excessive (repetitive) spaces in customer or vendor names') %]</td>
+  </tr>
 
   <tr><td class="listheading" colspan="4">[% LxERP.t8("Parts Master Data") %]</td></tr>
 
    <td>   [% L.input_tag('defaults.parts_image_css', SELF.defaults.parts_image_css, style=style) %]</td>
    <td>[% LxERP.t8('Style the picture with the following CSS code') %]</td>
   </tr>
+ <tr>
+   <td align="right">[% LxERP.t8('Normalize part description and part notes') %]</td>
+   <td>   [% L.yes_no_tag('defaults.normalize_part_descriptions', SELF.defaults.normalize_part_descriptions) %]</td>
+   <td>[% LxERP.t8('Automatic deletion of leading, trailing and excessive (repetitive) spaces in part description and part notes. Affects also the CSV-Import.') %]</td>
+  </tr>
+</tr>
  </table>
 </div>
index 58d2789..0f85512 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE L %][% USE LxERP %][% USE HTML %][%- USE JavaScript -%]
  <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript" src="js/parts_language_selection.js"></script>
  <script type="text/javascript">
   <!--
 var warehouses = [
index f7d854a..3b916ca 100644 (file)
@@ -3,7 +3,6 @@
 [%- USE LxERP %]
 [%- USE JavaScript -%]
  <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript" src="js/parts_language_selection.js"></script>
  <script type="text/javascript">
   <!--
       warehouses = new Array();
index e0555d3..e2c6e67 100644 (file)
 
   <tr>
    <td align="right">[% 'Discount' | $T8 %]</td>
-   <td>[% HTML.escape(discount) %]%</td>
+   <td>[% HTML.escape(discount_as_percent) %]%</td>
   </tr>
 
   [% IF is_customer %]
    <td>[% HTML.escape(payment_terms) %]</td>
   </tr>
 
+  <tr>
+   <td align="right">[% 'Delivery Terms' | $T8 %]</td>
+   <td>[% HTML.escape(delivery_terms) %]</td>
+  </tr>
+
   <tr>
    <td align="right">[% 'Tax Number' | $T8 %]</td>
    <td>[% HTML.escape(taxnumber) %]</td>
diff --git a/templates/webpages/csv_import/_form_orders.html b/templates/webpages/csv_import/_form_orders.html
new file mode 100644 (file)
index 0000000..e02b930
--- /dev/null
@@ -0,0 +1,16 @@
+[% USE LxERP %]
+[% USE L %]
+<tr>
+ <th align="right">[%- LxERP.t8('Order/Item row name') %]:</th>
+ <td colspan="10">
+  [% L.input_tag('settings.order_column', SELF.profile.get('order_column'), size => "10") %]
+  [% L.input_tag('settings.item_column',  SELF.profile.get('item_column'),  size => "10") %]
+ </td>
+</tr>
+
+<tr>
+ <th align="right">[%- LxERP.t8('Maximal amount difference') %]:</th>
+ <td colspan="10">
+  [% L.input_tag('settings.max_amount_diff', LxERP.format_amount(SELF.profile.get('max_amount_diff')), size => "5") %]
+ </td>
+</tr>
index 9fd30ac..4a9672b 100644 (file)
   <div class="help_toggle" style="display:none">
    <p><a href="#" onClick="javascript:$('.help_toggle').toggle()">[% LxERP.t8("Hide help text") %]</a></p>
 
-   <table>
-    <tr class="listheading">
-     <th>[%- LxERP.t8('Column name') %]</th>
-     <th>[%- LxERP.t8('Meaning') %]</th>
-    </tr>
-
-    [%- FOREACH row = SELF.displayable_columns %]
-     <tr class="listrow[% loop.count % 2 %]">
-      <td>[%- HTML.escape(row.name) %]</td>
-      <td>[%- HTML.escape(row.description) %]</td>
-     </tr>
-    [%- END %]
-   </table>
+   [%- IF SELF.worker.is_multiplexed %]
+     <table>
+       <tr class="listheading">
+         [%- FOREACH p = SELF.worker.profile %]
+           <th>[%- p.row_ident %]</th>
+         [%- END %]
+       </tr>
+       <tr class="listrow[% loop.count % 2 %]">
+         [%- FOREACH p = SELF.worker.profile %]
+           [% SET ri = p.row_ident %]
+         <td>
+           <table>
+             <tr class="listheading">
+               <th>[%- LxERP.t8('Column name') %]</th>
+               <th>[%- LxERP.t8('Meaning') %]</th>
+             </tr>
+
+             [%- FOREACH row = SELF.displayable_columns.$ri %]
+             <tr class="listrow[% loop.count % 2 %]">
+               <td>[%- HTML.escape(row.name) %]</td>
+               <td>[%- HTML.escape(row.description) %]</td>
+             </tr>
+             [%- END %]
+           </table>
+         </td>
+         [%- END %]
+       </tr>
+     </table>
+   [%- ELSE %]
+     <table>
+       <tr class="listheading">
+         <th>[%- LxERP.t8('Column name') %]</th>
+         <th>[%- LxERP.t8('Meaning') %]</th>
+       </tr>
+
+       [%- FOREACH row = SELF.displayable_columns %]
+       <tr class="listrow[% loop.count % 2 %]">
+         <td>[%- HTML.escape(row.name) %]</td>
+         <td>[%- HTML.escape(row.description) %]</td>
+       </tr>
+       [%- END %]
+     </table>
+   [%- END %]
 
 [%- IF SELF.type == 'contacts' %]
    <p>
     [% LxERP.t8('The items are imported accoring do their number "X" regardless of the column order inside the file.') %]
     [% LxERP.t8('The column "make_X" can contain either a vendor\'s database ID, a vendor number or a vendor\'s name.') %]
    </p>
+    <p>
+    [2]:
+    [% LxERP.t8('Onhand only sets the quantity in master data, not in inventory. This is only a legacy info field and will be overwritten as soon as a inventory transfer happens.') %]
+   </p>
+
+[%- ELSIF SELF.type == 'orders' %]
+   <p>
+    [1]:
+    [% LxERP.t8('The column "datatype" must be present and must be the first column. The values must be the row names (see settings) for order and item data respectively.') %]
+   </p>
+   <p>
+    [2]:
+    [%- LxERP.t8('Amount and net amount are calculated by kivitendo. "verify_amount" and "verify_netamount" can be used for sanity checks.') %]<br>
+    [%- LxERP.t8('If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.') %]<br>
+   </p>
 [%- END %]
 
    <p>
  [%- INCLUDE 'csv_import/_form_customers_vendors.html' %]
 [%- ELSIF SELF.type == 'contacts' %]
  [%- INCLUDE 'csv_import/_form_contacts.html' %]
+[%- ELSIF SELF.type == 'orders' %]
+ [%- INCLUDE 'csv_import/_form_orders.html' %]
 [%- END %]
 
    <tr>
index 51d4eb2..539ce5a 100644 (file)
@@ -6,7 +6,7 @@
 [%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %]
  <table>
 [%- FOREACH rownum = SELF.display_rows %]
- [%- IF loop.first %]
+ [%- IF rownum < SELF.report_numheaders %]
   <tr class="listheading">
   [%- FOREACH value = SELF.report_rows.${rownum} %]
    <th>[% value | html %]</th>
@@ -21,7 +21,7 @@
   [%- END %]
    <td>
     [%- FOREACH error = csv_import_report_errors %][%- error | html %][% UNLESS loop.last %]<br>[%- END %][%- END %]
-    [%- FOREACH info  = SELF.report_status.${rownum}.information %][% IF !loop.first || csv_import_report_errors.size %]<br>[%- END %][%- info | html %][%- END %]
+    [%- FOREACH info  = SELF.report_status.${rownum}.information %][% IF rownum >= SELF.report_numheaders || csv_import_report_errors.size %]<br>[%- END %][%- info | html %][%- END %]
    </td>
   </tr>
  [%- END %]
diff --git a/templates/webpages/ct/_contact.html b/templates/webpages/ct/_contact.html
deleted file mode 100644 (file)
index a7d395e..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-[% USE L %][% USE HTML %][% USE T8 %][% USE LxERP %]
-    <table>
-     <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
-     <tr>
-      <th align="left">[% 'Contacts' | $T8 %]</th>
-      <td>
-       [%- L.select_tag('cp_id', CONTACTS, default = cp_id, with_empty = 1, empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_sub = \contacts_label,
-                        onchange = "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').val() + '&db=' + \$('#db').val() + '&cp_id=' + \$('#cp_id').val())") %]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
-      <td>
-       <select id="cp_gender" name="cp_gender">
-        <option value="m"[% IF cp_gender == 'm' %] selected[% END %]>[% 'male' | $T8 %]</option>
-        <option value="f"[% IF cp_gender == 'f' %] selected[% END %]>[% 'female' | $T8 %]</option>
-       </select>
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Title' | $T8 %]</th>
-      <td>
-       <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">&nbsp;
-       [% L.select_tag('selected_cp_title', TITLES, with_empty = 1) %]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Department' | $T8 %]</th>
-      <td>
-       <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">&nbsp;
-       [% L.select_tag('selected_cp_abteilung', DEPARTMENT, with_empty = 1) %]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Function/position' | $T8 %]</th>
-      <td>[% L.input_tag('cp_position', cp_position, size=40, maxlength=75) %]</td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
-      <td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="[% HTML.escape(cp_givenname) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Name' | $T8 %]</th>
-      <td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="[% HTML.escape(cp_name) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
-      <td><input id="cp_email" name="cp_email" size="40" value="[% HTML.escape(cp_email) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
-      <td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="[% HTML.escape(cp_phone1) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
-      <td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="[% HTML.escape(cp_phone2) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
-      <td><input id="cp_fax" name="cp_fax" size="40" value="[% HTML.escape(cp_fax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
-      <td><input id="cp_mobile1" name="cp_mobile1" size="40" value="[% HTML.escape(cp_mobile1) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
-      <td><input id="cp_mobile2" name="cp_mobile2" size="40" value="[% HTML.escape(cp_mobile2) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
-      <td><input id="cp_satphone" name="cp_satphone" size="40" value="[% HTML.escape(cp_satphone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
-      <td><input id="cp_satfax" name="cp_satfax" size="40" value="[% HTML.escape(cp_satfax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Project' | $T8 %]</th>
-      <td><input id="cp_project" name="cp_project" size="40" value="[% HTML.escape(cp_project) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Street' | $T8 %]</th>
-      <td><input id="cp_street" name="cp_street" size="40" maxlength="75" value="[% HTML.escape(cp_street) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Zip, City' | $T8 %]</th>
-      <td>
-       <input id="cp_zipcode" name="cp_zipcode" size="5" maxlength="10" value="[% HTML.escape(cp_zipcode) %]">
-       <input id="cp_city" name="cp_city" size="25" maxlength="75" value="[% HTML.escape(cp_city) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
-      <td><input id="cp_privatphone" name="cp_privatphone" size="40" value="[% HTML.escape(cp_privatphone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
-      <td><input id="cp_privatemail" name="cp_privatemail" size="40" value="[% HTML.escape(cp_privatemail) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
-      <td>
-        [% L.date_tag('cp_birthday', cp_birthday) %]
-      </td>
-     </tr>
-
-     [% IF CUSTOM_VARIABLES.Contacts.size %]
-     <tr>
-      <td colspan="2"><hr></td>
-     </tr>
-
-     [%- FOREACH var = CUSTOM_VARIABLES.Contacts %]
-     <tr>
-      <th align="left" valign="top" nowrap>[% HTML.escape(var.description) %]</th>
-      <td valign="top">[% var.HTML_CODE %]</td>
-     </tr>
-     [%- END %]
-     [%- END %]
-
-    </table>
-
-    [% IF cp_id %]
-      <input type="button" id="delete_contact" onclick="submitInputButton(this);" name="action" value="[% 'Delete Contact' | $T8 %]">
-    [% END %]
diff --git a/templates/webpages/ct/_shipto.html b/templates/webpages/ct/_shipto.html
deleted file mode 100644 (file)
index 47eacee..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-[% USE L %][% USE HTML %][% USE T8 %][% USE LxERP %]
-    <table width="100%" id="shipto_table">
-     <tr>
-      <th align="right">[% 'Shipping Address' | $T8 %]</th>
-      <td>
-       [% L.select_tag('shipto_id', SHIPTO, default = shipto_id, value_key = 'shipto_id', title_sub = \shipto_label, with_empty = 1, empty_title = LxERP.t8('New shipto'),
-                       onchange = "\$('#shipto').load('ct.pl?action=get_shipto&id=' + \$('#cvid').val() + '&db=' + \$('#db').val() + '&shipto_id=' + this.value)") %]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Name' | $T8 %]</th>
-      <td><input id="shiptoname" name="shiptoname" size="35" maxlength="75" value="[% HTML.escape(shiptoname) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Abteilung' | $T8 %]</th>
-      <td>
-       <input id="shiptodepartment_1" name="shiptodepartment_1" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_1) %]">
-       <input id="shiptodepartment_2" name="shiptodepartment_2" size="16" maxlength="75" value="[% HTML.escape(shiptodepartment_2) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Street' | $T8 %]</th>
-      <td><input id="shiptostreet" name="shiptostreet" size="35" maxlength="75" value="[% HTML.escape(shiptostreet) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
-      <td>
-       <input id="shiptozipcode" name="shiptozipcode" size="5" maxlength="75" value="[% HTML.escape(shiptozipcode) %]">
-       <input id="shiptocity" name="shiptocity" size="30" maxlength="75" value="[% HTML.escape(shiptocity) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Country' | $T8 %]</th>
-      <td><input id="shiptocountry" name="shiptocountry" size="35" maxlength="75" value="[% HTML.escape(shiptocountry) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
-      <td><input id="shiptocontact" name="shiptocontact" size="30" maxlength="75" value="[% HTML.escape(shiptocontact) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
-      <td><input id="shiptophone" name="shiptophone" size="30" maxlength="30" value="[% HTML.escape(shiptophone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
-      <td><input id="shiptofax" name="shiptofax" size="30" maxlength="30" value="[% HTML.escape(shiptofax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
-      <td><input id="shiptoemail" name="shiptoemail" size="45" value="[% HTML.escape(shiptoemail) %]"></td>
-     </tr>
-    </table>
-
-[%- IF shipto_id %]
-    <input type="submit" id="delete_shipto" name="action" value="[% 'Delete Shipto' | $T8 %]">
-[%- END %]
diff --git a/templates/webpages/ct/ajax_autocomplete.html b/templates/webpages/ct/ajax_autocomplete.html
deleted file mode 100644 (file)
index 25ab8c3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[%- USE HTML %]
-[%- FOREACH vc = CT %]
-[%- IF loop.count < limit %]
-[% vc.$column %]
-[%- END %]
-[%- END %]
diff --git a/templates/webpages/ct/form_footer.html b/templates/webpages/ct/form_footer.html
deleted file mode 100644 (file)
index 8df9c7e..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-[%- USE T8 %]
-[% USE HTML %]
-[% USE LxERP %]
-[% USE L %]
-<input name="id" type="hidden" id="cvid" value="[% HTML.escape(id) %]">
-<input name="business_save" type="hidden" value="[% HTML.escape(selectbusiness) %]">
-<input name="title_save" type="hidden" value="[% HTML.escape(title) %]">
-
-<input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
-<input type="hidden" name="db" id="db" value="[% HTML.escape(db) %]">
-
-<br>
-  <input class="submit" type="submit" name="action" accesskey="s" value="[% 'Save' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  <input class="submit" type="submit" name="action" accesskey="s" value="[% 'Save and Close' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- IF is_customer %]
-  <input class="submit" type="submit" name="action" value="[% 'Save and AR Transaction' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- ELSE %]
-  <input class="submit" type="submit" name="action" value="[% 'Save and AP Transaction' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- END %]
-  <input class="submit" type="submit" name="action" value="[% 'Save and Invoice' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  <input class="submit" type="submit" name="action" value="[% 'Save and Order' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- IF is_customer %]
-  <input class="submit" type="submit" name="action" value="[% 'Save and Quotation' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- ELSE %]
-  <input class="submit" type="submit" name="action" value="[% 'Save and RFQ' | $T8 %]" onclick="return check_taxzone_and_ustid()">
-  [%- END %]
-[%- IF id AND is_orphaned %]
-  [% L.submit_tag('action', LxERP.t8('Delete'), id => 'action_delete', confirm => LxERP.t8('Do you really want to delete this object?')) %]
-[%- END %]
-[%- IF id %]
-  <input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %]);" name="history" id="history" value="[% 'history' | $T8 %]">
-[%- END %]
-
-  </form>
-
- <script type="text/javascript">
-  <!--
-      function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
-      function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
-
-      function submitInputButton(button)
-      {
-        var hidden = document.createElement("input");
-        hidden.setAttribute("type", "hidden");
-
-        if( button.hasAttribute("name") )
-          hidden.setAttribute("name", button.getAttribute("name"));
-
-        if( button.hasAttribute("value") )
-          hidden.setAttribute("value", button.getAttribute("value"));
-
-
-        button.form.appendChild(hidden);
-
-        button.disabled = true;
-
-        button.form.submit();
-      }
-
-      function check_taxzone_and_ustid() {
-        if (($('#taxzone_id').val() == '1') && ($('#ustid').val() == '')) {
-          alert('[% LxERP.t8('Please enter the sales tax identification number.') %]');
-          return false;
-        }
-        return true;
-      }
-
-    -->
- </script>
diff --git a/templates/webpages/ct/form_header.html b/templates/webpages/ct/form_header.html
deleted file mode 100644 (file)
index cd5f610..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-[%- USE T8 %]
-[% USE HTML %][% USE LxERP %]
-[% USE L %]
-
- <h1>[% title %]</h1>
-
- [% PROCESS 'common/flash.html' %]
-
- <form method="post" name="ct" action="ct.pl" >
-
-  <div class="tabwidget">
-   <ul>
-    <li><a href="#billing">[% 'Billing Address' | $T8 %]</a></li>
-    <li><a href="#shipto">[% 'Shipping Address' | $T8 %]</a></li>
-    <li><a href="#contacts">[% 'Contacts' | $T8 %]</a></li>
-[%- IF id %]
-    <li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li>
-[%- END %]
-    <li><a href="#vcnotes">[% 'Notes' | $T8 %]</a></li>
-[%- IF CUSTOM_VARIABLES.CT.size %]
-    <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
-[%- END %]
-   </ul>
-
-   <div id="billing">
-
-    <table width="100%">
-     <tr height="5"></tr>
-     [% IF INSTANCE_CONF.get_vertreter %]
-      <tr>
-       <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][%- ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
-       <td>
-        [%- INCLUDE generic/multibox.html
-              name       = 'business',
-              DATA       = all_business,
-              show_empty = 1,
-              id_key     = 'id',
-              label_key  = 'description',
-        -%]
-       </td>
-      </tr>
-      [%- IF id %]
-      <tr>
-       <th align="right">[% 'Representative' | $T8 %]</th>
-       <td>
-        <input type="hidden" name="salesman_id" value="[%- HTML.escape(salesman_id) %]"%>
-        [%- HTML.escape(salesman) %]
-       </td>
-      </tr>
-      [%- END %]
-      <tr>
-       <th align="right">
-        [%- IF !id %]
-         [% 'Representative' | $T8 %]
-        [%- ELSE %]
-         [% 'Change representative to' | $T8 %]
-        [%- END %]
-       </th>
-       <td>
-        [%- INCLUDE generic/multibox.html
-              name       = 'new_salesman_id',
-              DATA       = ALL_SALESMAN_CUSTOMERS,
-              id_key     = 'id',
-              label_key  = 'name',
-              show_empty = id,
-        -%]
-       </td>
-      </tr>
-     [%- END %]
-     <tr>
-      [%- IF is_customer %]
-      <th align="right" nowrap>[% 'Customer Number' | $T8 %]</th>
-      <td><input name="customernumber" size="35" value="[% HTML.escape(customernumber) %]"></td>
-      [%- ELSE %]
-      <th align="right" nowrap>[% 'Vendor Number' | $T8 %]</th>
-      <td><input name="vendornumber" size="35" value="[% HTML.escape(vendornumber) %]"></td>
-      [%- END %]
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
-      <td>
-       <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]" class="initial_focus">&nbsp;
-       [%- INCLUDE generic/multibox.html
-             name       = 'selected_company_greeting',
-             DATA       = MB_COMPANY_GREETINGS,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% IF is_customer %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
-      <td><input name="name" size="35" maxlength="75" value="[% HTML.escape(name) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Department' | $T8 %]</th>
-      <td>
-       <input name="department_1" size="16" maxlength="75" value="[% HTML.escape(department_1) %]">
-       <input name="department_2" size="16" maxlength="75" value="[% HTML.escape(department_2) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Street' | $T8 %]</th>
-      <td>
-        <input name="street" size="35" maxlength="75" value="[% HTML.escape(street) %]">
-        <a
-          href="#"
-          onclick="window.open('https://maps.google.com/maps?q='+ encodeURIComponent($('#billing input[name=street]').val() +', '+ $('#billing input[name=zipcode]').val() +' '+ $('#billing input[name=city]').val() +', '+ $('#billing input[name=country]').val()), '_blank'); window.focus();"
-          title="[% 'Map' | $T8 %]"
-          >
-            <img src="image/map.png" alt="[% 'Map' | $T8 %]" />
-          </a>
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
-      <td>
-       <input name="zipcode" size="5" maxlength="10" value="[% HTML.escape(zipcode) %]">
-       <input name="city" size="30" maxlength="75" value="[% HTML.escape(city) %]">
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Country' | $T8 %]</th>
-      <td><input name="country" size="35" maxlength="75" value="[% HTML.escape(country) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
-      <td><input name="contact" size="28" maxlength="75" value="[% HTML.escape(contact) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
-      <td><input name="phone" size="30" value="[% HTML.escape(phone) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
-      <td><input name="fax" size="30" maxlength="30" value="[% HTML.escape(fax) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
-      <td><input name="email" size="45" value="[% HTML.escape(email) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Cc E-mail' | $T8 %]</th>
-      <td><input name="cc" size="45" value="[% HTML.escape(cc) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Bcc E-mail' | $T8 %]</th>
-      <td><input name="bcc" size="45" value="[% HTML.escape(bcc) %]"></td>
-     </tr>
-
-
-     <tr>
-      <th align="right" nowrap>
-      [% IF homepage %]<a href="[% HTML.escape(homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
-      [% ELSE %][% 'Homepage' | $T8 %]
-      [% END %]
-      </th>
-      <td><input name="homepage" size="45" title="[% 'Example: http://kivitendo.de' | $T8 %]" value="[% HTML.escape(homepage) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Username' | $T8 %]</th>
-      <td><input name="username" size="45" value="[% HTML.escape(username) %]"></td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'Password' | $T8 %]</th>
-      <td><input name="user_password" size="45" value="[% HTML.escape(user_password) %]"></td>
-     </tr>
-    </table>
-
-    <table>
-     <tr>
-      <th align="right">[% 'Credit Limit' | $T8 %]</th>
-      <td><input name="creditlimit" size="9" value="[% LxERP.format_amount(creditlimit, 0) %]"></td>
-      <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
-      <th align="right">[% 'Payment Terms' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'payment_id',
-             DATA       = payment_terms,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-
-      <th align="right">[% 'Discount' | $T8 %]</th>
-      <td><input name="discount" size="4" value="[% LxERP.format_amount(discount) %]"> %</td>
-     </tr>
-
-     <tr>
-      <th align="right">[% 'Tax Number / SSN' | $T8 %]</th>
-      <td><input name="taxnumber" size="20" value="[% HTML.escape(taxnumber) %]"></td>
-      <!-- Anm.: R&B 15.11.2008     VAT Reg No ist Ust-ID in GB, aber generell sollte es laut Richardson die sales tax id sein -->
-      <th align="right">[% 'sales tax identification number' | $T8 %]</th>
-      <td>[% L.input_tag('ustid', ustid, maxlength=14, size=30) %]</td>
-      [%- IF is_customer %]
-      <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
-      <td>[% L.input_tag('c_vendor_id', c_vendor_id, size=30) %]</td>
-      [%- ELSE %]
-      <th align="right">[% 'Customer Number' | $T8 %]</th>
-      <td>[% L.input_tag('v_customer_id', v_customer_id, size=30) %]</td>
-      [%- END %]
-     </tr>
-
-     <tr>
-      <th align="right">[% 'Account Number' | $T8 %]</th>
-      <td>[% L.input_tag('account_number', account_number, size=30) %]</td>
-      <th align="right">[% 'Bank Code Number' | $T8 %]</th>
-      <td>[% L.input_tag('bank_code', bank_code, size=30) %]</td>
-      <th align="right">[% 'Bank' | $T8 %]</th>
-      <td>[% L.input_tag('bank', bank, size=30) %]</td>
-     </tr>
-
-     <tr>
-      <th align="right">[% 'IBAN' | $T8 %]</th>
-      <td>[% L.input_tag('iban', iban, maxlength=100, size=30) %]</td>
-      <th align="right">[% 'BIC' | $T8 %]</th>
-      <td>[% L.input_tag('bic', bic, maxlength=100, size=30) %]</td>
-      [%- IF ALL_CURRENCIES.size %]
-        <th align="right">[% 'Currency' | $T8 %]</th>
-        <td>[% L.select_tag('currency', ALL_CURRENCIES, default = currency) %]</td>
-      [%- END %]
-     </tr>
-
-     <tr>
-      [% UNLESS INSTANCE_CONF.get_vertreter %]
-       <th align="right">[% IF is_customer %][% 'Type of Customer' | $T8 %][% ELSE %][% 'Type of Vendor' | $T8 %][%- END %]</th>
-       <td>
-        [%- INCLUDE generic/multibox.html
-              name       = 'business',
-              DATA       = all_business,
-              show_empty = 1,
-              id_key     = 'id',
-              label_key  = 'description',
-        -%]
-       </td>
-      [%- END %]
-      <th align="right">[% 'Language' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'language_id',
-             default    = default_language_id,
-             DATA       = languages,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-
-      [%- IF is_customer %]
-      <th align="right">[% 'Preisklasse' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'klass',
-             DATA       = all_pricegroup,
-             show_empty = 1,
-             id_key     = 'id',
-             label_key  = 'pricegroup',
-       -%]
-      </td>
-      [%- END  %]
-     </tr>
-
-     <tr>
-      <td align="right"><label for="obsolete">[% 'Obsolete' | $T8 %]</label></td>
-      <td><input name="obsolete" id="obsolete" class="checkbox" type="checkbox" value="1" [% IF obsolete %]checked[% END %]></td>
-      <td align="right"><label for="direct_debit">[% 'direct debit' | $T8 %]</label></td>
-      <td><input name="direct_debit" id="direct_debit" class="checkbox" type="checkbox" value="1" [% IF direct_debit %]checked[% END %]></td>
-     </tr>
-
-     <tr>
-      <th align="right">[% 'Steuersatz' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'taxzone_id',
-             id         = 'taxzone_id',
-             DATA       = ALL_TAXZONES,
-             show_empty = 0,
-             id_key     = 'id',
-             label_key  = 'description',
-       -%]
-      </td>
-      [%- IF is_customer && !INSTANCE_CONF.get_vertreter %]
-      <th align="right">[% 'Salesman' | $T8 %]</th>
-      <td>[% L.select_tag('salesman_id', ALL_SALESMEN, default = salesman_id, with_empty = 1, title_key = 'safe_name') %]</td>
-      [%- END %]
-
-      <td>[% 'taxincluded checked' | $T8 %]</td>
-      <td>[% L.select_tag('taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = taxincluded_checked) %]</td>
-     </tr>
-    </table>
-
-    <table>
-     <tr>
-      <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
-     </tr>
-
-     <tr>
-      <td><textarea name="notes" rows="3" cols="60" wrap="soft">[% HTML.escape(notes) %]</textarea></td>
-     </tr>
-    </table>
-   </div>
-
-   <div id="shipto">
-    [% INCLUDE 'ct/_shipto.html' %]
-   </div>
-
-   <div id="contacts">
-    [% INCLUDE 'ct/_contact.html' %]
-   </div>
-
-   <div id="deliveries">
-    <table>
-     <tr>
-      <th align="right">[% 'Shipping Address' | $T8 %]</th>
-      <td colspan="3">
-       [% L.select_tag('delivery_id', SHIPTO_ALL, value_key = 'shipto_id', title_sub = \shipto_label, with_empty = 1,
-                       onchange = "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').val() + '&db=' + \$('#db').val() + '&shipto_id=' + this.value)") %]
-      </td>
-     </tr>
-
-     <tr>
-      <th align="right" nowrap>[% 'From' | $T8 %]</th>
-      <td>
-        [% L.date_tag('from',
-                      from,
-                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
-        %]
-      </td>
-      <th align="right" nowrap>[% 'To (time)' | $T8 %]</th>
-      <td>
-       [% L.date_tag('to',
-                      to,
-                      onchange => "\$('#delivery').load('ct.pl?action=get_delivery&shipto_id='+ \$('#delivery_id').val() +'&from='+ \$('#from').val() +'&to='+ \$('#to').val() +'&id='+ \$('#cvid').val() +'&db='+ \$('#db').val())")
-       %]
-      </td>
-     </tr>
-
-     <tr>
-      <td colspan="4">
-       <div id="delivery">
-       </div>
-      </td>
-     </tr>
-    </table>
-   </div>
-
-   <div id="vcnotes">
-
-    [%- IF NOTES && NOTES.size %]
-    <p>
-     <table>
-      <tr>
-       <th class="listheading">[% 'Delete' | $T8 %]</th>
-       <th class="listheading">[% 'Subject' | $T8 %]</th>
-       <th class="listheading">[% 'Created on' | $T8 %]</th>
-       <th class="listheading">[% 'Created by' | $T8 %]</th>
-       <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
-       <th class="listheading">[% 'Follow-Up for' | $T8 %]</th>
-       <th class="listheading">[% 'Follow-Up done' | $T8 %]</th>
-      </tr>
-
-      [%- FOREACH row = NOTES %]
-      <tr class="listrow[% loop.count % 2 %]">
-       <input type="hidden" name="NOTE_id_[% loop.count %]" value="[% HTML.escape(row.id) %]">
-       <td>[% UNLESS NOTE_id && (NOTE_id == row.id) %]<input type="checkbox" name="NOTE_delete_[% loop.count %]" value="1">[% END %]</td>
-       <td><a href="ct.pl?action=edit&db=[% HTML.url(db) %]&id=[% HTML.url(id) %]&edit_note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
-       <td>[% HTML.escape(row.created_on) %]</td>
-       <td>[% IF row.created_by_name %][% HTML.escape(row.created_by_name) %][% ELSE %][% HTML.escape(row.created_by_login) %][% END %]</td>
-       <td>[% HTML.escape(row.follow_up_date) %]</td>
-       <td>[% IF row.created_for_name %][% HTML.escape(row.created_for_name) %][% ELSE %][% HTML.escape(row.created_for_login) %][% END %]</td>
-       <td>[% IF row.follow_up_date %][% IF row.follow_up_done %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %][% END %]</td>
-      </tr>
-      [%- END %]
-
-      <input type="hidden" name="NOTES_rowcount" value="[% NOTES.size %]">
-
-     </table>
-    </p>
-    [%- END %]
-
-    <div class="listtop">[% IF NOTE_id %][% 'Edit note' | $T8 %][% ELSE %][% 'Add note' | $T8 %][% END %]</div>
-
-    <input type="hidden" name="NOTE_id" value="[% HTML.escape(NOTE_id) %]">
-    <input type="hidden" name="FU_id" value="[% HTML.escape(FU_id) %]">
-
-    <p>
-     <table>
-      <tr>
-       <td valign="right">[% 'Subject' | $T8 %]</td>
-       <td><input name="NOTE_subject" value="[% HTML.escape(NOTE_subject) %]" size="50"></td>
-      </tr>
-
-      <tr>
-       <td valign="right" align="top">[% 'Body' | $T8 %]</td>
-       <td align="top"><textarea cols="50" rows="10" name="NOTE_body">[% HTML.escape(NOTE_body) %]</textarea></td>
-      </tr>
-
-      <tr>
-       <td valign="right">[% 'Follow-Up On' | $T8 %]</td>
-       <td>
-        [% L.date_tag('FU_date', FU_date) %]
-        [% 'for' | $T8 %]
-        [% L.select_tag('FU_created_for_user', ALL_EMPLOYEES, default = (FU_created_for_user ? FU_created_for_user : USER.id), title_key='safe_name') %]
-       </td>
-      </tr>
-
-      <tr>
-       <td>&nbsp;</td>
-       <td>
-        <input type="checkbox" name="FU_done" id="FU_done" value="1"[% IF FU_done %] checked[% END %]>
-        <label for="FU_done">[% 'Follow-Up done' | $T8 %]</label>
-       </td>
-      </tr>
-     </table>
-    </p>
-   </div>
-
-   [%- IF CUSTOM_VARIABLES.CT.size %]
-   <div id="custom_variables">
-
-    <p>
-     <table>
-      [%- FOREACH var = CUSTOM_VARIABLES.CT %]
-      <tr>
-       <td align="right" valign="top">[% HTML.escape(var.description) %]</td>
-       <td valign="top">[% var.HTML_CODE %]</td>
-      </tr>
-      [%- END %]
-     </table>
-    </p>
-   </div>
-   [%- END %]
-
-  </div>
-
-  <script type="text/javascript">
-   <!--
-   function set_gender(gender) {
-     var s = document.getElementById('cp_gender');
-     if (s) {
-       s.selectedIndex = (gender == 'f') ? 1 : 0;
-     }
-   }
-  -->
-
-  </script>
diff --git a/templates/webpages/ct/get_delivery.html b/templates/webpages/ct/get_delivery.html
deleted file mode 100644 (file)
index 921aaba..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-[%- USE T8 %]
-[% USE HTML %][% USE LxERP %]
-<div id="delivery">
-<table width="100%">
-  <tr>
-    <td>
-      <table width="100%">
-        <tr class="listheading">
-          <th class="listheading">[% 'Shipping Address' | $T8 %]</th>
-          <th class="listheading">[% 'Invoice' | $T8 %]</th>
-          <th class="listheading">[% 'Order' | $T8 %]</th>
-          <th class="listheading">[% 'Invdate' | $T8 %]</th>
-          <th class="listheading">[% 'Description' | $T8 %]</th>
-          <th class="listheading">[% 'Qty' | $T8 %]</th>
-          <th class="listheading">[% 'Unit' | $T8 %]</th>
-[%- IF is_customer %]
-          <th class="listheading">[% 'Sell Price' | $T8 %]</th>
-[%- ELSE %]
-          <th class="listheading">[% 'Last Cost' | $T8 %]</th>
-[%- END %]
-        </tr>
-[%- FOREACH row = DELIVERY %]
-[%-
-    row.script = is_customer ?  ( row.invoice ? 'is' : 'ar' )
-                             :  ( row.invoice ? 'ir' : 'ap' )
--%]
-        <tr class="listrow[% loop.count % 2 %]">
-          <td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
-          <td>[% IF row.id %]<a href='[% row.script %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
-          <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=[% IF is_customer %]sales_order[% ELSE %]purchase_order[% END %]&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
-          <td>[% HTML.escape(row.transdate)   || '&nbsp;' %]</td>
-          <td>[% HTML.escape(row.description) || '&nbsp;' %]</td>
-          <td>[% HTML.escape(row.qty)         || '&nbsp;' %]</td>
-          <td>[% HTML.escape(row.unit)        || '&nbsp;' %]</td>
-          <td>[% LxERP.format_amount(row.sellprice, 2) || '&nbsp;' %]</td>
-        </tr>
-[%- END %]
-
-     </table>
-[%- IF DELIVERY.size == 15 %]
-     <p>[% 'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' | $T8 %]</p>
-[%- END %]
-</div>
index 7faabc3..9546101 100644 (file)
@@ -1,10 +1,10 @@
-[% USE T8 %][% USE HTML %]<form method="post" action="dispatcher.pl?M=ct">
+[% USE T8 %][% USE HTML %]
 
- <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
- <input name="db" type="hidden" value="[% HTML.escape(db) %]">
+<form method="post" action="controller.pl?action=CustomerVendor/add">
+  <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
+  <input name="db" type="hidden" value="[% HTML.escape(db) %]">
 
- [% IF IS_CUSTOMER %][% 'New customer' | $T8 %][% ELSE %][% 'New vendor' | $T8 %][% END %]<br>
-
- <input class="submit" type="submit" name="A_add" value="[%- 'Add' | $T8 %]">
+  [% IF IS_CUSTOMER %][% 'New customer' | $T8 %][% ELSE %][% 'New vendor' | $T8 %][% END %]<br>
 
+  <input class="submit" type="submit" value="[%- 'Add' | $T8 %]">
 </form>
diff --git a/templates/webpages/ct/testpage.html b/templates/webpages/ct/testpage.html
deleted file mode 100644 (file)
index e8ba838..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-[% USE L %]
-[% USE T8 %]
-[% USE LxERP %]
-[% L.javascript_tag('jquery-ui') %]
-<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" />
-
-<p>Pick a customer</p>
-id: [% L.input_tag('customer_id', '') %]
-nr: [% L.input_tag('customer_customernumber', '') %]
-desc: [% L.input_tag('customer_name', '') %]
-
-<script type='text/javascript'>
-function autocomplete_customer (selector, column) {
-  $(function(){ $(selector).autocomplete({
-    source: function(req, rsp) {
-      $.ajax({
-        url: 'controller.pl?action=Customer/ajax_autocomplete',
-        dataType: "json",
-        data: {
-          column: column,
-          term: req.term,
-          current: function() { $('#customer_id').val() },
-          obsolete: 0,
-        },
-        success: function (data){ rsp(data) }
-      });
-    },
-    limit: 20,
-    delay: 50,
-    select: function(event, ui) {
-      $('#customer_id').val(ui.item.id);
-      $('#customer_customernumber').val(ui.item.customernumber);
-      $('#customer_name').val(ui.item.name);
-    },
-  })});
-}
-//autocomplete_customer('#customer_customernumber', 'customernumber');
-autocomplete_customer('#customer_name', '');
-</script>
-
index 74f90a2..1f26429 100644 (file)
@@ -11,7 +11,7 @@
  <table width="100%" id="cvarcfg_list">
   <thead>
    <tr class="listheading">
-    <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+    <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
     <th width="20%">[% 'Name' | $T8 %]</th>
     <th width="20%">[% 'Description' | $T8 %]</th>
     <th width="20%">[% 'Type' | $T8 %]</th>
@@ -26,7 +26,7 @@
   <tbody>
    [%- FOREACH cfg = CONFIGS %]
     <tr class="listrow" id="cvarcfg_id_[% cfg.id %]">
-     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
 
      <td><a href="[% SELF.url_for(action='edit', module=SELF.module, id=cfg.id) %]">[% HTML.escape(cfg.name) %]</a></td>
 
index c8ec6b0..ad2da05 100644 (file)
   <div class="tabwidget" id="customer_vendor_tabs">
     <ul>
       <li><a href="#billing">[% 'Billing Address' | $T8 %]</a></li>
+      <li><a href="#bank">[% 'Bank account' | $T8 %]</a></li>
       <li><a href="#shipto">[% 'Shipping Address' | $T8 %]</a></li>
       <li><a href="#contacts">[% 'Contacts' | $T8 %]</a></li>
-      [% IF ( SELF.cv.id ) %]
+      [% IF ( SELF.cv.id && AUTH.assert('sales_all_edit', 1) ) %]
         <li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li>
       [% END %]
       <li><a href="#vcnotes">[% 'Notes' | $T8 %]</a></li>
     </ul>
 
     [% PROCESS "customer_vendor/tabs/billing.html" %]
+    [% PROCESS "customer_vendor/tabs/bank.html" %]
     [% PROCESS "customer_vendor/tabs/shipto.html" %]
     [% PROCESS "customer_vendor/tabs/contacts.html" %]
-    [% IF ( SELF.cv.id ) %]
+    [% IF ( SELF.cv.id && AUTH.assert('sales_all_edit', 1) ) %]
       [% PROCESS "customer_vendor/tabs/deliveries.html" %]
     [% END %]
     [% PROCESS "customer_vendor/tabs/vcnotes.html" %]
   }
 -->
 </script>
-
diff --git a/templates/webpages/customer_vendor/tabs/bank.html b/templates/webpages/customer_vendor/tabs/bank.html
new file mode 100644 (file)
index 0000000..1f08af4
--- /dev/null
@@ -0,0 +1,63 @@
+[%- USE T8 %]
+[%- USE HTML %]
+[%- USE LxERP %]
+[%- USE L %]
+
+<div id="bank">
+  <table>
+    <tr>
+      <th align="right">[% 'Owner of account' | $T8 %]</th>
+
+      <td>
+        [% L.input_tag('cv.depositor', SELF.cv.depositor, size = 20) %]
+      </td>
+
+    [%- IF ( SELF.is_customer ) %]
+      <th align="right">[% 'Mandator ID' | $T8 %]</th>
+      <td>
+        [% L.input_tag('cv.mandator_id', SELF.cv.mandator_id, size = 20) %]
+      </td>
+
+      <th align="right">[% 'Mandate Date of Signature' | $T8 %]</th>
+      <td>
+        [% L.date_tag('cv.mandate_date_of_signature', SELF.cv.mandate_date_of_signature) %]
+      </td>
+    [%- END %]
+    </tr>
+
+    <tr>
+      <th align="right">[% 'IBAN' | $T8 %]</th>
+
+      <td>
+        [% L.input_tag('cv.iban', SELF.cv.iban, size = 34, maxlength = 100) %]
+      </td>
+
+
+      <th align="right">[% 'BIC' | $T8 %]</th>
+      <td>
+        [% L.input_tag('cv.bic', SELF.cv.bic, size = 20, maxlength = 100) %]
+      </td>
+
+      <th align="right">[% 'Bank' | $T8 %]</th>
+
+      <td>
+        [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %]
+      </td>
+    </tr>
+
+    <tr>
+      <th align="right">[% 'Account Number' | $T8 %]</th>
+
+      <td>
+        [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 20, maxlength = 100) %]
+      </td>
+
+
+      <th align="right">[% 'Bank Code Number' | $T8 %]</th>
+
+      <td>
+        [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 20, maxlength = 100) %]
+      </td>
+    </tr>
+  </table>
+</div>
index e929a19..c65bed0 100644 (file)
       <th align="right">[% 'Discount' | $T8 %]</th>
 
       <td>
-        [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]
+        [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]%
       </td>
     </tr>
 
       [%- END %]
     </tr>
 
+  [% IF ( SELF.all_currencies.size ) %]
     <tr>
-      <th align="right">[% 'Account Number' | $T8 %]</th>
-
-      <td>
-        [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 20, maxlength = 100) %]
-      </td>
-
-
-      <th align="right">[% 'Bank Code Number' | $T8 %]</th>
-
-      <td>
-        [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 20, maxlength = 100) %]
-      </td>
-
-
-      <th align="right">[% 'Bank' | $T8 %]</th>
-
-      <td>
-        [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %]
-      </td>
-    </tr>
-
-    <tr>
-      <th align="right">[% 'IBAN' | $T8 %]</th>
-
-      <td>
-        [% L.input_tag('cv.iban', SELF.cv.iban, size = 34, maxlength = 100) %]
-      </td>
-
-
-      <th align="right">[% 'BIC' | $T8 %]</th>
-      <td>
-        [% L.input_tag('cv.bic', SELF.cv.bic, size = 11, maxlength = 100) %]
-      </td>
-
-
-      [% IF ( SELF.all_currencies.size ) %]
         <th align="right">[% 'Currency' | $T8 %]</th>
 
         <td>
           [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id) %]
         </td>
-      [% END %]
     </tr>
+  [% END %]
 
     <tr>
       [% IF ( !INSTANCE_CONF.get_vertreter ) %]
         [% L.select_tag('cv.language_id', SELF.all_languages, default = SELF.cv.language_id, value_key = 'id', title_key = 'description', with_empty = 1) %]
       </td>
 
-      [% IF ( SELF.is_customer() ) %]
-        <th align="right">[% 'Preisklasse' | $T8 %]</th>
+      <th align="right">[% 'Delivery Terms' | $T8 %]</th>
+
+      <td>
+        [% L.select_tag('cv.delivery_term_id', SELF.all_delivery_terms, default = SELF.cv.delivery_term_id, value_key = 'id', title_key = 'description', with_empty = 1) %]
+      </td>
 
-        <td>
-          [% L.select_tag('cv.klass', SELF.all_pricegroups, default = SELF.cv.klass, value_key = 'id', title_key = 'pricegroup', with_empty = 1) %]
-        </td>
-      [% END  %]
     </tr>
 
     <tr>
       <td>
         [% L.checkbox_tag('cv.direct_debit', checked = SELF.cv.direct_debit, for_submit=1) %]
       </td>
+
+      [% IF ( SELF.is_customer() ) %]
+        <th align="right">[% 'Preisklasse' | $T8 %]</th>
+
+        <td>
+          [% L.select_tag('cv.klass', SELF.all_pricegroups, default = SELF.cv.klass, value_key = 'id', title_key = 'pricegroup', with_empty = 1) %]
+        </td>
+      [% END  %]
+
     </tr>
 
     <tr>
index 0b238c3..8f49977 100644 (file)
@@ -59,7 +59,7 @@
       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
 
       <td>
-        [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptostreet,  size = 5, maxlength = 75) %]
+        [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptozipcode,  size = 5, maxlength = 75) %]
         [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity,  size = 30, maxlength = 75) %]
       </td>
     </tr>
index 04bf951..403b0ff 100644 (file)
@@ -3,7 +3,7 @@
 [%- USE L %]
 
 <div id="vcnotes">
-   [% IF ( NOTES && NOTES.size ) %]
+  [% IF ( SELF.notes && SELF.notes.size ) %]
      <p>
        <table>
         <tr>
         [%- FOREACH row = SELF.notes %]
           <tr class="listrow[% loop.count % 2 %]">
             <td>
-              [% L.hidden_tag('notes[+].id', row.id) %]
-              [% IF ( !NOTE_id || (NOTE_id != row.id) ) %]
-                [% L.checkbox_tag('notes[].delete', 0) %]
+              [% IF ( !SELF.note || SELF.note.id != row.id ) %]
+                [% L.checkbox_tag('delete_notes[]', value = row.id) %]
               [% END %]
             </td>
 
             <td>
-              <a href="ct.pl?action=edit&db=[% HTML.url(db) %]&id=[% HTML.url(id) %]&edit_note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a>
+              <a href="controller.pl?action=CustomerVendor/edit&db=[% SELF.is_vendor() ? 'vendor' : 'customer' %]&id=[% HTML.url(SELF.cv.id) %]&note_id=[% HTML.url(row.id) %]">[% HTML.escape(row.subject) %]</a>
             </td>
 
             <td>
-              [% HTML.escape(row.created_on) %]
+              [% row.itime.to_kivitendo | html %]
             </td>
 
             <td>
-              [% IF ( row.created_by_name ) %]
-                [% HTML.escape(row.created_by_name) %]
-              [% ELSE %]
-                [% HTML.escape(row.created_by_login) %]
-              [% END %]
+              [% row.employee.safe_name | html %]
             </td>
 
             <td>
-              [% HTML.escape(row.follow_up_date) %]
+              [% row.follow_up.follow_up_date.to_kivitendo | html %]
             </td>
 
             <td>
-              [% IF ( row.created_for_name ) %]
-                [% HTML.escape(row.created_for_name) %]
-              [% ELSE %]
-                [% HTML.escape(row.created_for_login) %]
-              [% END %]
+              [% row.follow_up.created_for.safe_name | html %]
             </td>
 
             <td>
-              [% IF ( row.follow_up_date ) %]
-                [% IF ( row.follow_up_done ) %]
+              [% IF ( row.follow_up.follow_up_date ) %]
+                [% IF ( row.follow_up.done ) %]
                   [% 'Yes' | $T8 %]
                 [% ELSE %]
                   [% 'No' | $T8 %]
@@ -68,8 +59,9 @@
     </p>
   [% END %]
 
+
   <div class="listtop">
-    [% IF ( NOTE_id ) %]
+    [% IF ( SELF.note.id ) %]
       [% 'Edit note' | $T8 %]
     [% ELSE %]
       [% 'Add note' | $T8 %]
index 2c7413d..0c82945 100644 (file)
@@ -3,7 +3,6 @@
 [%- USE LxERP %]
 [%- USE JavaScript %]
  <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript" src="js/parts_language_selection.js"></script>
  <script type="text/javascript">
   <!--
      warehouses = new Array();
diff --git a/templates/webpages/delivery_term/form.html b/templates/webpages/delivery_term/form.html
new file mode 100755 (executable)
index 0000000..92d98c2
--- /dev/null
@@ -0,0 +1,44 @@
+[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
+
+ <form method="post" action="controller.pl">
+  <div class="listtop">[% FORM.title %]</div>
+
+[%- INCLUDE 'common/flash.html' %]
+
+  <table>
+   <tr>
+    <td>[%- 'Description' | $T8 %]</td>
+    <td>
+     <input name="delivery_term.description" value="[%- HTML.escape(SELF.delivery_term.description) %]">
+    </td>
+   </tr>
+
+   <tr>
+    <td>[%- 'Long Description' | $T8 %]</td>
+    <td>
+     <input name="delivery_term.description_long" value="[%- HTML.escape(SELF.delivery_term.description_long) %]" size="60">
+    </td>
+   </tr>
+
+   [%- FOREACH language = SELF.languages %]
+    <tr>
+     <td>[%- HTML.escape(language.description) %] ([%- LxERP.t8('Translation') %])</td>
+     <td>
+      <input name="translation_[% language.id %]" value="[%- HTML.escape(SELF.delivery_term.translated_attribute('description_long', language, 1)) %]" size="60">
+     </td>
+    </tr>
+   [%- END %]
+
+  <p>
+   <input type="hidden" name="id" value="[% SELF.delivery_term.id %]">
+   <input type="hidden" name="action" value="DeliveryTerm/dispatch">
+   <input type="submit" class="submit" name="action_[% IF SELF.delivery_term.id %]update[% ELSE %]create[% END %]" value="[% 'Save' | $T8 %]">
+   [%- IF SELF.delivery_term.id %]
+    <input type="submit" class="submit" name="action_destroy" value="[% 'Delete' | $T8 %]"
+           onclick="if (confirm('[% 'Are you sure you want to delete this delivery term?' | $T8 %]')) return true; else return false;">
+   [%- END %]
+   <a href="[% SELF.url_for(action => 'list') %]">[%- 'Abort' | $T8 %]</a>
+  </p>
+
+ </form>
+
diff --git a/templates/webpages/delivery_term/list.html b/templates/webpages/delivery_term/list.html
new file mode 100644 (file)
index 0000000..661e2da
--- /dev/null
@@ -0,0 +1,45 @@
+[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
+
+ <div class="listtop">[% FORM.title %]</div>
+
+[%- INCLUDE 'common/flash.html' %]
+
+ <form method="post" action="controller.pl">
+  [% IF !DELIVERY_TERMS.size %]
+   <p>
+    [%- 'No delivery term has been created yet.' | $T8 %]
+   </p>
+
+  [%- ELSE %]
+   <table id="delivery_term_list">
+    <thead>
+    <tr class="listheading">
+     <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
+     <th>[%- 'Description' | $T8 %]</th>
+     <th>[%- 'Long Description' | $T8 %]</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    [%- FOREACH delivery_term = DELIVERY_TERMS %]
+    <tr class="listrow[% loop.count % 2 %]" id="delivery_term_id_[% delivery_term.id %]">
+     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
+     <td>
+      <a href="[% SELF.url_for(action => 'edit', id => delivery_term.id) %]">
+       [%- HTML.escape(delivery_term.description) %]
+      </a>
+     </td>
+     <td>[%- HTML.escape(delivery_term.description_long) %]</td>
+    </tr>
+    [%- END %]
+    </tbody>
+   </table>
+  [%- END %]
+
+  <p>
+   <a href="[% SELF.url_for(action => 'new') %]">[%- 'Create new delivery term' | $T8 %]</a>
+  </p>
+ </form>
+
+ [% L.sortable_element('#delivery_term_list tbody', url => 'controller.pl?action=DeliveryTerm/reorder', with => 'delivery_term_id') %]
+
index d02a1e5..eea9217 100644 (file)
         <td><textarea name="notes" rows="[% LxERP.numtextrows(notes, 25, 8, 2) %]" cols="25" wrap="soft"[% RO %]>[% HTML.escape(notes) %]</textarea></td>
         <td><textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td>
        </tr>
+
+       <tr>
+         <th align="right">[% 'Delivery Terms' | $T8 %]</th>
+         <td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description') %]</td>
+       </tr>
       </table>
 
      </td>
index baf7b3f..2961b5c 100644 (file)
@@ -38,6 +38,7 @@
  <div class="listtop">[% title %]</div>
 
 [%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
 
  [%- IF ERRORS && ERRORS.size %]
  <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
   <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
   <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
   <input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
+  <input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
   <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
   <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
   <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
        <tr>
         <input type="hidden" name="[% vc %]_id" value="[% HTML.escape(the_vc_id) %]">
         <input type="hidden" name="old[% vc %]" value="[% HTML.escape(the_oldvc) %]">
+        <input type="hidden" name="tradediscount" value="[% HTML.escape(tradediscount) %]">
         <th align="right">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
         <td>
          [%- UNLESS !delivered && SHOW_VC_DROP_DOWN %]
index 1f7dda6..95a2c8b 100644 (file)
     </tr>
 
     <tr>
-     <th align="right">[% 'From' | $T8 %]</th>
+     <th align="right">[% 'Delivery Order Date' | $T8 %] [% 'From' | $T8 %]</th>
      <td>
       [% L.date_tag('transdatefrom') %]
      </td>
      </td>
     </tr>
 
+    <tr>
+     <th align="right">[% 'Reqdate' | $T8 %] [% 'From' | $T8 %]</th>
+     <td>
+      [% L.date_tag('reqdatefrom') %]
+     </td>
+     <th align="right">[% 'Bis' | $T8 %]</th>
+     <td>
+      [% L.date_tag('reqdateto') %]
+     </td>
+    </tr>
+
     <tr>
      <th align="right">[% 'Include in Report' | $T8 %]</th>
      <td colspan="5">
        <tr>
         <td>
          <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
-         <label for="l_transdate">[% 'Date' | $T8 %]</label>
+         <label for="l_transdate">[% 'Delivery Order Date' | $T8 %]</label>
         </td>
         <td>
          <input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
index 06b5990..fa6cabb 100644 (file)
 
   <p><button type="button" onclick="window.close()">[% 'Close Window' | $T8 %]</button></p>
 
+  <script type="text/javascript">
+   <!--
+       $(function(){
+         $(window.opener.document.getElementsByName("stock_out_[% HTML.escape(row) %]")).val("");
+       });
+     -->
+  </script>
+
   [%- ELSE %]
 
   <input type="hidden" name="nextsub"   value="set_stock_out">
index e7cad6f..f0b225e 100644 (file)
@@ -17,7 +17,7 @@
  </form>
  <script type='text/javascript'>
    $(function() {
-     $("select[name='language_id']").prop('disabled', $('#force_lang').prop('checked'));
-     $('#force_lang').checkall('select[name="language_id"]', 'disabled');
+     $("select[name='language_id']").prop('disabled', !$('#force_lang').prop('checked'));
+     $('#force_lang').checkall('select[name="language_id"]', 'disabled', 'inverted');
    });
  </script>
diff --git a/templates/webpages/financial_controlling_report/_filter.html b/templates/webpages/financial_controlling_report/_filter.html
new file mode 100644 (file)
index 0000000..fcae079
--- /dev/null
@@ -0,0 +1,54 @@
+[%- USE T8 %]
+[%- USE L %]
+[%- USE LxERP %]
+[%- USE HTML %]
+<form action='controller.pl' method='post'>
+<div class='filter_toggle'>
+<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Show Filter' | $T8 %]</a>
+  [% SELF.filter_summary %]
+</div>
+<div class='filter_toggle' style='display:none'>
+<a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Hide Filter' | $T8 %]</a>
+ <table id='filter_table'>
+  <tr>
+   <th align="right">[% 'Customer' | $T8 %]</th>
+   <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, size = 20) %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Customer Number' | $T8 %]</th>
+   <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, size = 20) %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Order Number' | $T8 %]</th>
+   <td>[% L.input_tag('filter.ordnumber:substr::ilike', filter.ordnumber_substr__ilike, size = 20) %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Project Number' | $T8 %]</th>
+   <td>[% L.input_tag('filter.globalproject.projectnumber:substr::ilike', filter.globalproject.projectnumber_substr__ilike, size = 20) %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Project Type' | $T8 %]</th>
+   <td>[% L.select_tag('filter.globalproject.project_type_id', SELF.project_types, default=filter.globalproject.project_type_id, title_key='description', with_empty=1) %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Order Date' | $T8 %] [% 'From Date' | $T8 %]</th>
+   <td>[% L.date_tag('filter.transdate:date::ge', filter.transdate_date__ge, cal_align = 'BR') %]</td>
+  </tr>
+  <tr>
+   <th align="right">[% 'Order Date' | $T8 %] [% 'To Date' | $T8 %]</th>
+   <td>[% L.date_tag('filter.transdate:date::le', filter.transdate_date__le, cal_align = 'BR') %]</td>
+  </tr>
+ </table>
+
+[% L.hidden_tag('action', 'FinancialControllingReport/dispatch') %]
+[% L.hidden_tag('sort_by', FORM.sort_by) %]
+[% L.hidden_tag('sort_dir', FORM.sort_dir) %]
+[% L.hidden_tag('page', FORM.page) %]
+[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
+
+
+<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table option").prop("selected",0)'>[% 'Reset' | $T8 %]</a>
+
+</div>
+
+</form>
diff --git a/templates/webpages/financial_controlling_report/report_bottom.html b/templates/webpages/financial_controlling_report/report_bottom.html
new file mode 100644 (file)
index 0000000..da08e07
--- /dev/null
@@ -0,0 +1,2 @@
+[% USE L %]
+[%- L.paginate_controls(models=models) %]
diff --git a/templates/webpages/financial_controlling_report/report_top.html b/templates/webpages/financial_controlling_report/report_top.html
new file mode 100644 (file)
index 0000000..5fb399c
--- /dev/null
@@ -0,0 +1,3 @@
+[%- USE L %]
+[%- PROCESS 'financial_controlling_report/_filter.html' filter=SELF.filter %]
+ <hr>
diff --git a/templates/webpages/financial_overview/report_top.html b/templates/webpages/financial_overview/report_top.html
new file mode 100644 (file)
index 0000000..ae362ab
--- /dev/null
@@ -0,0 +1,18 @@
+[%- USE L %][% USE LxERP %]
+<form method="post" id="form" action="controller.pl">
+ [% L.hidden_tag('action', 'FinancialOverview/list') %]
+ <a href="[% SELF.url_for(action='list', year=(SELF.year - 1), subtotals_per_quarter=SELF.subtotals_per_quarter) %]">&laquo; [%- LxERP.t8("Prior year") %]: [% SELF.year - 1 %]</a>
+ |
+
+ [% LxERP.t8("Current year") %]:
+ [% L.select_tag('year', YEARS_TO_LIST, default=SELF.year, onchange='$("#form").submit();') %]
+
+ [% IF SELF.year < SELF.current_year %]
+  |
+  <a href="[% SELF.url_for(action='list', year=(SELF.year + 1), subtotals_per_quarter=SELF.subtotals_per_quarter) %]">[%- LxERP.t8("Following year") %]: [% SELF.year + 1 %] &raquo;</a>
+ [% END %]
+
+ <br>
+ [% L.checkbox_tag('subtotals_per_quarter', checked=SELF.subtotals_per_quarter, label=LxERP.t8('Subtotals per quarter'), onchange='$("#form").submit();') %]
+</form>
+<hr>
index 82b6f74..d6219e6 100644 (file)
 
       <input type="hidden" name="action" value="dispatcher">
       <input class="submit" type="submit" name="action_add" value="[% 'Continue' | $T8 %]">
-      <input class="submit" type="submit" name="action_back_to_record" value="[% 'Back' | $T8 %]">
+      <input id='back_button' type='button' class="submit" value="[% 'Back' | $T8 %]">
     </form>
+<script type='text/javascript'>
+  $(function(){ $('#back_button').click(function(){ window.history.back(-1) }) })
+</script>
 
 
index 1b4b9d0..f7855f3 100644 (file)
@@ -1,25 +1,29 @@
-[%- USE T8 %]
-[%- USE HTML %]
- <form name="Form">
-
-  <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
-
-  <div class="listtop">[% title %]</div>
-
-  <p>[% 'Please insert your longdescription below' | $T8 %]</p>
-
-  <p><textarea id="longdescription" name="longdescription" rows="15" cols="45" wrap="soft">[% HTML.escape(longdescription) %]</textarea></p>
-
-  <p><input type="submit" onclick="longdescription_updated()" value="[% 'Close' | $T8 %]"></p>
- </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();
-      }
-    -->
- </script>
-
+[%- USE L -%][%- USE LxERP -%]
+
+<div id="edit_longdescription_dialog" style="display: none">
+ <p>
+  <table>
+   <tr>
+    <th align="right">[% LxERP.t8("Row") %]:</th>
+    <td id="popup_edit_longdescription_runningnumber"></td>
+   </tr>
+
+   <tr>
+    <th align="right">[% LxERP.t8("Part Number") %]:</th>
+    <td id="popup_edit_longdescription_partnumber"></td>
+   </tr>
+
+   <tr>
+    <th align="right">[% LxERP.t8("Description") %]:</th>
+    <td id="popup_edit_longdescription_description"></td>
+   </tr>
+  </table>
+ </p>
+
+ <p>[% L.textarea_tag("popup_edit_longdescription_input", "", wrap="soft", style="width: 750px; height: 240px;") %]</p>
+
+ <p>
+  [% L.button_tag("kivi.SalesPurchase.set_longdescription()", LxERP.t8("Close")) %]
+  <a onclick="$('#edit_longdescription_dialog').dialog('close');" href="#">[% LxERP.t8("Abort") %]</a>
+ </p>
+</div>
index d73380e..98bb8f0 100644 (file)
@@ -8,33 +8,20 @@ function updateTaxes(row)
 {
   var accno  = document.getElementById('accno_' + row);
   var taxkey = accno.options[accno.selectedIndex].value;
-  var reg = /--([0-9]*)/;
+  var reg = /^(.*?)--(\d*)$/;
   var found = reg.exec(taxkey);
-  var index = found[1];
-  index = parseInt(index);
-  var tax = 'taxchart_' + row;
-  var taxkeyposition = taxkey.lastIndexOf(found[0]);
-  var account = taxkey.substr(0, taxkeyposition);
+  var account = found[1];
+  var default_tax_id = found[2];
 
-  var xmlhttp;
-  if (window.XMLHttpRequest)
-  {// code for IE7+, Firefox, Chrome, Opera, Safari
-    xmlhttp=new XMLHttpRequest();
-  }
-  else
-  {// code for IE6, IE5
-    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
-  }
-  xmlhttp.onreadystatechange=function()
-  {
-    if (xmlhttp.readyState==4 && xmlhttp.status==200)
-    {
-      var element = document.getElementById("taxchart_" + row);
-      element.innerHTML = xmlhttp.responseText;
-    }
-  }
-  xmlhttp.open("GET","gl.pl?action=get_tax_dropdown&accno=" + account + "&select_index=" + index,true);
-  xmlhttp.send();
+  $.ajax({
+    url: 'gl.pl?action=get_tax_dropdown',
+    data: { accno: account,
+            selected_tax_id: default_tax_id},
+    dataType: 'html',
+    success: function (new_html) {
+                                $("#taxchart_" + row).html(new_html);
+                              },
+  });
 };
 
   function copy_debit_to_credit() {
index 940d34d..d3c9586 100644 (file)
@@ -1,3 +1,4 @@
+[% USE L %]
 [% FOR row = TAX_ACCOUNTS %]
-<option value='[% row.id %]--[% row.rate %]' [% IF row.id == select_index %]selected[% END %]>[% row.taxdescription %] %</option>
+<option value='[% row.id %]--[% row.rate %]'[% IF row.id == selected_tax_id%] selected[% END %]>[% row.taxdescription %] %</option>
 [% END %]
index 7039131..51a6d66 100644 (file)
  </table>
 </div>
 
+[%- IF LANGUAGES.size %]
+ [% PROCESS 'ic/tabs/_edit_translations.html' %]
+[%- END %]
+
 [%- IF id %]
 <div id="sales_price_information">
   [% PROCESS ic/sales_price_information.html id=id %]
index 0088919..296cd16 100644 (file)
@@ -1,6 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
-[%- USE LxERP %]
+[%- USE LxERP %][%- USE L -%]
 [% PROCESS 'common/select_warehouse_bin.html' %]
  <p><div class="listtop">[% title %]  [% HTML.escape(partnumber) %]  [% HTML.escape(description) %]</div></p>
 
   <input name="taxaccounts" type="hidden" value="[% HTML.escape(taxaccounts) %]">
   <input name="rowcount" type="hidden" value="[% HTML.escape(rowcount) %]">
   <input name="eur" type="hidden" value="[% HTML.escape(eur) %]">
-  <input name="language_values" type="hidden" value="[% HTML.escape(language_values) %]">
   <input name="original_partnumber" type="hidden" value="[% HTML.escape(original_partnumber) %]">
   <input name="currow" type="hidden" value="[% HTML.escape(currow) %]">
 
   <div class="tabwidget">
    <ul>
     <li><a href="#master_data">[% 'Basic Data' | $T8 %]</a></li>
+[% IF LANGUAGES.size %]
+    <li><a href="#translations_tab">[% 'Translations' | $T8 %]</a></li>
+[% END %]
     [%- IF id %]
     <li><a href="#sales_price_information">[% 'Price information' | $T8 %]</a></li>
     [%- END %]
            </td>
           </tr>
 
-          <tr>
-           <td>
-            <button type="button" onclick="parts_language_selection_window('language_values')">[% 'Set Language Values' | $T8 %]</button>
-           </td>
-          </tr>
-
           <tr height="5"></tr>
 
           <tr>
diff --git a/templates/webpages/ic/generate_report_top.html b/templates/webpages/ic/generate_report_top.html
new file mode 100644 (file)
index 0000000..3e757a5
--- /dev/null
@@ -0,0 +1,6 @@
+[%- USE HTML %]
+[%- USE T8 %]
+[%- USE L %]
+[%- PROCESS 'common/flash.html' %]
+
+[% 'Options' | $T8 %]: [% options.join(', ') %]
diff --git a/templates/webpages/ic/parts_language_selection.html b/templates/webpages/ic/parts_language_selection.html
deleted file mode 100644 (file)
index 59fd2f6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-[%- USE T8 %]
-[%- USE HTML %]
- <form name="Form">
-
-  <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
-
-  <div class="listtop">[% title %]</div>
-
-  <p>[% 'Please insert your language values below' | $T8 %]</p>
-
-  <p>
-   <table>
-    <tr class="listheading">
-     <th class="listheading">&nbsp;</th>
-     [%- FOREACH col = HEADER %]
-     <th nowrap class="listheading">[% col.column_title %]</th>
-     [%- END %]
-    </tr>
-
-    [%- FOREACH row = LANGUAGES %]
-    <tr class="listrow[% loop.count % 2 %]">
-     <td><input type="hidden" id="id_[% loop.count %]" name="id_[% loop.count %]" value="[% HTML.escape(row.id) %]">[% HTML.escape(row.description) %]</td>
-     <td>
-       [%- IF row.translation_area %]
-         <textarea id="translation_[% loop.count %]" name="translation_[% loop.count %]" rows="[% HTML.escape(row.translation_rows) %]" cols=40 wrap="soft">[% HTML.escape(row.translation) %]</textarea>
-       [%- ELSE %]
-         <input  id="translation_[% loop.count %]" name="translation_[% loop.count %]" value="[% HTML.escape(row.translation) %]">
-       [%- END %]
-     </td>
-     <td><textarea id="longdescription_[% loop.count %]" name="longdescription_[% loop.count %]" rows="[% HTML.escape(row.longdescription_rows) %]" cols=40 wrap="soft">[% HTML.escape(row.longdescription) %]</textarea></td>
-    </tr>
-
-    [%- IF loop.last %]
-    <input type="hidden" id="rowcount" name="rowcount" value="[% loop.count %]">
-    [%- END %]
-    [%- END %]
-   </table>
-  </p>
-
-  <p>
-   <button type="button" onclick="languages_updated()">[% 'Close' | $T8 %]</button>
-  </p>
-
- </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();
-      }
-      //-->
- </script>
-
diff --git a/templates/webpages/ic/tabs/_edit_translations.html b/templates/webpages/ic/tabs/_edit_translations.html
new file mode 100644 (file)
index 0000000..61884bf
--- /dev/null
@@ -0,0 +1,22 @@
+[%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%]
+
+<div id="translations_tab">
+ <table>
+  <tr class="listheading">
+   <th>[% LxERP.t8("Language") %]</th>
+   <th>[% LxERP.t8("Description") %]</th>
+   <th>[% LxERP.t8("Long Description") %]</th>
+  </tr>
+
+  [%- FOREACH language = LANGUAGES %]
+   [% SET language_id = language.id
+          translation = translations_map.$language_id %]
+   [% L.hidden_tag('translations[+].language_id', language.id) %]
+   <tr class="listrow" valign="top">
+    <td>[% HTML.escape(language.description) %]</td>
+    <td>[% L.input_tag("translations[].translation", translation.translation) %]</td>
+    <td>[% L.textarea_tag("translations[].longdescription", translation.longdescription, id="translations_longdescription_" _ language_id, style="width: 500px; height: 100px") %]</td>
+   </tr>
+  [%- END %]
+ </table>
+</div>
index 6d3b643..ad241a1 100644 (file)
@@ -11,7 +11,7 @@
         <tr>
          <th align="left">[% 'Notes' | $T8 %]</th>
          <th align="left">[% 'Internal Notes' | $T8 %]</th>
-         <th align="left">[% 'Payment Options' | $T8 %]</th>
+         <th align="right">[% 'Payment / Delivery Options' | $T8 %]</th>
         </tr>
         <tr valign="top">
          <td>
           <textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea>
          </td>
          <td>
-          [%- L.checkbox_tag('direct_debit', 'checked', direct_debit, 'label', LxERP.t8('direct debit')) %]
+           <table>
+             <tr>
+               <th align="right">[% 'Delivery Terms' | $T8 %] </th>
+               <td>
+                 [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]
+               </td>
+             </tr>
+             <tr>
+               <th align="right">[% 'direct debit' | $T8 %]</th>
+               <td>
+                 [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
+               </td>
+             </tr>
+           </table>
          </td>
         </tr>
 [%- IF id && follow_ups.size %]
 
 [% IF show_delete %]
     <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
+    <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
 [% END %]
 
     <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
index fb9660a..c42139e 100644 (file)
@@ -24,6 +24,7 @@
 <p><div class="listtop" width="100%">[% title %]</div></p>
 
 [%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
 
 <div class="tabwidget">
  <ul>
      }
    //-->
   </script>
-
-  <input type="hidden" name="webdav" value="[% webdav %]">
+  <input type="hidden" name="webdav" value="[% webdav | html %]">
index 28fafaa..5ab55b7 100644 (file)
@@ -11,7 +11,7 @@
         <tr>
          <th align="left">[% 'Notes (will appear on hard copy)' | $T8 %]</th>
          <th align="left">[% 'Internal Notes' | $T8 %]</th>
-         <th align="right">[% 'Payment Terms' | $T8 %]</th>
+         <th align="right">[% 'Payment / Delivery Options' | $T8 %]</th>
         </tr>
         <tr valign="top">
          <td>
           <textarea name="intnotes" rows="[% rows %]" cols="35">[% intnotes %]</textarea>
          </td>
          <td>
-            [%- INCLUDE 'generic/multibox.html'
-                 name          = 'payment_id',
-                 style         = 'width: 250px',
-                 DATA          = payment_terms,
-                 id_key        = 'id',
-                 label_key     = 'description',
-                 show_empty    = 1
-                 allow_textbox = 0 -%]
-          <script type='text/javascript'>$('#payment_id').change(function(){ if (this.value) set_duedate()})</script>
-          <br>
-          [%- L.checkbox_tag('direct_debit', 'checked', direct_debit, 'label', LxERP.t8('direct debit')) %]
+           <table>
+             <tr>
+               <th align="right">[% 'Payment Terms' | $T8 %]</th>
+               <td>
+                 [%- INCLUDE 'generic/multibox.html'
+                   name          = 'payment_id',
+                   style         = 'width: 250px',
+                   DATA          = payment_terms,
+                   id_key        = 'id',
+                   label_key     = 'description',
+                   show_empty    = 1
+                   allow_textbox = 0 -%]
+                 <script type='text/javascript'>$('#payment_id').change(function(){ if (this.value) set_duedate()})</script>
+               </td>
+             </tr>
+             <tr>
+               <th align="right">[% 'Delivery Terms' | $T8 %] </th>
+               <td>
+                 [% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]
+               </td>
+             </tr>
+             <tr>
+               <th align="right">[% 'direct debit' | $T8 %]</th>
+               <td>
+                 [%- L.checkbox_tag('direct_debit', 'checked', direct_debit) %]
+               </td>
+             </tr>
+           </table>
          </td>
         </tr>
 [%- IF id && follow_ups.size %]
 [% IF id && !is_type_credit_note %]
     <input class="submit" type="submit" name="action" value="[% 'Credit Note' | $T8 %]">
 [% END %]
-[% IF show_delete %]
+[% IF show_delete && !storno %]
     <input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
     <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
 [% END %]
       <input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
       <input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
       <input class="submit" type="submit" name="action" value="[% 'Preview' | $T8 %]">
-      <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
+      <input class="submit" type="submit" name="action" value="[% 'Post and E-mail' | $T8 %]">
       <input class="submit" type="submit" name="action" value="[% 'Print and Post' | $T8 %]">
       <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
       <input class="submit" type="submit" name="action" value="[% 'Save Draft' | $T8 %]">
index f0184be..8c5c9f8 100644 (file)
@@ -25,6 +25,7 @@
 <p>[% saved_message %]</p>
 
 [%- PROCESS 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
 
 <div class="tabwidget">
  <ul>
index 8a06042..7346ca3 100644 (file)
@@ -27,8 +27,8 @@ $(function() {
 [% END %]
 });
 
-function fokus() {
 [%- IF focus -%]
+function fokus() {
   $('[% focus %]').focus();
-[%- END -%]
 }
+[%- END -%]
index c9281ac..7c72a45 100644 (file)
                            label_key  = 'description',
                            show_empty = 1 -%]
                 </td>
-            </tr>
+              </tr>
+              <tr>
+                <th align="right">[% 'Delivery Terms' | $T8 %]</th>
+                <td>[% L.select_tag('delivery_term_id', ALL_DELIVERY_TERMS, default = delivery_term_id, with_empty = 1, title_key = 'description', style = 'width: 250px') %]</td>
+              </tr>
 
 [%- IF is_sales_ord %]
             <tr>
index 5025d74..5d4afdc 100644 (file)
@@ -28,6 +28,7 @@
     <h1>[% title %]</h1>
 
 [%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
 
     <div class="tabwidget">
      <ul>
index c16dc11..1c30108 100644 (file)
@@ -3,9 +3,14 @@
 [%- PROCESS 'amcvar/render_inputs_block.html' %]
 <tr>
  <td>
-  <input type="button" id="cb_show_details" name="show_details" value='[% 'Show details' | $T8 %]'>
+  <input type="button" id="cb_show_details" name="show_details_button" value='[% 'Show details' | $T8 %]'>
   <script type="text/javascript">
-   $('#cb_show_details').click(function(){ $('[id^="row2"]').toggle() });
+   $('#cb_show_details').click(function(){ $('[id^="row2"]').toggle();
+                                           if ( $('[id^="row2"]').is(":visible") ) {
+                                            $("[name='show_details']").val(1);
+                                           } else {
+                                            $("[name='show_details']").val(0);
+                                           }});
   </script>
   <table id='display_row' width="100%">
    <tr class="listheading">
index c71e60f..8d76ecb 100644 (file)
      <th align="right">[% 'Salesman' | $T8 %]</th>
      <td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key='safe_name', with_empty=1, style='width:250px') %]</td>
     </tr>
+    <tr>
+     <th align="right">[% 'Steuersatz' | $T8 %]</th>
+     <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style='width: 250px') %]</td>
+    </tr>
+    <tr>
+     <th align="right">[% 'Shipping Point' | $T8 %]</th>
+     <td colspan="3">[% L.input_tag('shippingpoint', '', style='width:250px') %]</td>
+    </tr>
     <tr>
      <th align="right">[% 'Transaction description' | $T8 %]</th>
      <td colspan="3"><input name="transaction_description" style="width: 250px"></td>
          <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
          <label for="l_customernumber">[% 'Customer Number' | $T8 %]</label>
         </td>
+        <td>[%- L.checkbox_tag('l_taxzone',       label => LxERP.t8('Steuersatz'))     %]</td>
+        <td>[%- L.checkbox_tag('l_shippingpoint', label => LxERP.t8('Shipping Point')) %]</td>
        </tr>
        <tr>
         <td>
index 3bb59b4..bf1090b 100644 (file)
@@ -18,5 +18,5 @@
     $('#part_picker_filter').focus();
     pp.update_results();
   });
-  $('#part_picker_filter').keypress(pp.update_results);
+  $('#part_picker_filter').keypress(pp.result_timer);
 </script>
index 20533f6..41290c2 100644 (file)
@@ -14,7 +14,7 @@
    <table id="payment_term_list">
     <thead>
     <tr class="listheading">
-     <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+     <th align="center"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
      <th>[%- 'Description' | $T8 %]</th>
      <th>[%- 'Long Description' | $T8 %]</th>
      <th align="right">[%- 'Netto Terms' | $T8 %]</th>
@@ -26,7 +26,7 @@
     <tbody>
     [%- FOREACH payment_term = PAYMENT_TERMS %]
     <tr class="listrow[% loop.count % 2 %]" id="payment_term_id_[% payment_term.id %]">
-     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
      <td>
       <a href="[% SELF.url_for(action => 'edit', id => payment_term.id) %]">
        [%- HTML.escape(payment_term.description) %]
index d243afd..52cd782 100644 (file)
@@ -2,9 +2,9 @@
 [%- USE L %][%- USE P %]
 [%- USE HTML %][%- USE LxERP %]
 
-[%- INCLUDE 'common/flash.html' %]
+<h1>[% title %]</h1>
 
- <div class="listtop">[% title %]</div>
+[%- INCLUDE 'common/flash.html' %]
 
  <form method="post" action="controller.pl">
   [% L.hidden_tag("callback", callback) %]
@@ -42,8 +42,8 @@
      </tr>
 
      <tr>
-      <th align="right">[% 'Type' | $T8 %]</th>
-      <td>[% L.input_tag('project.type', SELF.project.type, size=60) %]</td>
+      <th align="right">[% 'Project Type' | $T8 %]</th>
+      <td>[% L.select_tag('project.project_type_id', ALL_PROJECT_TYPES, default=SELF.project.project_type_id, title_key='description', style='width: 300px') %]</td>
      </tr>
 
      <tr>
index 44bf0d8..1f3e33b 100644 (file)
@@ -27,8 +27,8 @@
     </tr>
 
     <tr>
-     <th align="right">[% 'Type' | $T8 %]</th>
-     <td>[% L.input_tag('filter.type:substr::ilike', filter.type_substr__ilike, size=20) %]</td>
+     <th align="right">[% 'Project Type' | $T8 %]</th>
+     <td>[% L.select_tag('filter.project_type_id', ALL_PROJECT_TYPES, default=filter.project_type_id, title_key='description', with_empty=1) %]</td>
     </tr>
 
     [% CUSTOM_VARIABLES_FILTER_CODE %]
diff --git a/templates/webpages/project_type/form.html b/templates/webpages/project_type/form.html
new file mode 100755 (executable)
index 0000000..692cb4a
--- /dev/null
@@ -0,0 +1,25 @@
+[% USE HTML %][% USE L %][% USE LxERP %]
+
+ <form method="post" action="controller.pl">
+  <div class="listtop">[% FORM.title %]</div>
+
+[%- INCLUDE 'common/flash.html' %]
+
+  <table>
+   <tr>
+    <td>[% LxERP.t8('Description') %]</td>
+    <td>[% L.input_tag("project_type.description" SELF.project_type.description) %]</td>
+   </tr>
+  </table>
+
+  <p>
+   [% L.hidden_tag("id", SELF.project_type.id) %]
+   [% L.hidden_tag("action", "ProjectType/dispatch") %]
+   [% L.submit_tag("action_" _ (SELF.project_type.id ? 'update' : 'create'), LxERP.t8('Save')) %]
+   [%- IF SELF.project_type.id %]
+    [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) %]
+   [%- END %]
+   <a href="[% SELF.url_for(action => 'list') %]">[% LxERP.t8('Abort') %]</a>
+  </p>
+
+ </form>
diff --git a/templates/webpages/project_type/list.html b/templates/webpages/project_type/list.html
new file mode 100644 (file)
index 0000000..fc45c0d
--- /dev/null
@@ -0,0 +1,42 @@
+[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
+
+ <div class="listtop">[% FORM.title %]</div>
+
+[%- INCLUDE 'common/flash.html' %]
+
+ <form method="post" action="controller.pl">
+  [% IF !PROJECT_TYPES.size %]
+   <p>
+    [%- 'No project type has been created yet.' | $T8 %]
+   </p>
+
+  [%- ELSE %]
+   <table id="project_type_list">
+    <thead>
+    <tr class="listheading">
+     <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+     <th>[%- 'Description' | $T8 %]</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    [%- FOREACH project_type = PROJECT_TYPES %]
+    <tr class="listrow[% loop.count % 2 %]" id="project_type_id_[% project_type.id %]">
+     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+     <td>
+      <a href="[% SELF.url_for(action => 'edit', id => project_type.id) %]">
+       [%- HTML.escape(project_type.description) %]
+      </a>
+     </td>
+    </tr>
+    [%- END %]
+    </tbody>
+   </table>
+  [%- END %]
+
+  <p>
+   <a href="[% SELF.url_for(action => 'new') %]">[%- 'Create new project type' | $T8 %]</a>
+  </p>
+ </form>
+
+ [% L.sortable_element('#project_type_list tbody', url => 'controller.pl?action=ProjectType/reorder', with => 'project_type_id') %]
index 675790d..7605caa 100644 (file)
@@ -1,18 +1,19 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<h2 align="center">
+<h3 align="center">
 [% company %]
 <br>[% address %]
 <p>[% 'BALANCE SHEET' | $T8 %]
-<br>[% period %]
-</h2>
+<br>[% 'Balance sheet date' | $T8 %]: [% this_period %]
+<br>[% 'Report date' | $T8 %]: [% report_date %]
+</h3>
 
 <table border="0">
   <tr>
     <th align="left" width="400" colspan="2">[% 'ASSETS' | $T8 %]<br><hr align="left" width="250" size="5" noshade></th>
-    <th>[% this_period %]</th>
-    <th>[% last_period %]</th>
+    <th><b>[% this_period %]<b></th>
+    <th><b>[% last_period %]<b></th>
   </tr>
 
   [% FOREACH row = A %]
diff --git a/templates/webpages/rp/bwa.html b/templates/webpages/rp/bwa.html
new file mode 100644 (file)
index 0000000..52d291e
--- /dev/null
@@ -0,0 +1,517 @@
+[%- USE T8 %]
+[%- USE HTML %]
+[%- USE LxERP %]
+
+<link rel="stylesheet" type="text/css" href="css/kivitendo/bwa.css">
+
+<table border=0 cellpadding=0 cellspacing=0>
+<tr class="headline">
+  <td class="left">[% company %]</td>
+  <td class=center colspan="9">
+    <h3>[% title | $T8 %] [% period %]</h3>
+    <h3>[% accounting_method %] - [% report_date %]</h3>
+  </td>
+  <td class="right">Blatt 1</td>
+</tr>
+  
+  
+</tr>  
+<tr class="querkopf">
+  <th class="left">&nbsp;</th>
+  <th class="center" colspan="5">Im Betrachtungszeitraum</th>
+  <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
+</tr>
+
+<tr>
+  <th class="left">Bezeichnung</th>
+  <th>Wert</th>
+  <th>% Ges.- Leistg.</th>
+  <th>% Ges.- Kosten</th>
+  <th>% Pers.- Kosten</th>
+  <th>Aufschlag</th>
+  <th>Wert</th>
+  <th>% Ges.- Leistg.</th>
+  <th>% Ges.- Kosten</th>
+  <th>% Pers.- Kosten</th>
+  <th class="right">Aufschlag</th>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Umsatzerl&ouml;se</nobr></td>
+  <td><nobr>[% jetzt1 %]</nobr></td>
+  <td><nobr>[% jetztgl1 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td></td>
+  <td><nobr>[% kumm1 %]</nobr></td>
+  <td><nobr>[% kummgl1 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
+  <td><nobr>[% jetzt2 %]</nobr></td>
+  <td><nobr>[% jetztgl2 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td></td>  
+  <td><nobr>[% kumm2 %]</nobr></td>
+  <td><nobr>[% kummgl2 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
+  <td><nobr>[% jetzt3 %]</nobr></td>
+  <td><nobr>[% jetztgl3 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td></td>
+  <td><nobr>[% kumm3 %]</nobr></td>
+  <td><nobr>[% kummgl3 %]</nobr></td>
+  <td></td>
+  <td></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+  
+<tr class="grey subtotal">
+  <td class="left"><nobr>Gesamtleistung</nobr></td>
+  <td><nobr>[% jetztgesamtleistung %]</nobr></td>
+  <td><nobr>[% jetztglgesamtleistung %]</nobr></td>
+  <td><nobr>[% jetztgkgesamtleistung %]</nobr></td>
+  <td><nobr>[% jetztpkgesamtleistung %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummgesamtleistung %]</nobr></td>
+  <td><nobr>[% kummglgesamtleistung %]</nobr></td>
+  <td><nobr>[% kummgkgesamtleistung %]</nobr></td>
+  <td><nobr>[% kummpkgesamtleistung %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+  
+<tr class="grey">
+  <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
+  <td><nobr>[% jetzt4 %]</nobr></td>
+  <td><nobr>[% jetztgl4 %]</nobr></td>
+  <td><nobr>[% jetztgk4 %]</nobr></td>
+  <td><nobr>[% jetztpk4 %]</nobr></td>
+  <td><nobr>[% jetztauf4 %]</nobr></td>
+  <td><nobr>[% kumm4 %]</nobr></td>
+  <td><nobr>[% kummgl4 %]</nobr></td>
+  <td><nobr>[% kummgk4 %]</nobr></td>
+  <td><nobr>[% kummpk4 %]</nobr></td>
+  <td class="right"><nobr>[% kummauf4 %]</nobr>&nbsp;</td>
+</tr>
+  
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+    
+<tr class="grey subtotal">
+  <td class="left"><nobr>Rohertrag</nobr></td>
+  <td><nobr>[% jetztrohertrag %]</nobr></td>
+  <td><nobr>[% jetztglrohertrag %]</nobr></td>
+  <td><nobr>[% jetztgkrohertrag %]</nobr></td>
+  <td><nobr>[% jetztpkrohertrag %]</nobr></td>
+  <td><nobr>[% jetztaufrohertrag %]</nobr></td>
+  <td><nobr>[% kummrohertrag %]</nobr></td>
+  <td><nobr>[% kummglrohertrag %]</nobr></td>
+  <td><nobr>[% kummgkrohertrag %]</nobr></td>
+  <td><nobr>[% kummpkrohertrag %]</nobr></td>
+  <td class="right"><nobr>[% kummaufrohertrag %]</nobr>&nbsp;</td>
+</tr>
+  
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+    
+<tr class="grey">
+  <td class="left"><nobr>So.betr.Erl&ouml;se</nobr></td>
+  <td><nobr>[% jetzt5 %]</nobr></td>
+  <td><nobr>[% jetztgl5 %]</nobr></td>
+  <td><nobr>[% jetztgk5 %]</nobr></td>
+  <td><nobr>[% jetztpk5 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm5 %]</nobr></td>
+  <td><nobr>[% kummgl5 %]</nobr></td>
+  <td><nobr>[% kummgk5 %]</nobr></td>
+  <td><nobr>[% kummpk5 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+    
+<tr class="grey subtotal">
+  <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
+  <td><nobr>[% jetztbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% jetztglbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% jetztgkbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% jetztpkbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% jetztaufbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% kummbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% kummglbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% kummgkbetriebrohertrag %]</nobr></td>
+  <td><nobr>[% kummpkbetriebrohertrag %]</nobr></td>
+  <td
+class="right"><nobr>[% kummaufbetriebrohertrag %]</nobr>&nbsp;</td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey subtotal">
+  <td class="left">Kostenarten:</td>
+  <td class="right" colspan="10">&nbsp;</td>
+</tr>  
+    
+<tr class="white">
+  <td class="left"><nobr>Personalkosten</nobr></td>
+  <td><nobr>[% jetzt10 %]</nobr></td>
+  <td><nobr>[% jetztgl10 %]</nobr></td>
+  <td><nobr>[% jetztgk10 %]</nobr></td>
+  <td><nobr>[% jetztpk10 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm10 %]</nobr></td>
+  <td><nobr>[% kummgl10 %]</nobr></td>
+  <td><nobr>[% kummgk10 %]</nobr></td>
+  <td><nobr>[% kummpk10 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Raumkosten</nobr></td>
+  <td><nobr>[% jetzt11 %]</nobr></td>
+  <td><nobr>[% jetztgl11 %]</nobr></td>
+  <td><nobr>[% jetztgk11 %]</nobr></td>
+  <td><nobr>[% jetztpk11 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm11 %]</nobr></td>
+  <td><nobr>[% kummgl11 %]</nobr></td>
+  <td><nobr>[% kummgk11 %]</nobr></td>
+  <td><nobr>[% kummpk11 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Betriebl.Steuern</nobr></td>
+  <td><nobr>[% jetzt12 %]</nobr></td>
+  <td><nobr>[% jetztgl12 %]</nobr></td>
+  <td><nobr>[% jetztgk12 %]</nobr></td>
+  <td><nobr>[% jetztpk12 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm12 %]</nobr></td>
+  <td><nobr>[% kummgl12 %]</nobr></td>
+  <td><nobr>[% kummgk12 %]</nobr></td>
+  <td><nobr>[% kummpk12 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Versich./Beitr&auml;ge</nobr></td>
+  <td><nobr>[% jetzt13 %]</nobr></td>
+  <td><nobr>[% jetztgl13 %]</nobr></td>
+  <td><nobr>[% jetztgk13 %]</nobr></td>
+  <td><nobr>[% jetztpk13 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm13 %]</nobr></td>
+  <td><nobr>[% kummgl13 %]</nobr></td>
+  <td><nobr>[% kummgk13 %]</nobr></td>
+  <td><nobr>[% kummpk13 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
+  <td><nobr>[% jetzt14 %]</nobr></td>
+  <td><nobr>[% jetztgl14 %]</nobr></td>
+  <td><nobr>[% jetztgk14 %]</nobr></td>
+  <td><nobr>[% jetztpk14 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm14 %]</nobr></td>
+  <td><nobr>[% kummgl14 %]</nobr></td>
+  <td><nobr>[% kummgk14 %]</nobr></td>
+  <td><nobr>[% kummpk14 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
+  <td><nobr>[% jetzt15 %]</nobr></td>
+  <td><nobr>[% jetztgl15 %]</nobr></td>
+  <td><nobr>[% jetztgk15 %]</nobr></td>
+  <td><nobr>[% jetztpk15 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm15 %]</nobr></td>
+  <td><nobr>[% kummgl15 %]</nobr></td>
+  <td><nobr>[% kummgk15 %]</nobr></td>
+  <td><nobr>[% kummpk15 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
+  <td><nobr>[% jetzt16 %]</nobr></td>
+  <td><nobr>[% jetztgl16 %]</nobr></td>
+  <td><nobr>[% jetztgk16 %]</nobr></td>
+  <td><nobr>[% jetztpk16 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm16 %]</nobr></td>
+  <td><nobr>[% kummgl16 %]</nobr>
+</td>
+  <td><nobr>[% kummgk16 %]</nobr></td>
+  <td><nobr>[% kummpk16 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Abschreibungen</nobr></td>
+  <td><nobr>[% jetzt17 %]</nobr></td>
+  <td><nobr>[% jetztgl17 %]</nobr></td>
+  <td><nobr>[% jetztgk17 %]</nobr></td>
+  <td><nobr>[% jetztpk17 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm17 %]</nobr></td>
+  <td><nobr>[% kummgl17 %]</nobr></td>
+  <td><nobr>[% kummgk17 %]</nobr></td>
+  <td><nobr>[% kummpk17 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
+  <td><nobr>[% jetzt18 %]</nobr></td>
+  <td><nobr>[% jetztgl18 %]</nobr></td>
+  <td><nobr>[% jetztgk18 %]</nobr></td>
+  <td><nobr>[% jetztpk18 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm18 %]</nobr></td>
+  <td><nobr>[% kummgl18 %]</nobr></td>
+  <td><nobr>[% kummgk18 %]</nobr></td>
+  <td><nobr>[% kummpk18 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Sonstige Kosten</nobr></td>
+  <td><nobr>[% jetzt20 %]</nobr></td>
+  <td><nobr>[% jetztgl20 %]</nobr></td>
+  <td><nobr>[% jetztgk20 %]</nobr></td>
+  <td><nobr>[% jetztpk20 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm20 %]</nobr></td>
+  <td><nobr>[% kummgl20 %]</nobr></td>
+  <td><nobr>[% kummgk20 %]</nobr></td>
+  <td><nobr>[% kummpk20 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey subtotal">
+  <td class="left"><nobr>Gesamtkosten</nobr></td>
+  <td><nobr>[% jetztgesamtkosten %]</nobr></td>
+  <td><nobr>[% jetztglgesamtkosten %]</nobr></td>
+  <td><nobr>[% jetztgkgesamtkosten %]</nobr></td>
+  <td><nobr>[% jetztpkgesamtkosten %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummgesamtkosten %]</nobr></td>
+  <td><nobr>[% kummglgesamtkosten %]</nobr></td>
+  <td><nobr>[% kummgkgesamtkosten %]</nobr></td>
+  <td><nobr>[% kummpkgesamtkosten %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+  
+<tr class="grey subtotal">
+<td class="left"><nobr>Betriebsergebnis</nobr></td>
+  <td><nobr>[% jetztbetriebsergebnis %]</nobr></td>
+  <td><nobr>[% jetztglbetriebsergebnis %]</nobr>
+</td>
+  <td><nobr>[% jetztgkbetriebsergebnis %]</nobr></td>
+  <td><nobr>[% jetztpkbetriebsergebnis %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummbetriebsergebnis %]</nobr></td>
+  <td><nobr>[% kummglbetriebsergebnis %]</nobr>
+</td>
+  <td><nobr>[% kummgkbetriebsergebnis %]</nobr></td>
+  <td><nobr>[% kummpkbetriebsergebnis %]</nobr></td>
+  <td class="right">&nbsp;</td>
+  </tr>
+
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Zinsaufwand</nobr></td>
+  <td><nobr>[% jetzt30 %]</nobr></td>
+  <td><nobr>[% jetztgl30 %]</nobr></td>
+  <td><nobr>[% jetztgk30 %]</nobr></td>
+  <td><nobr>[% jetztpk30 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm30 %]</nobr></td>
+  <td><nobr>[% kummgl30 %]</nobr></td>
+  <td><nobr>[% kummgk30 %]</nobr></td>
+  <td><nobr>[% kummpk30 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>&Uuml;brige Steuern</nobr></td>
+  <td><nobr>[% jetzt19 %]</nobr></td>
+  <td><nobr>[% jetztgl19 %]</nobr></td>
+  <td><nobr>[% jetztgk19 %]</nobr></td>
+  <td><nobr>[% jetztpk19 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm19 %]</nobr></td>
+  <td><nobr>[% kummg191 %]</nobr></td>
+  <td><nobr>[% kummgk19 %]</nobr></td>
+  <td><nobr>[% kummpk19 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
+  <td><nobr>[% jetzt31 %]</nobr></td>
+  <td><nobr>[% jetztgl31 %]</nobr></td>
+  <td><nobr>[% jetztgk31 %]</nobr></td>
+  <td><nobr>[% jetztpk31 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm31 %]</nobr></td>
+  <td><nobr>[% kummgl31 %]</nobr></td>
+  <td><nobr>[% kummgk31 %]</nobr></td>
+  <td><nobr>[% kummpk31 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white subtotal">
+<td class="left"><nobr>Neutraler Aufwand</nobr></td>
+  <td><nobr>[% jetztneutraleraufwand %]</nobr></td>
+  <td><nobr>[% jetztglneutraleraufwand %]</nobr></td>
+  <td><nobr>[% jetztgkneutraleraufwand %]</nobr></td>
+  <td><nobr>[% jetztpkneutraleraufwand %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummneutraleraufwand %]</nobr></td>
+  <td><nobr>[% kummglneutraleraufwand %]</nobr></td>
+  <td><nobr>[% kummgkneutraleraufwand %]</nobr></td>
+  <td><nobr>[% kummpkneutraleraufwand %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="white">
+  <td class="left"><nobr>Zinsertr&auml;ge</nobr></td>
+  <td><nobr>[% jetzt32 %]</nobr></td>
+  <td><nobr>[% jetztgl32 %]</nobr></td>
+  <td><nobr>[% jetztgk32 %]</nobr></td>
+  <td><nobr>[% jetztpk32 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm32 %]</nobr></td>
+  <td><nobr>[% kummgl32 %]</nobr></td>
+  <td><nobr>[% kummgk32 %]</nobr></td>
+  <td><nobr>[% kummpk32 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
+  <td><nobr>[% jetzt33 %]</nobr></td>
+  <td><nobr>[% jetztgl33 %]</nobr></td>
+  <td><nobr>[% jetztgk33 %]</nobr></td>
+  <td><nobr>[% jetztpk33 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm33 %]</nobr></td>
+  <td><nobr>[% kummgl33 %]</nobr></td>
+  <td><nobr>[% kummgk33 %]</nobr></td>
+  <td><nobr>[% kummpk33 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="white">
+  <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
+  <td><nobr>[% jetzt34 %]</nobr></td>
+  <td><nobr>[% jetztgl34 %]</nobr>
+  <td><nobr>[% jetztgk34 %]</nobr></td>
+  <td><nobr>[% jetztpk34 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm34 %]</nobr></td>
+  <td><nobr>[% kummgl34 %]</nobr></td>
+  <td><nobr>[% kummgk34 %]</nobr></td>
+  <td><nobr>[% kummpk34 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+
+<tr class="grey subtotal">
+  <td class="left"><nobr>Neutraler Ertrag</nobr></td>
+  <td><nobr>[% jetztneutralerertrag %]</nobr></td>
+  <td><nobr>[% jetztglneutralerertrag %]</nobr></td>
+  <td><nobr>[% jetztgkneutralerertrag %]</nobr></td>
+  <td><nobr>[% jetztpkneutralerertrag %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummneutralerertrag %]</nobr></td>
+  <td><nobr>[% kummglneutralerertrag %]</nobr></td>
+  <td><nobr>[% kummgkneutralerertrag %]</nobr></td>
+  <td><nobr>[% kummpkneutralerertrag %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+  
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey subtotal">
+  <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
+  <td><nobr>[% jetztergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% jetztglergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% jetztgkergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% jetztpkergebnisvorsteuern %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% kummglergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% kummgkergebnisvorsteuern %]</nobr></td>
+  <td><nobr>[% kummpkergebnisvorsteuern %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+  
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey">
+  <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
+  <td><nobr>[% jetzt35 %]</nobr></td>
+  <td><nobr>[% jetztgl35 %]</nobr></td>
+  <td><nobr>[% jetztgk35 %]</nobr></td>
+  <td><nobr>[% jetztpk35 %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kumm35 %]</nobr></td>
+  <td><nobr>[% kummgl35 %]</nobr></td>
+  <td><nobr>[% kummgk35 %]</nobr></td>
+  <td><nobr>[% kummpk35 %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+  
+<tr class="white"><td class="left right" colspan="11">&nbsp;</td></tr>
+
+<tr class="grey subtotal">
+  <td class="left"><nobr>Vorl&auml;ufiges Ergebnis</nobr></td>
+  <td><nobr>[% jetztergebnis %]</nobr></td>
+  <td><nobr>[% jetztglergebnis %]</nobr></td>
+  <td><nobr>[% jetztgkergebnis %]</nobr></td>
+  <td><nobr>[% jetztpkergebnis %]</nobr></td>
+  <td></td>
+  <td><nobr>[% kummergebnis %]</nobr></td>
+  <td><nobr>[% kummglergebnis %]</nobr></td>
+  <td><nobr>[% kummgkergebnis %]</nobr></td>
+  <td><nobr>[% kummpkergebnis %]</nobr></td>
+  <td class="right">&nbsp;</td>
+</tr>
+  
+<tr class="white" id=last><td class="left right"
+colspan="11">&nbsp;</td></tr>
+
+<tr>
+  <td colspan=11 class=footer>W&auml;hrung: Euro - FiBu: Kivitendo ERP
+(Version [% version %]) - Formular: 11.01.2007</td>
+</tr>
+
+</table>
diff --git a/templates/webpages/rp/income_statement.html b/templates/webpages/rp/income_statement.html
new file mode 100644 (file)
index 0000000..af0f19b
--- /dev/null
@@ -0,0 +1,295 @@
+[%- USE T8 %]
+[%- USE HTML %]
+[%- USE LxERP %]
+
+<h3 align=center> [% title %]</h3>
+<h3 align=center>
+[% period %]<br>
+[% accounting_method %]<br>
+
+<br>[% report_date %]
+</h3>
+
+<table width=100% border=0>
+<tr>
+  <td width=75% align=left colspan=2><font size="+1"><b>A. Betriebseinnahmen</font></b><br></td>
+  <td></td>
+</tr>
+
+<tr>
+  <td>
+    Umsatzerl&ouml;se  
+  </td>
+  <td>
+    [% eur1 %]
+  </td>
+</tr>
+<tr>
+  <td>
+    sonstige Erl&ouml;se  
+  </td>
+  <td>
+    [% eur2 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Privatanteile
+  </td>
+  <td>
+    [% eur3 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Zinsertr&auml;ge
+  </td>
+  <td>
+    [% eur4 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Au&szlig;erordentliche Ertr&auml;ge
+  </td>
+  <td>
+    [% eur5 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Vereinnahmte Umsatzsteuer
+  </td>
+  <td>
+    [% eur6 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Umsatzsteuererstattungen
+  </td>
+  <td>
+    [% eur7 %]  
+  </td>
+</tr>
+
+
+<tr>
+  <td> </td>
+  <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+  <th align=left><b>Summe Einnahmen</b></th>
+  <td align=right>[% sumeura %]<hr noshade size=2></td>
+</tr>
+<tr>
+  <td></td>
+  <td><br><br></td>
+</tr>
+<tr>
+  <td align=left><font size="+1"><b>B. Betriebsausgaben</font></b><br></td>
+  <td></td>
+</tr>
+
+<tr>
+  <td>
+    Wareneing&auml;nge
+  </td>
+  <td>
+    [% eur8 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    L&ouml;hne und Geh&auml;ter
+  </td>
+  <td>
+    [% eur9 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Gesetzlicher sozialer Aufwand
+  </td>
+  <td>
+    [% eur10 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Mieten
+  </td>
+  <td>
+    [% eur11 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Gas, Strom, Wasser
+  </td>
+  <td>
+    [% eur12 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Instandhaltung
+  </td>
+  <td>
+    [% eur13 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Steuern, Versicherungen, Beitr&auml;ge
+  </td>
+  <td>
+    [% eur14 %]  
+  </td>
+</tr>
+<tr>
+  <td>
+    Kfz-Steuern
+  </td>
+  <td>
+    [% eur15 %]  
+  </td>
+</tr><tr>
+  <td>
+    Kfz-Versicherungen
+  </td>
+  <td>
+    [% eur16 %]  
+  </td>
+</tr><tr>
+  <td>
+    Sonstige Fahrzeugkosten
+  </td>
+  <td>
+    [% eur17 %]  
+  </td>
+</tr><tr>
+  <td>
+    Werbe- und Reisekosten
+  </td>
+  <td>
+    [% eur18 %]  
+  </td>
+</tr><tr>
+  <td>
+    Instandhaltung und Werkzeuge
+  </td>
+  <td>
+    [% eur19 %]  
+  </td>
+</tr><tr>
+  <td>
+    Fachzeitschriften, B&uuml;cher
+  </td>
+  <td>
+    [% eur20 %]  
+  </td>
+</tr><tr>
+  <td>
+    Miete f&uuml;r Einrichtungen
+  </td>
+  <td>
+    [% eur21 %]  
+  </td>
+</tr><tr>
+  <td>
+    Rechts- und Beratungskosten
+  </td>
+  <td>
+    [% eur22 %]  
+  </td>
+</tr><tr>
+  <td>
+    B&uuml;robedarf, Porto, Telefon
+  </td>
+  <td>
+    [% eur23 %]  
+  </td>
+</tr><tr>
+  <td>
+    Sonstige Aufwendungen
+  </td>
+  <td>
+    [% eur24 %]  
+  </td>
+</tr><tr>
+  <td>
+    Abschreibungen auf Anlageverm&ouml;gen
+  </td>
+  <td>
+    [% eur25 %]  
+  </td>
+</tr><tr>
+  <td>
+    Abschreibungen auf GWG
+  </td>
+  <td>
+    [% eur26 %]  
+  </td>
+</tr><tr>
+  <td>
+    Vorsteuer
+  </td>
+  <td>
+    [% eur27 %]  
+  </td>
+</tr><tr>
+  <td>
+    Umsatzsteuerzahlungen
+  </td>
+  <td>
+    [% eur28 %]  
+  </td>
+</tr><tr>
+  <td>
+    Zinsaufwand
+  </td>
+  <td>
+    [% eur29 %]  
+  </td>
+</tr><tr>
+  <td>
+    Au&szlig;erordentlicher Aufwand
+  </td>
+  <td>
+    [% eur30 %]  
+  </td>
+</tr><tr>
+  <td>
+    Betriebliche Steuern
+  </td>
+  <td>
+    [% eur31 %]  
+  </td>
+</tr>
+
+
+<tr>
+  <td> </td>
+  <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+  <th align=left><b>Summe Ausgaben</b></th>
+  <td align=right>[% sumeurb %] <br><hr noshade size=2</td>
+</tr>
+<tr>
+  <td></td>
+  <td><br><br></td>
+</tr>
+<tr valign=top>
+  <td align=left>GEWINN / VERLUST</td>
+  <td align=right>[% guvsumme %]<br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+</body>
+</html>
+
index fe2d441..4ae82d1 100644 (file)
@@ -77,7 +77,7 @@
        <input name="bank_transfers[].reference" value="[% HTML.escape(reference.substr(0, 140)) %]" maxlength="140" size="60">
       </td>
       <td align="right">
-       <input name="bank_transfers[].amount" value="[% LxERP.format_amount(invoice.invoice_amount, -2) %]" style="text-align: right" size="12">
+       <input name="bank_transfers[].amount" value="[% LxERP.format_amount(invoice.invoice_amount, 2) %]" style="text-align: right" size="12">
       </td>
      </tr>
     [%- END %]
     <sup>(1)</sup>
     [%- IF is_vendor %]
      [%- 'No bank information has been entered in this vendor\'s master data entry. You cannot create bank transfers unless you enter bank information.' | $T8 %]
+     [% "The required information consists of the IBAN and the BIC." | $T8 %]
     [%- ELSE %]
      [%- 'No bank information has been entered in this customer\'s master data entry. You cannot create bank collections unless you enter bank information.' | $T8 %]
+     [% "The required information consists of the IBAN, the BIC, the mandator ID and the mandate's date of signature." | $T8 %]
     [%- END %]
    </p>
   [%- END %]
index 561baec..80af4c4 100644 (file)
      <th class="listheading">[% 'IBAN' | $T8 %]</th>
      <th class="listheading">[% 'BIC' | $T8 %]</th>
      <th class="listheading">[% 'Bank' | $T8 %]</th>
+     [% IF vc == 'customer' %]
+      <th class="listheading">[% 'Mandator ID' | $T8 %]</th>
+      <th class="listheading">[% 'Mandate Date of Signature' | $T8 %]</th>
+     [%- END %]
     </tr>
 
     [%- FOREACH vbi = VC_BANK_INFO %]
      <td><input name="vc_bank_info[].iban" size="34" value="[% HTML.escape(vbi.iban.substr(0, 34)) %]" maxlength="34"></td>
      <td><input name="vc_bank_info[].bic" size="20" value="[% HTML.escape(vbi.bic.substr(0, 20)) %]" maxlength="20"></td>
      <td><input name="vc_bank_info[].bank" size="30" value="[% HTML.escape(vbi.bank) %]"></td>
+     [% IF vc == 'customer' %]
+      <td><input name="vc_bank_info[].mandator_id" size="30" value="[% HTML.escape(vbi.mandator_id) %]"></td>
+      <td>[% L.date_tag("vc_bank_info[].mandate_date_of_signature", vbi.mandate_date_of_signature) %]</td>
+     [%- END %]
     </tr>
     [%- END %]
    </table>
    </table>
   </p>
 
+  <p>
+   [% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %]
+  </p>
+
   <p>
    [%- IF is_vendor %]
     <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Create bank transfer' | $T8 %]">
index b8f209d..589b358 100644 (file)
@@ -33,6 +33,9 @@
       <th class="listheading" colspan="2">[% 'Source bank account' | $T8 %]</th>
      [%- END %]
      <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
+     [% IF vc == 'customer' %]
+      <th class="listheading" align="right">[% 'Mandator ID' | $T8 %]</th>
+     [%- END %]
      <th class="listheading">[% 'Reference' | $T8 %]</th>
      <th class="listheading" align="right">[% 'Requested execution date' | $T8 %]</th>
      <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
@@ -44,7 +47,7 @@
      <th class="listheading">[% 'IBAN' | $T8 %]</th>
      <th class="listheading">[% 'BIC' | $T8 %]</th>
      [%- IF show_post_payments_button %]
-      <th class="listheading" colspan="3">&nbsp;</th>
+      <th class="listheading" colspan="[% IF vc == 'customer' %]4[% ELSE %]3[% END %]">&nbsp;</th>
       <th class="listheading">
         [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %]
       </th>
@@ -73,6 +76,9 @@
       <td>[% HTML.escape(item.vc_iban) %]</td>
       <td>[% HTML.escape(item.vc_bic) %]</td>
       <td align="right">[% HTML.escape(LxERP.format_amount(item.amount, 2)) %]</td>
+      [% IF vc == 'customer' %]
+       <td>[% HTML.escape(item.mandator_id) %]</td>
+      [%- END %]
       <td>[% HTML.escape(item.reference) %]</td>
       <td align="right">[% HTML.escape(item.requested_execution_date) %]</td>
       <td align="right" nowrap>
diff --git a/templates/webpages/ustva/ustva.html b/templates/webpages/ustva/ustva.html
new file mode 100644 (file)
index 0000000..b69d3b4
--- /dev/null
@@ -0,0 +1,395 @@
+[%- USE T8 %]
+[%- USE HTML %]
+[%- USE LxERP %]
+
+<link rel="stylesheet" type="text/css" href="css/kivitendo/ustva.css">
+
+<body>
+<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
+<h2>Zeitraum vom [%fromdate%] bis [%todate%] </h2>
+
+<!-- Diese HTML-Formular ist nicht selbstrechnend.
+<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
+gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
+automatisch berechnet.</small></p>
+-->
+
+<table width="100%">
+<tr align="left">
+  <td class="text">Steuernummer: [%steuernummer%]</td>
+  <td class="text" width="100px">&nbsp</td>
+  <td class="text" align="right">Datum ([%Datum_heute%])</td>
+</tr>
+<tr>
+  <td class="text" colspan="3"><br /></td>
+</tr>
+<tr align="left">
+  <td class="text">
+    Finanzamt [%FA_Name%]<br />
+    [%FA_Strasse%]<br />
+    [%FA_PLZ%] [%FA_Ort%]<br />
+    Fax: [%FA_FAX%]
+  </td>
+  <td class="text">&nbsp;</td>
+  <td class="text">
+    Firma [%company%]<br />
+    [% IF company_street %]
+      [% company_street %]<br />
+    [% END %]
+      [%company_city%]<br />
+    [%IF !company_street%]
+    [%address%]<!--used Address-->
+    [%END %]
+  </td>
+</tr>
+<tr>
+  <td class="text" colspan="3"><br />
+  </td>
+</tr>
+</table>
+<table border="0" cellspacing="2" cellpadding="2">
+  <tbody>
+    <tr>
+      <td class="text"><b class="h3">I. Anmeldung der
+Umsatzsteuer-Vorauszahlung </b></td>
+      <td colspan="4"></td>
+    </tr>
+    <tr>
+      <td class="text"><b class="h4">Lieferungen und sonstige Leistungen</b></td>
+      <td colspan="4"></td>
+    </tr>
+        <tr>
+      <td class="text2">an innergemeinschaftliche Abnehmer <b>mit</b> USt-IdNr</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>41<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_41%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+    <tr>
+      <td class="text">neuer Fahrzeuge an Abnehmer <b>ohne</b> USt-IdNr</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>44<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_44%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+    <tr>
+      <td class="text2">neuer Fahrzeuge au&szlig;erhalb eines Unternehmens</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>49<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_49%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+    <tr>
+      <td class="text">Weitere steuerfreie Ums&auml;tze mit Vorsteuerabzug</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>43<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_43%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+    <tr>
+      <td class="text2">Steuerfreie Ums&auml;tze ohne
+Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>48<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_48%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+
+    <tr>
+      <td class="text"><b class="h4">Steuerpflichtige Ums&auml;tze</b></td>
+      <td colspan="4"></td>
+    </tr>
+[% IF !year2007%]
+     <tr>
+      <td class="text2">zum Steuersatz von 16 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_51%]<br></td>
+      <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_511%]</td>
+    </tr>
+[%END%]
+[% IF year2007%]
+    <tr>
+      <td class="text2">zum Steuersatz von 19 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>81<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_81%]<br></td>
+      <td class="spalte"><span class="nodis">(Spalte 81 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_811%]</td>
+    </tr>
+[%END%]
+
+    <tr>
+      <td class="text">zum Steuersatz von 7 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_86%]</td>
+      <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_861%]</td>
+    </tr>
+    <tr>
+      <td class="text2">andere Steuers&auml;tze</td>
+      <td class="spalte ausfuellen"><span class="nodis"></span>35 <span class="nodis"></span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_35%]</td>
+      <td class="spalte">36</td>
+      <td class="betrag ausfuellen">[%pos_ustva_36%]</td>
+    </tr>
+    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
+   <tr>
+      <td class="text">Lieferungen in das &uuml;brige Gemeinschaftsgebiet <b>mit</b> USt-IdNr</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>77<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_77%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+    <tr>
+      <td class="text2">Ums&auml;tze, nach &sect;24 UStG (S&auml;gewerkserzeugnisse, alkoholische Getr&auml;nke etc.)</td>
+      <td class="spalte ausfuellen"><span class="nodis"></span>76 <span class="nodis"></span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_76%]</td>
+      <td class="spalte">80</td>
+      <td class="betrag ausfuellen">[%pos_ustva_80%]</td>
+    </tr>
+    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
+    <tr>
+      <td class="text"><b class="h3">Innergemeinschaftliche Erwerbe</b></td>
+      <td colspan="4"></td>
+    </tr>
+   <tr>
+      <td class="text2">Steuerfrei nach &sect;4b UStG</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>91<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_91%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+[% IF !year2007%]
+    <tr>
+      <td class="text">Steuerpflichtige zum Steuersatz von 16 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_97%]<br></td>
+      <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_971%]</td>
+    </tr>
+[%END%]
+[%IF year2007%]
+    <tr>
+      <td class="text">Steuerpflichtige zum Steuersatz von 19 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>89<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_89%]<br></td>
+      <td class="spalte"><span class="nodis">(Spalte 89 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_891%]</td>
+    </tr>
+[%END %]
+    <tr>
+      <td class="text2">zum Steuersatz von 7 v.H.</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_93%]</td>
+      <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
+      <td class="betrag">[%pos_ustva_931%]</td>
+    </tr>
+    <tr>
+      <td class="text">zu anderen Steuers&auml;tzen</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>95<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_95%]</td>
+      <td class="spalte">98</td>
+      <td class="betrag">[%pos_ustva_98%]</td>
+    </tr>
+    <tr>
+      <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
+             von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
+       zum allgemeinen Steuersatz</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_94%]</td>
+      <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
+      <td class="betrag">[%pos_ustva_96%]</td>
+    </tr>
+        <tr><td class="text">&nbsp;</td><td colspan="4"></td></tr>
+   <tr>
+      <td class="text">Lieferungen des ersten Abnehmers bei
+        innergemeinschaftlichen Dreiecksgeschften (&sect;25b Abs. 2 UStG)</td>
+      <td class="spalte ausfuellen">42</td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_42%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+   <tr>
+      <td class="text2">Steuerpflichtige Umstze im Sinne, f&uuml;r die der
+        <b>Leistungsempf&auml;nger die Steuer schuldet</b></td>
+      <td class="spalte ausfuellen">60</td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_60%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+[%IF year2010%]
+   <tr>
+      <td class="text2"><b>Nicht steuerbare Leistungen</b> gem. &sect; 18b Satz 1 Nr. 2 UStG</td>
+      <td class="spalte ausfuellen">21</td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_21%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+[%END%]
+   <tr>
+      <td class="text">Im Inland nicht steuerbare Ums&auml;tze</td>
+      <td class="spalte ausfuellen">45</td>
+      <td class="betrag ausfuellen" width="70">[%pos_ustva_45%]<br></td>
+      <td class="spalte"><span class="nodis"></span></td>
+      <td class="betrag"></td>
+    </tr>
+
+    <tr><td class="text">&nbsp;</td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
+
+    <tr>
+      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
+      <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
+      <td class="betrag">[%pos_ustva_Z43%]</td>
+    </tr>
+
+    <tr class="uebertrag">
+      <td class="text" colspan="3"><b class="h3">&Uuml;bertrag</td>
+      <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
+      <td class="betrag">[%Z45%]</td>
+    </tr>
+
+[%IF year2010%]
+    <tr>
+      <td class="text2">Im Inland steuerpflichtige sonstige Leistungen von im &uuml;brigen Gemeinschaftsgebiet ans&auml;ssigen Unternehmen (&sect;13b Abs. 1 UStG)</td>
+      <td class="spalte ausfuellen">46</td>
+      <td class="betrag ausfuellen">[%pos_ustva_46%]</td>
+      <td class="spalte">47</td>
+      <td class="betrag">[%pos_ustva_47%]</td>
+    </tr>
+[%END%]
+    <tr>
+      <td class="text2">Leistungen eines im Ausland ans&auml;ssigen Unternehmers</td>
+      <td class="spalte ausfuellen">52</td>
+      <td class="betrag ausfuellen">[%pos_ustva_52%]</td>
+      <td class="spalte">53</td>
+      <td class="betrag">[%pos_ustva_53%]</td>
+    </tr>
+    <tr>
+      <td class="text">Lieferungen sicherungsbereigneter Gegenst&auml;nde und
+           Ums&auml;tze, die unter das GrEStG fallen.</td>
+      <td class="spalte ausfuellen">73</td>
+      <td class="betrag ausfuellen">[%pos_ustva_73%]</td>
+      <td class="spalte">74</td>
+      <td class="betrag">[%pos_ustva_74%]</td>
+    </tr>
+    <tr>
+      <td class="text2">Bauleistungen eines im Inland ans&auml;ssigen Unternehmers</td>
+      <td class="spalte ausfuellen">84</td>
+      <td class="betrag ausfuellen">[%pos_ustva_84%]</td>
+      <td class="spalte">85</td>
+      <td class="betrag">[%pos_ustva_85%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Steuer wegen Wechsel der Besteuerungsform und
+         Nachsteuer auf versteuerte Anzahlungen wegen Steuersatzerh&ouml;hung.</td>
+      <td class="spalte ausfuellen">65</td>
+      <td class="betrag ausfuellen">[%pos_ustva_65%]</td>
+    </tr>
+
+
+
+    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
+
+    <tr>
+      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer</td>
+      <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
+      <td class="betrag">[%Z53%]</td>
+    </tr>
+
+    <tr><td class="text" colspan="3">&nbsp;</td><td class="spacer" colspan="4"></td></tr>
+
+    <tr>
+      <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbetr&auml;ge</b></td>
+      <td colspan="2"></td></tr>
+    </tr>
+
+    <tr>
+      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge von Rechnungen von anderen Unternehmern</td>
+      <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
+      <td class="betrag ausfuellen">[%pos_ustva_66%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus dem innergemeinschaftlichen Erwerb</td>
+      <td class="spalte ausfuellen">61</td>
+      <td class="betrag ausfuellen">[%pos_ustva_61%]</td>
+    </tr>
+    <tr>
+      <td class="text2" colspan="3">Entrichtete Einfuhrumsatzsteuer</td>
+      <td class="spalte ausfuellen">62</td>
+      <td class="betrag ausfuellen">[%pos_ustva_62%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Vorsteuerbetr&auml;ge aus Leistungen im Sinne
+          des &sect;13b Abs. 1 UStG</td>
+      <td class="spalte ausfuellen">67</td>
+      <td class="betrag ausfuellen">[%pos_ustva_67%]</td>
+    </tr>
+    <tr>
+      <td class="text2" colspan="3">Vorsteuerbetr&auml;ge, die nach allgemeinen
+           Durchschnitts&auml;stzen berechnet sind </td>
+      <td class="spalte ausfuellen">63</td>
+      <td class="betrag ausfuellen">[%pos_ustva_63%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Berichtigung des Vorsteuerabzugs</td>
+      <td class="spalte ausfuellen">64</td>
+      <td class="betrag ausfuellen">[%pos_ustva_64%]</td>
+    </tr>
+    <tr>
+      <td class="text2" colspan="3">Vorsteuerabzug f&uuml;r innergemeinschaftliche Lieferungen
+        neuer Fahrzeuge au&szlig;erhalb eines Unternehmens sowie von Kleinunternehmern</td>
+      <td class="spalte ausfuellen">59</td>
+      <td class="betrag ausfuellen">[%pos_ustva_59%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Verbleibender Betrag</td>
+      <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
+      <td class="betrag">[%Z62%]</td>
+    </tr>
+
+    <tr>
+      <td class="text2" colspan="3"><b class="h3">Andere Steuerbetr&auml;ge</b></td>
+      <td colspan="2"></td></tr>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">in Rechnungen unrichtig oder unberechtigt ausgewiesene
+        Steuerbetr&auml;ge sowie Steuerbetr&auml;ge, die nach
+        &sect;4 Nr. 4a, &sect; 6a Abs. 4, &sect;7 oder &sect;25b UStG geschuldet werden</td>
+      <td class="spalte ausfuellen">69</td>
+      <td class="betrag ausfuellen">[%pos_ustva_69%]</td>
+    </tr>
+
+    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
+
+    <tr>
+      <td class="text2" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/&Uuml;berschuss</b></td>
+      <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
+      <td class="betrag">[%Z65%]</td>
+    </tr>
+    <tr>
+      <td class="text" colspan="3">Anrechnung (Abzug) der festgesetzten Sondervorauszahlung
+        f&uuml;r Dauerfristverl&auml;ngerung (nur in der letzten Voranmeldung des
+        Besteuerungszeitraums, ausf&uuml;llen)</td>
+      <td class="spalte ausfuellen">39</td>
+      <td class="betrag ausfuellen">[%pos_ustva_39%]</td>
+    </tr>
+
+    <tr><td class="text" colspan="3">&nbsp;</td><td colspan="4"></td></tr>
+
+    <tr class="noborder">
+      <td class="text2" colspan="3"><b class="h3">Verbleibende Umsatzsteuer-Vorauszahlung bzw.
+                                      Verbleibender &Uuml;berschuss</b></td>
+      <td class="spalte ausfuellen">83</td>
+      <td class="summe">[%pos_ustva_83%]</td>
+    </tr>
+
+  </tbody>
+</table>
+[%IF FA_steuerberater%]
+<p>
+Steuerberater:<br />
+[%FA_steuerberater_name%]<br />
+[%FA_steuerberater_street%]<br />
+[%FA_steuerberater_city%]<br />
+Tel:&nbsp;[%FA_steuerberater_tel%]</p>
+[%END%]