Your script loads the records from the Excel file that match the date criterion. It then loads records from the qvd where the TransactionID was not already loaded from the Excel file.
So for 1325, it will load the amount from the spreadsheet and it will not load the amount from the QVD as it was already loaded. If you then save the QVD, the amount in the QVD will be updated. It looks correct to me, I have had a similar scenario before; although I don't know the business rules in your case.