Duplicate Invoice -> delete item line from the invoice -> press save button -> check the original invoice you will see the line item has been deleted also
Please advise
We were unable to reproduce this problem. Is it possible that you are running old code? Here is an excerpt from ~/_controls/EditLineItemsView.ascx.cs that suggests that we are handling the issue properly.
// 04/01/2007 Paul. If we are duplicating a quote, then we must create new IDs for the line items. // Otherwise, edits to the line items will change the old quote. // 04/29/2007 Paul. If we are converting from one module to another, then the loading module will not match the current module. if ( !Sql.IsEmptyGuid(gDuplicateID) || m_sMODULE != sLOAD_MODULE ){ foreach ( DataRow row in dtLineItems.Rows ) { row["ID"] = Guid.NewGuid(); }}
That is a tricky one. In my tests, I was saving the duplicate before deleting the line items. The bug only appears when you duplicate and immediately delete. The solution is to note delete the original line items if this is a duplicate operation. We had to fix Invoices, Orders, Quotes and Payments. The fix will be in the next build, or you can request the updated files directly from our support team.
Here is a sample fix for Quotes. Please keep in mind that we also saved the DuplicateID into the ViewState for the specific purpose of checking during the save operation: