Customer PO Number on Invoice, Accessories table in new item

Hello everyone,

I am new to ERPNext, Now while customizing I have encountered some problems.

In My Company, We have to create Sales Order as per the Customer’s Purchase Order then convert multiple sales order into invoices and then into delivery note.

1). I have multiple Sales Order which I want to convert into Sales Invoice and now in the Sales Invoice I want to display the Customer’s PO number against the line item in sales invoice. I can create a new field to enter it manually but with multiple items It will take a lot of time.

So, If anyone could guide me how can I implement it, It will be very helpful to me.

2). While creating item, like it has option to add variants. I want to create same to add accessories to that particular item. I tried creating new fields in customise form but I can’t seem to find the option to link them.

If anyone could help me in above mentioned problems. It will be very helpful to me.

  1. Open Customize Form and select the DocType Sales Invoice Item. Find the field named “Sales Order” and add a new field “PO No” below it. In “Fetch From”, enter sales_order.po_no. This will automatically fill in the customer’s purchase order number as recorded in Sales Order.

  2. Check this out: Product Bundle

2 Likes

Thanks alot rmeyer for your valued reply. Perhaps, I couldn’t explain my problem clearly.

Suppose there are two Sales Order no 4 & 5 and they have PO number 44 & 55.

Now, I create a Sales Invoice based on the two orders in which partial items are fetched from the sales order.

While Printing the invoice I want to display the PO in line with the item list like there is an item from sales order XX having PO 44 and YY have PO 55.

I want to display the po in line with the items in invoice.

The workflow of ERPNext requires that Sales Order, Sales Invoice, and Delivery must match.
Sales Order keeps track if Items have been Delivered, and Billed in Invoice.

If you want to serve Multiple Customer PO in many Sales Invoice where you may spread many Customer POs to many Sales Order, it is advisable to prepare the Sales Order that will match your Sales Invoice. You may open the Row Item, and edit Description (click to open) and place the customer PO and additional comments there per item.

At Sales Order / Sales Invoice Header, you may place the Customer POs as reference.

An alternative to Product Bundle, is Stock Entry using Repack stock entry type. The advantage of this is that it shows the Stock movement of items used and items produced.

I know the workflow mentioned in your reply is the correct one but in our company there are 2-3 major customers who purchase 100% of our goods and the same are exported to them.

So, Sales Order is created as per the PO issued by them. Now to improve the delivery time we ship multiple items from available stock-in-hand and the rest are shipped as the production completes.

And hence, we require an invoice which mentions the corresponding PO of the item.

I am also aware that I can mention the PO in description or create a new field in which the PO is entered manually but since each invoice contains more than 50-60 line items. I am looking for something automated which reduces the change of errors and fetches the PO automatically from sales order in line with items.

Hey, you can write a custom script for that.

Your Business Case requires that Sales Invoice Item should contain Sales Order and Sales Order Item as link.

Under Sales Invoice Item:

Good News: Sales Order and Sales Order Item is contained in Sales Invoice Item DocType. (So the data model is ok).

Bad News: Sales Order link has Read Only and Print Hide settings and Sales Order Item (Data) is Read Only, Print Hide and Hidden.

As a start, you can unhide the Sales Order and Sales Order Item data, you can assign the Sales Order by Item in your Sales Invoice. But I think you will have to place some customization code (or even monkey patch) the Sales Invoice and the Sales Order codes in Python to get your desired functionality.