Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 16 Jan 2012 14:04:13 +0000 (15:04 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 16 Jan 2012 14:04:13 +0000 (15:04 +0100)
17 files changed:
.htaccess [new file with mode: 0644]
SL/InstallationCheck.pm
bin/mozilla/do.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
doc/changelog
locale/de/all
locale/de_DE/all
scripts/installation_check.pl
sql/Pg-upgrade2/README
sql/Pg-upgrade2/umstellung_eur.pl
templates/webpages/admin/create_dataset.html
templates/webpages/am/edit_templates.html
templates/webpages/login/auth_db_needs_update.html
templates/webpages/login/auth_db_unreachable.html
templates/webpages/login/old_configuration_files.html

diff --git a/.htaccess b/.htaccess
new file mode 100644 (file)
index 0000000..6686227
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,11 @@
+### Choose a character set (just in case you like to change it here)
+### uncommit the line you wish to activate
+#AddDefaultCharset ISO-8859-15
+#AddDefaultCharset UTF-8
+
+### simple access control by client ip
+### uncomment the lines starting with Order ..., Deny ... and Allow ...
+### examples: "Allow from 192.168" or "Allow from 192.168.1" or "Allow from 192.168.178" or "Allow from 217.84.201.2"
+#Order deny,allow
+#Deny from all
+#Allow from 192.168
index e867076..0d1ab8b 100644 (file)
@@ -51,7 +51,13 @@ sub module_available {
   my $module  = $_[0];
   my $version = $_[1] || '' ;
 
-  return eval "use $module $version; 1";
+  my $got = eval "use $module $version; 1";
+
+  if ($got) {
+    return ($got, $module->VERSION);
+  } else {
+    return
+  }
 }
 
 sub check_kpsewhich {
index 37353dc..9d28bbb 100644 (file)
@@ -831,7 +831,7 @@ sub invoice {
 
   #  show pricegroup in newly loaded invoice when creating invoice from delivery order
   for my $i (1 .. $form->{rowcount}) {
-    $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
+    $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};
@@ -937,7 +937,7 @@ sub invoice_multi {
 
   #  show pricegroup in newly loaded invoice when creating invoice from delivery order
   for my $i (1 .. $form->{rowcount}) {
-    $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
+    $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};
index 2ace9a7..25831b2 100644 (file)
@@ -463,10 +463,11 @@ sub update {
 
   $main::auth->assert('vendor_invoice_edit');
 
-#  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining);
-
   &check_name('vendor');
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate});
+  }
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'sell');
   $form->{exchangerate} = $form->{forex} if $form->{forex};
 
index bcbf107..f438f1c 100644 (file)
@@ -485,8 +485,6 @@ sub update {
 
   my ($recursive_call) = @_;
 
-  $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
-
   $form->{print_and_post} = 0         if $form->{second_run};
   my $taxincluded         = $form->{taxincluded} ? "checked" : '';
   $form->{update} = 1;
@@ -495,6 +493,9 @@ sub update {
 
   $form->{taxincluded} ||= $taxincluded;
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
+  }
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy');
   $form->{exchangerate} = $form->{forex} if $form->{forex};
 
index 40a9b4e..aa6df6d 100644 (file)
@@ -536,11 +536,13 @@ sub update {
 
   set_headings($form->{"id"} ? "edit" : "add");
 
-  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
   $form->{update} = 1;
 
   &check_name($form->{vc});
 
+  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
+    map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call;
+  }
   my $buysell           = 'buy';
   $buysell              = 'sell' if ($form->{vc} eq 'vendor');
   $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, $buysell);
index c19e8c4..e85c85e 100644 (file)
@@ -87,6 +87,7 @@
   - Bugfix 1752: Rechnung -> Druckvorschau ignoriert Änderung des Steuersatz beim Beleg
   - Bugfix 1708: Fehlender Übertrag der Lieferadresse von Angebot -> Auftragsbestätigung
   - Bugfix 1648: bebuchte Konten sollten nicht in Überschriften umgewandelt werden können
+  - Bugfix 1775: Wechselkurs in Einkaufrechnung kann nicht eingegeben werden
 
 
 2011-06-15 - Release 2.6.3
index a780387..d153914 100644 (file)
@@ -16,6 +16,8 @@ $self->{texts} = {
   '#1 (custom variable)'        => '#1 (benutzerdefinierte Variable)',
   '#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.',
   '#1 prices were updated.'     => '#1 Preise wurden aktualisiert.',
+  '* there are restrictions for the perpetual method, look at chapter "Bemerkungen zu Bestandsmethode"  in' => ' für die Bestandsmethode gibt es Einschränkungen, siehe Kapitel "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:' => '*) Seit 2.7 werden Gewinnermittlungsart, Versteuerungsart und Warenbuchungsmethode in der Mandanten-DB gesteuert und nicht mehr in der lx-erp.conf / lx_office.conf, Umstellungs-Details:',
   '*/'                          => '*/',
   '---please select---'         => '---bitte auswählen---',
   '...after loggin in'          => '...nach dem Anmelden',
@@ -838,7 +840,7 @@ $self->{texts} = {
   '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.',
   'For AR transactions it will replace the input taxkeys with sales taxkeys with the same tax rate.' => 'Bei Debitorenbuchungen werden die Vorsteuer-Steuerschlüssel durch Umsatzsteuer-Steuerschlüssel mit demselben Steuersatz ersetzt.',
   '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.' => 'Einheiten haben entweder keine oder genau eine Basiseinheit, von der sie ein Vielfaches sind. Wenn Sie eine Basiseinheit ausw&auml;hlen, dann m&uuml;ssen Sie auch einen Faktor eingeben. Sie m&uuml;ssen Einheiten als ein Vielfaches einer kleineren Einheit eingeben. So ist die Definition von &quot;kg&quot; mit der Basiseinheit &quot;g&quot; und dem Faktor 1000 zul&auml;ssig, die Definition von &quot;g&quot; mit der Basiseinheit &quot;kg&quot; und dem Faktor &quot;0,001&quot; hingegen nicht.',
-  'For further information read this:' => 'Für weitere Informationen zu diesem Thema lesen Sie bitte:',
+  'For further information read this: ' => 'Für weitere Informationen zu diesem Thema lesen Sie bitte: ',
   'Foreign Exchange Gain'       => 'Wechselkurserträge',
   'Foreign Exchange Loss'       => 'Wechselkursaufwendungen',
   'Foreign Expenses'            => 'Aufwand Ausland',
@@ -1251,7 +1253,7 @@ $self->{texts} = {
   'Openings'                    => 'Öffnungszeiten',
   'Optional comment'            => 'Optionaler Kommentar',
   'Options'                     => 'Optionen',
-  'Or download the whole Installation Documentation as PDF (110kB) for off-line study (currently in German Language).' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (110kB) herunter.',
+  'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (350kB) herunter: ',
   'Order'                       => 'Auftrag',
   'Order Date'                  => 'Auftragsdatum',
   'Order Date missing!'         => 'Auftragsdatum fehlt!',
@@ -2060,7 +2062,7 @@ $self->{texts} = {
   'Weight unit'                 => 'Gewichtseinheit',
   'What <b>term</b> you are looking for?' => 'Nach welchem <b>Begriff</b> wollen Sie suchen?',
   'What type of item is this?'  => 'Was ist dieser Artikel?',
-  'Which is located at doc/konfigurationsdatei.txt. Click here: ' => 'Zu finden in doc/konfigurationsdatei.txt. Oder hier klicken: ',
+  'Which is located at doc/dokumentation.pdf. Click here: ' => 'Zu finden in doc/dokumentation.pdf. Oder hier klicken: ',
   'With Extension Of Time'      => 'mit Dauerfristverlängerung',
   'Workflow Delivery Order'     => 'Workflow Lieferschein',
   'Workflow purchase_order'     => 'Workflow Lieferantenauftrag',
@@ -2086,7 +2088,7 @@ $self->{texts} = {
   'You can create warehouses and bins via the menu "System -> Warehouses".' => 'Sie k&ouml;nnen Lager und Lagerpl&auml;tze &uuml;ber das Men&uuml; "System -> Lager" anlegen.',
   'You can declare different translations for singular and plural for each unit (e.g. &quot;day&quot; and &quot;days).' => 'Bei den &Uuml;bersetzungen k&ouml;nnen Sie unterschiedliche Varianten f&uuml;r singular und plural angeben (z.B. &quot;day&quot; und &quot;days&quot;).',
   'You can either create a new database or chose an existing database.' => 'Sie können entweder eine neue Datenbank erstellen oder eine existierende auswählen.',
-  'You can find information on the migration in the upgrade documentation.' => 'Informationen über die Migration sind in der Upgrade-Dokumentation zu finden.',
+  'You can find information on the migration in the upgrade chapter of the documentation.' => 'Informationen über die Migration sind in der Upgrade Kapitel in der Dokumentation zu finden.',
   'You can only delete datasets that are not in use.' => 'Sie k&ouml;nnen nur Datenbanken l&ouml;schen, die momentan nicht in Benutzung sind.',
   'You can use the following strings in the long description and all translations. They will be replaced by their actual values by Lx-Office before they\'re output.' => 'Sie k&ouml;nnen im Langtext und allen Übersetzungen die folgenden Variablen benutzen, die vor der Ausgabe von Lx-Office automatisch ersetzt werden:',
   'You cannot adjust the price for pricegroup "#1" by a negative percentage.' => 'Sie können den Preis für Preisgruppe "#1" um einen negativen Prozentwert anpassen.',
index 6ab32d5..9e832b5 100644 (file)
@@ -777,7 +777,7 @@ $self->{texts} = {
   '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.',
   'For AR transactions it will replace the input taxkeys with sales taxkeys with the same tax rate.' => 'Bei Debitorenbuchungen werden die Vorsteuer-Steuerschlüssel durch Umsatzsteuer-Steuerschlüssel mit demselben Steuersatz ersetzt.',
   '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.' => 'Einheiten haben entweder keine oder genau eine Basiseinheit, von der sie ein Vielfaches sind. Wenn Sie eine Basiseinheit ausw&auml;hlen, dann m&uuml;ssen Sie auch einen Faktor eingeben. Sie m&uuml;ssen Einheiten als ein Vielfaches einer kleineren Einheit eingeben. So ist die Definition von &quot;kg&quot; mit der Basiseinheit &quot;g&quot; und dem Faktor 1000 zul&auml;ssig, die Definition von &quot;g&quot; mit der Basiseinheit &quot;kg&quot; und dem Faktor &quot;0,001&quot; hingegen nicht.',
-  'For further information read this:' => 'Für weitere Informationen zu diesem Thema lesen Sie bitte:',
+  'For further information read this: ' => 'Für weitere Informationen zu diesem Thema lesen Sie bitte: ',
   'Foreign Exchange Gain'       => 'Wechselkurserträge',
   'Foreign Exchange Loss'       => 'Wechselkursaufwendungen',
   'Foreign Expenses'            => 'Aufwand Ausland',
@@ -1155,7 +1155,7 @@ $self->{texts} = {
   'Openings'                    => 'Öffnungszeiten',
   'Optional comment'            => 'Optionaler Kommentar',
   'Options'                     => 'Optionen',
-  'Or download the whole Installation Documentation as PDF (110kB) for off-line study (currently in German Language).' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (110kB) herunter.',
+  'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (350kB) herunter: ',
   'Order'                       => 'Auftrag',
   'Order Date'                  => 'Auftragsdatum',
   'Order Date missing!'         => 'Auftragsdatum fehlt!',
index 0f0dc20..1cebcb2 100755 (executable)
@@ -28,12 +28,12 @@ GetOptions(
   "c|color!"    => \ ( my $c = 1 ),
 );
 
-# if notihing is requested check "required"
+# if nothing is requested check "required"
 $check{r} = 1 unless defined $check{a} ||
                      defined $check{l} ||
                      defined $check{o} ||
                      defined $check{d};
-
+my $default_run ='1' if $check{r};  # no parameter, therefore print a note after default run
 if ($check{a}) {
   foreach my $check (keys %check) {
     $check{$check} = 1 unless defined $check{$check};
@@ -46,6 +46,7 @@ $| = 1;
 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');
@@ -123,8 +124,13 @@ sub check_module {
   my ($module, %role) = @_;
 
   my $line = "Looking for $module->{fullname}";
-  my $res = SL::InstallationCheck::module_available($module->{"name"}, $module->{version});
-  print_result($line, $res);
+  my ($res, $ver) = SL::InstallationCheck::module_available($module->{"name"}, $module->{version});
+  if ($res) {
+    print_line($line, $ver || 'no version', 'green');
+  } else {
+    print_result($line, $res);
+  }
+
 
   return if $res;
 
@@ -178,8 +184,17 @@ sub mycolor {
 
 sub print_result {
   my ($test, $exit) = @_;
-  print $test, " ", ('.' x (72 - length $test));
-  print $exit ? '.... '. mycolor('ok', 'green') : ' '. mycolor('NOT ok', 'red');
+  if ($exit) {
+    print_line($test, 'ok', 'green');
+  } else {
+    print_line($test, 'NOT ok', 'red');
+  }
+}
+
+sub print_line {
+  my ($text, $res, $color) = @_;
+  print $text, " ", ('.' x (78 - length($text) - length($res)));
+  print mycolor($res, $color);
   print "\n";
   return;
 }
index 3a53151..aa41768 100644 (file)
@@ -1,3 +1,3 @@
-Bitte lesen Sie die Datei doc/sql-upgrade-dateien.txt, bevor
+Bitte lesen Sie das Kapitel "SQL-Upgradedateien" aus doc/dokumentation.pdf, bevor
 Sie hier Dateien anlegen.
 
index c0c2b7a..5a400c9 100644 (file)
@@ -1,5 +1,5 @@
 # @tag: umstellung_eur
-# @description: Variable eur umstellen: bitte doc/umstellung_eur.txt lesen
+# @description: Variable eur umstellen: bitte in doc/dokumentation.pdf das entsprechende Kapitel zur Konfiguration von EUR lesen
 # @depends: release_2_6_3
 # @charset: utf-8
 
@@ -62,7 +62,7 @@ sub do_update {
   # only set parameters if they haven't already been set (this in only the case
   # when upgrading)
 
-  my $update_eur = "UPDATE defaults set accounting_method = '$accounting_method' where accounting_method is null;" . 
+  my $update_eur = "UPDATE defaults set accounting_method = '$accounting_method' where accounting_method is null;" .
                    "UPDATE defaults set inventory_system = '$inventory_system' where inventory_system is null; " .
                    "UPDATE defaults set profit_determination = '$profit_determination' where profit_determination is null;";
   do_query($update_eur);
index ba2d724..f1b7f0c 100644 (file)
@@ -58,7 +58,7 @@
       <select name="inventory_system">
        [% FOREACH row = INVENTORY_SYSTEMS %]<option value=[% HTML.escape(row.name) %] [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) | $T8 %]</option>[% END %]
       </select>
-     * f&uuml;r die Bestandsmethode gibt es Einschr&auml;nkungen, siehe Bemerkungen in <a href="doc/umstellung_eur.txt">EUR Umstellung in Mandant</a>.
+     [% '* there are restrictions for the perpetual method, look at chapter "Bemerkungen zu Bestandsmethode"  in' | $T8 %] <a href="doc/dokumentation.pdf">dokumentation.pdf</a>.
      </td>
 
     </tr>
@@ -73,7 +73,7 @@
    </tr>
     <tr>
     <td colspan="2">
-    *) Seit 2.7 werden Gewinnermittlungsart, Versteuerungsart und Warenbuchungsmethode in der Mandanten-DB gesteuert und nicht mehr in der lx-erp.conf, Umstellungs-Details: <a href="doc/umstellung_eur.txt">EUR Umstellung in Mandant</a>
+    [% '*) 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:' | $T8 %] <a href="doc/dokumentation.pdf">Kapitel Konfiguration zur Einnahmen&uuml;berschussrechnung/ Bilanzierung: EUR</a>
     </td>
     </tr>
    </table>
               "Die Buchungsgruppen sind nicht korrekt vorkonfiguriert" +
               "\n" +
               "fuer Kunden im Ausland." +
-              "\n" + 
+              "\n" +
               "Hinweis vom 20.09.2011");
       }
       if (s == 'Swiss-German') {
index efaffc4..a25abc6 100644 (file)
@@ -4,7 +4,7 @@
  <div class="listheading">[% title %]</div>
 
   [% IF type == 'templates' %]
-   <p style="text-align: right;">[<a href="doc/dokumentenvorlagen-und-variablen.html" target="_blank" title="[% 'Open in new window' | $T8 %]">[% 'Help Template Variables' | $T8 %]</a>]</p>
+   <p style="text-align: right;">[<a href="doc/html/ch03s02.html" target="_blank" title="[% 'Open in new window' | $T8 %]">[% 'Help Template Variables' | $T8 %]</a>]</p>
   [% END %]
 
  <form method="post" name="Form" action="amtemplates.pl">
index e2bb2c5..542b9c9 100644 (file)
 
  <hr>
  <p>
-  [% LxERP.t8('For further information read this:') %]
-  <a href="doc/INSTALL.html#Benutzerauthentifizierung-und-Administratorpasswort" target="_blank">Lx-Office Installation</a><br>
-  [% LxERP.t8('Or download the whole Installation Documentation as PDF (110kB) for off-line study (currently in German Language).') %]
-  <a href="doc/Lx-Office_Installation_DE.pdf">Lx-Office_Installation_DE.pdf</a>
+  [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Lx-Office Installation</a><br>
+  [% LxERP.t8('Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ') %] <a href="doc/dokumentation.pdf" target="_blank">dokumentation.pdf</a>
  </p>
 
  <hr>
index 8e5adce..5d503a0 100644 (file)
@@ -7,10 +7,11 @@
 
  <p>[% 'If you want to set up the authentication database yourself then log in to the administration panel. Lx-Office will then create the database and tables for you.' | $T8 %]</p>
  <hr>
- <p>[% 'For further information read this:' | $T8 %] <a href="doc/INSTALL.html#Benutzerauthentifizierung-und-Administratorpasswort" target="_blank">Lx-Office Installation</a><br>
- [% 'Or download the whole Installation Documentation as PDF (110kB) for off-line study (currently in German Language).' | $T8 %] <a href="doc/Lx-Office_Installation_DE.pdf">Lx-Office_Installation_DE.pdf</a></p>
+ <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">Lx-Office Installation</a><br>
+ [% 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' | $T8 %] <a href="doc/dokumentation.pdf" target="_blank"> dokumentation.pdf</a></p>
+
  <hr>
+
  <p>
   <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
   <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
index 6e147cf..32f3313 100644 (file)
  </p>
 
  <p>
-  [%- LxERP.t8('You can find information on the migration in the upgrade documentation.') %]
+  [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
  </p>
   <p>
 
-  [%- LxERP.t8('Which is located at doc/konfigurationsdatei.txt. Click here: ') %] <a href ="doc/konfigurationsdatei.txt">doc/konfigurationsdatei.txt</a>
+  [%- LxERP.t8('Which is located at doc/dokumentation.pdf. Click here: ') %] <a href ="doc/dokumentation.pdf">doc/dokumentation.pdf</a>
 </p>
 
  <p>