Tips to manage this purchase order module correctly

you recommend temp state for editing the purchase order?

this form is not 100% ready, user may change qty inside tables, or add new products to it

i got this modal to edit the purchase order, how temp state will fit here? i mean when user click DELETE it should hide row from table then after i press a button named SAVE CHANGES it should go to a deletequery and delete from db the two entries

in the example i should erase rows with transaction_id = 52, i create one line per product