westnetz / rechnung Goto Github PK
View Code? Open in Web Editor NEWFile based contract and invoice management system.
Home Page: https://rechnung.readthedocs.io
File based contract and invoice management system.
Home Page: https://rechnung.readthedocs.io
We need to agree on a License
In order to make contribution easier, we should create
We need an "example" csv file / bank statement for testing the print-csv function of the cli.
Currently partly pathlib and partly os.path is used, it should be unified to the new standard.
Contracts have a unique identifier (cid) and can be identified better by giving the name or email address of the other party. Therefore I propose to remove the slug property from the contracts.
Currently the invoices are created via <year>.<month>
however a better approach would be to have <year>.<month>.<counter>
to allow additional invoices like follow ups or something
The current invoices are pretty ugly, we should come up with something more appealing which is however universal.
This line makes absolutely no sense, as we are iterating over expected_results already. Should be result.output probably...
rechnung/rechnung/tests/test_cli.py
Line 147 in e27a8d4
The locale is settable, but not tested atm.
We definitely need (more) tests, as this project is growing fast atm.
We need documentation.
Preferrably using sphinx / readthedocs
It seams there is no install part in the Makefile therefor the 'make install' doesn't work.
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[\.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: check
check: bandit black-check pip-check test ## Run all checks
.PHONY: bandit
bandit: ## Run bandit
python -m bandit -r rechnung
.PHONY: black-check
black-check: ## Check code formatting
python -m black --check rechnung
.PHONY: black
black: ## Format code
python -m black rechnung
.PHONY: test
test: ## Run unittests
pytest -v rechnung --cov=./ --cov-report term-missing:skip-covered $(PYTEST_ARGS)
.PHONY: pip-check
pip-check: ## Verify that all python package dependencies are met
python -m pip check
.PHONY: upgrade
upgrade: ## Update all packages as available
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements.in | sed -n 's/==.*$$//p')
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements-dev.in | sed -n 's/==.*$$//p')
.PHONY: docs
docs:
rm -f docs/rechnung.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs rechnung
$(MAKE) -C docs clean
$(MAKE) -C docs html
Right now only all invoices matching a given prefixes can be sent (bulk). It should be possible to send single invoices by giving an invoice id.
It should be possible to send reminder email given either a cid oder invoice id, so basically the same as single sending a document (invoice or contract) but with a different text and subject
Instead of having all these different files only contracts with monthly billed items should be managed.
The currency should be customizable in the settings file
create_contracts, create_yaml_contract, save_contract_yaml and create_contract are causing problems when running flake and are not used anymore anyways. Should be deleted.
We need to add the date to the header.
This nondelivery report was generated by the program amavisd-new at host ********* [...]
INVALID HEADER
Missing required header field: "Date"
Currently there is no Continuous Integration.
Both print-stats and print-contacts do not calculate the amount per month in total correctly.
$ rechnung print-contracts
1000: [email protected] 2019-06-01 36.79€
$ rechnung print-stats
1 contracts in total
13.37€ per month
Even though, the correct amount should be 60.21€ according to this contract.
contents of _contracts/1000.yaml"
address:
- Martha Muster
- "Rosa-Luxemburg-Allee 161"
- 04161 Leipzig
cid: '1000'
dob: 1954-03-21
start: 2019-06-01
email: [email protected]
name: Martha Muster
notify: false
phone: '+491234567890'
slug: martha_muster
items:
- description: A great product
price: 13.37
quantity: 1- description: Another awesome product
price: 23.42
quantity: 2
a@tb:~/src/rechnung/test$ rechnung init
Initializing...
Traceback (most recent call last):
File "/home/a/.local/bin/rechnung", line 11, in <module>
load_entry_point('rechnung', 'console_scripts', 'rechnung')()
File "/home/a/.local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/a/.local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/a/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/a/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/a/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/a/src/rechnung/rechnung/cli.py", line 28, in init
settings = get_settings_from_cwd(cwd, create_non_existing_dirs=True)
File "/home/a/src/rechnung/rechnung/settings.py", line 81, in get_settings_from_cwd
Path(cwd) / settings_file, create_non_existing_dirs=create_non_existing_dirs
File "/home/a/src/rechnung/rechnung/settings.py", line 126, in get_settings_from_file
s_value = base_path / settings_data["assets_dir"] / s_value
File "/usr/lib/python3.7/pathlib.py", line 908, in __truediv__
return self._make_child((key,))
File "/usr/lib/python3.7/pathlib.py", line 695, in _make_child
drv, root, parts = self._parse_args(args)
File "/usr/lib/python3.7/pathlib.py", line 649, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.