From 7ce028b7b8d2d341f3fd6517b05512d0932048a8 Mon Sep 17 00:00:00 2001 From: Malin Date: Tue, 17 Feb 2026 13:38:25 +0100 Subject: [PATCH] fix: correct ListaPrecios OData field names and enum values Source_Type (not Assign_to_Type), Status='Activo' and Source_Type='Todos los clientes' (Spanish enum values from BC). Co-Authored-By: Claude Opus 4.6 --- woo-business-central/includes/class-wbc-product-sync.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/woo-business-central/includes/class-wbc-product-sync.php b/woo-business-central/includes/class-wbc-product-sync.php index 08cdf5b..80eb273 100644 --- a/woo-business-central/includes/class-wbc-product-sync.php +++ b/woo-business-central/includes/class-wbc-product-sync.php @@ -308,8 +308,8 @@ class WBC_Product_Sync { $result = WBC_API_Client::odata_get( 'ListaPrecios', array( '$filter' => "Price_List_Code eq '" . $escaped_code . "'" - . " and Status eq 'Active'" - . " and Assign_to_Type eq 'All Customers'" + . " and Status eq 'Activo'" + . " and Source_Type eq 'Todos los clientes'" . " and Product_No eq '" . $escaped_number . "'", '$select' => 'Unit_Price', '$top' => 1,