From 38d13c3326f57a9b7b1dc3fce67ef0a42aa55918 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Mon, 9 Aug 2021 16:47:48 +0200 Subject: [PATCH] Billing address can be empty if owner address is set --- Layout/default/Order/Form.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Layout/default/Order/Form.php b/Layout/default/Order/Form.php index 27f7948aa..99cd49179 100644 --- a/Layout/default/Order/Form.php +++ b/Layout/default/Order/Form.php @@ -293,8 +293,8 @@
@@ -834,10 +834,15 @@ checkEmpty.push("billing_phone"); checkEmpty.push("billing_email"); } + + //alert("error: " + error); + if(!$('#billingaddress_id :selected').val()) { - $('#billingaddress_id').addClass("invalid"); - $('#billingaddress_id').next().find('.select2-selection').addClass('invalid'); - error = true; + if(!$('#owner_id :selected').val()) { + $('#billingaddress_id').addClass("invalid"); + $('#billingaddress_id').next().find('.select2-selection').addClass('invalid'); + error = true; + } } // check bankdaten @@ -856,7 +861,7 @@ if(checkEmpty.length) { checkEmpty.forEach(function(field) { if(!$("#" + field).val().length) { - console(field + " empty"); + console.log(field + " empty"); $("#" + field).addClass("invalid"); error = true; }