From d56adb64d26e8797614ec62cf89b4a373b8ca227 Mon Sep 17 00:00:00 2001 From: faser2k Date: Fri, 28 Feb 2025 11:50:53 +0100 Subject: [PATCH] always use currency from auftrag for auftrag_positionen --- www/pages/ajax.php | 6 ------ www/pages/artikel.php | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/www/pages/ajax.php b/www/pages/ajax.php index 7dc3993d..eef23e93 100644 --- a/www/pages/ajax.php +++ b/www/pages/ajax.php @@ -3069,12 +3069,6 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku $adresse = $document['adresse'];// $this->app->DB->Select("SELECT adresse FROM $smodule WHERE id='$sid' LIMIT 1"); $waehrung = $document['waehrung'];//$this->app->DB->Select("SELECT waehrung FROM $smodule WHERE id='$sid' LIMIT 1"); - $posanz = (int)$this->app->DB->Select("SELECT count(id) FROM $smodule"."_position WHERE $smodule = '$sid'"); - - if($posanz == 0) - { - $waehrung = ''; - } $anzeigebrutto = false; if($smodule == 'auftrag' || $smodule == 'rechnung' || $smodule == 'gutschrift' || $smodule == 'angebot' || $smodule == 'proformarechnung') diff --git a/www/pages/artikel.php b/www/pages/artikel.php index 42253b8a..f479295c 100644 --- a/www/pages/artikel.php +++ b/www/pages/artikel.php @@ -3699,8 +3699,8 @@ class Artikel extends GenArtikel { $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'")) { + if (!is_null($smodule)) { + if ($this->app->DB->Select("SHOW COLUMNS FROM `$smodule` LIKE 'waehrung'")) { $waehrung = $this->app->DB->Select("SELECT waehrung FROM $smodule WHERE id='$sid' LIMIT 1"); } }