From 431b4448071a425d4d0affe4b0f6c95e77638981 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 1 Feb 2022 22:51:36 -0700 Subject: [PATCH] Fix loading receipts --- config.xml | 1 + www/assets/js/account.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 9e9d6f1..eb488d1 100644 --- a/config.xml +++ b/config.xml @@ -12,6 +12,7 @@ + diff --git a/www/assets/js/account.js b/www/assets/js/account.js index 7fef679..7aaa8c2 100644 --- a/www/assets/js/account.js +++ b/www/assets/js/account.js @@ -315,11 +315,12 @@ function loadReceiptHTMLIntoPopup(receiptid) { accountkey: getStorage("accountkey"), receiptid: receiptid }, function (success) { - app.dialog.close(); if (success.status == "OK") { - $('#receiptvieweriframe').attr("src", "data:text/html," + encodeURIComponent(success.receipt.html)); + $('#receiptvieweriframe').attr("src", "data:text/html;base64," + btoa(success.receipt.html)); app.popup.open("#receiptViewerPopup"); + app.dialog.close(); } else { + app.dialog.close(); app.dialog.alert(success.msg, "Error"); sendErrorReport("Receipts", "Loading receipt", success.msg); }