Add info deal
This commit is contained in:
parent
3fa4c0e223
commit
22d96f1b28
@ -1132,14 +1132,60 @@ ORDER BY date_sort ASC";
|
|||||||
<div class="message">Запланирована сделка на <?=$d?> <?=getRusMonth($m)?> <?=$y?> в <?=date("H:i", strtotime($date_source))?></div>
|
<div class="message">Запланирована сделка на <?=$d?> <?=getRusMonth($m)?> <?=$y?> в <?=date("H:i", strtotime($date_source))?></div>
|
||||||
|
|
||||||
<?php if ($deal_data) { ?>
|
<?php if ($deal_data) { ?>
|
||||||
<!-- НОВЫЙ ВАРИАНТ: расширенная информация о сделке -->
|
|
||||||
<hr style="border:none;border-top:1px solid #e0e0e0;margin:6px 0;">
|
<hr style="border:none;border-top:1px solid #e0e0e0;margin:6px 0;">
|
||||||
<?php if ($deal_data['contract_price']) { ?>
|
<?php
|
||||||
<div class="message" style="font-size:13px;">Сумма в договоре: <?=number_format($deal_data['contract_price'], 0, '', ' ')?><span class="rub"> руб.</span></div>
|
$price_fields = [
|
||||||
<?php } ?>
|
'contract_price' => 'Стоимость в договоре',
|
||||||
<?php if ($deal_data['agent_commission']) { ?>
|
'object_price' => 'Цена объекта',
|
||||||
<div class="message" style="font-size:13px;">Комиссия агента: <?=number_format($deal_data['agent_commission'], 0, '', ' ')?><span class="rub"> руб.</span></div>
|
'commission_buyer' => 'Комиссия с покупателя/арендатора',
|
||||||
<?php } ?>
|
'commission_seller' => 'Комиссия с продавца/арендодателя',
|
||||||
|
'agent_commission' => 'Комиссия агента',
|
||||||
|
'total_commission' => 'Итого комиссионные',
|
||||||
|
];
|
||||||
|
foreach ($price_fields as $field => $label) {
|
||||||
|
if (!empty($deal_data[$field]) && $deal_data[$field] > 0) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">' . $label . ': ' . number_format($deal_data[$field], 0, '', ' ') . '<span class="rub"> руб.</span></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$bool_labels = [
|
||||||
|
'proxy_sale' => 'Продажа по доверенности',
|
||||||
|
'e_registration' => 'Электронная регистрация',
|
||||||
|
'mortgaged' => 'Объект в залоге',
|
||||||
|
'has_counter_agent' => 'Встречный агент',
|
||||||
|
];
|
||||||
|
foreach ($bool_labels as $field => $label) {
|
||||||
|
if (!empty($deal_data[$field]) && $deal_data[$field] == 1) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">' . $label . ': Да</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$count_fields = [
|
||||||
|
'sellers_count' => 'Количество продавцов',
|
||||||
|
'buyers_count' => 'Количество покупателей',
|
||||||
|
];
|
||||||
|
foreach ($count_fields as $field => $label) {
|
||||||
|
if (!empty($deal_data[$field]) && $deal_data[$field] > 0) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">' . $label . ': ' . intval($deal_data[$field]) . '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($deal_data['mortgagee'])) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">Залогодержатель: ' . htmlspecialchars($deal_data['mortgagee']) . '</div>';
|
||||||
|
}
|
||||||
|
if (!empty($deal_data['debt_amount']) && $deal_data['debt_amount'] > 0) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">Сумма долга: ' . number_format($deal_data['debt_amount'], 0, '', ' ') . '<span class="rub"> руб.</span></div>';
|
||||||
|
}
|
||||||
|
if (!empty($deal_data['counter_agent_name'])) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">Встречный агент: ' . htmlspecialchars($deal_data['counter_agent_name']) . '</div>';
|
||||||
|
}
|
||||||
|
if (!empty($deal_data['counter_agent_commission']) && $deal_data['counter_agent_commission'] > 0) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">Комиссия встречному агенту: ' . number_format($deal_data['counter_agent_commission'], 0, '', ' ') . '<span class="rub"> руб.</span></div>';
|
||||||
|
}
|
||||||
|
if (!empty($deal_data['counter_agent_phone'])) {
|
||||||
|
echo '<div class="message" style="font-size:13px;">Телефон встречного агента: ' . htmlspecialchars($deal_data['counter_agent_phone']) . '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="message" style="margin-top:5px;font-size:13px;">
|
<div class="message" style="margin-top:5px;font-size:13px;">
|
||||||
<b>Стороны сделки:</b><br/>
|
<b>Стороны сделки:</b><br/>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user