Evidence Summary
- Source invoice
999901699 / FT 9999/1699- Customer
910 / 100 Ouvidos Lda- Route
/vendas/ft/view/OTk5OTAxNjk5- Evidence file
raw/playwright/workflows/latest-sales-invoice-edit-attachment.json
When to Use This
Use this when an invoice attachment is already listed on the saved FT view and you need to correct its description, assign or clear a category, or change whether the attachment is public. This edits attachment metadata only; it does not replace the uploaded file. To replace the file, delete the attachment and upload a new one.
Step-by-Step
- Open the saved sales invoice view. The verified run used
/vendas/ft/view/OTk5OTAxNjk5. - Open the Attachements tab.
- Find the attachment row by description or file name.
- Click the row's Edit action.
- In the Edit modal, change Description. This field is required.
- Optionally choose or clear Category.
- Check or uncheck Public depending on whether the attachment should be exposed as public metadata.
- Click Save.
- Confirm the attachment table reloads and shows the edited description and public state.
Verified Behavior
| Check | Observed result |
|---|---|
| Edit modal | The row edit action opened modal #editattachment with title Edit. |
| Loaded fields | The modal loaded hidden attachment id #attach_id, required description #edit_attach_assunto, category selector #edit_attach_categoria, and public checkbox #edit_attach_public. |
| Save action | Clicking Save called editAttachment and returned {"success":true}. |
| Description edit | The verified row changed from AI FT attachment before edit 20260519T221820Z to AI FT attachment edited 20260519T221820Z. |
| Public flag edit | The verified run unchecked Public; the next DT_Select_Attachments row returned public=0. |
| Cleanup | The disposable attachment was deleted after verification; the final lookup found zero rows for that attachment id. |
| Safety boundary | No invoice save, payment, print, communication, stock, or line-edit request was submitted. |
Backend Calls Observed
| Action or endpoint | Purpose |
|---|---|
loadAttach | Loads the selected attachment metadata into the edit modal. |
editAttachment | Saves serialized metadata values such as num, assunto, categoria, and the optional public flag. |
DT_Select_Attachments | Reloads the saved FT attachment table using search[NumDoc]=999901699 and search[tipodoc]=FT. |
deleteAttachmentById | Cleanup endpoint used after the verified edit so the demo invoice was left without the disposable attachment. |
Raw evidence: raw/playwright/workflows/sales-invoice-edit-attachment-20260519T221820Z.json. Screenshots: assets/screenshots/sales-invoice-edit-attachment-20260519T221820Z-01-attachments-tab.png through assets/screenshots/sales-invoice-edit-attachment-20260519T221820Z-05-after-delete.png.