Esempio n. 1
0
$description = $_GET['description'];
$sellingPrice = $_GET['sellingPrice'];
$discount = $_GET['discount'];
$timeCharge = $_GET['timeCharge'];
$room = $_GET['room'];
$chargeBy = $_GET['chargeBy'];
$service = $_GET['service'];
$title = $_GET['title'];
$paidVia = $_GET['paidVia'];
$cashPaid = $_GET['cashPaid'];
$batchNo = $_GET['batchNo'];
$username = $_GET['username'];
$inventoryFrom = $_GET['inventoryFrom'];
$ro = new database1();
if ($ro->selectNow("inventory", "quantity", "inventoryCode", $chargesCode) < 1) {
    $ro->getBack("Sorry, Out of Stock");
}
echo "\n<style type='text/css'>\n.qty {\n\tborder: 1px solid #000;\n\tcolor: #000;\n\theight:25px;\n\twidth: 100px;\n\tpadding:4px 4px 4px 10px;\n}\n\n</style>\n\n";
//addCharges.php
echo "<br><Br><Br>";
echo "<form method='get' action='http://" . $ro->getMyUrl() . "/COCONUT/availableSupplies/phicCovered.php'>";
echo "<center><div style='border:1px solid #000000; width:400px; height:100px;\t'>";
echo "<br><table border=0 cellpadding=0 cellspacing=0>";
echo "<tr>";
echo "<td><font size=4>Quantity:</font></td>";
echo "<td><input type=text class='qty' name='quantity' value='1'></td>";
echo "</tr>";
echo "<tr><td>&nbsp;</td></tr>";
echo "<tr>";
echo "<td><input type='button' class='button' value=' Back  '\nonClick='javascript: history.go(-1)' style='border:1px solid #000000; background-color:transparent;'></td>";
echo "<td>&nbsp;&nbsp;</td>";
Esempio n. 2
0
<?php

include "../../myDatabase1.php";
$packageName = $_GET['packageName'];
$packagePrice = $_GET['packagePrice'];
$phicPrice = $_GET['phicPrice'];
$ro = new database1();
if ($packageName == "") {
    $ro->getBack("Pls Type the Package Name");
} else {
    if ($packagePrice == "") {
        $ro->getBack("Pls Type the Package Price");
    } else {
        echo "\n\n<frameset cols='150%,150%' framespacing='0' border='1'>\n   <frame src='http://" . $ro->getMyUrl() . "/COCONUT/hospitalPackage/searchCharges.php?packageName={$packageName}&packagePrice={$packagePrice}&phicPrice={$phicPrice}'  scrolling=no frameborder=1 framespacing=1 name='selection' />\n   <frame src='http://" . $ro->getMyUrl() . "/COCONUT/hospitalPackage/showAddedPackage_update.php?packageName={$packageName}' />\n\n</frameset>\n\n\n";
    }
}
Esempio n. 3
0
$username = $_GET['username'];
$discount = $_GET['discount'];
$inventoryFrom = $_GET['inventoryFrom'];
$room = $_GET['room'];
$quantity = $_GET['quantity'];
$remarks = $_GET['remarks'];
$ro = new database1();
$ro->getPHIClimit_setter($ro->selectNow("registrationDetails", "casetype", "registrationNo", $registrationNo));
$ro->getPatientProfile($registrationNo);
// kunin ang data ng patient
//$totalPrice = $sellingPrice * $quantity; //kunin ang total price
//selectNow($table,$cols,$identifier,$identifierData)
//$ro->selectNow("inventory","phic","inventoryCode",$chargesCode); // ttgnan kung cover ba ng philhealth ung medicine
//number_format($ro->getCurrentPHIC_check($registrationNo,"MEDICINE") - $ro->getPHIClimit_medicine(),2)
if ($quantity == 0) {
    $ro->getBack("Zero is not Allowed");
} else {
    $remainingLimit = $ro->getPHIClimit_suppliesOnly() - $ro->getTotal("phic", "SUPPLIES", $registrationNo);
    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