Details
-
Bug
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
-
ACQ Sprint 117
-
2
-
Thunderjet
-
R2 2021 Bugfix
Description
Overview: When an invoice is created and linked to a POL a relationship is establish and user can no longer delete the POL. However, after deleting the invoice the user still cannot delete the POL because the system seems to maintain a connection
Steps to Reproduce:
- Log into some FOLIO environment as User X
- Create PO and POL
- Create invoice and invoice line for that POL
- Delete the invoice and invoice line
- Navigate to the POL
- Click Delete POL
- Confirm action
Expected Results: POL is deleted successfully
Actual Results: POL can not be deleted because there is a link to an invoice. However, there is no way to remove the link so the order can never be deleted. Unless someone removes the link from the database.
Approach
Update logic org.folio.rest.impl.InvoiceHelper#deleteInvoice
1. Check if relation exist org.folio.services.order.OrderService#getOrderInvoiceRelationship
2. Delete relation org.folio.services.order.OrderService#deleteOrderInvoiceRelationship(java.lang.String, org.folio.rest.core.models.RequestContext)
Additional Information:
Error thrown*;* update or delete on table “purchase_order” violates foreign key constraint “purchaseorderid_purchase_order_fkey” on table “order_invoice_relationship”: Key (id)=(87ed562f-f6b7-4e54-83cd-28e6bda51c2a) is still referenced from table “order_invoice_relationship”
Acceptance criteria:
Update permissions in the descriptors/ModuleDescriptor-template.json
Update logic
Unit tests
Karate Api tests
URL:
Interested parties: Brannon
TestRail: Results
Attachments
Issue Links
- blocks
-
MODINVOICE-268 MODINVOICE (mod-invoice) R2 Bugfix release
-
- Closed
-
- defines
-
UXPROD-3060 Thunderjet - R3 2021 Tech Debt, NFR
-
- Closed
-