Faster workflow for entering items in purchase invoice?

Hello ERPNext Community,

We are a small full-service media agency with branches in Germany and Austria. Currently we are dogfooding ERPNext. As a service company that purchases quite a lot of services from cloud, domain, or software vendors, and sometimes specialized hardware, we are dealing with quite a lot of unique purchase invoice items.

Now, we noticed an issue that when we get a purchase invoice it is quite time-consuming and cumbersome for us to enter each unique item (for example in an invoice from our domain registrar - first year for example.com, first year for example.de etc.). They all have different prices, and those prices often vary year over year, and therefore we also cannot use the subscription feature of ERPNext, at least not over the initial period.

The main issue we have is that for each item, we have to create it in the “New Item” popup and deselect the “Keep Stock” checkbox, and also enter both a name and a code, when in many cases in our region and line of business, items from suppliers do not have a code. This is obviously not optimal. I am talking about this popup:

Or we do it using the “edit” popup (the pencil icon, I can’t show it here as I can only post one picture as a new user). This also (seems to) work, but in that case the UOM and of course the item name need to be specified manually. Also (but perhaps due to a customization), in our production environment we get a Python error “AttributeError: ‘NoneType’ object has no attribute ‘name’” if we do that and the invoice save operation is rejected (" —
The resource you are looking for is not available").

What is the most effective solution, starting from the default Frappe Cloud ERPNext settings, to achieve a “copy-paste” or “tab-type-tab-type” solution for entering purchase invoice items? One account in the books per invoice and one stock-or-non-stock checkbox per invoice would be sufficient.

We are very happy with the sales invoice functionality btw, as there we define the items and variants, pricing policies etc., so there we need that level of control.

At the moment we do not have to do double-entry accounting, but we would like to be able to hit the ground running with that once we have to, so this would need to work as well.

I hope you can help us. Thank you in advance and thanks to the dev team for this impressive piece of software!

Hi there,

You can use a pre-defined Item on each line of a Purchase Invoice if you want, but it’s not mandatory. You can also just type in a name, a quantity, and a unit price. You can choose which fields show up in the table by going to “Customize Doctype” and marking the fields you want visible as “Show in List View”.

I’m not sure what’s going on with the AttributeError you’re describing.

1 Like

That sounds like a good approach. Do you know by any chance why the UOM is empty and required in my case? We have virtually no bulk items in our business.

It’s not just your case…UOM is a required field. If you’re not needing it, you can just set a default value like “Nos” or “Qty” in the customize doctype tool (and, if you’d like, set default accepted quantity to 1).

1 Like

OK, I changed the “Purchase Invoice Item” doctype to display the “Item Name” also by default. Unfortunately I still have the issue that when entering the Item code and then the name directly into the table, like so:

… and then tab out of the field, the item code (in most cases same as the item name for us) disappears again. I think this happens because there is no item (i.e. document with DocType item) with that code. Is my hunch correct?

By the way, we do need item codes occasionally, because some suppliers use them and they are pretty useful for repurchasing :slight_smile:

We set the UOM to a default value like you suggested.

Visually this is exactly how we want it. Now do we need to…

  • Make the item code non-mandatory for the purchase invoice items (is that even possible/supported without causing bugs?)
  • Autogenerate items for the purchase invoice line items?
  • Something else?

Thank you for your help so far @peterg!

When ask about making the item code non-mandatory, I’m not sure what “item code” refers to. The Item field is not mandatory by default. If you don’t want to identify a pre-defined Item for something you’re buying, you can just leave the Item field blank and type in an arbitrary name to the Item Name field.

Is there another field called “Item Code” on your system that is mandatory? Or has the Item field been somehow set to mandatory on your installation?

Autogenerating items is definitely possible, but it’s not a road I’d suggest except in very specific cases.

1 Like

Thank you, I was not aware I could leave the “Item” column entry out (which I referred to as “Item Code” because, visually, it contains the item code ;)).

I just tried creating an invoice where I just entered the item name directly, and this also looks good initially, but then I get the following error when submitting the invoice:

There is no column “Expense Account” though, only “Expense Head” and “Deferred Expense Account”, neither of which are mandatory, so I am a bit lost again. What am I missing?

Also, on a less related note, when entering from this particular invoice, I had the issue that, since it was a market receipt, it did not have per-item prices excluding German VAT. Is there any chance that I could enter the price including VAT and ERPNext could store it as if it was entered excluding VAT? Again, this does not apply to all invoices. I can make a new thread for that if the solution is more involved. (edit: just found this: Item price with precalculated/inclusive of tax - #6 by oxwivi Works well and easy to streamline by adding another table column in the taxes section :slight_smile: )

Autogenerating items is definitely possible, but it’s not a road I’d suggest except in very specific cases.

OK thanks. I would like to avoid that as well.

This is just a requirement of double-entry book-keeping. Invoices create a liability to a supplier (or, if you’re paying on the spot, a deduction to a bank account), and this CR entry needs a matching DR entry to balance. For that, you need to indicate which expense acount should be debited.

The most common way to do this is to set the account to be debited in the “Expense Head” field you mentioned for each item being purchased. The field is not mandatory because other ways exist too (especially for sales stock). So, there are times when the field will be blank because that information will come from somewhere else. If the field were mandatory, those other sources would be prevented from working.

Marking a field mandatory is a pretty blunt instrument. It’s easy to understand and very useful in many circumstances, but some doctypes will need more complex validation procedures. The error you’re seeing here is being generated by that custom validation process.

(FWIW, this is actually one advantage of using a predefined Item. You can set an item “Zitronensäure” to use “Cleaning Supplies” as the default expense account, which saves you the trouble of having to set it manually.)

1 Like

Thank you so much for the detailed explanation.

The only reason I did not succeed ended up being the default values shown in the expense head dropdown, which were tax-related accounts. As a non-accountant I assumed this was not the way to go. But when entering the account number manually, the “office supply” one showed right up.

I added the Expense Head as an additional column to the item table and entered the correct account number and everything worked like a charm :slight_smile:

1 Like