Merge branch 'add-order-frontend' into 'master'

Updated WarehouseOrderRequest

See merge request fronk/thetool!927
This commit is contained in:
Luca Haid
2025-01-20 14:46:01 +00:00

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";