Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2346 Lượt xem

Good afternoon, 

in my country there is a sales scenario where rounding is for the benefit of the customer. 

 example: 

if it is 10.78 the total of the invoice, it is rounded to 10.70 and 0.08 goes to the rounding.  How could I do so that my self.residual is the difference between the total of the document and the new field created self.redondeo

try with: 

(self.residual = self.amount_total-self.redondeo)

 but the change is not executed, this line added it in def _computer_amount (self), I don't know if it's the right way. thank you.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
3462
1
thg 7 25
1599
1
thg 8 25
1153
0
thg 5 25
1927
2
thg 4 25
4245