From 5b6b3682dd8bfc9a2f35d3d82d29b009a26d17a5 Mon Sep 17 00:00:00 2001 From: boris Date: Tue, 25 Aug 2026 14:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=BB=E7=BB=93=E4=BA=A4=E6=98=93=E8=B4=B9?= =?UTF-8?q?=E7=8E=87=E5=AE=9A=E7=82=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/fidc-core/src/cost.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/crates/fidc-core/src/cost.rs b/crates/fidc-core/src/cost.rs index 61ad310..e95e135 100644 --- a/crates/fidc-core/src/cost.rs +++ b/crates/fidc-core/src/cost.rs @@ -89,6 +89,10 @@ impl ChinaAShareCostModel { self.fixed.minimum_commission = Self::fixed_money(value, "minimum commission"); } + pub fn set_transfer_fee_rate(&mut self, value: f64) { + self.fixed.transfer_fee_rate = Self::fixed_money(value, "transfer fee rate"); + } + pub fn set_stamp_tax_rate_before_change(&mut self, value: f64) { self.fixed.stamp_tax_rate_before_change = Self::fixed_money(value, "stamp tax rate before change"); @@ -103,6 +107,30 @@ impl ChinaAShareCostModel { self.fixed.stamp_tax_change_date = value; } + pub fn commission_rate(&self) -> f64 { + self.fixed.commission_rate.to_f64() + } + + pub fn minimum_commission(&self) -> f64 { + self.fixed.minimum_commission.to_f64() + } + + pub fn transfer_fee_rate(&self) -> f64 { + self.fixed.transfer_fee_rate.to_f64() + } + + pub fn stamp_tax_rate_before_change(&self) -> f64 { + self.fixed.stamp_tax_rate_before_change.to_f64() + } + + pub fn stamp_tax_rate_after_change(&self) -> f64 { + self.fixed.stamp_tax_rate_after_change.to_f64() + } + + pub fn stamp_tax_change_date(&self) -> NaiveDate { + self.fixed.stamp_tax_change_date + } + pub fn with_commission_rate(mut self, value: f64) -> Self { self.set_commission_rate(value); self