X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=pepper%2Fshopimport_db.php;h=d7d16c7aef1d9029eb0e088b03b8560c8aa327ae;hb=4970b5b2d9752c974e9359e1f4548bce45ba6017;hp=c24d608c24c18ee3561c174d6008b97afe0e03ee;hpb=f33a755c10df3cb6c1b419ed568488aea7f35650;p=kivitendo-erp.git
diff --git a/pepper/shopimport_db.php b/pepper/shopimport_db.php
index c24d608c2..d7d16c7ae 100644
--- a/pepper/shopimport_db.php
+++ b/pepper/shopimport_db.php
@@ -217,11 +217,11 @@ global $db;
} else { return false; }
}
function updartikel($data,$id) {
-global $db,$bugru;
+global $db,$bugru,$mwst;
$sql ="update artikel set Preis=%01.2f,Gewicht=%0.2f,MwSt_Satz=%0.2f,letzteAenderung=now(),";
$sql.="Name='%s',Beschreibung='%s',Lagerbestand=%d where Artikel_ID=%d";
$preis=($data["sellprice"]>0)?$data["sellprice"]:$data["stdprice"];
- $preis+=$preis/100*$bugru[$data["bugru"]];
+ if ($mwst) $preis+=$preis/100*$bugru[$data["bugru"]];
$sql=sprintf($sql,$preis,$data["weight"],$bugru[$data["bugru"]],$data["description"],$data["notes"],$data["onhand"],$id);
$rc=$db->query($sql);
$sql="update artikel_kategorie set FK_Kategorie_ID=".$data["categories_id"]." where FK_Artikel_ID=$id";
@@ -229,7 +229,7 @@ global $db,$bugru;
echo "+++
";
}
function chkartikel($data) {
-global $db,$shop2erp;
+global $db,$shop2erp,$mwst;
if ($data["partnumber"]=="") { echo "Artikelnummer fehlt!
"; return false;};
$sql="select * from artikel A left join artikel_kategorie K on A.Artikel_id=K.FK_Artikel_ID where Artikel_Nr like '".$data["partnumber"]."'";
$rs=$db->getAll($sql,DB_FETCHMODE_ASSOC);
@@ -241,7 +241,7 @@ global $db,$shop2erp;
else { $data["picname"]=""; };
}
$preis=($data["sellprice"]>0)?$data["sellprice"]:$data["stdprice"];
- $preis+=$preis/100*$bugru[$data["bugru"]];
+ if ($mwst) $preis+=$preis/100*$bugru[$data["bugru"]];
if ($rs[0]["Preis"]<>$preis) { updartikel($data,$rs[0]["Artikel_ID"]); }
else if ($rs[0]["Gewicht"]<>$data["weight"]) { updartikel($data,$rs[0]["Artikel_ID"]); }
else if ($rs[0]["Name"]<>$data["description"]) { updartikel($data,$rs[0]["Artikel_ID"]); }