type = new BaseStringL11nType(); $this->start = new \DateTime('now'); $this->end = new \DateTime('now'); $this->createdAt = new \DateTimeImmutable('now'); $this->from = new Account(); $this->net = new FloatInt(); $this->gross = new FloatInt(); $this->taxP = new FloatInt(); } /** * Recalculate the expenses * * @return void * * @since 1.0.0 */ public function recalculate() : void { $net = 0; $gross = 0; foreach ($this->elements as $element) { $net += $element->net->value; $gross += $element->gross->value; } $this->net->value = $net; $this->gross->value = $gross; } use \Modules\Media\Models\MediaListTrait; use \Modules\Editor\Models\EditorDocListTrait; }