Facing issue to make New Purchase Invoice

Hello Everyone,

I was try to make new purchase invoice but when I tried to save that invoice they gives error “pymysql.err.InternalError: (1054, “Unknown column ‘export_type’ in ‘field list’”)”
Screenshot of this problem attached below…
Please give me a proper solution on this problem…

Hi,

It may help to say what version ERPNext, and whether this is happening on first use or if purchase invoices have been raised in the past without trouble.

Hello @smino

No, I have never raised purchase invoice before, This is my first time

Version Details :
ERPNext: v12.17.0 (version-12)
Frappe Framework: v12.14.0 (version-12)

Try: bench migrate, then bench update and see if it helps.

Sorry @smino but its not working.

The error message suggests that a field normally found in the Purchase Invoice doctype is not there. This could be due to inadvertent deletion during customization, or a fault in the installation of ERPNext. If this is a new installation and loss of data is not important, then:

bench --site [sitename] --force reinstall Reinstall with fresh database (Caution: Will wipe out old database)

A backup of data before reinstalling , then restoring, may or may not succeed.

I suppose you could also try adding the field to the table via a sql command, however there may be other issues and the message you see is only this first.