simonmichael / hledger_site

The repo for hledger.org, the hledger project's website.
GNU General Public License v3.0
63 stars 37 forks source link

Unexpected total when adding `--monthly` flag/not respecting data filter #70

Closed benwhalley closed 2 years ago

benwhalley commented 2 years ago

Given data a like this:

# repro.timedot
2022.5.1
    work:projectA   ....
    work:admin   ..

2022.5.6
    work:projectB   ....
    work:admin   ..

2022.6.2
    work:admin  ..
    work:projectB ....

2022.6.12
    work:projectB ....

I was surprised to see this output. Specifically, it seems like the -M flag overrides the date filter. Is that expected behaviour? It feels pretty unintuitive, and seems like it would warrant a warning with the output that the dates of the table produced don't match the query.


> hledger -f repro.timedot balance date:"from 2022.5.6 to 2022.6.10"  --tree -T                                          
                2.00  work
                1.00    admin
                1.00    projectB
--------------------
                2.00

> hledger -f repro.timedot balance date:"from 2022.5.6 to 2022.6.10"  --tree -T  -M                                     
Balance changes in 2022-05-01..2022-06-30:

            ||  May   Jun    Total 
============++=====================
 work       || 3.00  0.50     3.50 
   admin    || 1.00  0.50     1.50 
   projectA || 1.00     0     1.00 
   projectB || 1.00     0     1.00 
------------++---------------------
            || 3.00  0.50     3.50 
benwhalley commented 2 years ago

Reposting in correct repo now