diff --git a/public/index.html b/public/index.html
index b681bea..bcb526b 100644
--- a/public/index.html
+++ b/public/index.html
@@ -82,6 +82,22 @@
}
http("put", "/api/transactions", () => {init()}, JSON.stringify(kvs))
}
+ function setRowKeyValue(row, wantkey, wantvalue) {
+ const inputs = row.getElementsByTagName("td")
+ var kvs = {}
+ for (var i = 0; i < inputs.length; i++) {
+ const key = inputs[i].getAttribute("key")
+ if (key == wantkey) {
+ inputs[i].innerHTML = wantvalue
+ break
+ }
+ }
+ saveTransaction(row)
+ }
+ zachsPayment = (x) => setRowKeyValue(x, "Payer", "AssetAccount:Zach")
+ belsPayment = (x) => setRowKeyValue(x, "Payer", "AssetAccount:Bel")
+ zachsCharge = (x) => setRowKeyValue(x, "Payee", "DebtAccount:Zach")
+ belsCharge = (x) => setRowKeyValue(x, "belsCharge", "DebtAccount:Bel")
function http(method, remote, callback, body) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {