bestellung show wareneingang in minidetail

This commit is contained in:
OpenXE 2023-05-07 18:40:22 +02:00
parent 9002a66085
commit 33d2ca9497
2 changed files with 27 additions and 2 deletions

View File

@ -7062,7 +7062,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
$more_data7 = $this->app->Secure->GetGET("more_data7");
// SQL statement
$sql = "SELECT
$sql = "SELECT SQL_CALC_FOUND_ROWS
b.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',b.id,'\" />') AS `auswahl`,
IF(b.status='storniert',CONCAT(b.belegnr),b.belegnr) AS `belegnr`,

View File

@ -776,6 +776,7 @@ class Bestellung extends GenBestellung
$tmp3->DisplayNew('PDFARCHIV','Men&uuml;',"noAction");
}
/*
$wareneingangsbelege = $this->app->DB->SelectFirstCols("SELECT
CONCAT('<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"',if(r.status='storniert',' title=\"Wareneingangsbeleg storniert\"><s>','>'),if(r.document_number='0' OR document_number='','ENTWURF',r.document_number),if(r.status='storniert','</s>',''),'</a>&nbsp;<a href=\"index.php?module=receiptdocument&action=pdf&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/pdf.svg\" title=\"Wareneingangsbeleg PDF\" border=\"0\"></a>&nbsp;
<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/edit.svg\" title=\"Wareneingangsbeleg bearbeiten\" border=\"0\"></a>') as wareneingangsbeleg
@ -787,6 +788,30 @@ class Bestellung extends GenBestellung
else{
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
}
*/
$sql = "SELECT
CONCAT('<a href =\"index.php?module=wareneingang&action=distriinhalt&id=',pa.id,'\">',pa.id,'</a>') as wareneingang
FROM
paketannahme pa
INNER JOIN paketdistribution pd ON
pd.paketannahme = pa.id
INNER JOIN bestellung_position bp ON
pd.bestellung_position = bp.id
INNER JOIN bestellung b ON
b.id = bp.bestellung
WHERE
b.id = $id
GROUP BY
pa.id";
// echo($sql);
$wareneingangsbelege = $this->app->DB->SelectArr($sql);
if(!empty($wareneingangsbelege)){
$this->app->Tpl->Add('WARENEINGANGSBELEG', implode('<br />', array_column($wareneingangsbelege , 'wareneingang' )));
}
else{
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
}
$this->app->Tpl->Set('ID', $id);