$title = $_GET['title']; $paidVia = $_GET['paidVia']; $cashPaid = $_GET['cashPaid']; $batchNo = $_GET['batchNo']; $username = $_GET['username']; $quantity = $_GET['quantity']; $inventoryFrom = $_GET['inventoryFrom']; $room = $_GET['room']; $paycash = $_GET['paycash']; $ro = new storedProcedure(); $cashUnpaid = 0; $phic = 0; $company = 0; $ro->getPatientProfile($registrationNo); if ($title == "MEDICINE" && $ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode) < $quantity) { $ro->getBack("Sorry, Not Enough Stock"); } else { if ($title == "SUPPLIES" && $ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode) < $quantity) { $ro->getBack("Sorry, Not Enough Stock"); } else { if ($title == "MISCELLANEOUS") { $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}®istrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}"); } else { if ($title == "OXYGEN") { $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}®istrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}"); } else { if ($title == "NURSING-CHARGES") { $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}®istrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}"); } else { if ($description == "HAND SCRUBBING FEE/PERSON") { $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}®istrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}");