Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
3252 Visninger

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...

Avatar
Kassér
Forfatter

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.

Bedste svar

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 

Avatar
Kassér