From 054bb882da0121e85d6e5e536ebcdcc9942b490f Mon Sep 17 00:00:00 2001 From: ibs Date: Sun, 31 Dec 2023 17:32:59 +0100 Subject: [PATCH] =?UTF-8?q?An=20Angeboten,=20Rechnungen,=20etc.=20l=C3=A4s?= =?UTF-8?q?st=20sich=20der=20Rabatt=20in=20der=20ersten=20Zeile=20nicht=20?= =?UTF-8?q?=C3=A4ndern,=20der=20Server=20liefert=20einen=20Fehler=20500=20?= =?UTF-8?q?weil=20ein=20Mysql=20Query=20versucht,=20in=20der=20Rechnungsta?= =?UTF-8?q?belle=20"keinrabatterlaubt"=20zu=20setzen.=20Der=20ganze=20Code?= =?UTF-8?q?=20ist=20mir=20ein=20R=C3=A4tsel,=20ich=20w=C3=BCsste=20nicht,?= =?UTF-8?q?=20wof=C3=BCr=20der=20gut=20sein=20k=C3=B6nnte.=20Bei=20mir=20f?= =?UTF-8?q?unktioniert=20es=20ohne=20diese=203=20Zeilen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpwf/plugins/class.yui.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index ecf58f9c..6ac7fcd3 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -736,9 +736,10 @@ class YUI { if($value == '')$value = '0'; $this->app->DB->Update("UPDATE $table SET rabatt='$value',keinrabatterlaubt=1 WHERE id='$id' LIMIT 1"); $result = $this->app->DB->Select("SELECT ".$this->FormatPreis('rabatt')." FROM $table WHERE id='$id' LIMIT 1"); - $sort = $this->app->DB->Select("SELECT sort FROM $table WHERE id='$id' LIMIT 1"); - $parent = $this->app->DB->Select("SELECT $module FROM $table WHERE id='$id' LIMIT 1"); - if($parent && $sort == 1)$this->app->DB->Update("UPDATE $module SET rabatt = '$value',keinrabatterlaubt=1 WHERE id = '$parent' LIMIT 1"); + + //$sort = $this->app->DB->Select("SELECT sort FROM $table WHERE id='$id' LIMIT 1"); + //$parent = $this->app->DB->Select("SELECT $module FROM $table WHERE id='$id' LIMIT 1"); + //if($parent && $sort == 1)$this->app->DB->Update("UPDATE $module SET rabatt = '$value',keinrabatterlaubt=1 WHERE id = '$parent' LIMIT 1"); if(in_array($module, array('auftrag','rechnung','gutschrift'))) { $tmptable_value = $this->app->DB->Select("SELECT $module FROM $table WHERE id = '$id' LIMIT 1");