PO Number automation

We have a situation and we are looking forward to customize a bit, the situation is as follows,

Each sales order has an order type and budget code. Once these are populated in the sales order the PO field should auto populate. The PO field will fetch data from the budget details table in the customer record.

Is it possible to customize on our own in ERPNext?

Any assistance will be appreciated! Thanks

@Abhi Custom App? or custom development if you don’t have python developer…

I think you could probably do it by adding a custom field for Budget Code, linking to that data set, hide it then use a script to combine it into the PO field. I did a similar thing for Item Number to add revision control.

Here is the script I use for Item Code… yours would be similar.

//set the item code based on PN and rev
cur_frm.cscript.custom_validate = function(doc) {
    // clear item_code (name is from item_code)
    doc.item_code = "";
    //item code should be part_number_rev
    doc.item_code = doc.part_number
    doc.item_code += "_";
    doc.item_code += doc.revision;
}
1 Like