import Button from "@mui/material/Button"; import { EMPTY_RECHARGE_OVERVIEW, EMPTY_RECHARGE_SUMMARY, formatAmount, formatUsdMinor } from "../format.js"; // 渠道对账页:按结算月核对各渠道的流水与扣费。谷歌口径来自 Orders API 同步的实付明细; // 三方与币商没有渠道侧扣费数据时如实标注,不做拍脑袋估算。 export function FinanceReconciliation({ loading, month, onMonthChange, overview, summary }) { const data = summary || EMPTY_RECHARGE_SUMMARY; const paid = (overview || EMPTY_RECHARGE_OVERVIEW).googlePaid; const totalUsd = Number(data.total?.usdMinorAmount) || 0; const feeUsd = paid.estFeeUsdMinor; const taxUsd = paid.estTaxUsdMinor; const netUsd = totalUsd - feeUsd - taxUsd; return (
{month.label} 结算期 对账口径:平台流水 × 谷歌 Orders API 实付 · 中国时区
结算瀑布全渠道 · USD{paid.unsyncedCount > 0 ? " · 谷歌扣费为已同步部分估算" : ""}
{loading ? (

统计中…

) : (
)}
谷歌 {paid.unsyncedCount > 0 ? ( {formatAmount(paid.unsyncedCount)} 笔待同步 ) : ( 实付已全量同步 )}

与 Play Console 财务报告按月核对;未同步订单可在流水页批量补数

三方

V5Pay 的 fee/tax 已逐笔展示在流水明细;MiFaPay 仅提供毛额,需用渠道后台月账单人工核对

币商

打款凭证与 TRC20 交易号逐笔登记在流水明细,可按凭证号搜索核对

); } function WaterfallRow({ amount, color, label, max }) { const width = max > 0 ? (Math.abs(amount) / max) * 100 : 0; const negative = amount < 0; return (
{label} {negative ? `− ${formatUsdMinor(-amount, "USD")}` : formatUsdMinor(amount, "USD")}
); } function ReconLine({ label, negative, total, value }) { return (
{label} {value}
); }