public function preracunaj($smer = false) { $ls = $this->nasDelez - $this->zaproseno - $this->drugiJavni - $this->vsotaDrugihVirov() - $this->vlozekGostitelja; $this->lastnaSredstva = \Max\Functions::euroRound($ls); //Zaokrožimo na 2 decimalki predno shranimo $this->preracunajCelotnoVrednost(); //$$ verjetno malo redundantno // preračunamo navzdol foreach ($this->getKoprodukcije() as $numObject => $koprodukcija) { $koprodukcija->preracunaj(); // se ne zacikla, ker ni smer=up } $this->celotnaVrednostMat = $this->nasDelez - $this->celotnaVrednostGostovSZ; }
public function preracunaj($smer = false) { if ($this->placiloNaVajo) { $this->vrednostDoPremiere = $this->vrednostVaje * $this->planiranoSteviloVaj; } else { $this->vrednostDoPremiere = $this->vrednostVaj; } $this->vrednostDoPremiere = \Max\Functions::euroRound($this->vrednostDoPremiere); //Zaokrožimo na 2 decimalki predno shranimo }