WarehouseOffer fixed bugs

This commit is contained in:
Luca Haid
2025-07-21 07:24:40 +02:00
parent 409d7532df
commit b0f72e58f3

View File

@@ -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);
}