Revision fbe32862
Von Holger Lindemann vor mehr als 15 Jahren hinzugefügt
lxo-import/import_lib.php | ||
---|---|---|
1 |
<? |
|
1 |
<?php
|
|
2 | 2 |
/* |
3 | 3 |
Funktionsbibliothek für den Datenimport in Lx-Office ERP |
4 | 4 |
|
... | ... | |
68 | 68 |
"unit" => "Einheit", |
69 | 69 |
"weight" => "Gewicht in Benutzerdefinition", |
70 | 70 |
"onhand" => "Lagerbestand", |
71 |
"bin" => "Lagerplatz", |
|
71 | 72 |
"notes" => "Beschreibung", |
72 | 73 |
"notes1" => "Beschreibung", |
73 | 74 |
//"makemodel" => "Hersteller", |
... | ... | |
168 | 169 |
} |
169 | 170 |
|
170 | 171 |
function getKdId() { |
171 |
// die nächste freie Kunden-/Lieferantennummer holen
|
|
172 |
// die n?chste freie Kunden-/Lieferantennummer holen
|
|
172 | 173 |
global $db,$file,$test; |
173 | 174 |
if ($test) { return "#####"; } |
174 | 175 |
$sql1="select * from defaults"; |
... | ... | |
254 | 255 |
|
255 | 256 |
function mkland($data) { |
256 | 257 |
global $land; |
257 |
$data=strtr($data,array("Ö"=>"OE","Ä"=>"AE","Ü"=>"UE","ö"=>"OE","ä"=>"AE","ü"=>"UE","ß"=>"SS")); |
|
258 |
$data=strtr($data,array("Ö"=>"OE","Ä"=>"AE","Ü"=>"UE","ö"=>"OE","ä"=>"AE","ü"=>"UE","ß"=>"SS", |
|
259 |
'?'=>'OE','?'=>'AE','?'=>'UE','?'=>'OE','?'=>'AE','?'=>'UE','?'=>'SS')); |
|
258 | 260 |
$data=strtoupper(substr($data,0,6)); |
259 | 261 |
$cntr=$land[$data]; |
260 | 262 |
return (strlen($cntr)>0)?$cntr:substr($data,0,3); |
... | ... | |
381 | 383 |
return $auth; |
382 | 384 |
} |
383 | 385 |
|
386 |
function getLager($db) { |
|
387 |
$sql="select w.description as ort,bin.id,bin.description as platz from warehouse w left join bin on w.id=bin.warehouse_id"; |
|
388 |
$rs=$db->getAll($sql,"getLager"); |
|
389 |
return $rs; |
|
390 |
} |
|
391 |
?> |
lxo-import/partsB.php | ||
---|---|---|
55 | 55 |
clearstatcache (); |
56 | 56 |
|
57 | 57 |
$test = $_POST["test"]; |
58 |
$lager = $_POST["lager"]; |
|
58 | 59 |
$TextUpd = $_POST["TextUpd"]; |
59 | 60 |
$trenner = ($_POST["trenner"])?$_POST["trenner"]:","; |
60 | 61 |
$trennzeichen = ($_POST["trennzeichen"])?$_POST["trennzeichen"]:""; |
... | ... | |
96 | 97 |
$_test=$_POST; |
97 | 98 |
$_test["precision"]=-1; |
98 | 99 |
$_test["quotation"]=0; |
100 |
$_test["lager"]=$_POST["lager"]; |
|
101 |
$_test["lagerplatz"]=$_POST["lagerplatz"]; |
|
99 | 102 |
//$_test["shop"]="n"; |
100 | 103 |
//$_test["wgtrenner"]="!"; |
101 | 104 |
$err = import_parts($db, $file, $trenner, $trennzeichen, $parts, TRUE, FALSE, FALSE,$_test); |
... | ... | |
110 | 113 |
|
111 | 114 |
} else { |
112 | 115 |
$bugrus=getAllBG($db); |
116 |
$lagerplatz=getLager($db); |
|
113 | 117 |
?> |
114 | 118 |
|
115 | 119 |
<p class="listtop">Artikelimport für die ERP<p> |
... | ... | |
155 | 159 |
<input type="radio" name="bugrufix" value="1" checked>für alle Artikel verwenden |
156 | 160 |
<input type="radio" name="bugrufix" value="2">für Artikel ohne passende Bugru |
157 | 161 |
</td></tr> |
162 |
<tr><td>Default Lager<br></td><td><select name="lager"> |
|
163 |
<? if ($lagerplatz) foreach ($lagerplatz as $lp) { ?> |
|
164 |
<option value="<?= $lp["id"] ?>"><?= $lp["ort"] ?>-<?= $lp["platz"] ?> |
|
165 |
<? } ?> |
|
166 |
</select> |
|
167 |
<input type="radio" name="lagerfix" value="1" checked>für alle Artikel verwenden |
|
168 |
<input type="radio" name="lagerfix" value="2">für Artikel ohne passendes Lager |
|
169 |
</td></tr> |
|
158 | 170 |
<tr><td>Daten</td><td><input type="file" name="Datei"></td></tr> |
159 | 171 |
<tr><td></td><td><input type="submit" name="ok" value="Import"></td></tr> |
160 | 172 |
</table> |
Auch abrufbar als: Unified diff
Lager