Updated WarehouseOrderRequest

This commit is contained in:
Luca Haid
2025-01-20 15:45:42 +01:00
parent 8e2b959af4
commit 38d5cd1861

View File

@@ -106,8 +106,13 @@ class WarehouseOrderRequestController extends TTCrud {
protected function afterCreate($postData): void {
if ($_SERVER['HTTP_HOST'] == 'localhost') return;
if (is_numeric($postData['ware'])) {
$article = WarehouseArticleModel::get(intval($postData['ware']));
$postData['ware'] = $article->title;
}
$email = new Emailnotification();
$paddedId = str_pad($this->mod->id, 5, '0', STR_PAD_LEFT);
$paddedId = str_pad($postData['id'], 5, '0', STR_PAD_LEFT);
$email->setSubject("TheTool: Neue Interne Bestellung #$paddedId");
$body = "Hallo,\n\nes wurde eine neue interne Bestellung erstellt.\n\n";