Lieferschein/Paketmarke: Check for valid options before loadVersandModul

This commit is contained in:
Andreas Palm 2023-02-06 13:08:53 +01:00
parent ef8b79ff19
commit 9defde81ae

View File

@ -459,6 +459,10 @@ class Lieferschein extends GenLieferschein
WHERE l.id=$id
AND v.aktiv = 1 AND v.ausprojekt = 0 AND v.modul != ''
ORDER BY v.projekt DESC LIMIT 1");
if (empty($result['modul']) || empty($result['id'])) {
$this->app->Tpl->addMessage('error', 'Bitte zuerst eine gültige Versandart auswählen', false, 'PAGE');
return;
}
$versandmodul = $this->app->erp->LoadVersandModul($result['modul'], $result['id']);
$versandmodul->Paketmarke('TAB1', 'lieferschein', $id);
$this->app->Tpl->Parse('PAGE',"tabview.tpl");