本文整理匯總了PHP中database1::addCharges_cash_autoDispense方法的典型用法代碼示例。如果您正苦於以下問題:PHP database1::addCharges_cash_autoDispense方法的具體用法?PHP database1::addCharges_cash_autoDispense怎麽用?PHP database1::addCharges_cash_autoDispense使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類database1
的用法示例。
在下文中一共展示了database1::addCharges_cash_autoDispense方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
$ro->addCharges_cash("UNPAID", $registrationNo, $packageIncluded[1], $packageIncluded[0], $chargesPrice, "0.00", $chargesPrice, $chargesPrice, "0.00", "0.00", $ro->getSynapseTime(), date("Y-m-d"), $username, $services, $packageIncluded[2], "Cash", "0.00", $batchNo, $ro->selectNow("hospitalPackage", "packageIncluded_qty", "packageNo", $packageNo[$x]), $ro->selectNow("inventory", "inventoryLocation", "inventoryCode", $packageIncluded[1]), $ro->getRegistrationDetails_branch(), $ro->getRegistrationDetails_room());
} else {
if ($packageIncluded[2] == "MEDICINE") {
$services = "Medication";
$medPrice = preg_split("/\\_/", $ro->selectNow("hospitalPackage", "Added", "packageNo", $packageNo[$x]));
//original
//$ro->addCharges_cash("UNPAID",$registrationNo,$packageIncluded[1],$packageIncluded[0],$medPrice[1],"0.00",$medPrice[1],$medPrice[1],"0.00","0.00",$ro->getSynapseTime(),date("Y-m-d"),$username,$services,$packageIncluded[2],"Cash","0.00",$batchNo,$ro->selectNow("hospitalPackage","packageIncluded_qty","packageNo",$packageNo[$x]),"PHARMACY",$ro->getRegistrationDetails_branch(),$ro->getRegistrationDetails_room());
if ($ro->selectNow("inventory", "autoDispense", "inventoryCode", $packageIncluded[1]) == "yes") {
//check autoDispense
$currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $packageIncluded[1]);
// current qty ng meds sa inventory
$newQTY = $currentQTY - $itemQTY;
// less sa inventory as in qty after ibawas ung desired qty
$ro->editNow("inventory", "inventoryCode", $packageIncluded[1], "quantity", $newQTY);
// update qty sa database
$ro->addCharges_cash_autoDispense("UNPAID", $registrationNo, $packageIncluded[1], $packageIncluded[0], $medPrice[1], "0.00", "0.00", "0.00", "0.00", "0.00", $ro->getSynapseTime(), date("Y-m-d"), $username, $services, $packageIncluded[2], "Cash", "0.00", $batchNo, $itemQTY, $ro->selectNow("inventory", "inventoryLocation", "inventoryCode", $packageIncluded[1]), $ro->getRegistrationDetails_branch(), $ro->getRegistrationDetails_room(), "dispensedBy_" . $username, $ro->getSynapseTime());
} else {
$ro->addCharges_cash("UNPAID", $registrationNo, $packageIncluded[1], $packageIncluded[0], $medPrice[1], "0.00", "0.00", "0.00", "0.00", "0.00", $ro->getSynapseTime(), date("Y-m-d"), $username, $services, $packageIncluded[2], "Cash", "0.00", $batchNo, $itemQTY, $ro->selectNow("inventory", "inventoryLocation", "inventoryCode", $packageIncluded[1]), $ro->getRegistrationDetails_branch(), $ro->getRegistrationDetails_room());
}
} else {
if ($packageIncluded[2] == "SUPPLIES") {
$services = "Others";
$supPrice = $ro->selectNow("hospitalPackage", "unitcost", "packageNo", $packageNo[$x]);
//original
//$ro->addCharges_cash("UNPAID",$registrationNo,$packageIncluded[1],$packageIncluded[0],$supPrice,"0.00",$supPrice,$supPrice,"0.00","0.00",$ro->getSynapseTime(),date("Y-m-d"),$username,$services,$packageIncluded[2],"Cash","0.00",$batchNo,$ro->selectNow("hospitalPackage","packageIncluded_qty","packageNo",$packageNo[$x]),"PHARMACY",$ro->getRegistrationDetails_branch(),$ro->getRegistrationDetails_room());
if ($ro->selectNow("inventory", "autoDispense", "inventoryCode", $packageIncluded[1]) == "yes") {
$currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $packageIncluded[1]);
// current qty ng meds sa inventory
$newQTY = $currentQTY - $itemQTY;
// less sa inventory as in qty after ibawas ung desired qty
$ro->editNow("inventory", "inventoryCode", $packageIncluded[1], "quantity", $newQTY);
示例2: date
if ($ro->selectNow("inventory", "phic", "inventoryCode", $chargesCode) == "yes" && $ro->getPatientRecord_phic() == "YES") {
//cover at pasok pa sa phic limit ng meds
//$totalPrice = (($sellingPrice * 0.15) + $sellingPrice) * $quantity; //phic price
$totalPrice = $sellingPrice * $quantity;
// cashPrice muna for temporary
if ($remainingLimit >= $totalPrice) {
//cover lahat
//check autoDispense????
if ($ro->selectNow("inventory", "autoDispense", "inventoryCode", $chargesCode) == "yes") {
$currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode);
// current qty ng meds/sup sa inventory
$newQTY = $currentQTY - $quantity;
// less sa inventory as in qty after ibawas ung desired qty ng user
$ro->editNow("inventory", "inventoryCode", $chargesCode, "quantity", $newQTY);
// update qty sa database
$ro->addCharges_cash_autoDispense($status, $registrationNo, $chargesCode, $description, $sellingPrice * 0.15 + $sellingPrice, "0", $totalPrice, "0", $totalPrice, "0", $timeCharge, date("Y-m-d"), $username, $service, $title, $paidVia, $cashPaid, $batchNo, $quantity, $inventoryFrom, $ro->getRegistrationDetails_branch(), $room, "dispensedBy_" . $username, $ro->getSynapseTime());
} else {
//nka cash price pa e2 instead n nka philhealth price
$ro->addCharges_cash($status, $registrationNo, $chargesCode, $description, $sellingPrice, "0", $totalPrice, "0", $totalPrice, "0", $timeCharge, date("Y-m-d"), $username, $service, $title, $paidVia, $cashPaid, $batchNo, $quantity, $inventoryFrom, $ro->getRegistrationDetails_branch(), $room, $remarks, "");
}
} else {
//hindi lahat cover so hahatiin ung total pra maging eksakto sa allowed phic supplies limit
$excess = $totalPrice - $remainingLimit;
//check autoDispense????
if ($ro->selectNow("inventory", "autoDispense", "inventoryCode", $chargesCode) == "yes") {
$currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode);
// current qty ng meds/sup sa inventory
$newQTY = $currentQTY - $quantity;
// less sa inventory as in qty after ibawas ung desired qty ng user
$ro->editNow("inventory", "inventoryCode", $chargesCode, "quantity", $newQTY);
// update qty sa database