last 12.21

This commit is contained in:
Kevin Adametz 2021-12-25 02:53:44 +01:00
parent 73e38a006e
commit 3df0e93c2c
14 changed files with 395 additions and 43 deletions

View file

@ -151,6 +151,7 @@ class BookingRepository extends BaseRepository {
'deposit_total' => $data['deposit_total'] ? Util::_clean_float($data['deposit_total']) : 0,
'final_payment' => $data['final_payment'] ? Util::_clean_float($data['final_payment']) : 0,
'final_payment_date' => $data['final_payment_date'] ? _reformat_date($data['final_payment_date']) : null,
'price_total' => ($this->model->getPriceRaw() + $this->model->getServiceTotal(true)),
];
$this->model->fill($fill);
$this->model->save();
@ -197,6 +198,9 @@ class BookingRepository extends BaseRepository {
}
}
}
$this->model->price_total = ($this->model->getPriceRaw() + $this->model->getServiceTotal(true));
$this->model->save();
return $this->model;
}