Skip to content

Commit

Permalink
yoseph negatives and tithes in history
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHubert committed Aug 6, 2024
1 parent 2315901 commit 04c040f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions yoseph/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ document.querySelector(`#savings-expense-enter`).addEventListener(`click`, () =>
document.querySelector(`#savings-expense-amount`).value = ''
const savingsHistoryItem = {
description: document.querySelector(`#savings-expense-description`).value,
amount: SavingsSubtract,
amount: SavingsSubtract*-1,
date: Date.now(),
account: "savings"
}
Expand Down Expand Up @@ -84,7 +84,7 @@ document.querySelector(`#stupid-expense-enter`).addEventListener(`click`, () =>
document.querySelector(`#stupid-expense-amount`).value = ''
const stupidHistoryItem = {
description: document.querySelector(`#stupid-expense-description`).value,
amount: StupidSubtract,
amount: StupidSubtract*-1,
date: Date.now(),
account: "stupid"
}
Expand All @@ -93,6 +93,14 @@ document.querySelector(`#stupid-expense-enter`).addEventListener(`click`, () =>
})

document.querySelector(`#tithe-clear`).addEventListener(`click`, () => {
const tithesHistoryItem = {
description: document.querySelector(`#stupid-expense-description`).value,
amount: Tithes*-1,
date: Date.now(),
account: "tithes",
description: "tithed"
}
History.push(tithesHistoryItem)
Tithes = 0
document.querySelector(`#tithe-total`).innerHTML = Tithes
})
Expand Down

0 comments on commit 04c040f

Please sign in to comment.