$total_amount = Pay::where('purchase_id', $purchase_id)
->where('item_id', '!=', $excluded_item_id) // Exclude the specific item
->sum('amount');
$total_amount = Pay::where('purchase_id', $purchase_id)
->where('item_id', '!=', $excluded_item_id) // Exclude the specific item
->sum('amount');