|
|
@@ -242,52 +242,54 @@ $documentClass = $documentManager->getClass($model); |
|
|
|
|
|
|
|
<?php if ($action == 'update' && $documentClass == 'Invoice'): ?> |
|
|
|
|
|
|
|
<div v-if="document.status == 'valid'"> |
|
|
|
<div class="panel panel-default"> |
|
|
|
<div class="panel-heading"> |
|
|
|
Règlement |
|
|
|
</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<?php if($model->payments && count($model->payments) > 0): ?> |
|
|
|
<table class="table table-bordered"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th>Moyen de paiement</th> |
|
|
|
<th>Montant</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<?php foreach($model->payments as $payment): ?> |
|
|
|
<tr> |
|
|
|
<td><?= $paymentManager->getStrMeanPayment($payment); ?></td> |
|
|
|
<td><?= Price::format($payment->amount); ?></td> |
|
|
|
</tr> |
|
|
|
<?php endforeach; ?> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<?php endif; ?> |
|
|
|
<?php if($documentManager->isStatusValid($model)): ?> |
|
|
|
<div> |
|
|
|
<div class="panel panel-default"> |
|
|
|
<div class="panel-heading"> |
|
|
|
Règlement |
|
|
|
</div> |
|
|
|
<div class="panel-body"> |
|
|
|
<?php if($model->payments && count($model->payments) > 0): ?> |
|
|
|
<table class="table table-bordered"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th>Moyen de paiement</th> |
|
|
|
<th>Montant</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<?php foreach($model->payments as $payment): ?> |
|
|
|
<tr> |
|
|
|
<td><?= $paymentManager->getStrMeanPayment($payment); ?></td> |
|
|
|
<td><?= Price::format($payment->amount); ?></td> |
|
|
|
</tr> |
|
|
|
<?php endforeach; ?> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<?php if(!$invoiceManager->isInvoicePaid($model)): ?> |
|
|
|
<div class="row"> |
|
|
|
<?php $form = ActiveForm::begin(); ?> |
|
|
|
<div class="col-md-4"> |
|
|
|
<?= $form->field($payment, 'mean_payment')->dropDownList(MeanPayment::getAll()); ?> |
|
|
|
</div> |
|
|
|
<div class="col-md-4"> |
|
|
|
<?= $form->field($payment, 'amount')->textInput(); ?> |
|
|
|
</div> |
|
|
|
<div class="col-md-4"> |
|
|
|
<div class="form-group"> |
|
|
|
<br> |
|
|
|
<?= Html::submitButton('Ajouter', ['class' => 'btn btn-primary']) ?> |
|
|
|
<?php if(!$invoiceManager->isInvoicePaid($model)): ?> |
|
|
|
<div class="row"> |
|
|
|
<?php $form = ActiveForm::begin(); ?> |
|
|
|
<div class="col-md-4"> |
|
|
|
<?= $form->field($payment, 'mean_payment')->dropDownList(MeanPayment::getAll()); ?> |
|
|
|
</div> |
|
|
|
<div class="col-md-4"> |
|
|
|
<?= $form->field($payment, 'amount')->textInput(); ?> |
|
|
|
</div> |
|
|
|
<div class="col-md-4"> |
|
|
|
<div class="form-group"> |
|
|
|
<br> |
|
|
|
<?= Html::submitButton('Ajouter', ['class' => 'btn btn-primary']) ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
</div> |
|
|
|
<?php ActiveForm::end(); ?> |
|
|
|
</div> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
<div v-if="(deliveryNoteUpdateArray && deliveryNoteUpdateArray.length > 0) || (deliveryNoteCreateArray && deliveryNoteCreateArray.length > 0)"> |
|
|
|
<div class="panel panel-default"> |