Skip to content

Commit

Permalink
fix fees calc
Browse files Browse the repository at this point in the history
  • Loading branch information
pofider committed Dec 23, 2024
1 parent 41a566b commit dde2063
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/lib/payments/taxes/taxes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/payments/taxes/taxes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/lib/payments/taxes/taxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ async function calculateFees(stripeSales: Array<Sale>, gumroadInvoices: Array<In
incomes += stripeSale.accountingData.price
}

for (const gumroadInvoice of gumroadInvoices) {
incomes += (await quotation(moment(gumroadInvoice.date).format('DD.MM.YYYY'), 'USD')) / gumroadInvoice.amount
for (const gumroadInvoice of gumroadInvoices) {
const q = await quotation(moment(gumroadInvoice.date).format('DD.MM.YYYY'), 'USD')
incomes += gumroadInvoice.amount / q
}

return round(incomes * 0.23)
Expand Down

0 comments on commit dde2063

Please sign in to comment.