/** * Izračuna odstotekFinanciranja * * potrebno na novo izračunati vedno, ko se celotna vrednost spremeni */ public function preracunajOdstotekFinanciranja() { /** * izračunaj % financiranja */ $celVrednost = $this->getEnotaPrograma()->getCelotnaVrednost(); $odstFin = !($celVrednost == 0) ? 100 * $this->getDelez() / $celVrednost : 0; $odstFin = \Max\Functions::procRound($odstFin); //Zaokrožimo na 2 decimalki predno shranimo $this->odstotekFinanciranja = $odstFin; }