|
|
@ -117,6 +117,7 @@ function sendReturnToServer(callback) {
|
|
|
|
|
|
|
|
|
|
|
|
function showReceipt(txid) {
|
|
|
|
function showReceipt(txid) {
|
|
|
|
$("#receiptchangediv").removeClass("d-none");
|
|
|
|
$("#receiptchangediv").removeClass("d-none");
|
|
|
|
|
|
|
|
$("#receiptframe").data("txid", txid);
|
|
|
|
$("#receiptframe").attr("src", 'action.php?action=getreceipt&txid=' + txid);
|
|
|
|
$("#receiptframe").attr("src", 'action.php?action=getreceipt&txid=' + txid);
|
|
|
|
$("#receiptmodal").modal();
|
|
|
|
$("#receiptmodal").modal();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -150,7 +151,27 @@ $("#finishbtn").click(function () {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#receiptprintbtn").click(function () {
|
|
|
|
$("#receiptprintbtn").click(function () {
|
|
|
|
|
|
|
|
if (nickelbridge) {
|
|
|
|
|
|
|
|
$.get('action.php', {
|
|
|
|
|
|
|
|
action: 'getreceipt',
|
|
|
|
|
|
|
|
format: 'json',
|
|
|
|
|
|
|
|
width: receiptwidth,
|
|
|
|
|
|
|
|
txid: $("#receiptframe").data('txid')
|
|
|
|
|
|
|
|
}, function (receipt) {
|
|
|
|
|
|
|
|
$.ajax("http://127.0.0.1:64269/print", {
|
|
|
|
|
|
|
|
data: JSON.stringify(receipt),
|
|
|
|
|
|
|
|
contentType: 'application/json',
|
|
|
|
|
|
|
|
type: 'POST',
|
|
|
|
|
|
|
|
success: function (resp) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).fail(function (resp) {
|
|
|
|
|
|
|
|
alert("Error: " + JSON.stringify(resp));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
document.getElementById("receiptframe").contentWindow.print();
|
|
|
|
document.getElementById("receiptframe").contentWindow.print();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#receiptmodal").on("hide.bs.modal", function () {
|
|
|
|
$("#receiptmodal").on("hide.bs.modal", function () {
|
|
|
|