Support #10285
closedDo the code review on Friday commits in pos
Files
Subtasks
Related issues
Updated by Yalavarthi Thriveni about 1 month ago
- File SUBSCRIPTION_END_TO_END_REVIEW_2026-08-10.md SUBSCRIPTION_END_TO_END_REVIEW_2026-08-10.md added
- Due date set to 08/10/2026
- Status changed from New to Closed
- % Done changed from 0 to 100
Did the code review for the last week code changes & found some issues as well as suggession from AI in product & service subscriptions code -assigned to divya
Landscaping code issues :
1.Editing an accepted quotation can corrupt invoice payments
The new quotation-to-invoice synchronization identifies every normal installment as a required deposit because it matches:
inst?.type === "installment"
It can then overwrite the first real payment, label it as a deposit, exclude all installments from paidAmount, and reset remainingBalance to the full invoice amount.
Location: [quotation.service.js (line 153)](G:/POS/EGF_POS/main-branch/evergreen_pos_be/src/services/quotation.service.js:153)
Affected flow:
Accepted quotation edited
→ invoice deposit synchronized
→ existing payment overwritten/excluded
→ paid amount becomes incorrect
→ invoice balance becomes incorrect
This should be treated as a production financial-data risk.
Can you replicate this case & test in main code base once
2.Manual invoice payment can return HTTP 500
The payment endpoint searches for a quotation using the invoice quotation number. Manual invoices may not have a matching quotation, but some branches still execute quotation.save() without checking whether the quotation exists.
Locations:
[EverGreen-invoice-controller.js (line 4430)](G:/POS/EGF_POS/main-branch/evergreen_pos_be/src/routes/EvergreenInvoice/EverGreen-invoice-controller.js:4430)
[EverGreen-invoice-controller.js (line 4484)](G:/POS/EGF_POS/main-branch/evergreen_pos_be/src/routes/EvergreenInvoice/EverGreen-invoice-controller.js:4484)
[EverGreen-invoice-controller.js (line 4816)](G:/POS/EGF_POS/main-branch/evergreen_pos_be/src/routes/EvergreenInvoice/EverGreen-invoice-controller.js:4816)
Affected methods include cash, Zelle, cheque and some card/partial-payment branches.
3.Cancelled jobs appear in the “Focused” job filter
The Focused status list includes "auto cancelled" along with New and In Progress jobs.
Location: [jobs-controller.js (line 480)](G:/POS/EGF_POS/main-branch/evergreen_pos_be/src/controllers/jobs-controller.js:480)
Unless intentional, cancelled subscription jobs will appear as active/focused work.
Assinged to Ravishankar