use bpi to create monopoly money and weigh contributions to house and update staging for it
cicd / ci (push) Successful in 1m40s Details

main
Bel LaPointe 2023-11-07 06:36:15 -07:00
parent 8fd1a4fedb
commit f7098def0e
2 changed files with 15 additions and 11 deletions

View File

@ -3088,4 +3088,3 @@
2023-10-27 GOOD EARTH FOODS OR
AssetAccount:Chase:5876 $-173.57
Withdrawal:GOODEARTHFOODSOR

View File

@ -90,20 +90,25 @@
document.getElementById("lastNLines").innerHTML = result
}
function stage(who, contributesToHouse) {
var benefactor = who
var beneficiary = "AssetAccount:Chase:5876"
if (!contributesToHouse) {
var tmp = beneficiary
beneficiary = benefactor
benefactor = tmp
}
const zeroPad = (num, places) => String(num).padStart(places, '0')
var d = new Date()
const zeroPad = (num, places) => String(num).padStart(places, '0')
const today = `${d.getFullYear()}-${zeroPad(1+d.getMonth(), 2)}-${zeroPad(d.getDate(), 2)}`
var who_currency = who.split(":").at(-1).toUpperCase()
var benefactor = who
var benefactor_value = `-0.00 ${who_currency}`
var beneficiary = "AssetAccount:Chase:5876"
var beneficiary_value = `$0.00`
if (!contributesToHouse) {
beneficiary_value = `$-0.00`
benefactor_value = `0.00 ${who_currency}`
}
console.log(`@${today} ${benefactor} gave to ${beneficiary}`)
document.getElementById("lastNLinesTextarea").value += `\n${today} TODO moolah2`
document.getElementById("lastNLinesTextarea").value += `\n ${beneficiary} $0.00`
document.getElementById("lastNLinesTextarea").value += `\n ${benefactor}`
document.getElementById("lastNLinesTextarea").value += `\n ${beneficiary} ${beneficiary_value}`
document.getElementById("lastNLinesTextarea").value += `\n ${benefactor} ${benefactor_value}`
}
</script>
</header>