Skip to content

Commit 5df80e1

Browse files
dev
1 parent c3e8ba9 commit 5df80e1

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/views/upa-order/view.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,30 @@
9696
<?php endif; ?>
9797
</div>
9898
</div>
99+
100+
<?php if ($model->shop_pay_system_id == 10) : ?>
101+
<?php if ($model->cmsUser && $model->cmsUser->cmsContractors) : ?>
102+
<div class="sx-pay-wrapper">
103+
<form method="get" target="_blank" action="<?php echo \yii\helpers\Url::to(['/order/pdf']); ?>">
104+
<input type="hidden" name="code" value="<?php echo $model->code; ?>"/>
105+
<? if (count($model->cmsUser->cmsContractors) > 1) : ?>
106+
<div style="margin-bottom: 1rem;">
107+
<?php echo \skeeks\cms\widgets\Select::widget([
108+
'name' => 'c_id',
109+
'allowDeselect' => false,
110+
'data' => \yii\helpers\ArrayHelper::map($model->cmsUser->cmsContractors, 'id', 'name'),
111+
'options' => ['required' => 'required', 'placeholder' => 'Выберите юридическое лицо для оплаты...'],
112+
]); ?>
113+
</div>
114+
<? else : ?>
115+
<?php $firstContractor = $model->cmsUser->getCmsContractors()->one(); ?>
116+
<input type="hidden" name="c_id" value="<?php echo $firstContractor->id; ?>"/>
117+
<? endif; ?>
118+
<button type="submit" class="btn btn-xl btn-primary">Скачать счёт</button>
119+
</form>
120+
</div>
121+
<?php endif; ?>
122+
<?php endif; ?>
99123

100124
<? if ($model->shopOrderStatus->is_payment_allowed && $model->paySystem && $model->paySystem->paySystemHandler && !$model->paid_at) : ?>
101125
<div style="margin-top: 15px; background: #fafafa; padding: 15px 0;">

0 commit comments

Comments
 (0)