Hi experts, I would need to cancel a Sales Order for which a Purchase Order has already been created.
The Purchase Order cannot be canceled because that is how the agreement with the supplier is set up, but the customer has canceled his Sales Order and we cannot cancel the Sales Order without canceling the Purchase Order.
Hi, thanks for replay. I forgot to mention that problem occurs when PO has an approved status. Than I receive 2 type of messages.
When only approved but not received
Which version are you using? A purchase receipt is already created from the purchase order. So, when you cancel the purchase order, the purchase receipt is also canceled. This is the default process of the system.
We haven’t encountered this type of issue in version 15, when cancel the sales order.
I am using the newest version 15.
This is about canceling SO with linked PO(in status submited)
Of cours I understand that if I have Purchase Recipt and I try to cancel PO than it will need to cancel both, but it is not the case.
The case is to cancel SO without canceling PO,
just add in override sales invoice js file on refresh event
frm.ignore_doctype_on_cancel_all=['Purchase Order’s,‘Purchase Receipt’] it allow to cancel so without cancelling po and pr
Try this script,
frappe.db.set_value(“Purchase Order”, purchase_order_name, sales_order_field", “”). It will removes the Sales Order linked with Purchase Order.
Must check it reflect to any accounts entries, user permissions or default function.
Looks like it should not be disconnected and it is done in porpoues.
We have created our workflow with additional stem for that kind of situation. Anyway thank you for your suggestions.