WarehouseOffer fixed bugs
This commit is contained in:
@@ -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['offerNumber'] = 'AN' . date('Y') . '-' . str_pad($currentCount + 1, 4, '0', STR_PAD_LEFT);
|
||||||
$this->postData['status'] = 'new';
|
$this->postData['status'] = 'new';
|
||||||
$this->postData['version'] = 1;
|
$this->postData['version'] = 1;
|
||||||
|
$this->postData['alternativePositions'] = json_encode([]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function afterCreate($id): void
|
protected function afterCreate(WarehouseOfferModel $offer): void
|
||||||
{
|
{
|
||||||
|
$id = $offer->id;
|
||||||
$offer = WarehouseOfferModel::get($id);
|
$offer = WarehouseOfferModel::get($id);
|
||||||
$this->createHistoryEntry($id, 1, $offer);
|
$this->createHistoryEntry($id, 1, $offer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user