From 097d11732e36056ffeeaa8302f86a95fa12909a2 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Sun, 3 Apr 2022 17:07:18 +0200 Subject: [PATCH] Ivt Transfer uses banking data from contact first --- Layout/default/header.php | 4 ++-- application/IvtCustomer/IvtCustomerController.php | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Layout/default/header.php b/Layout/default/header.php index 3f973b9d1..c2ba9fe86 100644 --- a/Layout/default/header.php +++ b/Layout/default/header.php @@ -31,13 +31,13 @@ - + - + diff --git a/application/IvtCustomer/IvtCustomerController.php b/application/IvtCustomer/IvtCustomerController.php index 714e0c17b..7f260bd32 100644 --- a/application/IvtCustomer/IvtCustomerController.php +++ b/application/IvtCustomer/IvtCustomerController.php @@ -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; }