]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Fri, 5 Mar 2010 14:26:35 +0000 (15:26 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Fri, 5 Mar 2010 14:26:35 +0000 (15:26 +0100)
23 files changed:
SL/CP.pm
SL/DN.pm
SL/Form.pm
bin/mozilla/cp.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
doc/changelog
locale/de/all
locale/de/cp
locale/de/rundungsfehler_korrigieren_BUG1328 [new file with mode: 0644]
lxo-import/addressB.php
lxo-import/contactB.php
lxo-import/db.php
lxo-import/import_lib.php
lxo-import/partsB.php
lxo-import/parts_import.php
lxo-import/shiptoB.php
templates/webpages/dunning/show_invoices_de.html
templates/webpages/dunning/show_invoices_master.html
templates/webpages/wh/removal_parts_selection_de.html
templates/webpages/wh/removal_parts_selection_master.html
templates/webpages/wh/warehouse_selection_stock_de.html
templates/webpages/wh/warehouse_selection_stock_master.html

index b7e6241de7b84d1971a7c5ed19ebf2ad307693c4..f6c8c1a8ebec0e76c72b05ce6a205af59e72cd58 100644 (file)
--- a/SL/CP.pm
+++ b/SL/CP.pm
@@ -160,16 +160,14 @@ sub get_openinvoices {
   my $buysell = $form->{vc} eq 'customer' ? "buy" : "sell";
   my $arap = $form->{arap} eq "ar" ? "ar" : "ap";
 
-  my $curr_null = $form->{curreny} ? '' : ' OR a.curr IS NULL'; # fix: after sql-injection fix, curr is inserted as NULL, before that as ''
-
   my $query =
      qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, a.curr | .
      qq|FROM $arap a | .
-     qq|WHERE (a.${vc}_id = ?) AND (a.curr = ? $curr_null) AND NOT (a.amount = paid)| .
+     qq|WHERE (a.${vc}_id = ?) AND (COALESCE(a.curr, '') = ?) AND NOT (a.amount = a.paid)| .
      qq|ORDER BY a.id|;
   my $sth = prepare_execute_query($form, $dbh, $query,
                                   conv_i($form->{"${vc}_id"}),
-                                  $form->{currency});
+                                  "$form->{currency}");
 
   $form->{PR} = [];
   while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
@@ -182,6 +180,16 @@ sub get_openinvoices {
   }
 
   $sth->finish;
+
+  $query = <<SQL;
+    SELECT COUNT(*)
+    FROM $arap
+    WHERE (${vc}_id = ?)
+      AND (COALESCE(curr, '') <> ?)
+      AND (amount <> paid)
+SQL
+  ($form->{openinvoices_other_currencies}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{"${vc}_id"}), "$form->{currency}");
+
   $dbh->disconnect;
 
   $main::lxdebug->leave_sub();
@@ -363,7 +371,7 @@ sub process_payment {
                # Hier werden negativen Zahlungseingänge abgefangen
                # Besser: in Oberfläche schon prüfen
                # Zahlungsein- und ausgänge sind immer positiv
-    $dbh->rollback;    
+    $dbh->rollback;
     $rc = 0;
   }
   if ($form->round_amount($paymentamount, 2) == 0) {
index 0e378d69db07330d42f1516ab07ab59f5a2c639c..5cf42b543870268df5b12b42c3e8514613286635 100644 (file)
--- a/SL/DN.pm
+++ b/SL/DN.pm
@@ -469,6 +469,7 @@ sub get_invoices {
     qq|SELECT
          a.id, a.ordnumber, a.transdate, a.invnumber, a.amount,
          ct.name AS customername, a.customer_id, a.duedate,
+         a.amount - a.paid AS open_amount,
 
          cfg.dunning_description, cfg.dunning_level,
 
index 8d1772061fa3c5f5862b528584121eac4a8bf467..c1cc2abb13ed4d37116124438ec306a56d4573b2 100644 (file)
@@ -2576,7 +2576,7 @@ sub all_vc {
   my ($count) = selectrow_query($self, $dbh, $query);
 
   # build selection list
-  if ($count < $myconfig->{vclimit}) {
+  if ($count <= $myconfig->{vclimit}) {
     $query = qq|SELECT id, name, salesman_id
                 FROM $table WHERE NOT obsolete
                 ORDER BY name|;
index 51624331ca34e9127607be5aa77908157e41b5f2..f4a9efb20eeb337b2185ee27672a372d3a5c7770 100644 (file)
@@ -317,6 +317,19 @@ sub form_header {
 $jsscript
 |;
 
+  if ($form->{openinvoices_other_currencies}) {
+    my $warning = $form->{vc} eq 'customer' ? $::locale->text('There are #1 more open invoices for this customer with other currencies.', $form->{openinvoices_other_currencies})
+                :                             $::locale->text('There are #1 more open invoices from this vendor with other currencies.',  $form->{openinvoices_other_currencies});
+
+    print qq|
+
+  <input type="hidden" name="openinvoices_other_currencies" value="| . H($form->{openinvoices_other_currencies}) . qq|">
+  <tr>
+   <td><b>| . $::locale->text('Note') . qq|: $warning</b></td>
+  </tr>
+|;
+  }
+
   $lxdebug->leave_sub();
 }
 
index cf85bf5153756aa2d97addd9cbac311d6c13b6f1..845d2cd64bb063af2aaa4b0ce49c827496b34096 100644 (file)
@@ -132,7 +132,7 @@ sub show_invoices {
     if ($row->{next_dunning_config_id}) {
       map { $_->{SELECTED} = $_->{id} == $row->{next_dunning_config_id} } @{ $row->{DUNNING_CONFIG } };
     }
-    map { $row->{$_} = $form->format_amount(\%myconfig, $row->{$_} * 1, -2) } qw(amount fee interest);
+    map { $row->{$_} = $form->format_amount(\%myconfig, $row->{$_} * 1, -2) } qw(amount open_amount fee interest);
   }
 
   $form->get_lists('printers'  => 'printers',
index 9fa2b9096d7083831c70697070269a0f34332bed..a57022b76cbd2a34628e571814edc70e8c5b680d 100644 (file)
@@ -1209,10 +1209,10 @@ sub transfer_in {
 
       my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
 
-      if ($do_base_qty != $row_sum_base_qty) {
-        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.',
-                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
-      }
+#      if ($do_base_qty != $row_sum_base_qty) {
+#        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.',
+#                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
+#      }
     }
 
     if (@{ $form->{ERRORS} }) {
@@ -1280,10 +1280,10 @@ sub transfer_out {
 
       my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
 
-      if ($do_base_qty != $row_sum_base_qty) {
-        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.',
-                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
-      }
+#      if ($do_base_qty != $row_sum_base_qty) {
+#        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.',
+#                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
+#      }
     }
 
     if (%request_map) {
index 35ad7276a995beb31bb0f91dfa0ab20170bcd701..b52032fa46a98d26308cf23f4e22619ea2b5bd12 100644 (file)
@@ -75,6 +75,9 @@
    zugeordneten Zahlungskonditionen korrekt geladen, wenn der Kunde keine
    Zahlungsonditionen zugeordnet hatte, wird auch auf keine Zahlungskondition
    gewechselt.
+ - Die Beschränkung in Lieferscheinen immer genau die Menge auszulagern, die
+   angegeben wurde, wurde aufgehoben. Der Lieferschein ist nach der
+   Lagerbuchung weiterhin nicht mehr editierbar, also Vorsicht.
 
 
   Wichtige Änderungen für Administratoren:
   922 940 1017 1024 1025 1028 1030 1031 1034 1035 1036 1037 1040 1043 1044 1046
   1051 1055 1057 1058 1072 1073 1077 1079 1081 1082 1095 1098 1100 1101 1108
   1110 1118 1125 1127 1130 1133 1135 1136 1138 1144 1146 1147 1150 1151 1155
-  1164 1173 1177 1186 1188 1190 1191 1195 1197 1198 1199 1200 1201 1209 1213
-  1243 1248 1250 1262 1286 1287 1289 1290 1291 1294 1299 1331 1334 1336 1339 
-  1340 1341 1342 1343 1350 1399
+  1164 1170 1173 1177 1186 1188 1190 1191 1195 1197 1198 1199 1200 1201 1209
+  1213 1243 1248 1250 1262 1286 1287 1289 1290 1291 1294 1299 1331 1334 1336
+  1339 1340 1341 1342 1343 1350 1352 1399
 
 
 2009-06-02 - Version 2.6.0
index 2406b5413725b470f30aab4f6518192feb261183..35e8d33f9bccb46d0dbc8aba32bda738fada353f 100644 (file)
@@ -1098,6 +1098,7 @@ $self->{texts} = {
   'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen',
   'Only due follow-ups'         => 'Nur f&auml;llige Wiedervorlagen',
   'Open'                        => 'Offen',
+  'Open Amount'                 => 'Offener Betrag',
   'Open amount'                 => 'offener Betrag',
   'OpenDocument/OASIS'          => 'OpenDocument/OASIS',
   'Openings'                    => 'Öffnungszeiten',
@@ -1643,6 +1644,8 @@ $self->{texts} = {
   'The wrong taxkeys for AP and AR transactions have been fixed.' => 'Die Probleme mit falschen Steuerschlüssel bei Kreditoren- und Debitorenbuchungen wurden behoben.',
   'The wrong taxkeys for inventory transactions for sales and purchase invoices have been fixed.' => 'Die falschen Steuerschlüssel für Warenbestandsbuchungen bei Einkaufs- und Verkaufsrechnungen wurden behoben.',
   'The wrong taxkeys have been fixed.' => 'Die Steuerschlüssel wurden nach Ihrer Auswahl korrigiert.',
+  'There are #1 more open invoices for this customer with other currencies.' => 'Es gibt #1 weitere offene Rechnungen für diesen Kunden, die in anderen Währungen ausgestellt wurden.',
+  'There are #1 more open invoices from this vendor with other currencies.' => 'Es gibt #1 weitere offene Rechnungen von diesem Lieferanten, die in anderen Währungen ausgestellt wurden.',
   'There are #1 unfinished follow-ups of which #2 are due.' => 'Es gibt #1 Wiedervorlage(n), von denen #2 fällig ist/sind.',
   'There are four tax zones.'   => 'Es gibt vier Steuerzonen.',
   'There are no items in stock.' => 'Dieser Artikel ist nicht eingelagert.',
index 9de006c670c22c7e217d9a74f87d5975856061c6..11ee8881000e11ee2e4e77f0c3844b9ea8023a2f 100644 (file)
@@ -106,6 +106,7 @@ $self->{texts} = {
   'No or an unknown authenticantion module specified in "config/authentication.pl".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/authentication.pl" angegeben.',
   'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
   'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.',
+  'Note'                        => 'Hinweis',
   'Number'                      => 'Nummer',
   'Others'                      => 'Andere',
   'PAYMENT POSTED'              => 'Rechung gebucht',
@@ -159,6 +160,8 @@ $self->{texts} = {
   'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
   'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
   'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
+  'There are #1 more open invoices for this customer with other currencies.' => 'Es gibt #1 weitere offene Rechnungen für diesen Kunden, die in anderen Währungen ausgestellt wurden.',
+  'There are #1 more open invoices from this vendor with other currencies.' => 'Es gibt #1 weitere offene Rechnungen von diesem Lieferanten, die in anderen Währungen ausgestellt wurden.',
   'To (email)'                  => 'An',
   'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
   'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
diff --git a/locale/de/rundungsfehler_korrigieren_BUG1328 b/locale/de/rundungsfehler_korrigieren_BUG1328
new file mode 100644 (file)
index 0000000..eb6fbd1
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+$self->{texts} = {
+  'Database update error:'      => 'Fehler beim Datenbankupgrade:',
+};
+
+$self->{subs} = {
+  'do_query'                    => 'do_query',
+  'do_update'                   => 'do_update',
+  'mydberror'                   => 'mydberror',
+};
+
+1;
index 05ced5e8540eb12279a6a7c5adca660e1950f3db..e7f7be34ebfd5111a8c53a5eec501d9f4aacb183 100755 (executable)
@@ -48,17 +48,17 @@ function ende($txt) {
     echo "Abbruch: $txt<br>";
     exit(1);
 }
-
+$dir = "../users/";
 clearstatcache ();
 //print_r($_FILES);
 $test=$_POST["test"];
 if (!empty($_FILES["Datei"]["name"])) {
     $file=$_POST["ziel"];
-    if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$file.".csv")) {
+    if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$dir.$file.".csv")) {
         $file=false;
         echo "Upload von ".$_FILES["Datei"]["name"]." fehlerhaft. (".$_FILES["Datei"]["error"].")<br>";
     }
-} else if (is_file($_POST["ziel"].".csv")) {
+} else if (is_file($dir.$_POST["ziel"].".csv")) {
     $file=$_POST["ziel"];
 } else {
     $file=false;
@@ -67,8 +67,12 @@ if (!empty($_FILES["Datei"]["name"])) {
 if (!$file) ende ("Kein Datenfile");
 
 $trenner=($_POST["trenner"])?$_POST["trenner"]:",";
+if ($trenner=="other") {
+    $trenner=trim($trennzeichen);
+    if (substr($trenner,0,1)=="#") if (strlen($trenner)>1) $trenner=chr(substr($trenner,1));
+} 
 
-if (!file_exists("$file.csv")) ende("$file.csv nicht im Ordner oder leer");
+if (!file_exists($dir.$file.".csv")) ende("$file.csv nicht im Ordner oder leer");
 
 
 if (!$db->chkcol($file)) ende("Importspalte kann nicht angelegt werden");
@@ -78,7 +82,39 @@ if (!$employee) ende("Ung&uuml;ltiger User");
 
 $kunde_fld = array_keys($address);
 
-$f=fopen("$file.csv","r");
+    //Zeichencodierung des Servers
+    $tmpcode = $db->getServerCode();
+    //Leider sind die Benennungen vom Server anders als von mb_detect_encoding
+    if ($tmpcode == "UTF8") {
+         define("ServerCode","UTF-8");
+    } else if ($tmpcode == "LATIN9") {
+         define("ServerCode","ISO-8859-15");
+    } else if ($tmpcode == "LATIN1") {
+         define("ServerCode","ISO-8859-1");
+    } else {
+         define("ServerCode",$tmpcode);
+    }
+    //Zeichensatz sollte gleich sein, sonst ist die Datenkonvertierung nutzlos
+    //DB und LxO müssen ja nicht auf der gleichen Maschiene sein.
+    if($tmpcode<>$db->getClientCode()) {
+        $rc = $db->setClientCode($tmpcode);
+    }
+
+    // Zeichenkodierung File
+    if ($_POST["encoding"] == "auto") {
+         define("Auto",true);
+         define("Translate",true);
+    } else {
+         define("Auto",false);
+         if ($_POST["encoding"] == ServerCode) {
+            define("Translate",false);
+         } else {
+            define("Translate",true);
+            define("FileCode",$_POST["encoding"]);
+         }
+    }
+
+$f=fopen($dir.$file.".csv","r");
 $zeile=fgets($f,1200);
 $infld=split($trenner,strtolower($zeile));
 $first=true;
@@ -111,14 +147,14 @@ if ($ok) while (!feof($f)){
         $data=trim($data);
         // seit 2.6 ist die DB-Kodierung UTF-8 @holger Ansonsten einmal vorher die DB-Encoding auslesen
         // Falls die Daten ISO-kodiert kommen entsprechend wandeln
+        // done!
         // UTF-8 MUSS als erstes stehen, da ansonsten die Prüfung bei ISO-8859-1 aufhört ...
+        // die blöde mb_detect... tut leider nicht immer, daher die Möglichkeit der Auswahl
         // TODO Umlaute am Anfang wurden bei meinem Test nicht übernommen (Österreich). S.a.:
         // http://forum.de.selfhtml.org/archiv/2007/1/t143904/
 
-        $encoding = mb_detect_encoding($data,"UTF-8,ISO-8859-1,ISO-8859-15");
-        if ($encoding != "UTF-8"){
-          $data=mb_convert_encoding($data, "UTF-8","$encoding");
-        }
+        if (Translate) translate($data);
+
         //$data=htmlentities($data);
         $data=addslashes($data);
         if ($in_fld[$i]==$file."number") {  // customernumber || vendornumber
@@ -132,12 +168,9 @@ if ($ok) while (!feof($f)){
         } else if ($in_fld[$i]=="taxincluded"){
             $data=strtolower(substr($data,0,1));
             if ($data!="f" && $data!="t") $data="f";
-        } /*else if ($in_fld[$i]=="ustid"){
-            Was passiert hier:
-            $data=strtr(" ","",$data);
-            SUCHE IN ' ' nach dem Vorkommen von '' mit der BOOLEAN-Interpretation von $data
-            demnach gibt es immer eine leere Zeichenkette zurück.
-        }*/ /*else if ($in_fld[$i]=="matchcode") {
+        } else if ($in_fld[$i]=="ustid"){
+            $data=strtr($data," ","");
+        } /*else if ($in_fld[$i]=="matchcode") {
                   $matchcode=$data;
                   $i++;
                   continue;
@@ -208,9 +241,26 @@ echo $j." $file importiert.\n";
 <table>
 <tr><td></td><td><input type="submit" name="ok" value="Hilfe"></td></tr>
 <tr><td>Zieltabelle</td><td><input type="radio" name="ziel" value="customer" checked>customer <input type="radio" name="ziel" value="vendor">vendor</td></tr>
-<tr><td>Trennzeichen</td><td><input type="text" size="2" maxlength="1" name="trenner" value=";"></td></tr>
+<tr><td>Trennzeichen</td><td>
+        <input type="radio" name="trenner" value=";" checked>Semikolon
+        <input type="radio" name="trenner" value=",">Komma
+        <input type="radio" name="trenner" value="#9" checked>Tabulator
+        <input type="radio" name="trenner" value=" ">Leerzeichen
+        <input type="radio" name="trenner" value="other">
+        <input type="text" size="2" name="trennzeichen" value="">
+</td></tr>
 <tr><td>Test</td><td><input type="checkbox" name="test" value="1">ja</td></tr>
 <tr><td>Daten</td><td><input type="file" name="Datei"></td></tr>
+<tr><td>Verwendete<br />Zeichecodierung</td><td>
+        <select name="encoding">
+        <option value="auto">Automatisch (versuchen)</option>
+        <option value="UTF-8">UTF-8</option>
+        <option value="ISO-8859-1">ISO-8859-1</option>
+        <option value="ISO-8859-15">ISO-8859-15</option>
+        <option value="Windows-1252">Windows-1252</option>
+        <option value="ASCII">ASCII</option>
+        </select>
+</td></tr>
 <tr><td></td><td><input type="submit" name="ok" value="Import"></td></tr>
 </table>
 </form>
index e07bedb2ac0db405b21bc8ce3c14f34f5df27085..49e2adcb8368a7251bb21e3d546a555fd0b8ce5a 100644 (file)
@@ -28,6 +28,8 @@ $db=$_SESSION["db"]; //new myDB($login);
 $crm=checkCRM();
 
 if ($_POST["ok"]) {
+    $dir = "../users/";
+
        $test=$_POST["test"];
 
        if ($crm) {
@@ -55,14 +57,19 @@ if ($_POST["ok"]) {
        clearstatcache ();
 
        $trenner=($_POST["trenner"])?$_POST["trenner"]:",";
+    if ($trenner=="other") {
+        $trenner=trim($trennzeichen);
+        if (substr($trenner,0,1)=="#") if (strlen($trenner)>1) $trenner=chr(substr($trenner,1));
+    }
 
 if (!empty($_FILES["Datei"]["name"])) { 
        $file=$_POST["ziel"];
-       if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$file."_contact.csv")) {
+       if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$dir.$file."_contact.csv")) {
                $file=false;
                echo "Upload von ".$_FILES["Datei"]["name"]." fehlerhaft. (".$_FILES["Datei"]["error"].")<br>";
        } 
-} else if (is_file($_POST["ziel"]."_contact.csv")) {
+} else if (is_file($dir.$_POST["ziel"]."_contact.csv")) {
        $file=$_POST["ziel"];
 } else {
        $file=false;
@@ -70,16 +77,49 @@ if (!empty($_FILES["Datei"]["name"])) {
 
 if (!$file) ende (2);
 
-if (!file_exists($file."_contact.csv")) ende(5);
+if (!file_exists($dir.$file."_contact.csv")) ende(5);
 
-$prenumber=$_POST["prenumber"];
+//$prenumber=$_POST["prenumber"];
 
 $employee=chkUsr($_SESSION["employee"]);
 if (!$employee) ende(4);
 
 if (!$db->chkcol($file)) ende(6);
 
-$f=fopen($file."_contact.csv","r");
+    //Zeichencodierung des Servers
+    $tmpcode = $db->getServerCode();
+    //Leider sind die Benennungen vom Server anders als von mb_detect_encoding
+    if ($tmpcode == "UTF8") {
+         define("ServerCode","UTF-8");
+    } else if ($tmpcode == "LATIN9") {
+         define("ServerCode","ISO-8859-15");
+    } else if ($tmpcode == "LATIN1") {
+         define("ServerCode","ISO-8859-1");
+    } else {
+         define("ServerCode",$tmpcode);
+    }
+    //Zeichensatz sollte gleich sein, sonst ist die Datenkonvertierung nutzlos
+    //DB und LxO müssen ja nicht auf der gleichen Maschiene sein.
+    if($tmpcode<>$db->getClientCode()) {
+        $rc = $db->setClientCode($tmpcode);
+    }
+
+    // Zeichenkodierung File
+    if ($_POST["encoding"] == "auto") {
+         define("Auto",true);
+         define("Translate",true);
+    } else {
+         define("Auto",false);
+         if ($_POST["encoding"] == ServerCode) {
+            define("Translate",false);
+         } else {
+            define("Translate",true);
+            define("FileCode",$_POST["encoding"]);
+         }
+    }
+
+
+$f=fopen($dir.$file."_contact.csv","r");
 $zeile=fgetcsv($f,2000,$trenner);
 
 $first=true;
@@ -105,6 +145,7 @@ while (!feof($f)){
                }
                $data=addslashes(trim($data));
                if ($in_fld[$i]=="firma" && $data) { 
+            if (Translate) translate($data);
                        $data=suchFirma($file,$data);
                        if ($data) {
                                $id=$data["cp_cv_id"];
@@ -149,15 +190,18 @@ while (!feof($f)){
                if ($data==false or empty($data) or !$data) {
                         $vals.="null,";
                 } else {
-                       if (in_array($in_fld[$i],array("cp_fax","cp_phone1","cp_phone2"))) {
-                               $data=$prenumber.$data;
-                       } else if ($in_fld[$i]=="cp_country" && $data) {
-                               $data=mkland($data);
-                       }
-                       if ($in_fld[$i]=="cp_name") $name=true;
-                        $vals.="'".$data."',";
-                        // bei jedem gefuellten Datenfeld erhoehen
-                        $val_count++;
+
+                    if (Translate) translate($data);
+
+                       /*if (in_array($in_fld[$i],array("cp_fax","cp_phone1","cp_phone2"))) {
+                                       $data=$prenumber.$data;
+                    } else if ($in_fld[$i]=="cp_country" && $data) {
+                        $data=mkland($data);
+                    } */
+                       if ($in_fld[$i]=="cp_name") $name=true;
+                    $vals.="'".$data."',";
+                    // bei jedem gefuellten Datenfeld erhoehen
+                    $val_count++;
                 }
        }
        if (!$name) {
@@ -197,10 +241,27 @@ echo $j." $file importiert.\n";} else {
 <table>
 <tr><td></td><td><input type="submit" name="ok" value="Hilfe"></td></tr>
 <tr><td>Zieltabelle</td><td><input type="radio" name="ziel" value="customer" checked>customer <input type="radio" name="ziel" value="vendor">vendor</td></tr>
-<tr><td>Trennzeichen</td><td><input type="text" size="2" maxlength="1" name="trenner" value=";"></td></tr>
-<tr><td>Telefonvorwahl</td><td><input type="text" size="4" maxlength="1" name="prenumber" value=""></td></tr>
+<tr><td>Trennzeichen</td><td>
+        <input type="radio" name="trenner" value=";" checked>Semikolon
+        <input type="radio" name="trenner" value=",">Komma
+        <input type="radio" name="trenner" value="#9" checked>Tabulator
+        <input type="radio" name="trenner" value=" ">Leerzeichen
+        <input type="radio" name="trenner" value="other">
+        <input type="text" size="2" name="trennzeichen" value="">
+</td></tr>
+<!--tr><td>Telefonvorwahl</td><td><input type="text" size="4" maxlength="1" name="prenumber" value=""></td></tr-->
 <tr><td>Test</td><td><input type="checkbox" name="test" value="1">ja</td></tr>
 <tr><td>Daten</td><td><input type="file" name="Datei"></td></tr>
+<tr><td>Verwendete<br />Zeichecodierung</td><td>
+        <select name="encoding">
+        <option value="auto">Automatisch (versuchen)</option>
+        <option value="UTF-8">UTF-8</option>
+        <option value="ISO-8859-1">ISO-8859-1</option>
+        <option value="ISO-8859-15">ISO-8859-15</option>
+        <option value="Windows-1252">Windows-1252</option>
+        <option value="ASCII">ASCII</option>
+        </select>
+</td></tr>
 <tr><td></td><td><input type="submit" name="ok" value="Import"></td></tr>
 </table>
 </form>
index aae192c0fd31d34bac13e867c06bf6b4fb6fa7a9..3c884d0e8c43e55c24462d310d5f874e19350bd5 100644 (file)
@@ -134,6 +134,26 @@ class myDB extends DB {
         } else { return true; };
     }
 
+    /**
+     * Zeichekodirung der DB ermitteln
+     * 
+     * @return String
+     */
+    function getServerCode() {
+        $sql="SHOW  server_encoding";
+        $rs = $this->getAll($sql);
+        return $rs[0]["server_encoding"];
+    }
+    function getClientCode() {
+        $sql="SHOW  client_encoding";
+        $rs = $this->getAll($sql);
+        return $rs[0]["client_encoding"];
+    }
+    function setClientCode($encoding) {
+        $sql="SET  client_encoding = '$encoding'";
+        $rc = $this->query($sql);
+        return $rc;
+    }
            
 }
 ?>
index 2abec363c65e6caa4257f6a6708072ad1b76462a..e2eb34c5db58a33fa068fea7c227b18e1eacb443 100644 (file)
@@ -93,6 +93,7 @@ $parts = array(
     "partsgroup2" => "3.Warengruppenbezeichnung",
     "partsgroup3" => "4.Warengruppenbezeichnung",
     "partsgroup4" => "5.Warengruppenbezeichnung",
+    "shop"  => "Shopexport vorghesehen",
     );
     
 $contactscrm = array(
@@ -369,5 +370,20 @@ function authuser($dbhost,$dbport,$dbuser,$dbpasswd,$dbname,$cookie) {
     $db->query($sql,"authuser_3");
     return $auth;
 }
+/**
+ * Zeichencode übersetzen
+ *
+ * @param String $txt
+ */
+function translate(&$txt) {
+    if (Auto) {
+        $encoding = mb_detect_encoding($data,"UTF-8,ISO-8859-1,ISO-8859-15,Windows-1252,ASCII");
+        $txt = iconv("$encoding",ServerCode."//TRANSLIT",$txt);
+        //$txt = mb_convert_encoding($txt, ServerCode,"$encoding");
+    } else {
+        $txt = iconv(FileCode,ServerCode."//TRANSLIT",$txt);
+        //$txt = mb_convert_encoding($txt, ServerCode,FileCode);
+    }
+}
 
 ?>
index 961946612a1ae21a67d59a33e41610ca4e3b6d3d..920b31b7f0b801debc43ca85877da1f63d88a109 100644 (file)
@@ -27,11 +27,41 @@ if (!anmelden()) ende("Anmeldung fehlgeschlagen.");
 /* get DB instance */
 $db=$_SESSION["db"]; //new myDB($login);
 
-
 /* just display page or do real import? */
 if ($_POST["ok"]) {
 
     require ("parts_import.php");
+    //Zeichencodierung des Servers
+    $tmpcode = $db->getServerCode();
+    //Leider sind die Benennungen vom Server anders als von mb_detect_encoding
+    if ($tmpcode == "UTF8") {
+         define("ServerCode","UTF-8");
+    } else if ($tmpcode == "LATIN9") {
+         define("ServerCode","ISO-8859-15");
+    } else if ($tmpcode == "LATIN1") {
+         define("ServerCode","ISO-8859-1");
+    } else {
+         define("ServerCode",$tmpcode);
+    }
+    //Zeichensatz sollte gleich sein, sonst ist die Datenkonvertierung nutzlos
+    //DB und LxO müssen ja nicht auf der gleichen Maschiene sein.
+    if($tmpcode<>$db->getClientCode()) {
+        $rc = $db->setClientCode($tmpcode);
+    } 
+
+    // Zeichenkodierung File
+    if ($_POST["encoding"] == "auto") {
+         define("Auto",true);
+         define("Translate",true);
+    } else {
+         define("Auto",false);
+         if ($_POST["encoding"] == ServerCode) {
+            define("Translate",false);
+         } else {
+            define("Translate",true);
+            define("FileCode",$_POST["encoding"]);
+         }
+    }
 
     /* display help */
     if ($_POST["ok"]=="Hilfe") {
@@ -66,24 +96,24 @@ if ($_POST["ok"]) {
     $precision = $_POST["precision"];
     $quotation = $_POST["quotation"];
     $quottype = $_POST["quottype"];
-    $file    = "../users/parts.csv";
-    $table   = "parts";
+    $file    = "parts";
 
     /* no data? */
     if (empty($_FILES["Datei"]["name"]))
         ende ("Kein Datenfile angegeben");
 
     /* copy file */
-    if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$file)) {
+    $dir="../users/";
+    if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$dir.$file.".csv")) {
         ende ("Upload von Datei fehlerhaft.".$_FILES["Datei"]["error"]);
     } 
 
     /* check if file is really there */
-    if (!file_exists("$file") or filesize("$file")==0) 
-        ende("Datenfile ($file) nicht im Ordner gefunden oder leer");
+    if (!file_exists($dir.$file.'.csv') or filesize($dir.$file.'.csv')==0) 
+        ende("Datenfile ($file.csv) nicht im Ordner gefunden oder leer");
 
     /* Zu diesem Zeitpunkt wurde der Artikel Importiert */
-    if (!$db->chkcol($table)) 
+    if (!$db->chkcol($file)) 
         ende("Importspalte konnte nicht angelegt werden");
 
     /* first check all elements */
@@ -94,7 +124,7 @@ if ($_POST["ok"]) {
     $_test["lagerplatz"]=$_POST["lagerplatz"];
 
     /* just print data or insert it, if test is false */
-    import_parts($db, $file, $trenner, $trennzeichen, $parts, FALSE, !$test, $_POST["show"],$_POST);
+    import_parts($db, $dir.$file, $trenner, $trennzeichen, $parts, FALSE, !$test, $_POST["show"],$_POST);
 
 } else {
     $bugrus=getAllBG($db);
@@ -131,7 +161,7 @@ if ($_POST["ok"]) {
 <tr><td>Test</td><td><input type="checkbox" name="test" value="1">ja</td></tr>
 <tr><td>Textupdate</td><td><input type="checkbox" name="TextUpd" value="1">ja</td></tr>
 <tr><td>Warengruppen<br>verbinder</td><td><input type="text" name="wgtrenner" value="!" size="3"></td></tr>
-<tr><td>Shopartikel,<br>falls Feld leer</td><td><input type="radio" name="shop" value="t">ja <input type="radio" name="shop" value="f" checked>nein</td></tr>
+<tr><td>Shopartikel<br />falls nicht &uuml;bergeben</td><td><input type="radio" name="shop" value="t">ja <input type="radio" name="shop" value="f" checked>nein</td></tr>
 <tr><td>Art</td><td><input type="Radio" name="ware" value="W" checked>Ware &nbsp; 
             <input type="Radio" name="ware" value="D">Dienstleistung
             <input type="Radio" name="ware" value="G">gemischt (Spalte 'art' vorhanden)</td></tr>
@@ -145,6 +175,16 @@ if ($_POST["ok"]) {
     <input type="radio" name="bugrufix" value="2">f&uuml;r Artikel ohne passende Bugru
     </td></tr>
 <tr><td>Daten</td><td><input type="file" name="Datei"></td></tr>
+<tr><td>Verwendete<br />Zeichecodierung</td><td>
+        <select name="encoding">
+        <option value="auto">Automatisch (versuchen)</option>
+        <option value="UTF-8">UTF-8</option>
+        <option value="ISO-8859-1">ISO-8859-1</option>
+        <option value="ISO-8859-15">ISO-8859-15</option>
+        <option value="Windows-1252">Windows-1252</option>
+        <option value="ASCII">ASCII</option>
+        </select>
+</td></tr>
 <tr><td></td><td><input type="submit" name="ok" value="Import"></td></tr>
 </table>
 </form>
index 2f0edd0a2930d469fff9fae15426b2b56686613a..0107c39dbc1f3bd86d647e25514107f16919c76d 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 //Henry Margies <h.margies@maxina.de>
 //Holger Lindemann <hli@lx-system.de>
 
@@ -210,7 +210,7 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
     $parts_fld = array_keys($fields);
 
     /* open csv file */
-    $f=fopen("$file","r");
+    $f=fopen($file.'.csv',"r");
     
     /*
      * read first line with table descriptions
@@ -222,7 +222,7 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
         show("weight");     show("image");      show("partsgroup_id");
         show("bg");         show("income_accno"); show("expense_accno");
         show("inventory_accno"); show("microfiche");show("drawing");show("rop");
-        show("assembly");show("makemodel");show("shop");  show("");
+        show("assembly");show("makemodel");  show("shop"); show("");
         show("</tr>\n",false);
     }
 
@@ -250,8 +250,8 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
     while ( ($zeile=fgetcsv($f,120000,$trenner)) != FALSE) {
         $m++;    /* increase line */
         $unit=false;
-   
         unset($pgroup); 
+        unset($partsgroup_id); 
         unset($notes); 
         unset($rop);
         unset($weight);
@@ -274,15 +274,22 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
 
         /* Langtext zusammenbauen */
         if ($zeile[$fldpos["notes"]]) {
-            $notes = preg_replace('/""[^ ]/','"',$zeile[$fldpos["notes"]]);
-            $notes = addslashes($notes);
+            //Kundenspezifisch:
+            //$notes = preg_replace('/""[^ ]/','"',$zeile[$fldpos["notes"]]);
+            $notes = addslashes($zeile[$fldpos["notes"]]);
+            if (Translate) translate($notes);
         }
         if ($zeile[$fldpos["notes1"]]) {
-            $notes1 = preg_replace('/""[^ ]/','"',$zeile[$fldpos["notes1"]]);
+            //Kundenspezifisch:
+            //$notes1 = preg_replace('/""[^ ]/','"',$zeile[$fldpos["notes1"]]);
+            $notes1 = addslashes($zeile[$fldpos["notes1"]]);
+echo "!".$notes1."!<br>";
+            if (Translate) translate($notes1);
+echo "!".$notes1."!<br>";
             if ($notes) {
-                $notes = "\n".addslashes($notes1);
+                $notes .= "\n".$notes1;
             } else {
-                $notes = addslashes($notes1);
+                $notes = $notes1;
             }
         }
 
@@ -294,16 +301,21 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
         if ($fldpos["partsgroup4"]>0 and $zeile[$fldpos["partsgroup4"]]) $pgroup[]=$zeile[$fldpos["partsgroup4"]];
         if (count($pgroup)>0) {
                 $pgname = implode($wgtrenner,$pgroup);
+                if (Translate) translate($pgname);
                 $partsgroup_id = getPartsgroupId($db, $pgname, $insert);
         }
 
         /* sind Hersteller und Modelnummer hinterlegt 
             wenn ja, erfolgt er insert später */
         if (!empty($zeile[$fldpos["makemodel"]]) and !$artikel) { 
-            $hersteller=suchFirma("vendor",$zeile[$fldpos["makemodel"]]);
+            $mm = $zeile[$fldpos["makemodel"]];
+            if (Translate) translate($mm);
+            $hersteller=suchFirma("vendor",$mm);
             $hersteller=$hersteller["cp_cv_id"];
             if (!empty($zeile[$fldpos["model"]])) {
-                $model = $zeile[$fldpos["model"]];
+                $mo = $zeile[$fldpos["model"]];
+                if (Translate) translate($mo);
+                $model = $mo;
                 $makemodel = 't';
             } else { 
                 unset($hersteller);
@@ -378,6 +390,7 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
 
         $description = preg_replace('/""[^ ]/','"',$zeile[$fldpos["description"]]);
         $description = addslashes($description);
+        if (Translate) translate($description);
 
         // rop und weight müssen null oder Zahl sein
         if ($zeile[$fldpos["rop"]]) $rop = 1 * str_replace(",", ".",$zeile[$fldpos["rop"]]);
@@ -385,12 +398,13 @@ function import_parts($db, $file, $trenner, $trennzeichen, $fields, $check, $ins
 
         // Shop-Artikel
         if ($zeile[$fldpos["shop"]]) {
-                $shop = ($zeile[$fldpos["shop"]] > 0)?'t':'f';
+                $shop = (strtolower($zeile[$fldpos["shop"]]=='t'))?'t':'f';
         } else {
                 $shop = $maske["shop"];
         }
 
         // Artikel updaten
+
         if (getPartsid($db,trim($zeile[$fldpos["partnumber"]]))) {
             /* es gibt die Artikelnummer */
             if ($Update) {
index bc79db1002a4b9a745904d1b9331ee04c7054b46..5bb41d6a7e108255be1cff067c71f07bb56ca3d7 100644 (file)
@@ -44,6 +44,8 @@ $db=$_SESSION["db"]; //new myDB($login);
 $crm=checkCRM();
 
 if ($_POST["ok"] == "Import") {
+    $dir = "../users/";
+
     $test=$_POST["test"];
     
     $shipto_fld = array_keys($shiptos);
@@ -54,28 +56,63 @@ if ($_POST["ok"] == "Import") {
     clearstatcache ();
 
     $trenner=($_POST["trenner"])?$_POST["trenner"]:",";
+    if ($trenner=="other") {
+        $trenner=trim($trennzeichen);
+        if (substr($trenner,0,1)=="#") if (strlen($trenner)>1) $trenner=chr(substr($trenner,1));
+    };
 
     if (!empty($_FILES["Datei"]["name"])) { 
         $file=$_POST["ziel"];
-        if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$file."_shipto.csv")) {
+        if (!move_uploaded_file($_FILES["Datei"]["tmp_name"],$dir.$file."_shipto.csv")) {
             $file=false;
             echo "Upload von ".$_FILES["Datei"]["name"]." fehlerhaft. (".$_FILES["Datei"]["error"].")<br>";
         } 
-    } else if (is_file($_POST["ziel"]."_shipto.csv")) {
+    } else if (is_file($dir.$_POST["ziel"]."_shipto.csv")) {
         $file=$_POST["ziel"];
     } else {
         $file=false;
     } 
     if (!$file) ende ("Kein Datenfile");
 
-    if (!file_exists($file."_shipto.csv")) ende($file."_shipto.csv nicht im Ordner gefunden oder leer");
+    if (!file_exists($dir.$file."_shipto.csv")) ende($file."_shipto.csv nicht im Ordner gefunden oder leer");
 
     $employee=chkUsr($_SESSION["employee"]);
     if (!$employee) ende("Benutzer unbekannt");
 
     if (!$db->chkcol($file)) ende("Importspalte konnte nicht angelegt werden");
+    //Zeichencodierung des Servers
+    $tmpcode = $db->getServerCode();
+    //Leider sind die Benennungen vom Server anders als von mb_detect_encoding
+    if ($tmpcode == "UTF8") {
+         define("ServerCode","UTF-8");
+    } else if ($tmpcode == "LATIN9") {
+         define("ServerCode","ISO-8859-15");
+    } else if ($tmpcode == "LATIN1") {
+         define("ServerCode","ISO-8859-1");
+    } else {
+         define("ServerCode",$tmpcode);
+    }
+    //Zeichensatz sollte gleich sein, sonst ist die Datenkonvertierung nutzlos
+    //DB und LxO müssen ja nicht auf der gleichen Maschiene sein.
+    if($tmpcode<>$db->getClientCode()) {
+        $rc = $db->setClientCode($tmpcode);
+    }
+
+    // Zeichenkodierung File
+    if ($_POST["encoding"] == "auto") {
+         define("Auto",true);
+         define("Translate",true);
+    } else {
+         define("Auto",false);
+         if ($_POST["encoding"] == ServerCode) {
+            define("Translate",false);
+         } else {
+            define("Translate",true);
+            define("FileCode",$_POST["encoding"]);
+         }
+    }
 
-    $f=fopen($file."_shipto.csv","r");
+    $f=fopen($dir.$file."_shipto.csv","r");
     $zeile=fgetcsv($f,1000,$trenner);
     $first=true;
 
@@ -85,7 +122,7 @@ if ($_POST["ok"] == "Import") {
     }
     $j=0;
     $n=0;
-    $prenumber=$_POST["prenumber"];
+    //$prenumber=$_POST["prenumber"];
     $zeile=fgetcsv($f,1000,$trenner);
 
     while (!feof($f)){
@@ -116,6 +153,7 @@ if ($_POST["ok"] == "Import") {
             }
             if ($in_fld[$i]=="firma") {
                 if ($id) continue;
+                if (Translate) translate($data);
                 $data=suchFirma($file,$data);
                 if ($data) {
                     $id=$data["cp_cv_id"];
@@ -127,9 +165,10 @@ if ($_POST["ok"] == "Import") {
             if ($data==false or empty($data) or !$data) {
                             $vals.="null,";
             } else {
-                   if (in_array($in_fld[$i],array("shiptofax","shiptophone"))) {
+                /*if (in_array($in_fld[$i],array("shiptofax","shiptophone"))) {
                     $data=$prenumber.$data;
-                } 
+                } */
+                if (Translate) translate($data);
                 $vals.="'".$data."',";
                 // bei jedem gefuellten Datenfeld erhoehen
                 $val_count++;
@@ -167,10 +206,27 @@ if ($_POST["ok"] == "Import") {
 <table>
 <tr><td></td><td><input type="submit" name="ok" value="Hilfe"></td></tr>
 <tr><td>Zieltabelle</td><td><input type="radio" name="ziel" value="customer" checked>customer <input type="radio" name="ziel" value="vendor">vendor</td></tr>
-<tr><td>Trennzeichen</td><td><input type="text" size="2" maxlength="1" name="trenner" value=";"></td></tr>
-<tr><td>Telefonvorwahl</td><td><input type="text" size="4" maxlength="10" name="prenumber" value=""></td></tr>
+<tr><td>Trennzeichen</td><td>
+        <input type="radio" name="trenner" value=";" checked>Semikolon
+        <input type="radio" name="trenner" value=",">Komma
+        <input type="radio" name="trenner" value="#9" checked>Tabulator
+        <input type="radio" name="trenner" value=" ">Leerzeichen
+        <input type="radio" name="trenner" value="other">
+        <input type="text" size="2" name="trennzeichen" value="">
+</td></tr>
+<!--tr><td>Telefonvorwahl</td><td><input type="text" size="4" maxlength="10" name="prenumber" value=""></td></tr-->
 <tr><td>Test</td><td><input type="checkbox" name="test" value="1">ja</td></tr>
 <tr><td>Daten</td><td><input type="file" name="Datei"></td></tr>
+<tr><td>Verwendete<br />Zeichecodierung</td><td>
+        <select name="encoding">
+        <option value="auto">Automatisch (versuchen)</option>
+        <option value="UTF-8">UTF-8</option>
+        <option value="ISO-8859-1">ISO-8859-1</option>
+        <option value="ISO-8859-15">ISO-8859-15</option>
+        <option value="Windows-1252">Windows-1252</option>
+        <option value="ASCII">ASCII</option>
+        </select>
+</td></tr>
 <tr><td></td><td><input type="submit" name="ok" value="Import"></td></tr>
 </table>
 </form>
index 6d5d9a1ad420b1daabbd347862a46aafedc172c9..5dbb0d5174fb84d00b52d3660fb15d250dce455a 100644 (file)
@@ -27,6 +27,7 @@
    <th class="listheading">Rechnungsdatum</th>
    <th class="listheading">Rg. Fälligkeit</th>
    <th class="listheading">Betrag</th>
+   <th class="listheading">Offener Betrag</th>
    <th class="listheading">Zahlbar bis</th>
    <th class="listheading">Kumulierte Gebühren</th>
    <th class="listheading">Zinsen</th>
      <td><input type="checkbox" name="active_[% loop.count %]" value="1" [% IF row.active %]checked[% END %]></td>
      <td><input type="checkbox" name="email_[% loop.count %]" value="1" [% IF row.email %]checked[% END %]></td>
      <td><input type="hidden" name="customername_[% loop.count %]" size="6" value="[% HTML.escape(row.customername) %]">[% HTML.escape(row.customername) %]</td>
-     <td><input type="hidden" name="invnumber_[% loop.count %]" size="6" value="[% HTML.escape(row.invnumber) %]">[% HTML.escape(row.invnumber) %]</td>
+     <td>
+      <input type="hidden" name="invnumber_[% loop.count %]" size="6" value="[% HTML.escape(row.invnumber) %]">
+      <a href="is.pl?action=edit&type=invoice&id=[% row.id | url %]">[% HTML.escape(row.invnumber) %]</a>
+     </td>
      <td><input type="hidden" name="invdate_[% loop.count %]" size="6" value="[% HTML.escape(row.transdate) %]">[% HTML.escape(row.transdate) %]</td>
      <td><input type="hidden" name="inv_duedate_[% loop.count %]" size="6" value="[% HTML.escape(row.duedate) %]">[% HTML.escape(row.duedate) %]</td>
      <td align="right"><input type="hidden" name="amount_[% loop.count %]" size="6" value="[% HTML.escape(row.amount) %]">[% HTML.escape(row.amount) %]</td>
+     <td align="right"><input type="hidden" name="open_amount_[% loop.count %]" size="6" value="[% HTML.escape(row.open_amount) %]">[% HTML.escape(row.open_amount) %]</td>
      <td>[% HTML.escape(row.next_duedate) %]</td>
      <td align="right"><input type="hidden" name="fee_[% loop.count %]" size="6" value="[% HTML.escape(row.fee) %]">[% HTML.escape(row.fee) %]</td>
      <td align="right"><input type="hidden" name="interest_[% loop.count %]" size="6" value="[% HTML.escape(row.interest) %]">[% HTML.escape(row.interest) %]</td>
index cc48a459b8fe62e617acfcdc2b245df102685f41..cdb8c2d4689010d30ef3fd92db06c55e7a3472e1 100644 (file)
@@ -29,6 +29,7 @@
    <th class="listheading"><translate>Invdate</translate></th>
    <th class="listheading"><translate>Inv. Duedate</translate></th>
    <th class="listheading"><translate>Amount</translate></th>
+   <th class="listheading"><translate>Open Amount</translate></th>
    <th class="listheading"><translate>Dunning Duedate</translate></th>
    <th class="listheading"><translate>Total Fees</translate></th>
    <th class="listheading"><translate>Interest</translate></th>
      <td><input type="checkbox" name="active_[% loop.count %]" value="1" [% IF row.active %]checked[% END %]></td>
      <td><input type="checkbox" name="email_[% loop.count %]" value="1" [% IF row.email %]checked[% END %]></td>
      <td><input type="hidden" name="customername_[% loop.count %]" size="6" value="[% HTML.escape(row.customername) %]">[% HTML.escape(row.customername) %]</td>
-     <td><input type="hidden" name="invnumber_[% loop.count %]" size="6" value="[% HTML.escape(row.invnumber) %]">[% HTML.escape(row.invnumber) %]</td>
+     <td>
+      <input type="hidden" name="invnumber_[% loop.count %]" size="6" value="[% HTML.escape(row.invnumber) %]">
+      <a href="is.pl?action=edit&type=invoice&id=[% row.id | url %]">[% HTML.escape(row.invnumber) %]</a>
+     </td>
      <td><input type="hidden" name="invdate_[% loop.count %]" size="6" value="[% HTML.escape(row.transdate) %]">[% HTML.escape(row.transdate) %]</td>
      <td><input type="hidden" name="inv_duedate_[% loop.count %]" size="6" value="[% HTML.escape(row.duedate) %]">[% HTML.escape(row.duedate) %]</td>
      <td align="right"><input type="hidden" name="amount_[% loop.count %]" size="6" value="[% HTML.escape(row.amount) %]">[% HTML.escape(row.amount) %]</td>
+     <td align="right"><input type="hidden" name="open_amount_[% loop.count %]" size="6" value="[% HTML.escape(row.open_amount) %]">[% HTML.escape(row.open_amount) %]</td>
      <td>[% HTML.escape(row.next_duedate) %]</td>
      <td align="right"><input type="hidden" name="fee_[% loop.count %]" size="6" value="[% HTML.escape(row.fee) %]">[% HTML.escape(row.fee) %]</td>
      <td align="right"><input type="hidden" name="interest_[% loop.count %]" size="6" value="[% HTML.escape(row.interest) %]">[% HTML.escape(row.interest) %]</td>
index 4b771e3190e7fe2e1f056343408f1c149c0cb15b..f3a21edc080a5ece39c5a4f147e2c64c1bc86dfc 100644 (file)
@@ -22,7 +22,7 @@
 
     <tr>
      <td>Optionaler Kommentar:</td>
-     <td><input name="comment" size="20"></td>
+     <td><input name="comment" size="60"></td>
     </tr>
    </table>
   </p>
index 0d4ae59d29bfd78096275b9d1cb81c0ce901cc22..d8e1a446117714849bd4200c911d5de749cbf5f5 100644 (file)
@@ -22,7 +22,7 @@
 
     <tr>
      <td><translate>Optional comment</translate>:</td>
-     <td><input name="comment" size="20"></td>
+     <td><input name="comment" size="60"></td>
     </tr>
    </table>
   </p>
index d9ce5cba60e13dc92cd141b0a6f0d658840553ec..9a41c8e396c452368ccbeaaa4bae3b50d5033114 100644 (file)
 
     <tr>
      <th align="right" nowrap>Optionaler Kommentar</th>
-     <td><input name="comment" size="30" value="[% HTML.escape(comment) %]"></td>
+     <td><input name="comment" size="60" value="[% HTML.escape(comment) %]"></td>
     </tr>
 
    </table>
index 2558429add0d36394c02887f84f79e47b0b5c5b5..33bcd76b79e970dfd901be5ff21755cf0afb8d98 100644 (file)
 
     <tr>
      <th align="right" nowrap><translate>Optional comment</translate></th>
-     <td><input name="comment" size="30" value="[% HTML.escape(comment) %]"></td>
+     <td><input name="comment" size="60" value="[% HTML.escape(comment) %]"></td>
     </tr>
 
    </table>