Project

General

Profile

Edit Copy Actions

Bug #11774

open

Allow Explicit Service Removal in Partial Quotation Updates

Added by Yalavarthi Thriveni 5 days ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
10/28/2026
Due date:
% Done:

0%

Estimated time:
2:00 h
Tested Date:
10/28/2026
Raised by Tester:
Page/ Module (POS):
Quotes

Description

In

updateQuotation
, the merge routine was introduced to prevent accidental deletion of services when updating costBreakdowns:

javascript
const mergedServiceIds = Array.from(
new Set([
...extractServiceIds(existingQuotation.services),
...extractServiceIds(existingQuotation.costBreakdowns),
...derivedServiceIds,
...explicitServiceIds,
]),
);
While the frontend UI in

EditQuotations.tsx:L763
always provides services: servicesPayload, if an API caller or background process updates costBreakdowns with a removed service and leaves services undefined, mergedServiceIds unconditionally merges the old services back from existingQuotation.services.

2. Acceptance Criteria
AC 4.1 (Explicit Empty Services): Given an update payload containing costBreakdowns and an explicit services: [] (or fewer services), When updateQuotation is processed, Then mergedServiceIds MUST respect the services present in the incoming costBreakdowns and services payload without forcefully restoring deleted services from existingQuotation.services.
AC 4.2 (Safe Fallback When Services Omitted): If and only if the incoming payload contains neither services nor costBreakdowns, existing services must be preserved.


Add

Subtasks


Add

Related issues

No data to display

Edit Copy Actions

Also available in: Atom PDF