How do I assign different letter heads to different doctype/print format so that the PDF print of the doctype can have the correct letterhead. A company could have multiple locations/warehouses and based on that there could be a need to have different letterheads in the prints.
In the same way, if the field is not present, just create a new link field for Letter Head. This selection will correspond to the one being shown in the print preview.
hey thanks for replying, but this is manual and can only be done when I am creating the document. Can I have it dynamic while printing for older documents also ?
Hey @palashjhabak Have you tried custom script like this
frappe.ui.form.on('Purchase Order', {
refresh(frm) {
if(frm.doc.set_warehouse == "Warehouse Name"){
frm.set_value("letter_head","Letterhead Name of the warehouse");
}
});
Search for Custom Script and set it once for each doctype you want to print on different letterhead. Find the common factor used per doctype like above I used Cost Center which is defined on every