mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -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)
|
||||
{
|
||||
$item = $event->getOrderItem();
|
||||
$adv = $this->advModel->find($event->getOrderItem()->item_id);
|
||||
$total = $adv->total_sales + $item->piece;
|
||||
$adv->total_sales = $total;
|
||||
$adv->save();
|
||||
if ($item->item_type === 'adv') {
|
||||
$adv = $this->advModel->find($event->getOrderItem()->item_id);
|
||||
$total = $adv->total_sales + $item->piece;
|
||||
$adv->total_sales = $total;
|
||||
$adv->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user