コード例 #1
0
ファイル: addCharges.php プロジェクト: rickyx12/mendero
     $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}&registrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}");
 } else {
     if ($title == "OR/DR/ER Fee") {
         $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}&registrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}");
     } else {
         if ($title == "MEDICINE") {
             $ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/availableCharges/quantityMisc.php?status={$status}&registrationNo={$registrationNo}&chargesCode={$chargesCode}&description={$description}&sellingPrice={$sellingPrice}&discount={$discount}&timeCharge={$timeCharge}&room={$room}&chargeBy={$chargeBy}&service={$service}&title={$title}&paidVia={$paidVia}&cashPaid={$cashPaid}&batchNo={$batchNo}&username={$username}&inventoryFrom={$inventoryFrom}");
         } else {
             $dateCharge = date("Y-m-d");
             if ($title == "PROFESSIONAL FEE") {
                 $price = preg_split("/\\//", $sellingPrice);
                 $currentTotal = $quantity * $price[0];
             } else {
                 $currentTotal = $quantity * $sellingPrice;
             }
             if ($ro->getPatientRecord_senior() == "YES" && $ro->selectNow("availableCharges", "senior", "chargesCode", $chargesCode) == "yes" && $title != "MEDICINE") {
                 $totalDiscount = $currentTotal * 0.2;
                 $grandTotal = $currentTotal - $totalDiscount;
             } else {
                 if ($title == "LABORATORY") {
                     if ($paycash == "yes") {
                         //check kung bbyran ng cash if yes 5% discount
                         //$totalDiscount = $currentTotal * 0.05;
                         $totalDiscount = 0;
                     } else {
                         $totalDiscount = 0;
                     }
                 } else {
                     $totalDiscount = 0;
                 }
                 $grandTotal = $currentTotal - $totalDiscount;