Help with strategy

I am in a bit of a bind and need some help figuring this out. Also, willing to pay for services. Sorry for the long post! :slight_smile:
Please note: we are running ERPNext Cloud solution.

Issue: We have three types of Purchase Invoices that we would put in the system.

  1. Regular “Business” invoices- like electricity, rent, etc… These are simple and require supplier name, supplier invoice number, supplier invoice date, due date, total amount. After creating this, we would go to payment entry and print a check from there.
  2. Freight invoices - these are received from a supplier and then we pay the supplier but apply the freight to one or more sales orders (before we invoice the customer) so it’s really just a pass through rate but it creates a payable for us to pay and then we receive the money when the customer pays their invoice. I need freight invoice number, freight carrier (supplier), freight amount, then a child table that you select a sales order and apply an amount to. This amount then lands on the sales order in a freight invoice field.
  3. Plant supplier invoices - these are the tricky ones. We have to receive ALL supplier invoices for a customer’s sales order before we can actually send an invoice to our customer. Our industry is very volatile and prices and quantities change frequently so we have to check the invoice from the supplier to make sure they actually sent the right quantity and are charging us the right amount. To do this, we need to see exactly what is on the sales order and how much we charged the customer and may need to make changes if pricing or quantity changed PLUS we need to see what the purchase order was to the supplier. I sketched this table out here and need something similar:

So, my question really boils down to how do I handle having three very different types of purchase invoices like this? Do I create a button for each type and when clicked, it would show/hide different fields? Is this even possible? Do I create a new doctype for each one of these?

Overall, what’s the best practice? Only #3 will have a purchase order so maybe we do our editing in the purchase order directly and just show the information in the table like I sketched and then once we have it ready, we submit to purchase invoice? Does this make the most sense? I would still have two types of invoices though?

And, if anyone has ideas on how to show the purchase order information AND the sales order information for type #3 above on the same screen, please let me know.

Thanks in advance!

replies below.

Freight invoices - these are received from a supplier and then we pay the supplier but apply the freight to one or more sales orders (before we invoice the customer) so it’s really just a pass through rate but it creates a payable for us to pay and then we receive the money when the customer pays their invoice. I need freight invoice number, freight carrier (supplier), freight amount, then a child table that you select a sales order and apply an amount to. This amount then lands on the sales order in a freight invoice field.

In the sales transactions, you should add these charges in the taxes and other charges table. You can add details about fright invoice no. in the description field. Don’t go for the custom table or anything, as it should be manageable and searchable from Sales Order tax table as well.

Overall, what’s the best practice? Only #3 will have a purchase order so maybe we do our editing in the purchase order directly and just show the information in the table like I sketched and then once we have it ready, we submit to purchase invoice? Does this make the most sense? I would still have two types of invoices though?

The above work-around seems fine. It’s best to stick to vanilla and adapt work-arounds, atleast in initial phases.

Only one type of invoice, which is is Purchase Invoice. Let’s freeze it there :slight_smile:

You can add multiple fields in the doctype (from customize form) and set it’s visibility based on value in the other field. Following is the help on the same.

Thanks for the help @umair! Greatly appreciated!

So, if I had a drop down box for type and had option of “freight”, “business” or “supplier”, then I could show/hide fields accordingly and that seems like a good option.

I was hopeful that I could do something called “Quick Entry” like is on some other doctypes and that would be an easy way to only popup the required fields and would make it a lot easier on our bookkeeper when she’s entering a business invoice that only needs a few fields.

Anyways, I am going to see if my developer can do a drop down and only show/hide different fields based on this.

I’m not sure this will work for us as we need to do two things - one is create the purchase invoice for us to pay the freight carrier. Second is to put this amount over on the customer’s sales order. Can we do all of that using this taxes and other charges table?

Also, is it possible to show a child table (sales order item) from another doctype (sales order) for reference only? Something like this… and it would be read only? This would allow us to see exactly what we charged the customer and what we are being charged.