Merge pull request #151 from exciler/bugfix_articlethumbnail

Bugfix articlethumbnail
This commit is contained in:
OpenXE-ERP 2024-08-28 16:02:30 +02:00 committed by GitHub
commit d176ff757c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -37437,7 +37437,8 @@ function Firmendaten($field,$projekt="")
SELECT dv.datei AS datei
FROM datei_stichwoerter AS ds
JOIN (SELECT datei, MAX(id) AS id FROM datei_version GROUP BY datei) AS dv ON dv.datei = ds.datei
WHERE ds.objekt LIKE 'Artikel' AND
JOIN datei AS d on ds.datei = d.id
WHERE ds.objekt LIKE 'Artikel' AND d.geloescht = 0
ds.parameter = '%d' AND
(ds.subjekt LIKE 'Shopbild' OR ds.subjekt LIKE 'Druckbild' OR ds.subjekt LIKE 'Bild')
ORDER BY ds.subjekt LIKE 'Shopbild' DESC, ds.subjekt LIKE 'Druckbild' DESC, ds.sort

View File

@ -3525,7 +3525,7 @@ class Briefpapier extends SuperFPDF {
($this->doctype == "gutschrift" && $this->getStyleElement("gutschrift_artikelbild")) ||
($this->doctype == "angebot" && $this->getStyleElement("angebot_artikelbild"))
){
$datei = $this->app->DB->Select("SELECT datei FROM `datei_stichwoerter` WHERE subjekt='Shopbild' AND objekt='Artikel' AND parameter='" . $item['artikel'] . "' ORDER by sort ASC LIMIT 1");
$datei = $this->app->erp->GetArtikelStandardbild($item['artikel'],true);
if(!empty($datei)){
$datei = $this->app->DB->Select("SELECT id FROM datei_version WHERE datei = '$datei' ORDER BY id DESC LIMIT 1");
}

View File

@ -8432,7 +8432,7 @@ padding: 10px;\">
FROM `datei_stichwoerter` AS `ds`
INNER JOIN `datei_version` AS `dv` ON dv.datei = ds.datei
INNER JOIN `datei` AS `d` ON dv.datei = d.id AND IFNULL(d.geloescht, 0) = 0
WHERE ds.objekt LIKE 'artikel' AND ds.parameter = '%d'
WHERE ds.objekt LIKE 'artikel' AND ds.parameter = '%d' AND d.geloescht = 0
AND
(
ds.subjekt like 'Shopbild'