Error Pop-up if the item does not belong to item of supplier

I have 2 items item 1 and item 2
item 1 is supplied by supplier 1
item 2 is supplied by supplier 2

if the user creates a purchase order for item 1 and selects supplier 2 the user should get the pop-up error this item does not belong to this supplier and vice-versa with other item

How can i achieve it can anyone help.

Hi @Mohammed_Anas1,

Did you apply the rule in “Party Specific Item”? If yes remove it.

User can restrict certain items to a specific Customer or Supplier based on one of these attributes - Item Group / Brand / Item.

Thank You!

i didn’t apply party specific rule
what is that and how to execute it.

→ While creating an item I’m selecting the specific supplier who supplies that material.
→ What I want is if I’m creating a purchase order selecting supplier A and an item that belongs to the supplier A then the purchase order should be created with no additional requirements.
–>If I’m selecting supplier A and an item which is not supplied with this supplier i,e supplier A then I should get an error pop-up stating This item doesn’t belong to this supplier

Which version, and can you share the image or error?

I use version 15 of erpnext
the post I posted above is my requirement
I even tried party specific rule but its not working


This is my purchase order
While Creating an item Im specifying the supplier

so whenever I’m creating a purchase order i should only be able to create for items which belong to that particular supplier and error should pop-up if that item does not belong to the supplier

Please explore the Party-Specific Item.

Otherwise you have to develop this thing using your own logic.

1 Like

Yeah, I explored it and it is working what if we have 100+ items how can we achieve it in bulk as there are many chances of getting errors …?

Hi @Mohammed_Anas1,

No clear idea about any future issues on your side, but you can import Party-Specific Items.

Thank You!