Esempio n. 1
0
    ?>
    <tr>
        <td></td>
        <td>BILL TOTAL</td>
        <?php 
    if ($defaultFlag != 1) {
        ?>
        <td><?php 
        echo format_number_to_money_currencyName($billing_info['total'] * $exchange_rate->getExchangeRate(), $currencyTo);
        ?>
        </td>
		<?php 
    } else {
        ?>
		<td><?php 
        echo format_number_to_money($billing_info['costs'][$i]);
        ?>
</td>
		<?php 
    }
    ?>
    </tr>
</table>
    <?php 
    if (!isset($_REQUEST['yf'])) {
        ?>
		<script type='text/javascript'>
		$(document).ready(function(){
			$('#dd_from').attr("value", "<?php 
        echo $earliest_collection_parts[2];
        ?>
Esempio n. 2
0
	public function getTestTypeInfo($test_name, $show_db_name=false)
	{
		# Returns HTML for displaying test type information
		$test_type = get_test_type_by_name($test_name);
		?>
		<table class='hor-minimalist-b'>
			<tbody>
				<tr>
					<td><?php echo LangUtil::$generalTerms['NAME']; ?></td>
					<td>
						<?php
						if($show_db_name === true)
							echo $test_type->name;
						else
							echo $test_type->getName(); 
						?>
					</td>
				</tr>
				<tr>
					<td><?php echo LangUtil::$generalTerms['LAB_SECTION']; ?></td>
					<td><?php echo get_test_category_name_by_id($test_type->testCategoryId); ?></td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['DESCRIPTION']; ?></td>
					<td><?php echo $test_type->getDescription(); ?></td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['MEASURES']; ?></td>
					<td>
					<?php
						# Fetch all test measures
						$measure_id_list = get_test_type_measures($test_type->testTypeId);
                                                sort($measure_id_list);
                                                //print_r($measure_id_list);
						foreach($measure_id_list as $measure_id)
						{
							$measure = get_measure_by_id($measure_id);
							if($measure==NULL && count($meausre_id_list)==1 )
								{	echo "No Measures Found!";
									break;
								}
							else if($measure!=NULL)
                                                        {
                                                            if(strpos($measure->getName(), "\$sub") !== false)
                                                            {
                                                                $decName = $measure->truncateSubmeasureTag();
                                                                echo "&nbsp&nbsp&nbsp&nbsp;".$decName."<br>";
                                                            }
                                                            else
                                                            {
                                                                echo $measure->getName()."<br>";
                                                            }
                                                        }
						}
					?>
					</td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['COMPATIBLE_SPECIMENS']; ?></td>
					<td>
					<?php
						# Fetch list of compatible specimens
						$compatible_specimens = get_compatible_specimens($test_type->testTypeId);
						if(count($compatible_specimens) == 0)
						{
							echo "-";
						}
						else
						{
							foreach($compatible_specimens as $curr_specimen)
							{
								# Show test name
								$specimen_type = get_specimen_type_by_id($curr_specimen);
								echo $specimen_type->getName()."<br>";
							}
						}
					?>
					</td>
				</tr>
		
				<tr valign='top'>
					<td>Hide Patient Name in Report</td>
					<td><?php
						if(	$test_type->hidePatientName == 0) {
							echo "No";
						}
						else {
							echo "Yes";
						}
						?>
					</td>
				</tr> 
				<tr valign='top'>
					<td>Prevalence Threshold</td>
					<td><?php echo $test_type->prevalenceThreshold; ?></td>
				</tr>
				
				<tr valign='top'>
					<td>Target TAT</td>
					<td><?php echo $test_type->targetTat; ?></td>
				</tr>

                                <tr valign='top' <?php is_billing_enabled($_SESSION['lab_config_id']) ? print("") : print("style='display:none;'") ?>>
                                        <td>Cost To Patient</td>
                                        <td><?php print(format_number_to_money(get_latest_cost_of_test_type($test_type->testTypeId))); ?></td>
                                </tr>
			
			</tbody>
		</table>
		<?php

	}
<?php

#
# Updates the discount for an test-bill association
#
include "../includes/db_lib.php";
$lab_config_id = $_SESSION['lab_config_id'];
$discount_type = $_REQUEST['sel'];
$discount_amount = $_REQUEST['amt'];
$discount_id = $_REQUEST['id'];
$assoc = BillsTestsAssociationObject::loadFromId($discount_id, $lab_config_id);
$assoc->setDiscountType($discount_type);
$assoc->setDiscountAmount($discount_amount);
$assoc->save($lab_config_id);
$bill = Bill::loadFromId($assoc->getBillId(), $lab_config_id);
echo json_encode(array("a" => format_number_to_money($assoc->getDiscountedTotal()), "b" => format_number_to_money($bill->getBillTotal($lab_config_id))));
Esempio n. 4
0
" value="<?php 
    echo $assoc->getDiscountAmount();
    ?>
"/>
					</td>
					<td><div style="color:blue; cursor:hand; cursor:pointer;" onclick="javascript:apply_discount(<?php 
    echo $assoc->getId();
    ?>
)">Update Cost</div></td>
				</tr>
				<?php 
}
?>
				<tr>
					<td colspan='6'></td>
					<td>Bill Total: <div id="bill_total" ><?php 
echo format_number_to_money($bill->getBillTotal($lab_config_id));
?>
</div></td>
				</tr>
			</table>
			<input type='button' value='Print Bill' onclick="javascript:print_bill(<?php 
echo $bill->getId() . ", " . $lab_config_id;
?>
)"\>
		</form>
	</body>
</html>

<?php 
include "includes/footer.php";
Esempio n. 5
0
 public function getFormattedTestCost()
 {
     $cost = $this->getDiscountedTotal();
     return format_number_to_money($cost);
 }