asdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 25s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-08-14 02:34:47 +02:00
parent 6c9f3d3a77
commit a39a65ed40

View File

@@ -1349,7 +1349,10 @@
? (dailyCurrency === reportCurrency ? dailyAmount : convertCurrencyValue(dailyAmount, dailyCurrency, reportCurrency)) ? (dailyCurrency === reportCurrency ? dailyAmount : convertCurrencyValue(dailyAmount, dailyCurrency, reportCurrency))
: null; : null;
const totalHashrateKh = toKhPerSecond(miner.mining_speed_value, miner.mining_speed_unit) + toKhPerSecond(miner.bonus_speed_value, miner.bonus_speed_unit); const totalHashrateKh = toKhPerSecond(miner.mining_speed_value, miner.mining_speed_unit) + toKhPerSecond(miner.bonus_speed_value, miner.bonus_speed_unit);
const costPerKh = totalHashrateKh > 0 ? (Number(miner.total_cost_amount) / totalHashrateKh) : null; const effectiveAmountReport = Number.isFinite(baseAmount) && baseCurrency === reportCurrency
? baseAmount
: convertCurrencyValue(miner.total_cost_amount, effectiveCurrency, reportCurrency);
const costPerKh = totalHashrateKh > 0 && Number.isFinite(effectiveAmountReport) ? (effectiveAmountReport / totalHashrateKh) : null;
return { return {
id: `purchase-${miner.id}`, id: `purchase-${miner.id}`,
source: 'miete', source: 'miete',
@@ -1364,6 +1367,7 @@
daily_cost_report_amount: Number.isFinite(dailyReportAmount) ? dailyReportAmount : null, daily_cost_report_amount: Number.isFinite(dailyReportAmount) ? dailyReportAmount : null,
total_hashrate_kh: totalHashrateKh > 0 ? totalHashrateKh : null, total_hashrate_kh: totalHashrateKh > 0 ? totalHashrateKh : null,
cost_per_kh_amount: Number.isFinite(costPerKh) && costPerKh > 0 ? costPerKh : null, cost_per_kh_amount: Number.isFinite(costPerKh) && costPerKh > 0 ? costPerKh : null,
cost_per_kh_currency: reportCurrency,
base_amount: baseAmount, base_amount: baseAmount,
base_currency: baseCurrency, base_currency: baseCurrency,
miner_id: miner.id, miner_id: miner.id,
@@ -1388,7 +1392,8 @@
? (dailyCurrency === reportCurrency ? dailyAmount : convertCurrencyValue(dailyAmount, dailyCurrency, reportCurrency)) ? (dailyCurrency === reportCurrency ? dailyAmount : convertCurrencyValue(dailyAmount, dailyCurrency, reportCurrency))
: null; : null;
const totalHashrateKh = toKhPerSecond(plan.mining_speed_value, plan.mining_speed_unit) + toKhPerSecond(plan.bonus_speed_value, plan.bonus_speed_unit); const totalHashrateKh = toKhPerSecond(plan.mining_speed_value, plan.mining_speed_unit) + toKhPerSecond(plan.bonus_speed_value, plan.bonus_speed_unit);
const costPerKh = totalHashrateKh > 0 ? (Number(plan.total_cost_amount) / totalHashrateKh) : null; const effectiveAmountReport = convertCurrencyValue(plan.total_cost_amount, plan.currency, reportCurrency);
const costPerKh = totalHashrateKh > 0 && Number.isFinite(effectiveAmountReport) ? (effectiveAmountReport / totalHashrateKh) : null;
return { return {
id: `plan-${plan.id}`, id: `plan-${plan.id}`,
source: 'manual', source: 'manual',
@@ -1403,6 +1408,7 @@
daily_cost_report_amount: Number.isFinite(dailyReportAmount) ? dailyReportAmount : null, daily_cost_report_amount: Number.isFinite(dailyReportAmount) ? dailyReportAmount : null,
total_hashrate_kh: totalHashrateKh > 0 ? totalHashrateKh : null, total_hashrate_kh: totalHashrateKh > 0 ? totalHashrateKh : null,
cost_per_kh_amount: Number.isFinite(costPerKh) && costPerKh > 0 ? costPerKh : null, cost_per_kh_amount: Number.isFinite(costPerKh) && costPerKh > 0 ? costPerKh : null,
cost_per_kh_currency: reportCurrency,
base_amount: plan.base_price_amount, base_amount: plan.base_price_amount,
base_currency: currentSettings.report_currency || 'EUR', base_currency: currentSettings.report_currency || 'EUR',
payment_type: plan.payment_type, payment_type: plan.payment_type,
@@ -3561,7 +3567,7 @@
]), ]),
h('td', { key: 'cost-kh' }, row.cost_per_kh_amount !== null && row.cost_per_kh_amount !== undefined h('td', { key: 'cost-kh' }, row.cost_per_kh_amount !== null && row.cost_per_kh_amount !== undefined
? [ ? [
h('div', { key: 'amount' }, fmtNumber(row.cost_per_kh_amount, 6)), h('div', { key: 'amount' }, fmtMoney(row.cost_per_kh_amount, row.cost_per_kh_currency || reportCurrency)),
row.total_hashrate_kh !== null && row.total_hashrate_kh !== undefined row.total_hashrate_kh !== null && row.total_hashrate_kh !== undefined
? h('div', { key: 'hash', className: 'mc-kicker' }, `bei ${fmtNumber(row.total_hashrate_kh, 4)} kH/s`) ? h('div', { key: 'hash', className: 'mc-kicker' }, `bei ${fmtNumber(row.total_hashrate_kh, 4)} kH/s`)
: null, : null,