Multiple naming series

by | Jan 7, 2023 | Frappe Framework | 0 comments

Below example is of Sales Invoice if Is return is marked the series will be of the CN-0001 or else the series will be SI-0001

frappe.ui.form.on("Sales Invoice", {
    before_save(frm) {
        if(frm.doc.__islocal == 1){
            if(frm.doc.is_return == 1){
                (frm.set_value('naming_series', 'CN-.####'));
            }else{
                (frm.set_value('naming_series', 'SI-.####'));
            }
        }
        
    }
    
});

By Aadhil PM

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *