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 <noreply@anthropic.com>
This commit is contained in:
@@ -291,8 +291,7 @@ class WBC_Product_Sync {
|
|||||||
/**
|
/**
|
||||||
* Get price from ListaPrecios custom endpoint
|
* Get price from ListaPrecios custom endpoint
|
||||||
*
|
*
|
||||||
* Filters by: Assign-to Type = All Customers, Status = Active,
|
* Filters by: Price List Code, Status = Activo, and Product No. = item number.
|
||||||
* Price List Code = specified code, and Product No. = item number.
|
|
||||||
*
|
*
|
||||||
* @param string $item_number BC item number.
|
* @param string $item_number BC item number.
|
||||||
* @param string $price_list_code Price list code (e.g. 'B2C').
|
* @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(
|
$result = WBC_API_Client::odata_get( 'ListaPrecios', array(
|
||||||
'$filter' => "Price_List_Code eq '" . $escaped_code . "'"
|
'$filter' => "Price_List_Code eq '" . $escaped_code . "'"
|
||||||
. " and Status eq 'Activo'"
|
. " and Status eq 'Activo'"
|
||||||
. " and Source_Type eq 'Todos los clientes'"
|
|
||||||
. " and Product_No eq '" . $escaped_number . "'",
|
. " and Product_No eq '" . $escaped_number . "'",
|
||||||
'$select' => 'Unit_Price',
|
'$select' => 'Unit_Price',
|
||||||
'$top' => 1,
|
'$top' => 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user