From 72b76be0625bd682091ee63dc733fea15c7a8a2f Mon Sep 17 00:00:00 2001 From: Xenomporio <> Date: Mon, 30 May 2022 21:13:58 +0200 Subject: [PATCH] Bugfix artikel ajax --- www/pages/artikel.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/pages/artikel.php b/www/pages/artikel.php index 5cb70b0d..0f290f8c 100644 --- a/www/pages/artikel.php +++ b/www/pages/artikel.php @@ -3679,8 +3679,10 @@ class Artikel extends GenArtikel { $id = $this->app->DB->Select("SELECT id FROM artikel WHERE nummer='$id' AND intern_gesperrt!=1 LIMIT 1"); $warnung = 1-(int)$this->app->DB->Select("SELECT if(rabatt=1,1,vkmeldungunterdruecken) FROM artikel WHERE id = '$id' LIMIT 1"); - $adresse = $this->app->DB->Select("SELECT adresse FROM $smodule WHERE id='$sid' LIMIT 1"); + if (!is_null($id)) { + $adresse = $this->app->DB->Select("SELECT adresse FROM $smodule WHERE id='$sid' LIMIT 1"); + } if (!is_null($module)) { if ($this->app->DB->Select("SHOW COLUMNS FROM `$module` LIKE 'waehrung'")) { @@ -3688,7 +3690,9 @@ class Artikel extends GenArtikel { } } - $posanz = (int)$this->app->DB->Select("SELECT count(id) FROM $smodule"."_position WHERE $smodule = '$sid'"); + if (!is_null($id)) { + $posanz = (int)$this->app->DB->Select("SELECT count(id) FROM $smodule"."_position WHERE $smodule = '$sid'"); + } //if($posanz == 0){ // $waehrung = ''; //}