Ivt Transfer uses banking data from contact first

This commit is contained in:
Frank Schubert
2022-04-03 17:07:18 +02:00
parent e81a961d0f
commit 097d11732e
2 changed files with 9 additions and 4 deletions

View File

@@ -31,13 +31,13 @@
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/bootstrap-select.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-autocomplete.min.js"></script>
<?php if(MFAPPNAME == "devthetool"): ?>
<?php if(MFAPPNAME == "devthetool"): ?>
<style type="text/css">
body {
border-left: 8px dashed #f672a7;
}
</style>
<?php endif; ?>
<?php endif; ?>
</head>

View File

@@ -73,7 +73,12 @@ class IvtCustomerController extends mfBaseController {
$ivtc->phone = $contact->phone;
$ivtc->email = $contact->email;
if($order->billing_type == "sepa") {
if($contact->billing_type == "sepa") {
$ivtc->payment = 0; // 0 = sepa / 1 = rechnung
$ivtc->BIC = $contact->bank_account_bic;
$ivtc->IBAN = $contact->bank_account_iban;
} elseif($order->billing_type == "sepa") {
$ivtc->payment = 0; // 0 = sepa / 1 = rechnung
$ivtc->BIC = $order->bank_account_bic;
$ivtc->IBAN = $order->bank_account_iban;
@@ -84,7 +89,7 @@ class IvtCustomerController extends mfBaseController {
}
$ivtc->paper_invoice = 0;
if(!$contact->email) {
if(!$contact->email || $contact->billing_delivery == "paper") {
$ivtc->paper_invoice = 1;
}