Add a section comparing earnings
This commit is contained in:
parent
09f35f84ea
commit
afccfcfb56
1 changed files with 10 additions and 0 deletions
|
|
@ -43,6 +43,7 @@ pub(crate) enum Section {
|
||||||
Variable,
|
Variable,
|
||||||
Accounts,
|
Accounts,
|
||||||
Remaining,
|
Remaining,
|
||||||
|
Earnings,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Section {
|
impl Section {
|
||||||
|
|
@ -52,6 +53,7 @@ impl Section {
|
||||||
Section::Variable => "Variable",
|
Section::Variable => "Variable",
|
||||||
Section::Accounts => "Accounts",
|
Section::Accounts => "Accounts",
|
||||||
Section::Remaining => "Remaining",
|
Section::Remaining => "Remaining",
|
||||||
|
Section::Earnings => "Earnings",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -399,6 +401,14 @@ where
|
||||||
|
|
||||||
std::iter::once(("Main", main_account)).chain(s.savings())
|
std::iter::once(("Main", main_account)).chain(s.savings())
|
||||||
}),
|
}),
|
||||||
|
mk_section!(Section::Earnings, |s| {
|
||||||
|
let earnings = s.earnings();
|
||||||
|
|
||||||
|
[
|
||||||
|
(self.person_1, earnings.person_1),
|
||||||
|
(self.person_2, earnings.person_2),
|
||||||
|
]
|
||||||
|
}),
|
||||||
mk_section!(Section::Remaining, move |s| {
|
mk_section!(Section::Remaining, move |s| {
|
||||||
let contrib = s.contributions(self.archive);
|
let contrib = s.contributions(self.archive);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue