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

I wanna to add a field betwen Quantity and Unit Price, name field is Discount,, i can add name header field, but i can't add connection to the database,, how to get field database for Discount?

thanks...

Ảnh đại diện
Huỷ bỏ
Tác giả

Help Me,,,,

It is functional field might be value is not stored in database. so you cannot get value directly. you can define your own method in parser class to get discount value. pass amount and discount percentage from line into that method and return the specific discount value.

Câu trả lời hay nhất

In Settings --> Configuration --> Sales,
      Enable "Allow setting a discount on sales order lines".

After enabling the Discount field will be available at report.

To get field name for Discount:
      ==> Activate Developer mode and hower to your field.  
      ==> Go to Settings --> Technical --> Database structure --> Models and search for "sale.order".  Now you can see the list of fields available at Sale order 

Ảnh đại diện
Huỷ bỏ