diff --git a/app/helpers/Woo_Helper.php b/app/helpers/Woo_Helper.php index c996fdd..a0d49b6 100644 --- a/app/helpers/Woo_Helper.php +++ b/app/helpers/Woo_Helper.php @@ -286,6 +286,40 @@ class PEPPOL_Woo_Helper { } } + // Si aucun champ n'a été trouvé dans les groupes billing/shipping, + // chercher dans toutes les meta keys contenant un pattern + if (empty($vat_fields_found)) { + foreach ($order->get_meta_data() as $meta) { + $k = (string) $meta->key; + $k_lower = strtolower($k); + + // Vérifier si la clé contient un pattern TVA + $found = false; + foreach ($patterns as $p) { + if (strpos($k_lower, $p) !== false) { + $found = true; + break; + } + } + + if ($found) { + $v = $meta->value; + if (is_string($v)) { + $v = trim($v); + } + if (!empty($v)) { + if (!isset($vat_fields_found[$k])) { + $vat_fields_found[$k] = [ + 'key' => $k, + 'value' => $v, + 'group' => 'other', // Groupe "other" pour les champs hors billing/shipping + ]; + } + } + } + } + } + return array_values($vat_fields_found); } diff --git a/assets/css/admin.css b/assets/css/admin.css index 1253f75..9d4ffe8 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -517,9 +517,7 @@ a.statut:visited { font-style: italic; } -<<<<<<< HEAD -/* ======================================== - ÉTAT COMPLÉTÉ : .is-done + /** ÉTAT COMPLÉTÉ : .is-done ======================================== */ .step.is-done::before { @@ -570,17 +568,4 @@ a.statut:visited { .step.is-done[data-step="✓"]::before { font-size: 22px; content: "✓"; -======= -.esi-peppol-dashboard-actions { - margin-top: 40px; - padding-top: 30px; - border-top: 2px solid #f0f0f1; -} - -.esi-peppol-dashboard-actions h2 { - margin: 0 0 16px 0; - font-size: 20px; - font-weight: 600; - color: #1d2327; ->>>>>>> f1fd1fe1015c57a9f30ec2f84ef5b774162d5a83 }