<?php
function throwVat( $iVat ){
	$oDB = DataBase::getInstance( );
	$aData = $oDB->throwData( DB_VAT, $iVat, 'iVat' );
	if( isset( $aData ) ){
		$aData['sVatValue'] = sprintf( '%01.2f', $aData['fVatValue'] );
		return $aData;
	}
}
function throwVatValue( $iVat ){
	$oDB = DataBase::getInstance( );
	$aData = $oDB->throwData( DB_VAT, $iVat, 'iVat' );
	return $aData['fVatValue'];
}
function getVatIdByValue( $fVatValue ){
	$oDB = DataBase::getInstance( );
	$aData = $oDB->throwData( DB_VAT, $fVatValue, 'fVatValue' );
	return $aData['iVat'];
}
?>