Exemplo n.º 1
0
                                             $totalDiscount = 0;
                                         } else {
                                             $totalDiscount = 0;
                                         }
                                     } else {
                                         $totalDiscount = 0;
                                     }
                                     $grandTotal = $currentTotal - $totalDiscount;
                                 }
                                 //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, $totalDiscount, $grandTotal, $grandTotal, 0, 0, $timeCharge, $dateCharge, $username, $service, $title, $paidVia, $cashPaid, $batchNo, $quantity, $inventoryFrom, $ro->getRegistrationDetails_branch(), $room, "dispensedBy_" . $username, $ro->getSynapseTime());
                                 } else {
                                     $ro->addCharges_cash($status, $registrationNo, $chargesCode, $description, $sellingPrice, $totalDiscount, $grandTotal, $grandTotal, 0, 0, $timeCharge, $dateCharge, $username, $service, $title, $paidVia, $cashPaid, $batchNo, $quantity, $inventoryFrom, $ro->getRegistrationDetails_branch(), $room);
                                 }
                                 //ORIGINAL
                                 //$ro->addCharges_cash($status,$registrationNo,$chargesCode,$description,$sellingPrice,$totalDiscount,$grandTotal,$grandTotal,0,0,$timeCharge,$dateCharge,$username,$service,$title,$paidVia,$cashPaid,$batchNo,$quantity,$inventoryFrom,$ro->getRegistrationDetails_branch(),$room);
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
<?php

include "../../../storedProcedure.php";
require_once '../authentication.php';
$date = $_POST['date'];
$username = $_POST['username'];
$makeDo = $_POST['makeDo'];
$ro = new storedProcedure();
echo "<html>";
echo "<head>";
if ($makeDo == "putStatus") {
    if (isset($_POST['requestNo']) && isset($_POST['status'])) {
        $requestNo = $_POST['requestNo'];
        $status = $_POST['status'];
        $ro->editNow("admin2request", "requestNo", $requestNo, "status", $status . "_" . $username);
        $ro->editNow("admin2request", "requestNo", $requestNo, "status_time", $ro->getSynapseTime());
        $ro->editNow("admin2request", "requestNo", $requestNo, "status_date", date("Y-m-d"));
        $ro->editNow("admin2request", "requestNo", $requestNo, "status_encodeIn", getenv("REMOTE_ADDR") . "-" . php_uname("n"));
    } else {
    }
}
?>



<link rel="stylesheet" type="text/css" href="http://<?php 
echo $ro->getMyUrl();
?>
/COCONUT/flow/rickyCSS1.css" />

<script type='text/javascript'>
Exemplo n.º 3
0
<?php

include "../../../storedProcedure.php";
$registrationNo = $_GET['registrationNo'];
$protoType = $_GET['protoType'];
$room = $_GET['room'];
$username = $_GET['username'];
$ro = new storedProcedure();
if ($protoType == "Discharged") {
    $ro->EditNow("room", "Description", $room, "Status", "Vacant");
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", date("Y-m-d"));
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", $ro->getSynapseTime());
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "unregisteredBy", $username);
    //if( $ro->selectNow("registrationDetails","type","registrationNo",$registrationNo) == "OPD" ) {
    $ro->lockedAccountItems($registrationNo, date('Y-m-d H:i:s'), $username);
    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", "yes_" . $username);
    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", date("Y-m-d"));
    //}else { }
} else {
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", "");
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", "");
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "room", "");
    $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "unregisteredBy", "");
    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", "");
    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", "");
}
echo "\n<script type='text/javascript'>";
if ($protoType == "Discharged") {
    echo "alert('Patient is now Discharged');";
} else {
    echo "alert('Patient is now Active');";
Exemplo n.º 4
0
echo "<script>";
?>

function playBuzzer(){
        $("body").append("<embed src='/COCONUT/bell.mp3' autostart='true' loop='false' width='2' height='0'></embed>");
}

<?php 
if ($ro->totalRequest($date) != $ro->selectNow("admin2request_forApproved_total", "currentTotal", "code", "1")) {
    if ($ro->totalRequest($date) > $ro->selectNow("admin2request_forApproved_total", "currentTotal", "code", "1")) {
        ?>
playBuzzer();
<?php 
    } else {
    }
    $ro->editNow("admin2request_forApproved_total", "code", "1", "currentTotal", $ro->totalRequest($date));
} else {
}
?>

<?php 
if ($ro->totalRequest($date) > 0) {
    echo "   \nvar title = document.title;\ndocument.title = (title == 'For Approval' ? '(" . $ro->totalRequest($date) . ") New Request' : 'For Approval');";
} else {
    echo "document.title = 'Waiting for Request' ";
}
echo "</script>";
echo "</head>";
echo "<body>";
$ro->getTable_admin($date, $username);
echo "</body>";