From d6987c110c631f9996cf11a38a069c19c88b1d7c Mon Sep 17 00:00:00 2001 From: Malin Date: Tue, 17 Feb 2026 13:40:31 +0100 Subject: [PATCH] fix: simplify ListaPrecios filter to price list code + active status Remove Source_Type filter to allow flexible assignment types per price list in BC. Co-Authored-By: Claude Opus 4.6 --- woo-business-central/includes/class-wbc-product-sync.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/woo-business-central/includes/class-wbc-product-sync.php b/woo-business-central/includes/class-wbc-product-sync.php index 80eb273..5b7f8a6 100644 --- a/woo-business-central/includes/class-wbc-product-sync.php +++ b/woo-business-central/includes/class-wbc-product-sync.php @@ -291,8 +291,7 @@ class WBC_Product_Sync { /** * Get price from ListaPrecios custom endpoint * - * Filters by: Assign-to Type = All Customers, Status = Active, - * Price List Code = specified code, and Product No. = item number. + * Filters by: Price List Code, Status = Activo, and Product No. = item number. * * @param string $item_number BC item number. * @param string $price_list_code Price list code (e.g. 'B2C'). @@ -309,7 +308,6 @@ class WBC_Product_Sync { $result = WBC_API_Client::odata_get( 'ListaPrecios', array( '$filter' => "Price_List_Code eq '" . $escaped_code . "'" . " and Status eq 'Activo'" - . " and Source_Type eq 'Todos los clientes'" . " and Product_No eq '" . $escaped_number . "'", '$select' => 'Unit_Price', '$top' => 1,