This commit is contained in:
2026-04-24 23:37:57 +02:00
parent ff05330778
commit ed2f89567c
15 changed files with 1263 additions and 41 deletions

View File

@@ -16,14 +16,19 @@ class IndexController extends MainController implements ControllerInterface {
//Utils::ArrayDisplay($_POST);
//SessionProxy::SetValue("infoSent",'true');
$registrationSettings = RegistrationFormSettings::GetSettings();
$vatMultiplier = $registrationSettings['vat_multiplier'];
$arrayPriceVat = array();
$arrayPricePromVat = array();
$arrayPrice = Utils::GetArrayList('mf_parameters', 'id_mf_parameters', 'price');
$arrayPriceProm = Utils::GetArrayList('mf_parameters', 'id_mf_parameters', 'price_prom');
foreach ($arrayPrice as $key => $price) {
$priceVat = $price*1.23;
$priceVat = $price*$vatMultiplier;
$arrayPriceVat[$key] = $priceVat;
}
foreach ($arrayPriceProm as $key => $price) {
$priceVat = $price*1.23;
$priceVat = $price*$vatMultiplier;
$arrayPricePromVat[$key] = $priceVat;
}
@@ -32,6 +37,9 @@ class IndexController extends MainController implements ControllerInterface {
$this->smarty->assign('arrayPriceVatJson', str_replace('"', '', json_encode($arrayPriceVat)));
$this->smarty->assign('arrayPricePromJson', str_replace('"', '', json_encode($arrayPriceProm)));
$this->smarty->assign('arrayPricePromVatJson', json_encode($arrayPricePromVat));
$this->smarty->assign('registrationSettings', $registrationSettings);
$this->smarty->assign('registrationPricesJson', json_encode($registrationSettings['prices']));
$this->smarty->assign('registrationVatMultiplier', $vatMultiplier);
$type = 1;
@@ -213,11 +221,20 @@ class IndexController extends MainController implements ControllerInterface {
$arrayPrice2Value = array();
$objParticipant->setFeeFull(serialize($arrayFee));
if (isset($arrayFee['disc'])) {
unset($arrayFee['disc']);
$arrayFeeForCalculation = $arrayFee;
if (isset($arrayFeeForCalculation['disc'])) {
unset($arrayFeeForCalculation['disc']);
}
if (Request::GetPost('conference_fee') == 5) {
$resultPrice = RegistrationFormSettings::GetOneDayPrice(Request::GetPost('conference_fee_disc'));
foreach ($arrayFeeForCalculation as $feeKey => $feeValue) {
if ($feeValue == 5) {
unset($arrayFeeForCalculation[$feeKey]);
}
}
}
foreach ($arrayObjParameters as $objParam) {
if (in_array($objParam->GetId(), $arrayFee) != '') {
if (in_array($objParam->GetId(), $arrayFeeForCalculation) != '') {
if (Request::GetPost('conference_fee_disc') == 2) {
if($objParam->GetId() != 2 || $_POST['fee_room1'] != null){
$resultPrice = $resultPrice + $objParam->getPrice();