How to amend a document without having to amend all downstream docs?

Given that you guys limited the “Allow on Submit” feature to only work on custom fields back in Sep 2014 (see links below) I’m stuck with some scenarios which are not nice at all.

Previously, I had “Allow on Submit” enabled on the rate field in Sales Order Items. We have regular rush orders, which we place on behalf of customers. The price is not known at the beginning, and the customer accepts that. We issue a SO, and in due course, a MREQ, PO and sometimes even a PR. Previously, when the price is known, the ERP user would go back to the SO and correct the rate before shipping and invoicing goods to the client.

The alternative is to cancel the SO, Amend, and re-submit. But the system forces the user to deal with all descendants first. When trying to cancel the SO, the user gets the error Cannot delete or cancel because Sales Order SO22093 is linked with MREQ-01074 Material Request. This makes sense to me. But now the erp user needs to cancel and re-issue many more records, MREQ, possibly multiple POs, and sometimes also Purchase Receipts. That’s a lot of work, and the supplier PO name will also change, so if we are to be rigorous, we should rightly resend the PO to our supplier even though there was no material change on that PO, just that the PO suffix now has a -1 suffix.

Now “Allow on Submit” is no longer an option for our scenario (as per issue erpnext/956). I accept that our configuration was not the best anyway (editable price fields are bad!), but comparing it to the the alternative of Cancelling/Amending/Submitting all downstream records, it was a reasonable trade-off.

My question is, given this scenario, what could the correct way to deal with this scenario? Is there a way to Cancel/Amend/Re-Submit a SO without having to do the same for all downstream Docs related to that SO instance?

Thank you guys,
-Jev

Links to previous discussion, and issue in github.

I think you should be able to change the price in the invoice if you have not checked “Maintain Same Rate Throughout Sales Cycle” in Selling Settings.

Would that work for you?

Also isn’t it a better practice to fix the pricing issue with your customers. What if the customer balks on a price. you are always at a disadvantage when you have already shipped the order. (My ERP won’t accept it is a good argument to give to the customer :))

1 Like

Hi @rmehta

I was not aware of the “Maintain Same Rate Throughout Sales Cycle” setting, but I have looked, and we have that set to off in our system anyway. We still cannot change the price on the Sales Order, which is what we would wish to do in this case. So it appears this won’t help us. Please do tell me if I am missing something, I’ll be happy for a solution! :smile:

I understand your ideal, but this is a valid use case for us. We do have an agreement with certain customers that permits this use case.

This issue I have is not limited just to the rate (price). As You know, I had to replace the po_no with a custom field to also get by the change that makes ‘Allow on Submit’ only apply to custom fields.

My ideal solution is that I can allow for Sales Orders to be cancelled, amended, and then Re-Submitted in a way that all down stream references (MREQs in this particular example) are updated to point to the new Sales Order. This would make the event more transparent, and I would also be able to use the po_no standard fields, instead of making workarounds and replacing perfect standard fields with custom fields.

What do you think? I’m happy for any workable solution, not just the ideal one I mentioned… :smile:

-Jev

Hi Many Erpnext users have their own “procedures” I only use the POS for sales. If a client has not paid (eg ank tranfer) than i will not submit. So I monitor my incoming payments by looking to unsubmitted invoices, Once i receive payment i submit the invoice.Reaon: dont want to bother about creating a voucher when money comes in.

You could possibly do the same. Wait till you know the final price before you submit
robert

I know @becht_robert has been after us for this feature.

But what if the user cancels and does not amend? What happens to downstream references?

What if cancellation leads to an integrity error (i.e. stock balances going negative? We would need to write a whole bunch of code to make sure the amendment is correct and maybe let the cancelled link remain until the amendment is made. I am not sure this is a clean solution.

Why does changing the price in the invoice not work?

Hi guys!

@becht_robert leaving the SO un-submitted would be good, but we can’t create the follow on items, such as MREQ’s PO’s etc.

@rmehta Yes, there are lots of side effects and corner cases, and I don’t particularly want to go down this road either.
Adding the price on the invoice is a workaround, but now we can’t rely on our SO data being accurate for aggregate reports. Also, my issue is more general than just the price. I have the same issue for po_no that I have to work around.

One suggestion is that you re-approach the Allow On Submit: Do not allow to customize this property for standard fields · Issue #956 · frappe/erpnext · GitHub so that you re-enable the “Allow on Submit” setting on standard fields, but you do two things;

  1. Add a modal warning that displays when a user trys to change a standard field after submit (assuming it is configured 'Allow on Submit=true) stating the risk, and allow consenting adults to take the risk.
  2. Add history tracking on these actions, so if I change the price, it is recorded in the activity log of the Doc. This makes people accountable, and future problems easier to comprehend.

What do you guys think?

I’m not particularly dogmatic about the actual solution. It comes down to us requiring to modify SOs without having to re-create between 3 and 10 associated docs. That’s a lot of erpnext push-ups. :slight_smile:

For what it is worth, I’m going to monkey patch our install to back out the #956 change, as it is too restrictive for us, and we consent to the risks in that action.