Create new Proforma Invoice page

Hi All

Now I try to clone code of Sales Order to Profoma Invoice, But I need to fix many code (convert from Sales Order to Profoma Invoice but not easy to understand code to fix) and need to customize code of erpnext app ( try add payment for Profoma Invoice this way is not good)

Could you suggest me how to create new Profoma Invoice Page easier or anyone have already?

Thank you very much,

it’s very strange to create a proforma invoice (Quotation in ERPNext parlance) from a Sales Order. It’s usually the other way round. However, nothing is impossible. You can view https://github.com/frappe/erpnext/blob/9b74f8bd37359a7d68e989b20e1561dad49aa584/erpnext/selling/doctype/quotation/quotation.py#L122 for inspiration which is the code that creates a Sales Order from a Quotation

1 Like

Thank @tundebabzy.

My workflow of my Company is Quotation >> ProForma >> Sales Order.

I need to create new Profoma Invoice because current Erpnext Only have Quotation, Sales Order , Sales Invoice, So I copy code Sales Order to make Profoma,

It’s ok?

Quotation is no different from Proforma Invoice. Just naming. If you must have a Doctype for proforma invoice, copy the code for Quotation instead.

Hi @tundebabzy

Yes thanks, Now I copy code of Sales Order.