From: Jan Büren Date: Wed, 3 Mar 2010 13:29:36 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.1beta1~48 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/964b978f634c75359b1f55a134a36b66f6dd822c?hp=6670c0a6720f82726f65bfdec384563634f869c4 Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp --- diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index fd019eedc..cd7c1eeab 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1777,14 +1777,17 @@ sub poso { map { $form->{$_} = $saved_vars{$_} } keys %saved_vars; - &prepare_order; - # prepare_order assumes that the discount is in db-notation (0.05) and not user-notation (5) - # and therefore multiplies the values by 100 in the case of reading from db or making an order from several quotation, so we convert this back into percent-notation for the user interface by multiplying with 0.01 + # and therefore multiplies the values by 100 in the case of reading from db or making an order + # from several quotation, so we convert this back into percent-notation for the user interface by multiplying with 0.01 + # ergänzung 03.10.2010 muss vor prepare_order passieren (s.a. Svens Kommentar zu Bug 1017) + # das parse_amount wird oben schon ausgeführt, deswegen an dieser stelle raus (wichtig: kommawerte bei discount testen) for my $i (1 .. $form->{rowcount}) { - $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 0.01); + $form->{"discount_$i"} /=100; }; + &prepare_order; + # format amounts for my $i (1 .. $form->{rowcount} - 1) { map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description unit); diff --git a/lxo-import/addressB.php b/lxo-import/addressB.php old mode 100644 new mode 100755 index 2341fdd81..5fec8b1a6 --- a/lxo-import/addressB.php +++ b/lxo-import/addressB.php @@ -109,7 +109,16 @@ if ($ok) while (!feof($f)){ continue; }; $data=trim($data); - $data=mb_convert_encoding($data,"ISO-8859-15","auto"); + // 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 + // UTF-8 MUSS als erstes stehen, da ansonsten die Prüfung bei ISO-8859-1 aufhört ... + // 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"); + } //$data=htmlentities($data); $data=addslashes($data); if ($in_fld[$i]==$file."number") { // customernumber || vendornumber