echo "</tr>"; $companyDiscount = $ro->selectNow("registrationDetails", "companyDiscount", "registrationNo", $registrationNo); echo "<Tr>"; //discount type if ($ro->selectNow("registrationDetails", "discountType", "registrationNo", $registrationNo) != "") { echo "<td> <font size=2>" . $ro->selectNow("registrationDetails", "discountType", "registrationNo", $registrationNo) . "</font></tD>"; } else { } echo "<td> </tD>"; echo "<td> </tD>"; if ($companyDiscount != "") { echo "<td> " . number_format($companyDiscount, 2) . " </tD>"; } else { echo "<td> </tD>"; } if ($ro->getRegistrationDetails_discount() != "") { echo "<td> " . number_format($ro->getRegistrationDetails_discount(), 2) . " </tD>"; } else { echo "<td> 0.00 </tD>"; } echo "</tr>"; //} $gross = $cashz - $ro->getPaymentHistory_showUp_returnPaid(); $disc = $ro->getRegistrationDetails_discount() * $gross; $grandTotalCompany = $hospitalBill_company + $pf_company; $grandTotalCompany1 = $grandTotalCompany - $companyDiscount; $grandTotalPHIC = $hospitalBill_phic + $pf_phic; echo "<Tr>"; echo "<td> <b>Grand Total</b></tD>"; echo "<td> </tD>"; echo "<td> " . number_format($grandTotalPHIC, 2) . "</tD>";
echo "<td> <span class='txtSize'><b>" . number_format($hospitalBill_phic + $pf_phic, 2) . "</b></span> </tD>"; echo "<td> <span class='txtSize'><b>" . number_format($hospitalBill_company + $pf_company, 2) . "</b></span> </tD>"; //echo "<td> <b>".number_format($hospitalBill_phic + $pf_phic,2)."</b> </tD>"; echo "<td> <span class='txtSize'><b>" . number_format($hospitalBill_cash + $pf_cash - $HBandPF + $refund, 2) . "</b></span> </tD>"; echo "</tr>"; $companyDiscount = $ro->selectNow("registrationDetails", "companyDiscount", "registrationNo", $registrationNo); echo "<Tr>"; echo "<td> <span class='txtSize'>Discount</span> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; if ($companyDiscount != "") { echo "<td> <span class='txtSize'>" . number_format($companyDiscount, 2) . "</span> </tD>"; } else { echo "<td> </tD>"; } if ($ro->getRegistrationDetails_discount() != "") { echo "<td> <span class='txtSize'>" . number_format($ro->getRegistrationDetails_discount(), 2) . "</span> </tD>"; } else { echo "<td> <span class='txtSize'>0.00</span> </tD>"; } echo "</tr>"; //} $gross = $cashz - $ro->getPaymentHistory_showUp_returnPaid(); $disc = $ro->getRegistrationDetails_discount() * $gross; $grandTotalCompany = $hospitalBill_company + $pf_company; $grandTotalCompany1 = $grandTotalCompany - $companyDiscount; $grandTotalPHIC = $hospitalBill_phic + $pf_phic; echo "<Tr>"; echo "<td> <span class='txtSize'><b>Grand Total</b></span></tD>"; echo "<td> </tD>"; echo "<td> <span class='txtSize'>" . number_format($grandTotalPHIC, 2) . "</span></tD>";
} echo "</tr>"; //$ro->getPatientDoc($registrationNo); //$gross = ( $cashz - $ro->getPaymentHistory_showUp_returnPaid() ); //$disc = $ro->getRegistrationDetails_discount() * $gross; echo "<tr>"; echo "<td><b>Professional Fee</b></tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; //echo "<td> <b>".$pf_phic."</b></tD>"; echo "<td> </tD>"; echo "</tr>"; $ro->getPatientDoc($registrationNo); $gross = $cashz - $ro->getPaymentHistory_showUp_returnPaid(); $disc = $ro->getRegistrationDetails_discount() * $gross; echo "<tr>"; echo "<td><b></b></tD>"; echo "<td> <input type='text' class='editable' value='" . $pf_gt . "'></tD>"; echo "<td> <input type='text' class='editable' value='" . $pf_phic . "'></tD>"; echo "<td> <input type='text' class='editable' value='" . $pf_company . "'></tD>"; //echo "<td> <b>".$pf_phic."</b></tD>"; echo "<td> <input type='text' class='editable' value='" . $pf_cash . "'></tD>"; echo "</tr>"; echo "<tr>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<tr>";
if ($ro->selectNow("registrationDetails", "package", "registrationNo", $registrationNo) != "") { $package = $ro->selectNow("registrationDetails", "package", "registrationNo", $registrationNo); $splitPackage = preg_split("/\\_/", $package); } else { $package = "0_0_0"; $splitPackage = preg_split("/\\_/", $package); } echo "<Tr>"; echo "<td><div align='left' class='Arial12BlackBold'> TOTAL</div></tD>"; echo "<td><div align='right' class='Arial12BlackBold'> " . number_format($hospitalBill_gt + $pf_gt, 2) . " </div></tD>"; echo "<td><div align='right' class='Arial12BlackBold'> " . number_format($hospitalBill_phic + $pf_phic, 2) . " </div></tD>"; echo "<td><div align='right' class='Arial12BlackBold'> " . number_format($hospitalBill_company + $pf_company, 2) . " </div></tD>"; echo "<td><div align='right' class='Arial12BlackBold'> " . number_format($hospitalBill_cash + $pf_cash, 2) . " </div></tD>"; echo "</tr>"; $companyDiscount = $ro->selectNow("registrationDetails", "companyDiscount", "registrationNo", $registrationNo); $x = $ro->getRegistrationDetails_discount(); if ($companyDiscount == "" && $ro->getRegistrationDetails_discount() == "") { } else { echo "<Tr>"; if ($ro->selectNow("registrationDetails", "discountType", "registrationNo", $registrationNo) == "") { echo "<td><div align='left' class='Arial12BlackBold'> DISCOUNT </div> </tD>"; } else { echo "<td><div align='left' class='Arial12BlackBold'> " . $ro->selectNow("registrationDetails", "discountType", "registrationNo", $registrationNo) . " </div> </tD>"; } echo "<td></tD>"; echo "<td></tD>"; if ($companyDiscount != "") { echo "<td><div align='right' class='Arial12Black'> " . number_format($companyDiscount, 2) . " </div></tD>"; } else { echo "<td></tD>"; }
/* if($ro->getRegistrationDetails_discount() < .30 ) { echo "<Tr>"; echo "<td> Discount <font size=2>(".substr($ro->getRegistrationDetails_discount(),2,2)."%)</font></tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> ".number_format(( $disc),2)." </tD>"; echo "</tr>"; }else {*/ echo "<Tr>"; echo "<td> Discount </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; if ($ro->getRegistrationDetails_discount() != "") { echo "<td> " . number_format($ro->getRegistrationDetails_discount(), 2) . " </tD>"; } else { echo "<td> 0.00 </tD>"; } echo "</tr>"; //} $gross = $cashz - $ro->getPaymentHistory_showUp_returnPaid(); $disc = $ro->getRegistrationDetails_discount() * $gross; if ($ro->checkIfPackageExist($registrationNo) > 0) { echo "<Tr>"; echo "<td> <b>Grand Total</b></tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> </tD>"; echo "<td> <b>" . $ro->sumPackageNow($registrationNo) . "</b> </tD>";