<?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;
<?php include "../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; $itemNo = $_GET['itemNo']; $shift = $_GET['shift']; $username = $_GET['username']; $monthDischarged = $_GET['monthDischarged']; $dayDischarged = $_GET['dayDischarged']; $yearDischarged = $_GET['yearDischarged']; $dateDischarged = $yearDischarged . "-" . $monthDischarged . "-" . $dayDischarged; $ro = new database3(); //echo $registrationNo."<br>"; //echo $shift."<br>"; //echo $dateDischarged."<br>"; for ($x = 0; $x < count($itemNo); $x++) { //echo $itemNo[$x]."<br>"; $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "reportShift", $shift); } $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"; $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}");
$description = $_POST['description']; $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);
<?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";
$inputVAT = $lessVAT * 0.12; $accountPayables = $originalUnitCost * $qtyDifference; if ($terms != "") { if ($terms != "CASH" || $terms != "C.O.D" || $terms != "Retail") { $terms1 = "ACCOUNTS PAYABLE"; } else { $terms1 = "CASH"; } } else { $terms1 = "CASH"; } $ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INVENTORY", $qtyDifference, $qtyDifference, "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INPUT VAT", round($inputVAT, 2), round($inputVAT, 2), "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, $terms1, round($accountPayables, 2), "", round($accountPayables, 2), date("Y-m-d")); echo $qtyDifference; echo "<br>"; echo $inputVAT; echo "<br>"; echo $accountPayables; echo "<br>"; echo $terms1; } else { //do nothing } $ro->editNow("inventory", "inventoryCode", $inventoryCode, "description", $description); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "genericName", $generic); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "quantity", $quantity); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "unitcost", $unitcost); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "ipdPrice", $ipdPrice); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "opdPrice", $opdPrice); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "expiration", $expiration);
$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; } if ($ro->selectNow("patientCharges", "otShare", "itemNo", $itemz[1]) > 0) { $otShare = $ro->selectNow("patientCharges", "otShare", "itemNo", $itemz[1]); } else { $otShare = 0; } $deductions = $doctorsPF + $otShare; echo $pxPaid; $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashUnpaid", $newCash); $ro->editNow("patientCharges", "itemNo", $itemz[1], "cashPaid", $chargesTotal - $deductions - $newCash); $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],"status","UNPAID"); $ro->editNow("patientCharges", "itemNo", $itemz[1], "reportShift", $shift); $ro->addCollectionReport($registrationNo, $itemz[1], $shift, "OPD", $chargesTotal - $newCash, $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]
$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); $ro->editNow("patientCharges", "itemNo", $itemz[1], "discount", $exactDisc); echo "3"; } if ($ro->getTotal("discount", "", $registrationNo) != $targetAmount) {
$cashUnpaid = $ro->getItemNo_total($cashierPaid[$x]); //$cashPaid = $totalPaid; if ($paidVia == "Cash") { //check kung meron ng payment sa collectionReport table ung charges if ($ro->selectNow("collectionReport", "collectionNo", "itemNo", $cashierPaid[$x]) != "") { $totalCashPaid = $cashPaid + $ro->selectNow("collectionReport", "amountPaid", "itemNo", $cashierPaid[$x]); $ro->paymentManager($cashierPaid[$x], "PAID", $username, $cashPaid, $datePaid, date("H:i:s"), "0"); } else { $ro->paymentManager($cashierPaid[$x], "PAID", $username, $cashPaid, $datePaid, date("H:i:s"), "0"); } } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "PROFESSIONAL FEE") { $payablesPF = $ro->selectNow("patientCharges", "doctorsPF", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $payablesPF; $ro->paymentManager_creditCard_PF($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0", $payablesPF); $ro->editNow("patientCharges", "itemNo", $cashierPaid[$x], "doctorsPF", "0"); } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "OT") { $otShare = $ro->selectNow("patientCharges", "otShare", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $otShare; $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0"); } else { if ($ro->selectNow("patientCharges", "title", "itemNo", $cashierPaid[$x]) == "ST") { $stShare = $ro->selectNow("patientCharges", "otShare", "itemNo", $cashierPaid[$x]); $totalCreditCard = $cashPaid + $stShare; $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $totalCreditCard, $datePaid, date("H:i:s"), "0"); } else { $ro->paymentManager_creditCard($cashierPaid[$x], "PAID", $username, $cashUnpaid, $datePaid, date("H:i:s"), "0"); } } }
} else { $terms1 = "CASH"; } } else { $terms1 = "CASH"; } $ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INVENTORY", $qtyDifference, $qtyDifference, "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INPUT VAT", round($inputVAT, 2), round($inputVAT, 2), "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, $terms1, round($accountPayables, 2), "", round($accountPayables, 2), date("Y-m-d")); echo $qtyDifference; echo "<br>"; echo $inputVAT; echo "<br>"; echo $accountPayables; echo "<br>"; echo $terms1; } else { //do nothing } $ro->editNow("inventory", "inventoryCode", $inventoryCode, "description", $description); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "quantity", $quantity); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "suppliesUNITCOST", $unitcost); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "unitcost", $price); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "expiration", $expiration); /* echo $inventoryCode."<br>"; echo $description."<br>"; echo $quantity."<Br>"; echo $unitcost."<br>"; echo $price."<br>"; */
$ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INVENTORY", $qtyDifference, $qtyDifference, "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, "INPUT VAT", round($inputVAT, 2), round($inputVAT, 2), "", date("Y-m-d")); $ro->inventoryAdjustment($inventoryCode, $stockCardNo, $terms1, round($accountPayables, 2), "", round($accountPayables, 2), date("Y-m-d")); } else { //do nothing } //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); $ro->editedInventory($stockCardNo, $inventoryCode, $description, $generic, $beforeEdit_qty, $beforeEdit_unitcost, $beforeEdit_opdPrice, $beforeEdit_ipdPrice, $inventoryType, $beforeEdit_timeAdded, $beforeEdit_dateAdded, $beforeEdit_username); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "description", $description); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "genericName", $generic); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "unitcost", $unitcost); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "quantity", $quantity); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "expiration", $expiration); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "dateAdded", $dateAdded); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "timeAdded", $timeAdded); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "inventoryType", $inventoryType); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "inventoryLocation", $inventoryLocation); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "branch", $branch); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "transition", $transition); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "remarks", $remarks); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "preparation", $preparation); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "phic", $phic); //$ro->editNow("inventory","inventoryCode",$inventoryCode,"Added",$pricing."_".$additional); $ro->editNow("inventory", "inventoryCode", $inventoryCode, "criticalLevel", $criticalLevel);
<?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"; $registrationNo = $_GET['registrationNo']; $count = count($registrationNo); $ro = new database3(); for ($x = 0; $x < $count; $x++) { $ro->editNow("registrationDetails", "registrationNo", $registrationNo[$x], "dateUnregistered", $ro->getDateOfLastPayment($registrationNo[$x])); }
$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"; $registrationNo = $_GET['registrationNo']; $itemNo = $_GET['itemNo']; $reportDate = $_GET['reportDate']; $reportShift = $_GET['reportShift']; $count = count($itemNo); $ro = new database3(); for ($x = 0; $x < $count; $x++) { //$ro->editHistory($itemNo[$x],$reportDate,$reportShift); echo "<font color=red>" . $ro->selectNow("patientCharges", "description", "itemNo", $itemNo[$x]) . "</font> Reporting Date: {$reportDate}......Reporting Shift: {$reportShift}<Br>"; $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "reportShift", $reportShift); $ro->editNow("patientCharges", "itemNo", $itemNo[$x], "datePaid", $reportDate); }
<?php include "../../../myDatabase3.php"; $registrationNo = $_GET['registrationNo']; $protoType = $_GET['protoType']; $room = $_GET['room']; $username = $_GET['username']; $ro = new database3(); 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", ""); $ro->addDischargeHistory($registrationNo, "Open", date("H:i:s"), date("Y-m-d"), $username); } echo "\n<script type='text/javascript'>"; if ($protoType == "Discharged") { echo "alert('Patient is now Discharged');"; } else {