Calculations inside DocType and Printout?

Hi guys,

basically this would only be needed for the pricelist.

I would like to accomplish the following:

Item Price: Rate net and Rate standard, Take product Tax

e.g. Product net value is 10 € incl. 20% tax, the Rate standard would be 12 €

Is this somehow possible inside the DocType?


sorry for posting again, but I wanted to tell you, what I tried so far:

Making a new Custom Field called “Gross Rate” or gross_rate, then I created a custom Script:

cur_frm.cscript.custom_gross_rate = function(doc) {
   rate_calc = (doc.price_list_rate * 1.2);
doc.gross_rate = rate_calc;

The 1.2 is the local tax, meaning 20%.

In the custom field “Gross Rate” I tried to call the function under options with “custom_gross_rate” but this does not seen to work. additionally to that I have chosen “readonly” for this.

How can I call the script withing this?


Somehow they are not going to be called…I have spent hours googling for a solution :frowning: please help!


sorry for bothering you again, but you can close the topic…after spending even more hours I realized how the custom scripts work!