2023-10-23 21:07:52 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# A custom compound report - like incomestatement but with different
|
|
|
|
# subheadings/subreports. A bit hacky but quick and short.
|
|
|
|
# See also hledger-report1.hs.
|
|
|
|
|
2023-10-23 21:29:32 +03:00
|
|
|
echo "Report1 Statement $(date +%Y-%m-%d)"
|
2023-10-23 21:33:41 +03:00
|
|
|
|
2023-10-23 21:07:52 +03:00
|
|
|
printf "\nRevenues\n"
|
|
|
|
hledger bal expr:"type:r and $@" | tail +2
|
2023-10-23 21:33:41 +03:00
|
|
|
|
2023-10-23 21:07:52 +03:00
|
|
|
printf "\nOperating Expenses\n"
|
|
|
|
hledger bal expr:"type:x and operating and $@" | tail +2
|
2023-10-23 21:33:41 +03:00
|
|
|
|
2023-10-23 21:07:52 +03:00
|
|
|
printf "\nOther expenses\n"
|
|
|
|
hledger bal expr:"type:x and not:operating and $@" | tail +2
|
2023-10-23 21:33:41 +03:00
|
|
|
|
2023-10-23 21:07:52 +03:00
|
|
|
printf "\nGrand Total\n"
|
|
|
|
hledger bal expr:"type:rx and $@" | tail -1
|