Example #1
0
<?php

include "../../../myDatabase2.php";
$itemNo = $_GET['itemNo'];
$countItem = count($itemNo);
$registrationNo = $_GET['registrationNo'];
$mode = $_GET['mode'];
$ro = new database2();
if ($mode == "cash2company1") {
    for ($x = 0; $x < $countItem; $x++) {
        $ro->getPatientChargesToEdit($itemNo[$x]);
        $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_cashUnpaid();
        $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", $totalTransfer);
        $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "cashUnpaid", 0);
    }
} else {
    if ($mode == "company1_to_cash") {
        for ($x = 0; $x < $countItem; $x++) {
            $ro->getPatientChargesToEdit($itemNo[$x]);
            $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_cashUnpaid();
            $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "cashUnpaid", $totalTransfer);
            $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", 0);
        }
    } else {
        if ($mode == "company2company1") {
            for ($x = 0; $x < $countItem; $x++) {
                $ro->getPatientChargesToEdit($itemNo[$x]);
                $totalTransfer = $ro->selectNow("patientCharges", "company1", "itemNo", $itemNo[$x]) + $ro->patientCharges_company();
                $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company1", $totalTransfer);
                $ro->EditNow("patientCharges", "itemNo", $itemNo[$x], "company", 0);
            }
Example #2
0
<?php

include "../../myDatabase2.php";
$registrationNo = $_GET['registrationNo'];
$targetAmount = $_GET['targetAmount'];
$ro = new database2();
$itemz = preg_split("/\\_/", $ro->getMaximumTotal_rBanny($registrationNo, "Room and Board"));
$ro->getPatientChargesToEdit($itemz[1]);
if ($ro->getTotal("cashUnpaid", "Room And Board", $registrationNo) > 0) {
    echo "<br><Br><br><br><br>";
    echo "<font color=red>R-Banny is now Calculating Room</font><br>";
    echo "Total:&nbsp;" . $itemz[0];
    echo "<br>";
    echo "Item#:&nbsp;" . $itemz[1];
    if ($targetAmount >= $itemz[0]) {
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", "0");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "Company", "0");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "phic", $itemz[0]);
    } else {
        //echo "<br><Br><br><br><font color=blue size=5>R-Banny is Having a trouble in Computation</font>";
        $newCash = $itemz[0] - $targetAmount;
        $newPHIC = $ro->selectNow("patientCharges", "total", "itemNo", $itemz[1]) - $newCash;
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", $newCash);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "Company", "0");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "phic", $newPHIC);
    }
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/rBanny/consumedRoom.php?registrationNo={$registrationNo}&targetAmount={$targetAmount}");
} else {
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/rBanny/consumedMeds.php?registrationNo={$registrationNo}&targetAmount={$targetAmount}");
}
Example #3
0
<?php

include "../../myDatabase2.php";
$itemNo = $_GET['itemNo'];
$username = $_GET['username'];
$ro = new database2();
$ro->coconutDesign();
$ro->getPatientChargesToEdit($itemNo);
echo "<br><Br><center><font color=red>\n" . $ro->patientCharges_Description() . "\n</font><Br></center>";
$ro->coconutFormStart("get", "hmoPrice1.php");
$ro->coconutHidden("itemNo", $itemNo);
$ro->coconutBoxStart("500", "100");
echo "<br>";
echo "<table border=0>";
echo "<tR>";
echo "<Td>HMO Price&nbsp;</tD>";
echo "<td>";
$ro->coconutTextBox("hmoPrice", $ro->selectNow("patientCharges", "hmoPrice", "itemNo", $itemNo));
echo "</td>";
echo "</tr>";
echo "<tR>";
echo "<Td>Company&nbsp;</tD>";
echo "<td>";
$ro->coconutTextBox("company", $ro->selectNow("patientCharges", "company", "itemNo", $itemNo));
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<Br><BR>";
$ro->coconutButton("Proceed");
$ro->coconutBoxStop();
$ro->coconutFormStop();