From cd647bd6ba328530374939e7df3fe6faf5f37ede Mon Sep 17 00:00:00 2001 From: Xenomporio <> Date: Thu, 26 May 2022 21:51:59 +0200 Subject: [PATCH] Bugfixes artikel --- phpwf/plugins/class.yui.php | 5 ++++- www/lib/class.erpapi.php | 14 +++++++++----- www/pages/artikel.php | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/phpwf/plugins/class.yui.php b/phpwf/plugins/class.yui.php index 660f7729..5edd48ec 100644 --- a/phpwf/plugins/class.yui.php +++ b/phpwf/plugins/class.yui.php @@ -8541,7 +8541,10 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise, $more_data4 = $this->app->Secure->GetGET("more_data4"); if($more_data4=="1") $subwhere[] = " v.adresse = 0 AND v.gruppe=0 "; - for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j]; + if (!is_null($subwhere)) + { + for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j]; + } if ($more_data1 == 1) $where = "v.artikel='$id' AND v.geloescht = 0 ".$tmp; diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php index 5f6bdc60..1a7961b3 100644 --- a/www/lib/class.erpapi.php +++ b/www/lib/class.erpapi.php @@ -29948,11 +29948,15 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert, function GetSelectEtiketten($art,$selected="") { $user = $this->app->DB->SelectArr("SELECT * FROM etiketten WHERE verwendenals='$art' ORDER by name"); - for($i=0;$i{$user[$i]['name']}"; - } + + if (!is_null($user)) { + + for($i=0;$i{$user[$i]['name']}"; + } + } return $tpl; } diff --git a/www/pages/artikel.php b/www/pages/artikel.php index 54d5bdee..1c7431f9 100644 --- a/www/pages/artikel.php +++ b/www/pages/artikel.php @@ -81,12 +81,12 @@ class Artikel extends GenArtikel { $menu = ""; - $sqla[] = "(SELECT ew.id, e.name, ew.wert, ew.einheit, '' as eigenschafts, '' as werts, 'DE' as spraches, '' as shops, '' as artikelspezifisch, CONCAT('
app->Conf->WFconf[defaulttheme]}/images/edit.svg\" title=\"Bearbeiten\" border=\"0\"> app->Conf->WFconf[defaulttheme]}/images/delete.svg\" title=\"Löschen\" border=\"0\"> ',IF(e.typ='select' AND ew.vorlage>0,'',CONCAT('app->Conf->WFconf[defaulttheme]}/images/copy.svg\" title=\"Kopieren\" border=\"0\">
'))) as menux, '' as menu + $sqla[] = "(SELECT ew.id, e.name, ew.wert, ew.einheit, '' as eigenschafts, '' as werts, 'DE' as spraches, '' as shops, '' as artikelspezifisch, CONCAT('
app->Conf->WFconf['defaulttheme']}/images/edit.svg\" title=\"Bearbeiten\" border=\"0\"> app->Conf->WFconf['defaulttheme']}/images/delete.svg\" title=\"Löschen\" border=\"0\"> ',IF(e.typ='select' AND ew.vorlage>0,'',CONCAT('app->Conf->WFconf['defaulttheme']}/images/copy.svg\" title=\"Kopieren\" border=\"0\">
'))) as menux, '' as menu FROM artikeleigenschaften e INNER JOIN artikeleigenschaftenwerte ew ON e.id = ew.artikeleigenschaften WHERE ew.artikel = '$id')"; - $sqla[] = "(SELECT ap.id, ae.name, aw.wert, aw.einheit, ap.property_to as eigenschafts, ap.property_value_to as werts, ap.language_to as spraches, s.bezeichnung as shops, IF(ap.article_id > 0, 'ja', '') as artikelspezifisch, IF(ap.article_id = 0, CONCAT('
app->Conf->WFconf[defaulttheme]}/images/forward.svg\" title=\"Eigenschaften Übersetzung\" border=\"0\">'), IF(ap.article_id != 0, CONCAT('
app->Conf->WFconf[defaulttheme]}/images/edit.svg\" title=\"Bearbeiten\" border=\"0\"> app->Conf->WFconf[defaulttheme]}/images/delete.svg\" title=\"Löschen\" border=\"0\">'), '')) as menux, '' as menu + $sqla[] = "(SELECT ap.id, ae.name, aw.wert, aw.einheit, ap.property_to as eigenschafts, ap.property_value_to as werts, ap.language_to as spraches, s.bezeichnung as shops, IF(ap.article_id > 0, 'ja', '') as artikelspezifisch, IF(ap.article_id = 0, CONCAT('
app->Conf->WFconf['defaulttheme']}/images/forward.svg\" title=\"Eigenschaften Übersetzung\" border=\"0\">'), IF(ap.article_id != 0, CONCAT('
app->Conf->WFconf['defaulttheme']}/images/edit.svg\" title=\"Bearbeiten\" border=\"0\"> app->Conf->WFconf['defaulttheme']}/images/delete.svg\" title=\"Löschen\" border=\"0\">'), '')) as menux, '' as menu FROM article_property_translation ap LEFT JOIN shopexport s ON ap.shop_id = s.id LEFT JOIN artikeleigenschaften ae ON ap.property_from = ae.name