$totalCashPaid = $cashPaid + $ro->selectNow("collectionReport", "amountPaid", "itemNo", $cashierPaid[$x]); $ro->paymentManager($cashierPaid[$x], "PAID", $username, $cashPaid, $datePaid, date("H:i:s"), "0"); } else { $ro->paymentManager($cashierPaid[$x], "PAID", $username, $cashPaid, $datePaid, date("H:i:s"), "0"); } } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "PROFESSIONAL FEE") { $payablesPF = $ro->selectNow("patientCharges", "doctorsPF", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $payablesPF; $ro->paymentManager_creditCard_PF($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0", $payablesPF); $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "doctorsPF", "0"); } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "OT") { $otShare = $ro->selectNow("patientCharges", "otShare", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $otShare; $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0"); } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "ST") { $stShare = $ro->selectNow("patientCharges", "otShare", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $stShare; $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0"); } else { $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $cashUnpaid, $datePaid, date("H:i:s"), "0"); } } } } $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "orNO", $orNO); if ($comp == '') { $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", $datePaid); //date discharged