fix: EntertainmentService order_date → received_at 컬럼 수정
This commit is contained in:
@@ -121,13 +121,15 @@ public function getSummary(
|
||||
*/
|
||||
private function getAnnualSales(int $tenantId, string $startDate, string $endDate): float
|
||||
{
|
||||
// TODO: 실제 매출 테이블에서 조회
|
||||
// 현재는 임시로 고정값 반환 (orders 테이블 또는 invoices 테이블에서 합계)
|
||||
return DB::table('orders')
|
||||
// orders 테이블에서 확정된 수주 합계 조회
|
||||
$amount = DB::table('orders')
|
||||
->where('tenant_id', $tenantId)
|
||||
->whereBetween('order_date', [$startDate, $endDate])
|
||||
->where('status_code', 'confirmed')
|
||||
->whereBetween('received_at', [$startDate, $endDate])
|
||||
->whereNull('deleted_at')
|
||||
->sum('total_amount') ?: 30530000000;
|
||||
->sum('total_amount');
|
||||
|
||||
return $amount ?: 30530000000; // 임시 기본값 (305억)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user