@ -697,9 +697,10 @@ class ActivityController extends Controller
'm_version_gantt.name_version',
'm_version_gantt.name_version',
DB::raw('user_names.user_name as user_name'),
DB::raw('user_names.user_name as user_name'),
DB::raw('SUM(report_activity_material.qty) as qty'),
DB::raw('SUM(report_activity_material.qty) as qty'),
DB::raw('SUM(assign_material_to_activity.qty_planning) as qty_planning'),
// DB::raw('SUM(assign_material_to_activity.qty_planning) as qty_planning'),
'assign_material_to_activity.id as join_third_id'
'assign_material_to_activity.id as join_third_id'
)
)
->addSelect(DB::raw('(SELECT SUM(assign_material_to_activity.qty_planning) FROM assign_material_to_activity WHERE assign_material_to_activity.activity_id = report_activity_material.activity_id) as qty_planning'))