EFT payment amount should be read-only if there is an IN_PROGRESS EFTPOS transaction
Description
If there is an IN_PROGRESS EFTPOS transaction, the parent EFT payment/refund should be read-only. It should be only editable if the transaction status changes to CANCELLED, DECLINED or ERROR.
To reproduce:
install the Sample EFTPOS Service plugin
Configure a Sample EFTPOS Terminal and link it to a till
Create a new payment, and add an EFT payment item
Select the Sample EFTPOS Terminal, and click Apply to start EFT.
Close the OpenVPMS browser tab, to simulate a failure
Log in again, and edit the payment. The EFT item should have an IN_PROGRESS transaction. The Amount, Cashout and Terminal fields should all be read-only to prevent change while there is an ongoing transaction, but are editable.
If there is an IN_PROGRESS EFTPOS transaction, the parent EFT payment/refund should be read-only. It should be only editable if the transaction status changes to CANCELLED, DECLINED or ERROR.
To reproduce:
install the Sample EFTPOS Service plugin
Configure a Sample EFTPOS Terminal and link it to a till
Create a new payment, and add an EFT payment item
Select the Sample EFTPOS Terminal, and click Apply to start EFT.
Close the OpenVPMS browser tab, to simulate a failure
Log in again, and edit the payment. The EFT item should have an IN_PROGRESS transaction. The Amount, Cashout and Terminal fields should all be read-only to prevent change while there is an ongoing transaction, but are editable.