Amendment is a common day to day requirement, for updating existing document or correcting errors
Problem Faced under current scenario.
Possible Solution
Following restructuring of documents could be done.
I understand that "amend" means to correct but I don't think it's proper to be able to amend a submitted document.
Hi,
I understand this is debatable.
My Concern is simple. Currently documents can be amended. But first they need to be cancelled (which cannot be done if it is linked to another existing document) and then amended, which results in creation of new document, and old trail gets lost.
Why to cancel in first place when ultimately it just needs to be amended?
Also, a lot of complexities exists in businesses, say,
This all may require to amend documents.
Finally, amending documents would surely be restricted to few users to avoid its misuse.
Hope I am able to justify...:-)
@snvora +1
For adding things like shipping costs, delivery costs, custom duties etc, remember that we have Landed Cost Voucher
Landed cost voucher is only applicable to Purchase Receipt / Purchase Invoice, and it is limited to additional charges.
With this feature scope would increase to a greater extent, including purchase/sales order, sales invoicing, etc.
Also Landed Cost voucher could be corrected for errors if any.... ;-)
@snvora +1
here the related discussion from the forum
https://discuss.erpnext.com/t/sales-order-amendment/31688
After the following changes in my own local development instance, I can change the submitted sales orders with following features:
the implementation so far is far from complete, a lot of other features need to be considered, e.g
quantity can not be less than produced quantity, can not be less than ordered quantity, can not be less than returned quantity?
item can not be deleted if already partially or fully billed, it is associated with other linked documents?
anyone interested in this topic? let us push this feature to be implemented by the core team !
changes made
# used for production plan
d.transaction_date = self.transaction_date
tot_avail_qty = frappe.db.sql("select projected_qty from `tabBin` \
where item_code = %s and warehouse = %s", (d.item_code, d.warehouse))
d.projected_qty = tot_avail_qty and flt(tot_avail_qty[0][0]) or 0
if d.qty < d.delivered_qty:
frappe.throw(_("Row #{0}: Quantity can not be less than Delivered quantity").format(d.idx))
# check for same entry multiple times
unique_chk_list = set(check_list)
if len(unique_chk_list) != len(check_list) and \
not cint(frappe.db.get_single_value("Selling Settings", "allow_multiple_items")):
frappe.msgprint(_("Same item has been entered multiple times"),
title=_("Warning"), indicator='orange')
def before_update_after_submit(self):
self.validate_po()
self.validate_drop_ship()
self.validate_supplier_after_submit()
self.validate_for_items()
self.update_delivery_status()
self.set_status()
tabDelivery Note t1,tabDelivery Note Item t2@szufisher Your efforts are really appreciable.
I thought about this. Maybe another way to implement this could be as follows
quantity can not be less than produced quantity, can not be less than ordered quantity, can not be less than returned quantity?
Well I feel that only compulsory validations should be considered (as you have correctly worked upon). Maybe warning for others (as quoted above) should suffice.
I feel this would help everyone a lot and I'd surely love to devote all help needed for this. I can't code, but I can definitely help in formulating logic.
+1
+1
+1
+1
+1
+10 :)
+100
+1000
+100