Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012581Openbravo ERP03. Procurement managementpublic2010-03-06 08:322011-07-22 11:32
balamurugan 
balamurugan 
highminoralways
closedno change required 
20Professional Appliance
 
 
Core
No
0012581: In Purchase/Sales Order Lines tab, while editing Line Net Amount, it is changed when we save.
In Purchase/Sales Order Lines tab, the user entered Line Net Amount value got changed when we save the order lines.
1. Go to Sales Management || Transactions || Sales Order || Header >> Lines tab
2. Select any product, and enter the following values.
  - Ordered Quantity=7
  - Now, the remaining fields like Net Unit Price, Net Standard price. etc., are populated as per the setup.
  - check the Edit Line Net Amount field and change the value of Line Net Amount to 45.33
  - Please realize that the Net Unit Amount is changed based on the Line Net Amount entered.
  - click Save.
  - Now, realize that Line Net Amount is changed to 45.36
Merge all c_orderlineX_trgX triggers into one only trigger.
No tags attached.
blocks defect 0012582 closed balamurugan "Line Net Amount is not Correct" Error message is displayed when we try to save any Purchase/Sales Invoice Line 
Issue History
2010-03-06 08:32balamuruganNew Issue
2010-03-06 08:32balamuruganAssigned To => adrianromero
2010-03-06 09:15balamuruganAssigned Toadrianromero => dalsasua
2010-03-06 09:16balamuruganRelationship addedblocks 0012582
2010-03-08 08:29dalsasuaAssigned Todalsasua => balamurugan
2010-03-08 08:47dalsasuaNote Added: 0025107
2010-03-08 08:50dalsasuaProposed Solution updated
2011-07-22 11:32psarobeNote Added: 0039328
2011-07-22 11:32psarobeStatusnew => closed
2011-07-22 11:32psarobeResolutionopen => no change required

Notes
(0025107)
dalsasua   
2010-03-08 08:47   
This is what I reported in issue 12495: that trigger is not working, and value is changed...
After debuging, I see that the problem is that when trigger c_orderline_trg3 is executed, it is already provided the changed value. Another trigger is acting on the table before the c_orderline_trg3 acts... My assumption is that this line:
new.LineNetAmt := ROUND(new.QtyOrdered*new.PriceActual, v_Prec);-- Modified by I.Ciordia
in the c_orderline_trg trigger is the one failing.
I change the proposed solution to merge all c_orderline_trgX triggers into one only trigger, where order in which statements are executed are not random, as it happens with different triggers for the same table.
(0039328)
psarobe   
2011-07-22 11:32   
It is working fine