Receipt Order to Purchase Order Matching Rules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffreysgrossman
    Senior Member
    • Jan 2025
    • 111

    #1

    Receipt Order to Purchase Order Matching Rules

    A lot of systems that handle Purchase Orders and Receipt Orders linked to them is around the matching of what was ordered to what was received. Obviously with the Workflows you can create your own rules. However it seems like a good feature request is to have the basic rules built into the system.

    - Over Received Line Item - Each line item is compared to the amount ordered. If more is received a warning status of over received is implemented for that line item.
    - Under Received Line Item - Each line item is compared to the amount ordered. If less is received a warning status of under received is implemented for that line item.
    - Receipt Order matching Purchase Order - Status of the Receipt Order itself updated to Mismatch Received vs Complete Received.
    - Line Item Count Mismatch - Change status of Receipt Order to Mismatch Received on the Receipt Order Status.

    I am working on building all these status changes using the workflow. However it just seems like a nice feature request to have pre built for the receipt orders. So I figured I would just put it down on the list.

    Here is a request I am working on getting all the flows working. I am almost there for all of them.
    Receipt Order Items Workflow to Warn if new product added in receipt. - EspoCRM Open Source Community Forum

    Thank you for listening.
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9360

    #2
    > Over Received Line Item - Each line item is compared to the amount ordered. If more is received a warning status of over received is implemented for that line item.

    Do you mean comparing the quantity received against the quantity field of the same Receipt Order Item? Or against the Purchase Order Item quantity? If the latter, it's not that straightforward as PO can have multiple ROs.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • jeffreysgrossman
      Senior Member
      • Jan 2025
      • 111

      #3
      hello yuri Thank you for your response. For the line item Over / Under Status I was looking to compare against the quantity on the Receipt Order to the Quantity Received field. If they match it sets the status i have on Receipt Order Items to say over or under compared to the result. That one works well and is quite simple with logic:
      Click image for larger version

Name:	image.png
Views:	21
Size:	77.3 KB
ID:	121216
      So the above two workflow are working well to determine the amount recorded on the receive and update that line item in the Receipt Order with a status.

      However I have an issue that I am looking for guidance with. My idea was to make sure that the Quantity field on the Receipt Order was read only and could only be set when choosing a Purchase Order linked to the receipt order. I want to set the Quantity Feild to be zero by default and read only:
      Click image for larger version

Name:	image.png
Views:	17
Size:	85.6 KB
ID:	121220

      However the read only does not work. I want it so that if a person adds a new line item to the Receipt Order it sets the quantity to be zero and read only. That way they can add a new product but the quantity received will compare to the zero that is in the Quantity because they added it only to the Receipt Order and not the Purchase Order. Then the logic above to compare the line item Quantity to the Quantity received. It would alsway be over received then due to the fact that the original Purchase Order does not have that item in it.

      So in this example where we have the PO:
      Click image for larger version

Name:	image.png
Views:	17
Size:	34.3 KB
ID:	121217
      Then this receipt order created from it:
      Click image for larger version

Name:	image.png
Views:	17
Size:	38.9 KB
ID:	121218
      But now I want it so if they add a new line to that receipt order. It should due to the setting set the Quantity field to be Zero and Read Only. However it always comes in as 1 and not read only?
      Click image for larger version

Name:	image.png
Views:	17
Size:	40.3 KB
ID:	121219

      Is this a bug that can be fixed? Because if I could set it so that every time a new line item is added it puts the Qty field to be Zero and read only I have everything I need. It will always say mismatch on any receive line item added that is not on the PO. The PO still needs to be able to set that field to whatever the PO says its just when a new one is added manually that we are wanting it to be zero and read only.

      Actually that Qty field should always be read only. I see no reason ever for it to be editable. Especially to make ESPO conform with 3 way match rules.

      Thoughts? Any help on why its not allowing that field to be set to zero and read only?

      Thank You!

      Comment


      • yuri
        yuri commented
        Editing a comment
        Hi Jeffrey,

        The Quantity field cannot be set to read only in the item view as it has a special parameter in entityDefs: "itemNotReadOnly": true. This field is already read-only but for items it's exceptionally non-read-only.
    • jeffreysgrossman
      Senior Member
      • Jan 2025
      • 111

      #4
      yuri thank you for confirming what I am seeing. So it sounds like it will not be able to be set to Read Only on the Receipt Item Section... Thats a bummer... Can you explain why that logic is there? What is the reason to allow someone to change the requested Quantity on the receipt order? In our world that is part of what we are trying to stop and catch. 3 way match rules make it so we want to be able to warn if anything is received that was not on the approved PO.. Was this set to editable from a different request or idea? Can you explain the logic behind keeping that field open and not read only?

      The reason I ask is that I am trying to close the loop on all the conditions that would cause someone to be able to add anything to a receive that was not approved in the Purchase Order. To your point earlier if multiple RO are created to one PO then logic of adding up the line items does not work. However if we could get that field to be read only defaulted to zero then we have a way to make sure if they do add anything that was not on the approved PO it gets flagged.

      Any help in this is greatly appreciated.

      Thank You,
      Jeff

      Comment


      • yuri
        yuri commented
        Editing a comment
        Hi Jeff,

        I have a lot of work. It's hard for me to explain why it's not read-only. If the field were read only, I'm sure users would be asking to make it not read only. Having it not read-only gives more freedom. Not all need it read-only.

      • yuri
        yuri commented
        Editing a comment
        You can write a custom validation script that will check whether quantities changed and show error if any did.
    • jeffreysgrossman
      Senior Member
      • Jan 2025
      • 111

      #5
      Thank you yuri I just wanted to say that I truly appreciate you taking time to answer all of the questions in this forum. You are GOD around here! In the vein of feature request then I would just like to add that you are right that if it were read only field users would ask for it to be editable. So the feature request is to allow us to set it to be editable or read only like a normal field in ESPO. Allow the read only flag set on the actual field to work is the request. That way nobody has to complain and can just control it the way they want.

      I will investigate writing the validation script then as well as a way to examine this problem. I appreciate you helping in any way as you ALWAYS DO! We really do appreciate it!!!!

      Comment

      Working...