mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-12 08:16:06 -06:00
#4413 asfaltdunyasi bug
This commit is contained in:
parent
1f018e8acd
commit
5be3d9ed0c
@ -16,9 +16,11 @@ class AddTotalSales
|
|||||||
public function handle(CreatedOrderDetail $event)
|
public function handle(CreatedOrderDetail $event)
|
||||||
{
|
{
|
||||||
$item = $event->getOrderItem();
|
$item = $event->getOrderItem();
|
||||||
|
if ($item->item_type === 'adv') {
|
||||||
$adv = $this->advModel->find($event->getOrderItem()->item_id);
|
$adv = $this->advModel->find($event->getOrderItem()->item_id);
|
||||||
$total = $adv->total_sales + $item->piece;
|
$total = $adv->total_sales + $item->piece;
|
||||||
$adv->total_sales = $total;
|
$adv->total_sales = $total;
|
||||||
$adv->save();
|
$adv->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user