Fix for reloadinvoice.js. Added check for paymentHistory