Auto generate purchase invoice on sales order submiit

for my useCase of erpnext i need to auto generate purchase order from sales order on submit.
is there any build in solutions ?

all items have a default supplier in the system,
i need to use same price as items price in sales order to generate purchase invoice.

@Emad_Fani There is no direct link between sales order and purchase invoice . so the answer is no.

1 Like

It’s possible only with a custom app

1 Like

You could do this with a server script listening to the on_submit hook. No need to build a custom app.

thanks, although i know about server scripts but do to lack of debuging tools i didnt want to make any customization and wanted to use build in solutions, i will check it out, thanks

Server scripts use the regular error logging process, so you can spot problems in production. In development, I believe you can use all the regular debugging tools you would use for other server-side code.

Generating a purchase order from a sales order is somewhat unusual as use-case, so I doubt it will ever be built in. It’s a pretty easy customization to implement, though.