How to print HTML fields in Print Format?

Hi,

I want to print tax break-up in print format. But its html print.
How to print this html fields into printformat?

Thanks,
Sambhaji

HTML values are not saved. Set it of type Text.

1 Like

Is there a way to print “tax break-up”?

@kolate_sambhaji did you solve this issue? I need to print the tax break up as well, and couldnt figure out how.

@kirthi
You can add custom field tax_breakup of type Text Editor
Add following script in Sales Invoice. Script will copy tax breakup into new field, then you can easily print new field into print format.

frappe.ui.form.on("Sales Invoice", "validate", function(frm) { 
var tax= $(".tax-break-up").html()
$(cur_frm.fields_dict.other_charges_calculation.wrapper).html("sam")
cur_frm.set_value("tax_breakup",tax);

});
3 Likes

Worked like a charm! Thanks @kolate_sambhaji

1 Like