adjust payout report to show actual days

This commit is contained in:
aecsocket
2026-08-14 12:08:38 +00:00
parent ba1b7ce3c1
commit a0c2537505
5 changed files with 109 additions and 80 deletions
+3 -15
View File
@@ -52,9 +52,9 @@ pub enum PayoutRunStatus {
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
pub struct PayoutRunReport {
pub revenue: PayoutRunRevenue,
#[serde(with = "rust_decimal::serde::float")]
pub fees_deducted_usd: Decimal,
pub days: Vec<DayRevenue>,
#[serde(with = "rust_decimal::serde::float")]
pub fees_deducted_usd: Decimal,
#[serde(with = "rust_decimal::serde::float")]
pub variance_adjustment_usd: Decimal,
#[serde(with = "rust_decimal::serde::float")]
@@ -71,18 +71,6 @@ pub struct PayoutRunCompletion {
pub revenue_usd: Decimal,
}
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum PayoutRunRevenue {
Estimated {
days: Vec<DayRevenue>,
},
Actual {
#[serde(with = "rust_decimal::serde::float")]
amount_usd: Decimal,
},
}
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
pub struct DayRevenue {
pub date: NaiveDate,