feat : rank
This commit is contained in:
@@ -110,7 +110,7 @@ class Order extends Model
|
|||||||
*/
|
*/
|
||||||
public function getDiscountsByCycleIdAndKitchenId(int $cycleId, int $kitchenId): mixed
|
public function getDiscountsByCycleIdAndKitchenId(int $cycleId, int $kitchenId): mixed
|
||||||
{
|
{
|
||||||
return $this->where('cycle_id',$cycleId)->where('kitchen_id',$kitchenId)->where('status',OrderCode::FINISH)->sum('discounts') ?? 0;
|
return $this->where('cycle_id',$cycleId)->where('kitchen_id',$kitchenId)->where('status',OrderCode::FINISH)->sum('discount_price') ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user