1.3 KiB
1.3 KiB
Spec Delta
Purpose
Garantiza que cambios posteriores al registro original de productores, productos y ventas sean explicables y aparezcan en la información exportada y reportada.
ADDED Requirements
Requirement: Editar registros operativos
The system SHALL allow editing producers, products, and sales from the application UI.
Scenario: Editar producto
- WHEN user edits a product and confirms with actor and reason
- THEN the product stores the new values
- AND the edit appears in the audit history
Requirement: Auditoría obligatoria
The system SHALL require actor and non-empty reason for every edit and SHALL store before and after values with timestamp.
Scenario: Edición sin motivo
- WHEN user attempts to save an edit without actor or reason
- THEN the edit is not persisted
- AND an inline validation message identifies the missing data
Requirement: Corrección de venta trazable
The system SHALL update inventory consistently when an existing sale is edited and SHALL preserve the original and corrected sale snapshots.
Scenario: Cambiar cantidad vendida
- WHEN user changes a sale line quantity with a valid audit reason
- THEN compensating inventory movement is recorded
- AND the audit entry identifies the original and new sale values