hasMany( 'Invoice' ); } public static function getVats( $archive ) { if ( $archive == 'F' ) { $vats = vat::whereArchive( 'F' )->get(); } else { $vats = Vat::get(); } return $vats; } public static function getCurrentVat() { $currentVat = Vat::whereActive('T')->whereArchive('F')->first(); if( ! $currentVat) return 0; return $currentVat->vatrate; } }