Exemple #1
0
<?php

include "../../myDatabase3.php";
$itemNo = $_GET['itemNo'];
$count = count($itemNo);
$registrationNo = $_GET['registrationNo'];
$type = $_GET['type'];
$ro = new database3();
$price = "";
for ($x = 0; $x < $count; $x++) {
    echo $itemNo[$x];
    if ($type == "OPD") {
        if ($ro->selectNow("patientCharges", "title", "itemNo", $itemNo[$x]) == "MEDICINE" || $ro->selectNow("patientCharges", "title", "itemNo", $itemNo[$x]) == "SUPPLIES") {
            $sellingPrice = $ro->selectNow("inventory", "opdPrice", "inventoryCode", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]));
        } else {
            $sellingPrice = $ro->selectNow("availableCharges", "OPD", "chargesCode", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]));
        }
    } else {
        if ($ro->selectNow("patientCharges", "title", "itemNo", $itemNo[$x]) == "MEDICINE" || $ro->selectNow("patientCharges", "title", "itemNo", $itemNo[$x]) == "SUPPLIES") {
            $sellingPrice = $ro->selectNow("inventory", "ipdPrice", "inventoryCode", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]));
        } else {
            $sellingPrice = $ro->selectNow("availableCharges", "PRIVATE", "chargesCode", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]));
        }
    }
    $qty = $ro->selectNow("patientCharges", "quantity", "itemNo", $itemNo[$x]);
    $total = $sellingPrice * $qty;
    $ro->updatePriceNow_inventory($registrationNo, $itemNo[$x], $sellingPrice, $total);
}
$ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/updatePrice.php?registrationNo={$registrationNo}");
Exemple #2
0
<?php

include "../../../myDatabase3.php";
$stockCardNo = $_GET['stockCardNo'];
$startLetter = $_GET['startLetter'];
$count = count($stockCardNo);
$ro = new database3();
/*
for($x=0;$x<$count;$x++) {
echo $stockCardNo[$x]."- ".$ro->selectNow("inventoryStockCard","description","stockCardNo",$stockCardNo[$x])."<Br>";
}

echo "<br>";
echo "<a href='stockCardList2.php?stockCardNo1=".$stockCardNo[0]."&stockCardNo2=".$stockCardNo[1]."'>Merge ".$stockCardNo[0]." to ".$stockCardNo[1]."</a>";
*/
for ($x = 0; $x < $count; $x++) {
    $ro->editNow("inventory", "stockCardNo", $stockCardNo[$x], "stockCardNo", end($stockCardNo));
    $ro->editNow("patientCharges", "stockCardNo", $stockCardNo[$x], "stockCardNo", end($stockCardNo));
}
$ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/inventory/stockCard/stockCardList.php?startLetter={$startLetter}");
<?php

include "../../../myDatabase3.php";
$invoiceNo = $_GET['invoiceNo'];
$ro = new database3();
$paymentMode = $ro->selectNow("vouchers", "paymentMode", "invoiceNo", $invoiceNo);
if ($paymentMode == "cash") {
    //do nothing
} else {
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/accounting/voucher/voucherOutput.php?invoiceNo={$invoiceNo}");
}
<?php

include "../myDatabase3.php";
$discountType = $_POST['discountType'];
$ro = new database3();
$ro->addDiscountTypez($discountType);
$ro->gotoPage("http://" . $ro->getMyUrl() . "/Maintenance/addDiscountType.php");
Exemple #5
0
    $ro->coconutHidden("chargeBy", $chargeBy);
    $ro->coconutHidden("service", $service);
    $ro->coconutHidden("title", $title);
    $ro->coconutHidden("paidVia", $paidVia);
    $ro->coconutHidden("cashPaid", $cashPaid);
    $ro->coconutHidden("batchNo", $batchNo);
    $ro->coconutHidden("username", $username);
    $ro->coconutHidden("quantity", $quantity);
    $ro->coconutHidden("inventoryFrom", $inventoryFrom);
    $ro->coconutHidden("paycash", $paycash);
    $ro->coconutHidden("remarks", $remarks);
    echo "<Br>";
    echo "<table>";
    echo "<tr>";
    echo "<td>Balance</td>";
    echo "<td>";
    $ro->coconutTextBox("sellingPrice", "");
    echo "</td>";
    echo "</tr>";
    echo "</table>";
    echo "<br>";
    $ro->coconutButton("Proceed");
    $ro->coconutBoxStop();
    $ro->coconutFormStop();
} else {
    if ($title == "OT" || $title == "ST") {
        $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/therapyCharges.php?status=UNPAID&registrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&quantity={$quantity}&inventoryFrom={$inventoryFrom}&paycash={$paycash}&remarks={$remarks}");
    } else {
        $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/addCharges.php?status=UNPAID&registrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&quantity={$quantity}&inventoryFrom={$inventoryFrom}&paycash={$paycash}&remarks={$remarks}");
    }
}
Exemple #6
0
        $deductions = $doctorsPF + $otShare;
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", "0.00");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashPaid", $chargesTotal - $deductions);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "status", "PAID");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "paidBy", $username);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "timePaid", date("H:i:s"));
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "datePaid", $datePaid);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "control_datePaid", $datePaid);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "orNO", $orNO);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "reportShift", $shift);
        $ro->addCollectionReport($registrationNo, $itemz[1], $shift, "OPD", $chargesTotal, $orNO, "OPD", $username, date("H:i:s"), $datePaid, "Cash");
        $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", date("Y-m-d"));
        //date discharged
        $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", date("H:i:s"));
        //time discharged
        $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", "Synapse System");
        //set as MGH [LOCKED ACCOUNT]
        $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", date("Y-m-d"));
        //set as MGH [LOCKED ACCOUNT]
        $ro->addDischargeHistory($registrationNo, "Closed", date("H:i:s"), date("Y-m-d"), $username);
    }
    $excessPaid1 = $excessPaid;
    $exactPaid = $itemz[0];
}
$excessPaid2 = $excessPaid1;
if ($excessPaid2 > 0) {
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/Cashier/rBanny_cash.php?registrationNo={$registrationNo}&cashInputted={$cashInputted}&targetAmount={$excessPaid1}&username={$username}&orNO={$orNO}&datePaid={$datePaid}&shift={$shift}");
} else {
    //$ro->editNow("registrationDetails","registrationNo",$registrationNo,"balance",$ro->getTotal("cashUnpaid","",$registrationNo));
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/individualPayment/toDispense.php?registrationNo={$registrationNo}&module=PHARMACY&username={$username}&month=" . date("m") . "&day=" . date("d") . "&year=" . date("Y") . "&fromTime_hour=00&fromTime_minutes=00&fromTime_seconds=00&toTime_hour=24&toTime_minutes=00&toTime_seconds=00&nod=");
}
Exemple #7
0
                    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", "Synapse System");
                    //set as MGH [LOCKED ACCOUNT]
                    $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", $datePaid);
                    //set as MGH [LOCKED ACCOUNT]
                    $ro->addDischargeHistory($registrationNo, "Closed", date("H:i:s"), date("Y-m-d"), $username);
                }
                $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "control_datePaid", $year . "-" . $month . "-" . $day);
                $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "reportShift", $shift);
                $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "cardType", $cardType);
                $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "creditCardNo", $creditCardNo);
                $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "paidVia", $paidVia);
                if ($paymentType != "Cash") {
                    $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "paidVia", $paymentType);
                    $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "orNO", $orNO);
                } else {
                    echo "";
                    //credit card
                }
                //echo $ro->getItemNo_total($cashierPaid[$x]);
                //echo $cashierPaid[$x];
            }
        } else {
            $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/Cashier/rBanny_cash.php?registrationNo={$registrationNo}&cash=&targetAmount={$totalPaid}&cashInputted={$totalPaid}&username={$username}&orNO={$orNO}&datePaid={$datePaid}&shift={$shift}");
        }
    } else {
        echo "not UNPAID";
    }
} else {
    echo "The Patient is not OPD nor walkin";
}
//$ro->gotoPage("http://".$ro->getMyUrl()."/COCONUT/patientProfile/individualPayment/toDispense.php?registrationNo=$registrationNo&module=PHARMACY&username=$username&month=".date("m")."&day=".date("d")."&year=".date("Y")."&fromTime_hour=00&fromTime_minutes=00&fromTime_seconds=00&toTime_hour=24&toTime_minutes=00&toTime_seconds=00&nod=");
$itemz = preg_split("/\\_/", $ro->getHighestTotal_rBanny($registrationNo));
echo "<Br>";
echo "Item#:&nbsp;" . $itemz[1];
echo "<br>Price:&nbsp;" . $itemz[0];
echo "<br><b>Analyzing &nbsp;" . $ro->selectNow("patientCharges", "description", "itemNo", $itemz[1]) . "</b>";
//check kung ilan na lang ung natitira sa target amount kpg bnwsan na sa current discount ng px
$pxDisc = $ro->getCurrentDiscount_rBanny($registrationNo) - $targetAmount;
//check kung mas mataas pa ung total ng item kaysa sa natitirang sa targetAmount
if ($itemz[0] >= $pxDisc) {
    $newCash = $ro->selectNow("patientCharges", "cashUnpaid", "itemNo", $itemz[1]) - ($targetAmount - $ro->getTotal("discount", "", $registrationNo));
    if ($newCash > 1) {
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", $newCash);
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "discount", $targetAmount - $ro->getTotal("discount", "", $registrationNo));
        echo "1";
    } else {
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", "0");
        $ro->editNow("patientCharges", "itemNo", $itemz[1], "discount", $ro->selectNow("patientCharges", "total", "itemNo", $itemz[1]));
        echo "2";
    }
} else {
    $excessDisc = $itemz[0] - $targetAmount;
    $exactDisc = $itemz[0] - $excessDisc;
    $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", $excessDisc);
    $ro->editNow("patientCharges", "itemNo", $itemz[1], "discount", $exactDisc);
    echo "3";
}
if ($ro->getTotal("discount", "", $registrationNo) != $targetAmount) {
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/rBanny_discount.php?registrationNo={$registrationNo}&discount={$targetAmount}");
} else {
    echo "<br><Br><Br><center><font size=5 color=red><i>Discount Completed</i></font></center>";
}
Exemple #9
0
<?php

include "../../myDatabase3.php";
$registrationNo = $_GET['registrationNo'];
$username = $_GET['username'];
$from = $_GET['from'];
$ro = new database3();
echo $ro->accumulateBalance($registrationNo);
$ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientProfile_handler.php?registrationNo={$registrationNo}&username={$username}&from={$from}");
Exemple #10
0
$username = $_GET['username'];
$ro = new database3();
$stockCardNo = $ro->selectNow("inventory", "stockCardNo", "inventoryCode", $inventoryCode);
$description = $ro->selectNow("inventory", "description", "inventoryCode", $inventoryCode);
$genericName = $ro->selectNow("inventory", "genericName", "inventoryCode", $inventoryCode);
$unitcost = $ro->selectNow("inventory", "unitcost", "inventoryCode", $inventoryCode);
$quantity = $ro->selectNow("inventory", "quantity", "inventoryCode", $inventoryCode);
$expiration = $ro->selectNow("inventory", "expiration", "inventoryCode", $inventoryCode);
$addedBy = $ro->selectNow("inventory", "addedBy", "inventoryCode", $inventoryCode);
$dateAdded = $ro->selectNow("inventory", "dateAdded", "inventoryCode", $inventoryCode);
$timeAdded = $ro->selectNow("inventory", "timeAdded", "inventoryCode", $inventoryCode);
$inventoryLocation = $ro->selectNow("inventory", "inventoryLocation", "inventoryCode", $inventoryCode);
$inventoryType = $ro->selectNow("inventory", "inventoryType", "inventoryCode", $inventoryCode);
$branch = $ro->selectNow("inventory", "branch", "inventoryCode", $inventoryCode);
$transition = $ro->selectNow("inventory", "transition", "inventoryCode", $inventoryCode);
$remarks = $ro->selectNow("inventory", "remarks", "inventoryCode", $inventoryCode);
$preparation = $ro->selectNow("inventory", "preparation", "inventoryCode", $inventoryCode);
$phic = $ro->selectNow("inventory", "phic", "inventoryCode", $inventoryCode);
$pricing = $ro->selectNow("inventory", "Added", "inventoryCode", $inventoryCode);
$criticalLevel = $ro->selectNow("inventory", "criticalLevel", "inventoryCode", $inventoryCode);
$supplier = $ro->selectNow("inventory", "supplier", "inventoryCode", $inventoryCode);
$phicPrice = $ro->selectNow("inventory", "phicPrice", "inventoryCode", $inventoryCode);
$companyPrice = $ro->selectNow("inventory", "companyPrice", "inventoryCode", $inventoryCode);
$autoDispense = $ro->selectNow("inventory", "autoDispense", "inventoryCode", $inventoryCode);
$invoiceNo = $ro->selectNow("inventory", "invoiceNo", "inventoryCode", $inventoryCode);
if ($inventoryType == "medicine") {
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/masterfile/EDIT/editInventory.php?username={$username}&inventoryCode={$inventoryCode}&stockCardNo={$stockCardNo}&description={$description}&genericName={$genericName}&unitcost={$unitcost}&quantity={$quantity}&expiration={$expiration}&addedBy={$addedBy}&dateAdded={$dateAdded}&timeAdded={$timeAdded}&inventoryLocation={$inventoryLocation}&inventoryType={$inventoryType}&branch={$branch}&transition={$transition}&remarks={$remarks}&preparation={$preparation}&phic={$phic}&pricing={$pricing}&criticalLevel={$criticalLevel}&supplier={$supplier}&phicPrice={$phicPrice}&companyPrice={$companyPrice}&autoDispense={$autoDispense}&invoiceNo={$invoiceNo}");
} else {
    $suppliesUnitcost = $ro->selectNow("inventory", "suppliesUNITCOST", "inventoryCode", $inventoryCode);
    $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/masterfile/EDIT/editInventory_supplies.php?username={$username}&inventoryCode={$inventoryCode}&stockCardNo={$stockCardNo}&description={$description}&sellingPrice={$unitcost}&suppliesUNITCOST={$suppliesUnitcost}&quantity={$quantity}&dateAdded={$dateAdded}&inventoryLocation={$inventoryLocation}&phic={$phic}&remarks={$remarks}&supplier={$supplier}&criticalLevel={$criticalLevel}");
}
Exemple #11
0
<?php

include "../../../myDatabase3.php";
$date = $_GET['date'];
$shift = $_GET['shift'];
$attributes = $_GET['attributes'];
$amount = $_GET['amount'];
$attributeName = $_GET['attributeName'];
$attributeValue = $_GET['attributeValue'];
$ro = new database3();
if ($attributes != "") {
    $ro->addDailyCashierAttribute($attributes, $amount, $shift, $date);
} else {
}
if ($attributeName != "") {
    $ro->addDailyCashierAttribute($attributeName, $attributeValue, $shift, $date);
} else {
}
$ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/Cashier/cashierReport/attributes.php?date={$date}&shift={$shift}");