GithubHelp home page GithubHelp logo

westnetz / rechnung Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 3.0 480 KB

File based contract and invoice management system.

Home Page: https://rechnung.readthedocs.io

Makefile 1.80% CSS 5.17% Python 80.65% HTML 12.04% Jinja 0.34%
invoice contract yaml pdf jinja2 weasyprint

rechnung's People

Contributors

aparcar avatar cfra avatar dependabot[bot] avatar olf42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rechnung's Issues

Licence

We need to agree on a License

Community profile

In order to make contribution easier, we should create

  • Contributing guidelines
  • code of conduct
  • issue template
  • PR template

CSV file for test cases

We need an "example" csv file / bank statement for testing the print-csv function of the cli.

Use pathlib only

Currently partly pathlib and partly os.path is used, it should be unified to the new standard.

Remove {slug} from contracts

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.

Allow multiple invoices per month

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

Testcoverage

We definitely need (more) tests, as this project is growing fast atm.

make install not working

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

Send single invoice

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.

Send reminder

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

INVALID HEADER

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"

Add CI

Currently there is no Continuous Integration.

print-stats and print-contracts do not calculate correctly

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

rechnung init broken

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.