OPEN-DSI / ecommerceng_woosync

WooSync, synchronize Woocommerce and Dolibarr
GNU General Public License v3.0
67 stars 42 forks source link

"Woosync total delta" calculations causes SQL error in invoice list #115

Open marc-dll opened 8 months ago

marc-dll commented 8 months ago

At least up to Dolibarr v16, the calculation of the column "Woosync total delta" in invoice list causes an SQL error.

Up to this version, Dolibarr builds the SQL query to count objects in the list by replacing info the query that fetches the results.

This replacement is peculiar, and the way it is done doesn't allow the + sign to be there... which your module does :/

See https://github.com/Dolibarr/dolibarr/blob/16.0/htdocs/compta/facture/list.php#L871 to see what I mean.

I didn't try in Dolibarr v17+, as the way this is done is different, I guess this works there.

I created a PR in the core to try to fix the underlying issue : https://github.com/Dolibarr/dolibarr/pull/26525. In the eventuality that it is merged, you have nothing to do ! But else, there is a workaround to be found.