Esempio n. 1
0
<?php

include "../../../myDatabase1.php";
$itemNo = $_GET['itemNo'];
$countz = count($itemNo);
$registrationNo = $_GET['registrationNo'];
$user = $_GET['username'];
$ro = new database1();
$ro->getPatientProfile($registrationNo);
for ($x = 0; $x < $countz; $x++) {
    $ricky = preg_split("/\\_/", $itemNo[$x]);
    // combine itemNo + total  = itemNo_total_orNo
    $ro->getPatientChargesToEdit($ricky[0]);
    $ro->addVoidPayment($registrationNo . "_" . $ro->getPatientRecord_completeName(), $ricky[0] . "_" . $ro->patientCharges_Description(), $ro->patientCharges_cashPaid(), $ro->getSynapseTime(), date("Y-m-d"), $user, $ricky[2]);
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "status", "UNPAID");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "orNo", "");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "cashPaid", "0");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "datePaid", "");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "timePaid", "");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "paidBy", "");
    $ro->editNow("patientCharges", "itemNo", $ricky[0], "cashUnpaid", $ricky[1]);
    $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";
Esempio n. 2
0
<?php

include "../../../myDatabase1.php";
$paymentNo = $_GET['paymentNo'];
$registrationNo = $_GET['registrationNo'];
$username = $_GET['username'];
$ro = new database1();
$ro->getPatientProfile($registrationNo);
$ro->addVoidPayment($registrationNo . "_" . $ro->getPatientRecord_completeName(), "IPD_DELETE_" . $ro->selectNow("patientPayment", "paymentFor", "paymentNo", $paymentNo), $ro->selectNow("patientPayment", "amountPaid", "paymentNo", $paymentNo), $ro->getSynapseTime(), date("Y-m-d"), $username);
$ro->deleteNow("patientPayment", "paymentNo", $paymentNo);
echo "\n\n<script type='text/javascript'>\nwindow.location='http://" . $ro->getMyUrl() . "/COCONUT/patientProfile/Payments/viewPayment.php?username={$username}&registrationNo={$registrationNo}'\n</script>\n\n";