Can now redirect to pay with cash
This commit is contained in:
parent
50a262e549
commit
30e7d5a164
1 changed files with 14 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ var all_products
|
||||||
|
|
||||||
let barcodeForm
|
let barcodeForm
|
||||||
|
|
||||||
const api_url = "http://127.0.0.1:8000"
|
const api_url = "http://192.168.1.3:8000"
|
||||||
|
|
||||||
var to_fill_product_index = 0
|
var to_fill_product_index = 0
|
||||||
|
|
||||||
|
|
@ -30,7 +30,10 @@ async function loadCash(price) {
|
||||||
for (var x = 0; x < bill_amount; x++){
|
for (var x = 0; x < bill_amount; x++){
|
||||||
const new_column = document.createElement('div')
|
const new_column = document.createElement('div')
|
||||||
new_column.classList.add('col')
|
new_column.classList.add('col')
|
||||||
new_column.innerHTML = bill_type
|
const bill_image = document.createElement('img')
|
||||||
|
bill_image.src = api_url + '/icons/' + bill_type
|
||||||
|
new_column.appendChild(bill_image)
|
||||||
|
|
||||||
cash_bills_row.appendChild(new_column)
|
cash_bills_row.appendChild(new_column)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,3 +81,12 @@ async function loadProducts() {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function payCash() {
|
||||||
|
const total_cost = document.getElementById('totalprice').innerHTML.replace('€ ','')
|
||||||
|
window.location.replace("/pay_cash/" + total_cost);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toMain() {
|
||||||
|
window.location.replace("/");
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue