MySQL triggers

I am creating a trigger to update price (U.P net of tax) in customer order. This is the trigger:
CREATE TRIGGER disc BEFORE UPDATE ON llx_commandedet FOR EACH ROW SET new.price=price/(1+tva_tx/100);

If I create a new customer order then add item then edit that line to enter a new price I get an error in Dolibarr:
Unknown column ‘price’ in ‘field list’
In table llx_commandedet there is a column called price.
What am I doing wrong? Can one run a trigger like that?

HI. Have you worked out the solution?

I have overcome a similar issue: I have create a trigger in MySQL to update my invoice due-date with the actual delivery date. This trigger works correctly if I update the delivery date directly in MySQL database/table. However, back to Dolibarr, we found out the Dolibarr PHP update the actual delivery date but the MySQL trigger is not fired so there is always no update to the invoice due-date.

Could you please share how you revolve your trigger issue? Thanks.