AnsweredAssumed Answered

Quote wrong tax field after change line items

Question asked by Stefano Mapelli on Sep 28, 2016
Latest reply on Sep 29, 2016 by Alan Apter


I use SugarCRM 7.6 pro and when I programmatically change the discount_price of a line item in a quote. When I save the bean the total is wrong beaceuse the tax is not calculated. For example:


Original quote

tax rate=22%:  

product discount_price=100




After change quote

tax rate=22%

product discount_price=1000




Why does this happen? The total is correctly calculated with the sum of the discount_price of the products in the quotes but sugar doesn't sum the correct tax.


I try to insert programmatically the correct tax, but the value of tax in the DB doesn't change.

When I open the quote in sugar the total is wrong, when I open the quote in the editview the field is updated and with the save button I can fix the wrong value. I want to do the same thing with PHP code and not with the user interface.


I find also that this is a bug but it was corrected in the 7.2 version and I have the 7.6


Please help me.