diff --git a/app/Http/Controllers/HealthCareSheetController.php b/app/Http/Controllers/HealthCareSheetController.php index 3191b39..f0baf9b 100755 --- a/app/Http/Controllers/HealthCareSheetController.php +++ b/app/Http/Controllers/HealthCareSheetController.php @@ -1022,6 +1022,7 @@ class HealthCareSheetController extends Controller $i->billed_quantity += $item->quantity; } $item->unit_price = $prescriptions[$itemIndex]['unit_price']; + $item->billed_quantity = null; } if ($relation == 'exams') { @@ -1058,7 +1059,6 @@ class HealthCareSheetController extends Controller $item->insurer_paid_amount = $parts->insurer_part * $item->unit_price * ($item->quantity ?? 1) * ($item->unit_quantity ?? 1); $item->created_at = $item->updated_at = $datetime; $item->billed = true; - $item->billed_quantity = null; $item->push(); if (!empty($i->billed_quantity) && $i->billed_quantity != $i->quantity) {