Skip to content

Commit

Permalink
Merge pull request #50 from jczaja/jczaja/rounding
Browse files Browse the repository at this point in the history
Correct rounding for showing values
  • Loading branch information
jczaja authored Jan 25, 2023
2 parents 532c816 + 2584876 commit df96241
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "etradeTaxReturnHelper"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
description = "Parses etrade financial documents for transaction details (income, tax paid, cost basis) and compute total income and total tax paid according to chosen tax residency (currency)"
license = "BSD-3-Clause"
Expand Down
12 changes: 6 additions & 6 deletions src/pl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ impl etradeTaxReturnHelper::Residency for PL {
}

fn present_result(&self, gross_div: f32, tax_div: f32, gross_sold: f32, cost_sold: f32) {
println!("(DYWIDENDY) PRZYCHOD Z ZAGRANICY: {} PLN", gross_div);
println!("(DYWIDENDY) PRZYCHOD Z ZAGRANICY: {:.2} PLN", gross_div);
println!(
"===> (DYWIDENDY) ZRYCZALTOWANY PODATEK: {} PLN",
0.19 * gross_div
"===> (DYWIDENDY) ZRYCZALTOWANY PODATEK: {:.2} PLN",
(0.19 * gross_div)
);
println!(
"===> (DYWIDENDY) PODATEK ZAPLACONY ZAGRANICA: {} PLN",
"===> (DYWIDENDY) PODATEK ZAPLACONY ZAGRANICA: {:.2} PLN",
tax_div
);
println!(
"===> (SPRZEDAZ AKCJI) PRZYCHOD Z ZAGRANICY: {} PLN",
"===> (SPRZEDAZ AKCJI) PRZYCHOD Z ZAGRANICY: {:.2} PLN",
gross_sold
);
println!(
"===> (SPRZEDAZ AKCJI) KOSZT UZYSKANIA PRZYCHODU: {} PLN",
"===> (SPRZEDAZ AKCJI) KOSZT UZYSKANIA PRZYCHODU: {:.2} PLN",
cost_sold
);
}
Expand Down

0 comments on commit df96241

Please sign in to comment.