Merge branch 'WarehouseOffer/fix-bugs' into 'master'

WarehouseOffer fixed bugs

See merge request fronk/thetool!1562
This commit is contained in:
Luca Haid
2025-07-21 05:24:54 +00:00
@@ -53,11 +53,13 @@ class WarehouseOfferController extends TTCrud
$this->postData['offerNumber'] = 'AN' . date('Y') . '-' . str_pad($currentCount + 1, 4, '0', STR_PAD_LEFT);
$this->postData['status'] = 'new';
$this->postData['version'] = 1;
$this->postData['alternativePositions'] = json_encode([]);
return true;
}
protected function afterCreate($id): void
protected function afterCreate(WarehouseOfferModel $offer): void
{
$id = $offer->id;
$offer = WarehouseOfferModel::get($id);
$this->createHistoryEntry($id, 1, $offer);
}