X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c9fe9e1cf781276904dd9978562d201d4351b55c..e69e3657:/lxo-import/import_lib.php diff --git a/lxo-import/import_lib.php b/lxo-import/import_lib.php index 6fef1ecf0..9e25c3dc6 100644 --- a/lxo-import/import_lib.php +++ b/lxo-import/import_lib.php @@ -1,4 +1,4 @@ - "Einheit", "weight" => "Gewicht in Benutzerdefinition", "onhand" => "Lagerbestand", + "bin" => "Lagerplatz", "notes" => "Beschreibung", "notes1" => "Beschreibung", //"makemodel" => "Hersteller", @@ -168,7 +169,7 @@ global $db; } function getKdId() { -// die nächste freie Kunden-/Lieferantennummer holen +// die nächste freie Kunden-/Lieferantennummer holen global $db,$file,$test; if ($test) { return "#####"; } $sql1="select * from defaults"; @@ -254,7 +255,8 @@ $land=array("DEUTSC"=>"D","FRANKR"=>"F","SPANIE"=>"ES","ITALIE"=>"I","HOLLAN"=>" function mkland($data) { global $land; - $data=strtr($data,array("Ö"=>"OE","Ä"=>"AE","Ü"=>"UE","ö"=>"OE","ä"=>"AE","ü"=>"UE","ß"=>"SS")); + $data=strtr($data,array("Ö"=>"OE","Ä"=>"AE","Ü"=>"UE","ö"=>"OE","ä"=>"AE","ü"=>"UE","ß"=>"SS", + 'Ö'=>'OE','Ä'=>'AE','Ü'=>'UE','ö'=>'OE','ä'=>'AE','ü'=>'UE','ß'=>'SS')); $data=strtoupper(substr($data,0,6)); $cntr=$land[$data]; return (strlen($cntr)>0)?$cntr:substr($data,0,3); @@ -300,7 +302,7 @@ function anmelden() { $dbuser=$hits[1]; preg_match("/'host'[ ]*=> '(.+)'/",$tmp,$hits); $dbhost=($hits[1])?$hits[1]:"localhost"; - preg_match("/'port'[ ]*=> '(.+)'/",$tmp,$hits); + preg_match("/'port'[ ]*=> '?(.+)'?/",$tmp,$hits); $dbport=($hits[1])?$hits[1]:"5432"; preg_match("/[ ]*\\\$self->\{cookie_name\}[ ]*=[ ]*'(.+)'/",$tmp,$hits); $cookiename=$hits[1]; @@ -381,3 +383,9 @@ function authuser($dbhost,$dbport,$dbuser,$dbpasswd,$dbname,$cookie) { return $auth; } +function getLager($db) { + $sql="select w.description as ort,bin.id,bin.description as platz from warehouse w left join bin on w.id=bin.warehouse_id"; + $rs=$db->getAll($sql,"getLager"); + return $rs; +} +?>