$description = $_POST['description']; $quantity = $_POST['quantity']; $unitcost = $_POST['unitcost']; $sellingPrice = $_POST['sellingPrice']; $expiration = $_POST['expiration']; $dateAdded = $_POST['dateAdded']; $inventoryLocation = $_POST['inventoryLocation']; $criticalLevel = $_POST['criticalLevel']; $supplier = $_POST['supplier']; $orNo = $_POST['orNo']; $remarks = $_POST['remarks']; $classification = $_POST['classification']; $lock = $_POST['lock']; $username = $_POST['username']; $data = array("stockCardNo" => $stockCardNo, "description" => $description, "quantity" => $quantity, "suppliesUNITCOST" => $unitcost, "unitcost" => $sellingPrice, "expiration" => $expiration, "addedBy" => $username, "timeAdded" => date("H:i:s"), "dateAdded" => $dateAdded, "inventoryLocation" => $inventoryLocation, "criticalLevel" => $criticalLevel, "inventoryType" => "supplies", "supplier" => $supplier, "retail" => $orNo, "remarks" => $remarks, "classification" => $classification, "locked" => $lock, "beginningCapital" => $unitcost * $sellingPrice, "beginningQTY" => $quantity); $ro4->insertNow("inventory", $data); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="../../bootstrap-3.3.6/css/bootstrap.css"></link> </head> <body> <div class="container"> <div class="col-md-3"> </div> <div class="col-md-6">
$description = $_POST['description']; $quantity = $_POST['quantity']; $unitcost = $_POST['unitcost']; $sellingPrice = $_POST['sellingPrice']; $expiration = $_POST['expiration']; $dateAdded = $_POST['dateAdded']; $inventoryLocation = $_POST['inventoryLocation']; $criticalLevel = $_POST['criticalLevel']; $supplier = $_POST['supplier']; $orNo = $_POST['orNo']; $remarks = $_POST['remarks']; $classification = $_POST['classification']; $lock = $_POST['lock']; $username = $_POST['username']; $supplies = array("stockCardNo" => $stockCardNo, "description" => $description, "quantity" => $quantity, "suppliesUNITCOST" => $unitcost, "unitcost" => $sellingPrice, "expiration" => $expiration, "addedBy" => $username, "timeAdded" => date("H:i:s"), "dateAdded" => $dateAdded, "inventoryLocation" => $inventoryLocation, "criticalLevel" => $criticalLevel, "inventoryType" => "supplies", "supplier" => $supplier, "retail" => $orNo, "remarks" => $remarks, "classification" => $classification, "locked" => $lock, "beginningCapital" => $unitcost * $sellingPrice, "beginningQTY" => $quantity); $ro4->insertNow("inventory", $supplies); $stockCard = array("stockCardNo" => $stockCardNo, "description" => $description, "encodedDetails" => date("Y-m-d"), "encodedBy" => $username, "inventoryType" => "supplies"); $ro4->insertNow("inventoryStockCard", $stockCard); $incrementStockCardNo = $ro->selectNow("trackingNo", "value", "name", "stockCardNo") + 1; $ro->editNow("trackingNo", "name", "stockCardNo", "value", $incrementStockCardNo); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="../../bootstrap-3.3.6/css/bootstrap.css"></link> </head> <body> <div class="container">
$ro->coconutDesign(); $ro4->census_list_patient($_GET['registrationNo']); echo "<form method='get' action='addToCensus.php'>"; echo "<br>"; echo "<center>"; echo "<font color=red>Census Date</font><br><br>"; $ro->coconutHidden("registrationNo", $_GET['registrationNo']); $ro->coconutHidden("room", $ro->selectNow("registrationDetails", "room", "registrationNo", $_GET['registrationNo'])); $ro->coconutTextBox("datez", date("Y-m-d")); echo "<br><br>"; echo "<input id='censusBtn' type='submit' value='Proceed'>"; echo "</form>"; echo "</center>"; if (isset($_GET['room'])) { $myData = array("registrationNo" => $_GET['registrationNo'], "room" => $_GET['room'], "date" => $_GET['datez']); $ro4->insertNow("ipdCensus", $myData); echo "<center>Patient Added</center>"; } echo "<br>"; ?> <!doctype html> <html> <head> <title></title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="../../jquery-2.1.4.min.js"></script> <link rel="stylesheet" href="../../bootstrap-3.3.6/css/bootstrap.css"></link> <script src="../../bootstrap-3.3.6/js/bootstrap.js"></script>
<?php session_start(); include "../../../myDatabase.php"; include "../../../myDatabase4.php"; $collectionNo = $_POST['collectionNo']; $ro = new database(); $ro4 = new database4(); echo $collectionNo . "<br>"; if ($ro->selectNow("collectionReport", "paidVia", "collectionNo", $collectionNo) == "Cash") { $remainingPd = $ro->selectNow("patientCharges", "cashPaid", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo)) - $ro->selectNow("collectionReport", "amountPaid", "collectionNo", $collectionNo); } else { $remainingPd = $ro->selectNow("patientCharges", "amountPaidFromCreditCard", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo)) - $ro->selectNow("collectionReport", "amountPaid", "collectionNo", $collectionNo); } $totalCashUnpaid = $ro->selectNow("patientCharges", "cashUnpaid", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo)) + $ro->selectNow("collectionReport", "amountPaid", "collectionNo", $collectionNo); if ($ro->selectNow("collectionReport", "paidVia", "collectionNo", $collectionNo) == "Cash") { $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "cashPaid", $remainingPd); } else { $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "amountPaidFromCreditCard", $remainingPd); } $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "cashUnpaid", $totalCashUnpaid); $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "status", "UNPAID"); if ($ro->selectNow("collectionReport", "paidVia", "collectionNo", $collectionNo) == "Cash") { $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "cashPaid", "0"); } else { $ro->editNow("patientCharges", "itemNo", $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "amountPaidFromCreditCard", "0"); } $voidTable = array("collectionNo" => $collectionNo, "registrationNo" => $ro->selectNow("collectionReport", "registrationNo", "collectionNo", $collectionNo), "itemNo" => $ro->selectNow("collectionReport", "itemNo", "collectionNo", $collectionNo), "shift" => $ro->selectNow("collectionReport", "shift", "collectionNo", $collectionNo), "description" => $ro->selectNow("collectionReport", "description", "collectionNo", $collectionNo), "amountPaid" => $ro->selectNow("collectionReport", "amountPaid", "collectionNo", $collectionNo), "orNo" => $ro->selectNow("collectionReport", "orNo", "collectionNo", $collectionNo), "type" => $ro->selectNow("collectionReport", "type", "collectionNo", $collectionNo), "paidBy" => $ro->selectNow("collectionReport", "paidBy", "collectionNo", $collectionNo), "timePaid" => $ro->selectNow("collectionReport", "timePaid", "collectionNo", $collectionNo), "datePaid" => $ro->selectNow("collectionReport", "datePaid", "collectionNo", $collectionNo), "paidVia" => $ro->selectNow("collectionReport", "paidVia", "collectionNo", $collectionNo), "voidBy" => $_SESSION['username']); $ro4->insertNow("collectionReport_void", $voidTable); $ro->deleteNow("collectionReport", "collectionNo", $collectionNo);
<?php include "../../myDatabase4.php"; $preparation = $_POST['preparation']; $ro4 = new database4(); $data = array("preparation" => $preparation); $ro4->insertNow("inventoryPreparation", $data);
echo "<br>"; echo "lock: ".$lock; */ $counterDate = $ro->selectNow("counters", "counterdate", "id", "1"); $counter02 = $ro->selectNow("counters", "counter02", "id", "1"); $purchaseDate = date("Ymd"); if ($counterDate != $purchaseDate) { $ro->editNow("counters", "id", "1", "counter02", "0"); } else { $newCounter02 = $counter02 + 1; $ro->editNow("counters", "id", "1", "counter02", $newCounter02); } if ($counter02 < 10) { $refNo = $purchaseDate . "000" . $counter02; } else { if ($counter02 > 9 && $counter02 < 100) { $refNo = $purchaseDate . "00" . $counter02; } else { if ($counter02 > 99 && $counter02 < 1000) { $refNo = $purchaseDate . "0" . $counter02; } else { $refNo = $purchaseDate . $counter02; } } } $inventory = array("stockCardNo" => $stockCardNo, "description" => $brandName, "genericName" => $genericName, "preparation" => $preparation, "quantity" => $quantity + $freeGoods, "fgQuantity" => $freeGoods, "unitcost" => $unitcost, "opdPrice" => $opdPrice, "ipdPrice" => $ipdPrice, "expiration" => $expiration, "addedBy" => $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']), "timeAdded" => date("H:i:s"), "dateAdded" => $dateAdded, "inventoryType" => "medicine", "inventoryLocation" => $inventoryLocation, "criticalLevel" => $criticalLevel, "supplier" => $supplier, "invoiceNo" => $invoiceNo, "remarks" => $remarks, "locked" => $lock, "autoDispense" => "no", "classification" => "inventory", "beginningQTY" => $quantity + $freeGoods); $ro4->insertNow("inventory", $inventory); //inventorycode nung last inserted $inventoryCode = $ro4->selectLast("inventory", "inventoryCode", "stockCardNo", $stockCardNo, "inventoryCode"); $salesInvoiceItem = array("refNo" => $refNo, "siNo" => $siNo, "inventoryCode" => $inventoryCode, "description" => $brandName, "unit" => $preparation, "unitPrice" => $unitcost, "quantity" => $quantity + $freeGoods, "fgquantity" => $freeGoods, "type" => "medicine", "status" => "Active", "encodedBy" => $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']), "dateEncoded" => date("YmdHi")); $ro4->insertNow("salesInvoiceItems", $salesInvoiceItem);
<?php require_once "../authentication.php"; include "../../myDatabase.php"; include "../../myDatabase4.php"; $ro = new database(); $ro4 = new database4(); $description = $_POST['description']; if (isset($_POST['genericName'])) { $genericName = $_POST['genericName']; } else { $genericName = ""; } $inventoryType = $_POST['inventoryType']; foreach ($inventoryType as $type) { $data = array("description" => $description, "genericName" => $genericName, "inventoryType" => $type, "encodedDetails" => date("Y-m-d"), "encodedBy" => $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID'])); $ro4->insertNow("inventoryStockCard", $data); } $incrementStockCardNo = $ro->selectNow("trackingNo", "value", "name", "stockCardNo") + 1; $ro->editNow("trackingNo", "name", "stockCardNo", "value", $incrementStockCardNo);
//selectLast($table,$cols,$identifier,$identifierData,$ordering) $opdPrice = $ro4->selectLast("inventory", "opdPrice", "stockCardNo", $stockCardNo, "inventoryCode"); $ipdPrice = $ro4->selectLast("inventory", "ipdPrice", "stockCardNo", $stockCardNo, "inventoryCode"); $expiration = $ro4->selectLast('inventory', 'expiration', 'stockCardNo', $stockCardNo, 'inventoryCode'); $remarks = "Ending inventory - " . date('Y-m-d'); $locked = "no"; $criticalLevel = "5"; $inventoryType = $ro->selectNow("inventoryStockCard", "inventoryType", "stockCardNo", $stockCardNo); $inventoryLocation = $ro->selectNow("endingInventory", "inventoryLocation", "endingNo", $endingNo1); $supplier = $ro4->selectLast("inventory", "supplier", "stockCardNo", $stockCardNo, "inventoryCode"); $dateAdded = date('Y-m-d'); $timeAdded = date('H:i:s'); $addedBy = $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']); $beginningQTY = $totalEnding; $medicine = array("stockCardNo" => $stockCardNo, "genericName" => $genericName, "description" => $brandName, "preparation" => $preparation, "quantity" => $qty, "unitcost" => $unitcost, "opdPrice" => $opdPrice, "ipdPrice" => $ipdPrice, "expiration" => $expiration, "remarks" => $remarks, "locked" => $locked, "criticalLevel" => $criticalLevel, "inventoryType" => $inventoryType, "inventoryLocation" => $inventoryLocation, "supplier" => $supplier, "dateAdded" => $dateAdded, "timeAdded" => $timeAdded, "addedBy" => $addedBy, "beginningQTY" => $qty); $ro4->insertNow("inventory", $medicine); } else { $stockCardNo = $ro->selectNow("endingInventory", "stockCardNo", "endingNo", $endingNo1); $description = $ro->selectNow("inventoryStockCard", "description", "stockCardNo", $stockCardNo); $preparation = $ro->selectNow("inventory", "preparation", "stockCardNo", $stockCardNo); $qty = $totalEnding; $suppliesUNITCOST = $ro->selectNow("inventory", "suppliesUNITCOST", "stockCardNo", $stockCardNo); $unitcost = $ro4->selectLast('inventory', 'unitcost', 'stockCardNo', $stockCardNo, 'inventoryCode'); $expiration = $ro4->selectLast('inventory', 'expiration', 'stockCardNo', $stockCardNo, 'inventoryCode'); $remarks = "Ending inventory - " . date('Y-m-d'); $locked = "no"; $criticalLevel = "5"; $inventoryType = $ro->selectNow("inventoryStockCard", "inventoryType", "stockCardNo", $stockCardNo); $inventoryLocation = $ro->selectNow("endingInventory", "inventoryLocation", "endingNo", $endingNo1); $supplier = $ro4->selectLast("inventory", "supplier", "stockCardNo", $stockCardNo, "inventoryCode"); $dateAdded = date('Y-m-d');
<?php include "../myDatabase4.php"; $description = $_POST['description']; $category = $_POST['category']; $opdPrice = $_POST['opdPrice']; $ipdPrice = $_POST['ipdPrice']; $hmoPrice = $_POST['hmoPrice']; $specialRates = $_POST['specialRates']; $discountable = $_POST['discountable']; $ro4 = new database4(); echo $description; echo "<br>"; echo $category; echo "<br>"; echo $opdPrice; echo "<Br>"; echo $ipdPrice; echo "<br>"; echo $hmoPrice; echo "<br>"; echo $specialRates; echo "<br>"; echo $discountable; $data = array("Description" => $description, "Service" => "Examination", "Category" => $category, "OPD" => $opdPrice, "WARD" => $ipdPrice, "SOLOWARD" => $ipdPrice, "SEMIPRIVATE" => $ipdPrice, "PRIVATE" => $ipdPrice, "HMO" => $hmoPrice, "ipd_hmo" => $hmoPrice, "specialRates" => $specialRates, "senior" => $discountable); $ro4->insertNow("availableCharges", $data);
<?php include "myDatabase.php"; include "myDatabase4.php"; $ro = new database(); $ro4 = new database4(); $ro4->opdPayment_updater("2016-04-01", "2016-04-01"); foreach ($ro4->opdPayment_updater_itemNo() as $itemNo) { $registrationNo = $ro->selectNow("patientCharges", "registrationNo", "itemNo", $itemNo); $shift = $ro->selectNow("patientCharges", "reportShift", "itemNo", $itemNo); $description = $ro->selectNow("patientCharges", "description", "itemNo", $itemNo); if ($ro->selectNow("patientCharges", "paidVia", "itemNo", $itemNo) == "Cash") { $amountPaid = $ro->selectNow("patientCharges", "cashPaid", "itemNo", $itemNo); } else { $amountPaid = $ro->selectNow("patientCharges", "amountPaidFromCreditCard", "itemNo", $itemNo); } $orNo = $ro->selectNow("patientCharges", "orNO", "itemNo", $itemNo); $type = "OPD"; $paidBy = $ro->selectNow("patientCharges", "paidBy", "itemNo", $itemNo); $timePaid = $ro->selectNow("patientCharges", "timePaid", "itemNo", $itemNo); $datePaid = $ro->selectNow("patientCharges", "datePaid", "itemNo", $itemNo); $paidVia = $ro->selectNow("patientCharges", "paidVia", "itemNo", $itemNo); $myData = array("registrationNo" => $registrationNo, "itemNo" => $itemNo, "shift" => $shift, "description" => $description, "amountPaid" => $amountPaid, "orNo" => $orNo, "type" => $type, "paidBy" => $paidBy, "timePaid" => $timePaid, "datePaid" => $datePaid, "paidVia" => $paidVia); $ro4->insertNow("collectionReport", $myData); }
include "../../myDatabase4.php"; include "../../myDatabase.php"; $status = $_POST['status']; $registrationNo = $_POST['registrationNo']; $chargesCode = $_POST['chargesCode']; $description = $_POST['description']; $sellingPrice = $_POST['sellingPrice']; $discount = $_POST['discount']; $timeCharge = $_POST['timeCharge']; $chargeBy = $_POST['chargeBy']; $service = $_POST['service']; $title = $_POST['title']; $paidVia = $_POST['paidVia']; $cashPaid = $_POST['cashPaid']; $batchNo = $_POST['batchNo']; $username = $_POST['username']; $quantity = $_POST['quantity']; $inventoryFrom = $_POST['inventoryFrom']; $paycash = $_POST['paycash']; $remarks = $_POST['remarks']; $hospital = $_POST['hospital']; $pf = $_POST['pf']; $therapist = $_POST['therapist']; $dateCharge = $_POST['dateCharge']; $ro = new database4(); $ro1 = new database(); $myData = array("status" => $status, "registrationNo" => $registrationNo, "chargesCode" => $chargesCode, "description" => $description, "sellingPrice" => $hospital + $pf + $discount, "quantity" => "1", "discount" => $discount, "total" => $hospital + $pf + $discount, "cashUnpaid" => $hospital, "phic" => "0", "company" => "0", "timeCharge" => $timeCharge, "dateCharge" => $dateCharge, "chargeBy" => $chargeBy, "service" => $service, "title" => $title, "paidVia" => $paidVia, "cashPaid" => $cashPaid, "batchNo" => $batchNo, "otShare" => $pf, "therapist" => $therapist); $ro->insertNow("patientCharges", $myData); $room = $ro1->selectNow("registrationDetails", "room", "registrationNo", $registrationNo); $ro1->gotoPage("http://" . $ro1->getMyUrl() . "/COCONUT/availableCharges/searchCharges.php?registrationNo={$registrationNo}&username={$username}&room={$room}&batchNo={$batchNo}");
} else { $serviceType = "Others"; $inventoryType = "SUPPLIES"; //ung price ng supplies nka depende lng s unitcost cols $price = $ro->selectNow('inventory', 'unitcost', 'inventoryCode', $inventoryCode); } $status = "UNPAID"; $registrationNo1 = $registrationNo; $chargesCode = $inventoryCode; $description = $ro->selectNow('inventory', 'description', 'inventoryCode', $inventoryCode); $sellingPrice = $price; $discount = 0; $total = $qty * $sellingPrice; $cashUnpaid = $sellingPrice; $phic = 0; $company = 0; $timeCharge = date("H:i:s"); $dateCharge = date("Y-m-d"); $chargeBy = $ro->selectNow('registeredUser', 'username', 'employeeID', $_SESSION['employeeID']); $service = $serviceType; $title = $inventoryType; $paidVia = 'Cash'; $cashPaid = 0; $batchNo1 = $batchNo; $quantity = $qty; $inventoryFrom = $ro->selectNow('inventory', 'inventoryLocation', 'inventoryCode', $inventoryCode); $room = $ro->selectNow('registrationDetails', 'room', 'registrationNo', $registrationNo); $stockCardNo = $ro->selectNow('inventory', 'stockCardNo', 'inventoryCode', $inventoryCode); $charges = array("status" => $status, "registrationNo" => $registrationNo1, "chargesCode" => $chargesCode, "description" => $description, "sellingPrice" => $sellingPrice, "discount" => $discount, "total" => $total, "cashUnpaid" => $cashUnpaid, "phic" => $phic, "company" => $company, "timeCharge" => $timeCharge, "dateCharge" => $dateCharge, "chargeBy" => $chargeBy, "service" => $service, "title" => $title, "paidVia" => $paidVia, "cashPaid" => $cashPaid, "batchNo" => $batchNo1, "quantity" => $quantity, "inventoryFrom" => $inventoryFrom, "stockCardNo" => $stockCardNo); $ro4->insertNow("patientCharges", $charges);
<?php include "../../myDatabase.php"; include "../../myDatabase4.php"; if (isset($_POST['registrationNo'])) { $doctorCode = $_POST['doctorCode']; $registrationNo = $_POST['registrationNo']; $subjective = $_POST['subjective']; $objective = $_POST['objective']; $assessment = $_POST['assessment']; $plan = $_POST['plan']; $ro = new database(); $ro4 = new database4(); $data = array("itemNo" => $ro4->get_current_doctor($registrationNo, $doctorCode), "registrationNo" => $registrationNo, "subjective" => $subjective, "objective" => $objective, "assessment" => $assessment, "plan" => $plan); $ro4->insertNow("SOAP", $data); echo "OK"; } else { echo "FAILED"; }
$supplier = $_POST['supplier']; $terms = $_POST['terms']; $date = $_POST['date']; $ro = new database(); $ro4 = new database4(); $purchaseDate = date("Ymd"); $counterDate = $ro->selectNow("counters", "counterDate", "id", "1"); $counter01 = $ro->selectNow("counters", "counter01", "id", "1"); if ($purchaseDate != $counterDate) { $ro->editNow("counters", "id", "1", "counterDate", $purchaseDate); $ro->editNow("counters", "id", "1", "counter01", "0"); } else { $newCounter01 = $counter01 + 1; $ro->editNow("counters", "counterdate", $purchaseDate, "counter01", $newCounter01); } if ($counter01 < 10) { $sino = date("Ymd") . "000" . $counter01; } else { if ($counter01 > 9 && $counter01 < 100) { $sino = date("Ymd") . "00" . $counter01; } else { if ($counter01 > 99 && $counter01 < 1000) { $sino = date("Ymd") . "0" . $counter01; } else { $sino = date("Ymd") . $counter01; } } } $data = array("siNo" => $sino, "invoiceNo" => $invoiceNo, "supplier" => $supplier, "terms" => $terms, "recievedDate" => $date, "status" => "Active", "encodedBy" => $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']), "dateEncoded" => date("Ymd")); $ro4->insertNow("salesInvoice", $data); echo $sino;
<?php include "../../myDatabase.php"; include "../../myDatabase4.php"; $inventoryCode = $_POST['inventoryCode']; $ro = new database(); $ro4 = new database4(); for ($x = 0; $x < count($inventoryCode); $x++) { //echo "Inventory Code: ".$inventoryCode[$x]."<br>"; echo "DELETE " . $ro->selectNow("inventory", "description", "inventoryCode", $inventoryCode[$x]) . "<br>"; $data = array("stockCardNo" => $ro->selectNow("inventory", "stockCardNo", "inventoryCode", $inventoryCode[$x]), "inventoryCode" => $inventoryCode[$x], "date" => date("Y-m-d H:i:s")); $ro4->insertNow("endingInventory_deleted", $data); $ro->editNow("inventory", "inventoryCode", $inventoryCode[$x], "status", "DELETED_System[no ending inventory]_" . date("Y-m-d")); } $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/inventory/endingInventory.php?inventoryType=medicine");
<?php require_once "../authentication.php"; include "../../myDatabase.php"; include "../../myDatabase4.php"; $inventoryCode = $_POST['inventoryCode']; $requesitionNo = $_POST['requesitionNo']; $requestQTY = $_POST['requestQTY']; $module = $_POST['module']; $ro = new database(); $ro4 = new database4(); $stockCardNo = $ro->selectNow("inventory", "stockCardNo", "inventoryCode", $inventoryCode); $description = $ro->selectNow("inventory", "description", "inventoryCode", $inventoryCode); $genericName = $ro->selectNow("inventory", "genericName", "inventoryCode", $inventoryCode); $qty = $requestQTY; $inventoryType = $ro->selectNow("inventory", "inventoryType", "inventoryCode", $inventoryCode); $requestToDept = "Stockroom"; $requestingDept = $module; $requestingUser = $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']); $dateRequested = date("Y-m-d"); $timeRequested = date("H:i:s"); $status = "requesting"; $batchNo = $requesitionNo; $request = array("inventoryCode" => $inventoryCode, "stockCardNo" => $stockCardNo, "description" => $description, "genericName" => $genericName, "quantity" => $qty, "inventoryType" => $inventoryType, "requestTo_department" => $requestToDept, "requestingDepartment" => $requestingDept, "requestingUser" => $requestingUser, "dateRequested" => $dateRequested, "timeRequested" => $timeRequested, "status" => $status, "batchNo" => $batchNo); $ro4->insertNow("inventoryManager", $request);
<?php include "../../myDatabase.php"; include "../../myDatabase4.php"; $itemNo = $_POST['itemNo']; $registrationNo_balance = $_POST['registrationNo_balance']; $registrationNo_paid = $_POST['registrationNo_paid']; $ro = new database(); $ro4 = new database4(); $amountPaid = 0; echo "Balance" . $registrationNo_balance; echo "<Br>"; echo "Paid" . $registrationNo_paid; $amountPaid = $ro->selectNow("patientCharges", "cashPaid", "itemNo", $itemNo) + $ro->selectNow("patientCharges", "amountPaidFromCreditCard", "itemNo", $itemNo); $myData = array("registrationNo_balance" => $registrationNo_balance, "registrationNo_paid" => $registrationNo_paid, "datePaid" => $ro->selectNow("patientCharges", "datePaid", "itemNo", $itemNo), "paidBy" => $ro->selectNow("patientCharges", "paidBy", "itemNo", $itemNo), "amountPaid" => $amountPaid); $ro4->insertNow("paidBalance", $myData);
$stockCardNo = $_POST['stockCardNo']; $brandName = $_POST['brandName']; $genericName = $_POST['genericName']; $currentQTY = $_POST['currentQTY']; $endingQTY = $_POST['endingQTY']; $unitcost = $_POST['unitcost']; $inventoryLocation = $_POST['inventoryLocation']; $dateAdded = $_POST['dateAdded']; $quarter = $_POST['quarter']; ?> <?php $ro = new database(); $ro4 = new database4(); $data = array("stockCardNo" => $stockCardNo, "currentQTY" => $currentQTY, "endingQTY" => $endingQTY, "unitcost" => $unitcost, "inventoryLocation" => $inventoryLocation, "date" => $dateAdded . " " . date("H:i:s"), "quarter" => $quarter, "username" => $ro->selectNow('registeredUser', 'username', 'employeeID', $_SESSION['employeeID'])); $ro4->insertNow("endingInventory", $data); ?> <!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="../../jquery-2.1.4.min.js"></script> <link rel="stylesheet" href="../../bootstrap-3.3.6/css/bootstrap.css"></link> <script src="../../bootstrap-3.3.6/js/bootstrap.js"></script> </head> <body> <div class="container"> <h3> </h3> <div class="col-md-3">
<?php require_once "../authentication.php"; include "../../myDatabase.php"; include "../../myDatabase4.php"; $ro = new database(); $ro4 = new database4(); $registrationNo = $_POST['registrationNo']; $paymentFor = $_POST['paymentFor']; $paidVia = $_POST['paidVia']; $or = $_POST['or']; $amount = $_POST['amount']; $date = $_POST['date']; $shift = $_POST['shift']; $paymentData = array("registrationNo" => $registrationNo, "amountPaid" => $amount, "datePaid" => $date, "timePaid" => date("H:i:s"), "paidBy" => $ro->selectNow("registeredUser", "username", "employeeID", $_SESSION['employeeID']), "paymentFor" => $paymentFor, "orNo" => $or, "paidVia" => $paidVia, "shift" => $shift, "patientType" => "IPD"); $ro4->insertNow("patientPayment", $paymentData);