updateVoucher is async, so if you want it guaranteed to be executed before continuing you will need to await it
updateVoucher
await
i.e
await updateVoucher(voucher.id, 0);