<?php include "../../../myDatabase3.php"; $invoiceNo = $_GET['invoiceNo']; $ro = new database3(); echo "<Br>"; echo "<center><font size=5>Protacio Hospital</font>"; echo "<br><br><br>"; echo "<font size=4>Accounts Payable Voucher</font>"; echo "<Table border='0' width='80%'>"; echo "</tr>"; echo "<td align='right'>AP.NO.<input type='text' style='border-top:0px; border-right:0px; border-left:0px; border-bottom:1px solid #000000; width:15%;' value='" . $ro->selectNow("purchaseJournal", "vouchersCode", "invoiceNo", $invoiceNo) . "'></td>"; echo "</tr>"; $date = $ro->selectNow("purchaseJournal", "date", "invoiceNo", $invoiceNo); $yearDate = substr($date, "0", "4"); $monthDate = substr($date, "5", "2"); $dayDate = substr($date, "6", "2"); echo "</tr>"; echo "<td align='right'>Date.<input type='text' style='border-top:0px; border-right:0px; align:center; border-left:0px; border-bottom:1px solid #000000; width:15%;' value='{$yearDate}-{$monthDate}-{$dayDate}'></td>"; echo "</tr>"; echo "</table>"; echo "<Table border='1' cellspacing=0 width='80%'>"; echo "<tr>"; echo "<th>PARTICULARS</th>"; echo "</tr>"; $ro->purchaseJournal_items($invoiceNo); echo "</table>"; echo "<Br><br>"; echo "<Table border='1' width='80%' cellspacing=0>"; echo "<tr>"; echo "<th>Description</th>";
<?php include "../../myDatabase3.php"; $stockCardNo = $_GET['stockCardNo']; $ro = new database3(); //$stockCardNo = "1720"; $highestCost = $ro->salesCost("MAX", $stockCardNo); $lowestCost = $ro->salesCost("MIN", $stockCardNo); $average = $highestCost + $lowestCost; $average1 = $average / 2; echo $ro->selectNow("inventoryStockCard", "description", "stockCardNo", $stockCardNo); echo "<br>"; echo "Highest: " . $highestCost; echo "<br>"; echo "Lowest: " . $lowestCost; echo "<br>"; echo "Average: " . $average1; echo "<br>"; echo "Dispense: " . $ro->countDispense($stockCardNo); echo "<br>"; echo "Cost of Sales " . number_format($ro->countDispense($stockCardNo) * $average1, 2);
$username = $_GET['username']; $orNO = $_GET['orNO']; $datePaid = $_GET['datePaid']; $shift = $_GET['shift']; $ro = new database3(); $excessPaid1 = 0; $doctorsPF; $otShare; $deductions; //echo ( $cash - $targetAmount ); echo "<center><br>"; $itemz = preg_split("/\\_/", $ro->getMaximumTotal_rBanny_cash_cashier($registrationNo)); echo "<Br>"; echo "Item#: " . $itemz[1]; echo "<br>Price: " . $itemz[0]; echo "<br><b>Analyzing " . $ro->selectNow("patientCharges", "description", "itemNo", $itemz[1]) . "</b>"; //check kung ilan na lang ung natitira sa target amount kpg bnwsan na sa current Paid ng px if ($ro->getCurrentPaid_check_rBanny($registrationNo) >= $targetAmount) { $pxPaid = $ro->getCurrentPaid_check_rBanny($registrationNo) - $targetAmount; } else { $pxPaid = $targetAmount - $ro->getCurrentPaid_check_rBanny($registrationNo); } //check kung mas mataas pa ung total ng item kaysa sa natitirang sa targetAmount=payment ng px if ($itemz[0] >= $pxPaid) { $newCash = $ro->selectNow("patientCharges", "cashUnpaid", "itemNo", $itemz[1]) - $targetAmount; if ($newCash > 1) { $chargesTotal = $ro->selectNow("patientCharges", "total", "itemNo", $itemz[1]) - $ro->selectNow("patientCharges", "discount", "itemNo", $itemz[1]); if ($ro->selectNow("patientCharges", "doctorsPF", "itemNo", $itemz[1]) > 0) { $doctorsPF = $ro->selectNow("patientCharges", "doctorsPF", "itemNo", $itemz[1]); } else { $doctorsPF = 0;
<?php include "../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; if (isset($_GET['show'])) { $show = $_GET['show']; } else { $show = "All"; } if (isset($_GET['checked'])) { $checked = $_GET['checked']; } else { $checked = ""; } $ro = new database3(); if ($ro->selectNow("registrationDetails", "type", "registrationNo", $registrationNo) == "OPD") { echo "<font color=red>Update to Outpatient Price</font><br><font size=2>Updated price will be in cash column</font>"; } else { if ($ro->selectNow("registrationDetails", "type", "registrationNo", $registrationNo) == "IPD") { echo "<font color=red>Update to Inpatient Price</font><br><font size=2>Updated price will be in cash column</font>"; } else { } } if ($checked == "") { echo "<center><a href='/COCONUT/patientProfile/updatePrice.php?registrationNo={$registrationNo}&show={$show}&checked=checked' style='text-decoration:none; color:Red;'>Check All</a>"; } else { echo "<center><a href='/COCONUT/patientProfile/updatePrice.php?registrationNo={$registrationNo}&show={$show}&checked=' style='text-decoration:none; color:Red;'>Uncheck All</a>"; } $ro->updatePricez($registrationNo, $show, $checked);
<?php include "../../../myDatabase3.php"; $ro = new database3(); $ro->coconutDesign(); $siNo = $_GET['siNo']; $count = count($siNo); $invoiceNo = $_GET['invoiceNo']; $username = $_GET['username']; $voucherNo = $ro->selectNow("trackingNo", "value", "name", "trackingNo"); $ro->editNow("trackingNo", "name", "trackingNo", "value", $voucherNo + 1); /* $ro->getVouchersNo(); $myFile = $ro->getReportInformation("homeRoot")."/COCONUT/trackingNo/voucherNo.dat"; $fh = fopen($myFile, 'r'); $voucherNo = fread($fh, 100); fclose($fh); */ /* for($x=0;$x<$count;$x++) { //echo $siNo[$x]; $data = preg_split ("/\-/",$siNo[$x]); $supplier = $ro->selectNow("supplier","supplierName","supplierCode",$data[2]); $username = $data[3]; $invoiceNo = $ro->selectNow("salesInvoice","invoiceNo","siNo",$data[0]); if( $ro->selectNow("supplier","vatable","supplierCode",$data[2]) == "yes" ) { $lessVAT = ($data[1] / 1.12); $vat = ( $data[1] - $lessVAT ); }else { $lessVAT = $date[1]; $vat = 0;
$additional = $_POST['additional']; //unitcost $unitcost = $_POST['unitcost']; //sellingPrice $quantity = $_POST['quantity']; $dateAdded = $_POST['dateAdded']; $inventoryLocation = $_POST['inventoryLocation']; $phic = $_POST['phic']; $remarks = $_POST['remarks']; $supplier = $_POST['supplier']; $criticalLevel = $_POST['criticalLevel']; $expiration = $_POST['expiration']; $username = $_POST['username']; $ro = new database3(); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "description", $description); if ($ro->selectNow("inventory", "inventoryType", "inventoryCode", $inventoryCode) == "medicine") { $ro->editNow("inventory", "inventoryCode", $inventoryCode, "unitcost", $unitcost); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "Added", $additional); } else { $ro->editNow("inventory", "inventoryCode", $inventoryCode, "unitcost", $additional); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "suppliesUNITCOST", $unitcost); } //edit history $generic = ""; $inventoryType = "supplies"; $qty = $ro->selectNow("inventory", "quantity", "inventoryCode", $inventoryCode); $unitcost = $ro->selectNow("inventory", "suppliesUNITCOST", "inventoryCode", $inventoryCode); $opdPrice = $ro->selectNow("inventory", "unitcost", "inventoryCode", $inventoryCode); $ipdPrice = $ro->selectNow("inventory", "unitcost", "inventoryCode", $inventoryCode); $ro->editedInventory($stockCardNo, $inventoryCode, $description, $generic, $qty, $unitcost, $opdPrice, $ipdPrice, $inventoryType, date("H:i:s"), date("Y-m-d"), $username); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "quantity", $quantity);
<?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}");
<?php include "../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; $paymentNo = $_GET['paymentNo']; $count = count($paymentNo); $reportDate = $_GET['reportDate']; $reportShift = $_GET['reportShift']; $ro = new database3(); for ($x = 0; $x < $count; $x++) { $ro->editHistory_ipdPayments($paymentNo[$x], $reportDate, $reportShift); echo "<font color=red>" . $ro->selectNow("patientCharges", "description", "itemNo", $paymentNo[$x]) . "</font> Reporting Date: {$reportDate}......Reporting Shift: {$reportShift}<Br>"; }
<th>Discharge</th> <th>Cash</th> <th>Credit Card</th> </tr> <?php for ($a = 0, $b = 0, $c = 0, $d = 0; $a < count($ro4->inpatient_deposit_registrationNo()), $b < count($ro4->inpatient_deposit_dateUnregistered()), $c < count($ro4->inpatient_deposit_amountPaid()), $d < count($ro4->inpatient_deposit_paidVia()); $a++, $b++, $c++, $d++) { ?> <tr> <?php if ($ro4->inpatient_deposit_paidVia()[$d] == "Cash") { ?> <td><?php echo $ro4->inpatient_deposit_registrationNo()[$a]; ?> - <?php echo $ro3->selectNow("patientRecord", "lastName", "patientNo", $ro3->selectNow("registrationDetails", "patientNo", "registrationNo", $ro4->inpatient_deposit_registrationNo()[$a])) . ", " . $ro3->selectNow("patientRecord", "firstName", "patientNo", $ro3->selectNow("registrationDetails", "patientNo", "registrationNo", $ro4->inpatient_deposit_registrationNo()[$a])); ?> </td> <td><?php echo $ro4->inpatient_deposit_dateUnregistered()[$b]; ?> </td> <td><?php echo $ro4->inpatient_deposit_amountPaid()[$c]; ?> </td> <td> </td> <?php $deposit_cash += $ro4->inpatient_deposit_amountPaid()[$c]; ?> <?php
<?php require_once "../../authentication.php"; include "../../../myDatabase3.php"; $month = $_GET['month']; $day = $_GET['day']; $year = $_GET['year']; $shift = $_GET['shift']; $ro = new database3(); $date = $year . "-" . $month . "-" . $day; $username = $ro->selectNow('registeredUser', 'username', 'employeeID', $_SESSION['employeeID']); ?> <script type="text/javascript"> function printF(printData) { var a = window.open ('', '',"status=1,scrollbars=1, width=auto,height=auto"); a.document.write(document.getElementById(printData).innerHTML.replace(/<a\/?[^>]+>/gi, '')); a.document.close(); a.focus(); a.print(); a.close(); } </script> <a href="#" onClick="printF('printData')" style="text-decoration:none; color:black;">PRINT</a> <div id='printData'> <?php echo "<img src='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/SOAoption/newSOA/ProtacioHeader.png' width='100%' height='10%'>"; echo "<style type='text/css'>\n.txt {\n\tfont-size:13px;\n}\n</style>";
<?php include "../myDatabase3.php"; $inventoryCode = $_GET['inventoryCode']; $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}");
<?php include "../../../myDatabase3.php"; $monthDischarged = $_GET['monthDischarged']; $dayDischarged = $_GET['dayDischarged']; $yearDischarged = $_GET['yearDischarged']; $dateDischarged = $yearDischarged . "-" . $monthDischarged . "-" . $dayDischarged; if (isset($_GET['itemNo'])) { $itemNo = $_GET['itemNo']; $countItem = count($itemNo); } else { $itemNo = ""; $countItem = ""; } $registrationNo = $_GET['registrationNo']; $username = $_GET['username']; $ro = new database3(); if (isset($_GET['itemNo'])) { for ($x = 0; $x < $countItem; $x++) { $ro->editNow("room", "Description", $ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo[$x]), "status", "Vacant"); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "status", "Discharged"); } } else { } $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", $dateDischarged); $ro->EditNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", $ro->getSynapseTime()); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh", $username); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "unregisteredBy", $username); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "mgh_date", $dateDischarged . "@" . $ro->getSynapseTime()); $ro->addDischargeHistory($registrationNo, "Closed", date("H:i:s"), $dateDischarged, $username); echo "<center><br><Br><Br><font color=red>Patient Discharged</font>";
<?php include "../../../myDatabase3.php"; $doctor = $_GET['doctor']; $month = $_GET['month']; $day = $_GET['day']; $year = $_GET['year']; $month1 = $_GET['month1']; $day1 = $_GET['day1']; $year1 = $_GET['year1']; $ro = new database3(); $date = $year . "-" . $month . "-" . $day; $date1 = $year1 . "-" . $month1 . "-" . $day1; $doctor = $ro->selectNow("Doctors", "Name", "doctorCode", $doctor); echo "<br>" . $doctor . "<br>"; echo $date . "<Br>" . $date1; $ro->doctorPatient($doctor, $date, $date1, "OPD");
<?php include "../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; $count = count($registrationNo); $ro = new database3(); //$ro->dermaCharges("101980"); for ($x = 0; $x < $count; $x++) { echo "Reg#: " . $registrationNo[$x] . "<Br>"; $ro->dermaCharges($registrationNo[$x]); //$ro->updateDermaPx($registrationNo[$x]); } if ($ro->dermaCharges_itemNo() != "") { foreach ($ro->dermaCharges_itemNo() as $itemNo) { if ($ro->selectNow("patientCharges", "description", "itemNo", $itemNo) == "MEDICAL CERTIFICATE") { //dont update } else { if ($ro->selectNow("patientCharges", "description", "itemNo", $itemNo) == "SSS Record / Medical Records") { //dont update } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $itemNo) == "PROFESSIONAL FEE") { if ($ro->selectNow("patientCharges", "chargesCode", "itemNo", $itemNo) == "17") { // kpg c doc icasiano update title from PF to DERMA $ro->editNow("patientCharges", "itemNo", $itemNo, "title", "DERMA"); //update ung sellingPrice cols kpg c doc icasiano pra ndi mag error.. since derma n sya dpat wlang "/" ung sellingPrice $ro->editNow("patientCharges", "itemNo", $itemNo, "sellingPrice", $ro->selectNow("patientCharges", "total", "itemNo", $itemNo)); } else { //dont update the doctor unless c doc icasiono ung doctor } } else { $ro->editNow("patientCharges", "itemNo", $itemNo, "title", "DERMA");
<?php include "../myDatabase3.php"; $inventoryCode = $_GET['inventoryCode']; $refNo = $_GET['refNo']; $sino = $_GET['sino']; $page = $_GET['page']; $username = $_GET['username']; $ro = new database3(); $ro->coconutDesign(); $description = $ro->selectNow("salesInvoiceItems", "description", "inventoryCode", $inventoryCode); $generic = $ro->selectNow("inventory", "genericName", "inventoryCode", $inventoryCode); $unitcost = $ro->selectNow("salesInvoiceItems", "unitPrice", "inventoryCode", $inventoryCode); $qty = $ro->selectNow("salesInvoiceItems", "quantity", "inventoryCode", $inventoryCode); $fgqty = $ro->selectNow("salesInvoiceItems", "fgquantity", "inventoryCode", $inventoryCode); $unit = $ro->selectNow("salesInvoiceItems", "unit", "inventoryCode", $inventoryCode); echo "<br><br>"; $ro->coconutFormStart("post", "editPurchasing1.php"); $ro->coconutHidden("inventoryCode", $inventoryCode); $ro->coconutHidden("refNo", $refNo); $ro->coconutHidden("sino", $sino); $ro->coconutHidden("page", $page); $ro->coconutHidden("username", $username); $ro->coconutBoxStart("500", "300"); echo "<br>"; echo "<table border=0>"; echo "<tr>"; echo "<td>Description</td>"; echo "<td>"; $ro->coconutTextBox("description", $description); echo "</td>";
<?php include "../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; $targetAmount = $_GET['discount']; $ro = new database3(); //echo ( $cash - $targetAmount ); echo "<center><br>"; $itemz = preg_split("/\\_/", $ro->getHighestTotal_rBanny($registrationNo)); echo "<Br>"; echo "Item#: " . $itemz[1]; echo "<br>Price: " . $itemz[0]; echo "<br><b>Analyzing " . $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);
$wTax = $_GET['wTax']; $netTotal = $_GET['netTotal']; $payee = $_GET['payee']; $date = $_GET['date']; $username = $_GET['username']; $vat = $_GET['vat']; $voucherNo = $_GET['voucherNo']; $ro = new database3(); for ($x = 0; $x < $count; $x++) { $invoiceTotal = $ro->purchasingPayablesTotal($siNo[$x]); $vattable = round($invoiceTotal / 1.12, 2); $vat = round($invoiceTotal - $vattable, 2); $wTax = round($vattable * 0.01, 2); $netTotal = round($invoiceTotal - $wTax, 2); echo $siNo[$x] . "......." . "Vattable: " . $vattable . "........Vat: " . $vat . "........wTax: " . $wTax . ".......Net: " . $netTotal . "<Br>"; if ($paymentMode == "cash") { $voucherNo1 = "CA" . $voucherNo; } else { $voucherNo1 = "CH" . $voucherNo; } $ro->payment_voucher_purhcasing($ro->selectNow("salesInvoice", "invoiceNo", "siNo", $siNo[$x]), $checkNo, $bank, $orNo, $paymentMode, $description, $invoiceTotal, $vattable, $wTax, $vat, $payee, $date, $username, $voucherNo1); if ($paymentMode == "cash") { $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "INVENTORY", $invoiceTotal, "", $siNo[$x], date("Y-m-d")); $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "CASH", "", $netTotal, $siNo[$x], date("Y-m-d")); $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "WITHHOLDING TAX - EXPANDED", "", $wTax, $siNo[$x], date("Y-m-d")); } else { $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "ACCOUNTS PAYABLE", $invoiceTotal, "", $siNo[$x], date("Y-m-d")); $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "CASH IN BANK - {$bank}", "", $netTotal, $siNo[$x], date("Y-m-d")); $ro->addToPurchaseJournal($voucherNo1, $invoiceNo, "WITHHOLDING TAX - EXPANDED", "", $wTax, $siNo[$x], date("Y-m-d")); } }
if ($month == "Dec") { $m = "12"; } else { } } } } } } } } } } } } $comp = $ro->selectNow("registrationDetails", "Company", "registrationNo", $registrationNo); $datePaid = $year . "-" . $month . "-" . $day; $ro->getPatientProfile($registrationNo); //$disc = $ro->getUnpaidPatientAmount($registrationNo) * $ro->getRegistrationDetails_discount(); //$grandTotal = $ro->getUnpaidPatientAmount($registrationNo) - $disc; $grandTotal = $ro->getUnpaidPatientAmount($registrationNo); //$payables = ($grandTotal - $ro->sumPartialPayment($registrationNo)); $payables = $grandTotal; if ($ro->getRegistrationDetails_type() == "OPD" || $ro->getRegistrationDetails_type() == "walkin") { if ($chargeStatus == "UNPAID") { if ($totalPaid >= $payables) { for ($x = 0; $x < $countz; $x++) { //add to collectionReport table $ro->addCollectionReport($registrationNo, $cashierPaid[$x], $shift, "OPD", $ro->getItemNo_total($cashierPaid[$x]), $orNO, "OPD", $username, date("H:i:s"), $datePaid, $paidVia); //$natira = $totalPaid - $ro->getItemNo_total($cashierPaid[$x]); $cashPaid = $ro->getItemNo_total($cashierPaid[$x]) + $ro->selectNow("patientCharges", "cashPaid", "itemNo", $cashierPaid[$x]);
<?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}"); }
echo "<td> </td>"; echo "<Td><font class='labelz'><b>Registration#:</b></font></td>"; echo "<td><font size=2>" . $ro->getRegistrationDetails_registrationNo() . "</td>"; echo "</tr>"; echo "<tr>"; echo "<Td><font class='labelz'><B>Age:</b></td>"; echo "<Td><font size=2>" . $ro->getPatientRecord_age() . " yrs Old</font></td>"; echo "<Td> </td>"; echo "<td><font class='labelz'><b> Senior:</b></font></td>"; echo "<td><font size=2>" . $ro->getPatientRecord_senior() . "</font></td>"; echo "</tr>"; echo "<tr>"; echo "<Td><font class='labelz'><b>Company:</b></font></td>"; echo "<td><font size=2>" . $ro->getRegistrationDetails_company() . "</font></tD>"; echo "<td><font class='labelz'>Diagnosis:</font></td>"; echo "<tD><font class='labelz'>" . $ro->soap_assessmentz() . " " . $ro->selectNow("registrationDetails", "finalDiagnosis", "registrationNo", $registrationNo) . "</font></tD>"; echo "</tr>"; echo "</table>"; echo "<hr>"; echo "<Table border=0 cellpadding=0 cellspacing=0>"; echo "<tr>"; echo "<th> <font class='heading'><b>DATE</b></font> </th>"; //echo "<th> <font class='heading'><b>Ref#</b></font> </th>"; echo "<th width='30%'> <font class='heading'><b>Particulars</b></font> </th>"; echo "<th> <font class='heading'><b>QTY</b></font> </th>"; echo "<th> <font class='heading'><b>Price</b></font> </th>"; echo "<th> <font class='heading'><b>Total</b></font> </th>"; echo "</tr>"; echo "<tr>"; echo "<td> </td>"; //echo "<td> </td>";
<?php include "../../../myDatabase3.php"; $itemNo = $_GET['itemNo']; $countz = count($itemNo); $registrationNo = $_GET['registrationNo']; $user = $_GET['username']; $ro = new database3(); $ro->getPatientProfile($registrationNo); for ($x = 0; $x < $countz; $x++) { $collectionNo = $ro->selectNow("collectionReport", "collectionNo", "itemNo", $itemNo[$x]); $ro->addVoidPayment($registrationNo . "_" . $ro->getPatientRecord_completeName(), $itemNo[$x] . "_" . $ro->patientCharges_Description(), $ro->patientCharges_cashPaid(), $ro->getSynapseTime(), date("Y-m-d"), $user); $ro->voidItemized_OPD($collectionNo, $itemNo[$x], $user); $newCashUnpaid = $ro->selectNow("patientCharges", "sellingPrice", "itemNo", $itemNo[$x]) * $ro->selectNow("patientCharges", "quantity", "itemNo", $itemNo[$x]); $newCashUnpaid1 = $newCashUnpaid - $ro->selectNow("patientCharges", "discount", "itemNo", $itemNo[$x]); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "status", "UNPAID"); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "orNo", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "cashPaid", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "datePaid", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "timePaid", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "paidBy", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "cashUnpaid", $newCashUnpaid1); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "amountPaidFromCreditCard", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "doctorsPF", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "doctorsPF_payable", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "cardType", ""); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "reportShift", ""); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "dateUnregistered", ""); $ro->editNow("registrationDetails", "registrationNo", $registrationNo, "timeUnregistered", ""); } echo "\n<script type='text/javascript'>\nalert('Void Payment Success');\nwindow.location = 'http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/patientProfile_handler.php?registrationNo={$registrationNo}&username={$user}';\n</script>\n\n";
$unitcost = $_POST['unitcost']; $ipdPrice = $_POST['ipdPrice']; $opdPrice = $_POST['opdPrice']; $expiration = $_POST['expiration']; $ro = new database3(); /* echo $inventoryCode."<br>"; echo $description."<br>"; echo $generic."<br>"; echo $quantity."<br>"; echo $unitcost."<br>"; echo $ipdPrice."<br>"; echo $opdPrice."<br>"; */ //edit history $beforeEdit_qty = $ro->selectNow("inventory", "quantity", "inventoryCode", $inventoryCode); $beforeEdit_unitcost = $ro->selectNow("inventory", "unitcost", "inventoryCode", $inventoryCode); $beforeEdit_opdPrice = $ro->selectNow("inventory", "opdPrice", "inventoryCode", $inventoryCode); $beforeEdit_ipdPrice = $ro->selectNow("inventory", "ipdPrice", "inventoryCode", $inventoryCode); $beforeEdit_dateAdded = $ro->selectNow("inventory", "dateAdded", "inventoryCode", $inventoryCode); $beforeEdit_timeAdded = $ro->selectNow("inventory", "timeAdded", "inventoryCode", $inventoryCode); $beforeEdit_username = $ro->selectNow("inventory", "addedBy", "inventoryCode", $inventoryCode); $stockCardNo = $ro->selectNow("inventory", "stockCardNo", "inventoryCode", $inventoryCode); $inventoryType = $ro->selectNow("inventory", "inventoryType", "inventoryCode", $inventoryCode); $ro->editedInventory($stockCardNo, $inventoryCode, $description, $generic, $beforeEdit_qty, $beforeEdit_unitcost, $beforeEdit_opdPrice, $beforeEdit_ipdPrice, $inventoryType, $beforeEdit_timeAdded, $beforeEdit_dateAdded, $beforeEdit_username); //inventory adjustment $currentQTY = $ro->selectNow("inventory", "quantity", "inventoryCode", $inventoryCode); $invoiceNo = $ro->selectNow("inventory", "invoiceNo", "inventoryCode", $inventoryCode); if ($currentQTY != $quantity) { $terms = $ro->selectNow("salesInvoice", "terms", "invoiceNo", $invoiceNo); $originalUnitCost = $ro->selectNow("inventory", "unitcost", "inventoryCode", $inventoryCode);
<table class="table table-hover"> <thead> <tr> <th>Date</th> <th>Name</th> <th>Amount</th> </tr> </thead> <tbody> <?php foreach ($ro3->creditCardPatient_registrationNo() as $registrationNo) { ?> <tr> <td> <?php echo $ro4->formatDate($ro3->selectNow("registrationDetails", "dateUnregistered", "registrationNo", $registrationNo)); ?> </td> <td> <?php echo $ro3->selectNow("patientRecord", "lastName", "patientNo", $ro3->selectNow("registrationDetails", "patientNo", "registrationNo", $registrationNo)) . ", " . $ro3->selectNow("patientRecord", "firstName", "patientNo", $ro3->selectNow("registrationDetails", "patientNo", "registrationNo", $registrationNo)); ?> </td> <td> <?php $totalCr += $ro3->creditCardPatient_total($registrationNo); echo number_format($ro3->creditCardPatient_total($registrationNo), 2); ?> </td> </tr> <?php
$timePaid_minutes = $_GET['timePaid_minutes']; $timePaid_seconds = $_GET['timePaid_seconds']; $paidBy = $_GET['paidBy']; $remarks = $_GET['remarks']; $ro = new database3(); $datePaid = $datePaid_month . "_" . $datePaid_day . "_" . $datePaid_year; $timePaid = $timePaid_hour . ":" . $timePaid_minutes . ":" . $timePaid_seconds; $total = $quantity * $sellingPrice; $totalCovered = $cashCovered + $companyCovered + $phicCovered + $discount; //$totalCovered = ($cashCovered + $companyCovered + $phicCovered) ; //check if total covered is equal to the grand total if ($totalCovered != $total) { //if not equal,dont edit but prompt the user that was not tally echo "\n<script type='text/javascript'>\nalert('Sorry,The Cash Covered + Company Covered + PHIC Covered = ({$totalCovered}) this Total Covered is not equal to the Total which is ({$total}) only');\nwindow.back(-1);\n</script>"; } else { $beforeEdit_sellingPrice = $ro->selectNow("patientCharges", "sellingPrice", "itemNo", $itemNo); $beforeEdit_quantity = $ro->selectNow("patientCharges", "quantity", "itemNo", $itemNo); $beforeEdit_discount = $ro->selectNow("patientCharges", "discount", "itemNo", $itemNo); $beforeEdit_total = $ro->selectNow("patientCharges", "total", "itemNo", $itemNo); $beforeEdit_cash = $ro->selectNow("patientCharges", "cashUnpaid", "itemNo", $itemNo); $beforeEdit_company = $ro->selectNow("patientCharges", "company", "itemNo", $itemNo); $beforeEdit_phic = $ro->selectNow("patientCharges", "phic", "itemNo", $itemNo); $beforeEdit_user = $ro->selectNow("patientCharges", "chargeBy", "itemNo", $itemNo); $beforeEdit_dateCharge = $ro->selectNow("patientCharges", "dateCharge", "itemNo", $itemNo); $beforeEdit_timeCharge = $ro->selectNow("patientCharges", "timeCharge", "itemNo", $itemNo); //kung ndi inedit ng user ung dateCharge then use current date //if($beforeEdit_dateCharge == $dateCharge) { //$dateCharge = date("Y-m-d"); //}else { //kung inedit ng user ung dateCharge then use the inputted date by the user //$dateCharge = $dateCharge;
<?php require_once "../authentication.php"; include "../../myDatabase3.php"; $supplier = $_POST['supplier']; $ro = new database3(); $username = $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']); echo "<center>"; echo $ro->selectNow("supplier", "supplierName", "supplierCode", $supplier); echo "<Br>"; echo $ro->selectNow("supplier", "address", "supplierCode", $supplier); echo "<Br>"; echo $ro->selectNow("supplier", "contactPerson", "supplierCode", $supplier) . " - " . $ro->selectNow("supplier", "contactNo", "supplierCode", $supplier); $ro->purchasingPayables($supplier, $username);
include "../../../myDatabase3.php"; $invoiceNo = $_GET['invoiceNo']; $ro = new database3(); //$invoiceNo = "7738"; echo "<style>\n\ntr:hover { background-color:yellow; color:black;}\na { border_bottom:10px; color:black; }\n\n</style>"; echo "<center>"; echo "<font size=5><b>Protacio Hospital</b></font>"; echo "<Br><br>"; echo "<font size=3>Check Voucher</font>"; echo "<br><br>"; echo "<table border=0 width='80%' cellspacing=0>"; echo "<Tr>"; echo "<td><b>Vendor or Payee</b></td>"; echo "</tr>"; echo "<Tr>"; echo "<td> " . $ro->selectNow("vouchers", "payee", "invoiceNo", $invoiceNo) . "</td>"; echo "<td align='right'>NO#: <a href='#'>" . $ro->selectNow("vouchers", "voucherNo", "invoiceNo", $invoiceNo) . "</a></td>"; echo "<Td> </td>"; echo "</tr>"; echo "</table>"; echo "<br>"; echo "<table border=1 cellspacing=0 style='border:1px solid #000000;' width='80%'>"; echo "<Tr>"; echo "<th>Description</th>"; echo "<th>Amount</th>"; echo "</tr>"; $ro->voucher_items($invoiceNo); echo "</table>"; echo "<br><br>"; echo "<table border=1 cellspacing=0 width='80%'>"; echo "<tr>";