fix: use Asset_No instead of Product_No for ListaPrecios filter

Product_No doesn't exist on NAV.ListaPrecios, the correct field
is Asset_No (field 8).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 13:45:47 +01:00
parent d6987c110c
commit 7cbbf3dec1

View File

@@ -308,7 +308,7 @@ 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 Product_No eq '" . $escaped_number . "'", . " and Asset_No eq '" . $escaped_number . "'",
'$select' => 'Unit_Price', '$select' => 'Unit_Price',
'$top' => 1, '$top' => 1,
) ); ) );