Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ share/
./contracts/
./invoices/
./settings.yaml
docs/_build/*
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ uninstall: ## Remove the currently installed version of rechnung

.PHONY: reinstall
reinstall: uninstall install

.PHONY: docs
docs:
.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
100 changes: 63 additions & 37 deletions README.md → README.rst
Original file line number Diff line number Diff line change
@@ -1,95 +1,121 @@
# rechnung
rechnung
========

**rechnung** is a command line based invoice generation system.

![westnetz and reudnetz logos](assets/westnetz_reudnetz.png?raw=true "westnetz and reudnetz")
.. image:: assets/westnetz_reudnetz.png

## Features
Features
--------

* purely file based (no database)
* customizeable (invoice layout is HTML/CSS)

## Installation
Installation
------------

Clone this repository to your machine:

```
$ git clone https://github.com/westnetz/rechnung
```
.. code:: zsh

$ git clone https://github.com/westnetz/rechnung


Install the package

```
$ make install
```
.. code:: zsh
$ make install

**Note:** At the moment installation via pip only works, if you provide the -e option. Therefore it is recommended to use the provided *make install* method.

## Getting Started
*Note:* At the moment installation via pip only works, if you provide the -e option. Therefore it is recommended to use the provided *make install* method.

Getting Started
---------------

This section is a quick walkthrough all the features.

### Initialization
Initialization
~~~~~~~~~~~~~~

Before you can start generating your own invoices you need to setup your working directory for *rechnung*. By invoking

```
$ rechnung init
```
.. code:: zsh

$ rechnung init


all required directory and configuration files will be placed in the current working directory. It is recommended to do this in a clean directory.

### Configuration and Customization
Configuration and Customization
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can now edit the *rechnung.config.yaml* file to your needs. You need to enter the credentials for the mail server if you want to send out your invoices by email.

Customization of the invoices can be done by editing the invoice template *templates/invoice_template.j2.html* and the corresponding stylesheet in *assets/inovice.css*.

### Invoice Creation
Creating invoices
~~~~~~~~~~~~~~~~~

After creating your customers, you can create your first invoices.
The following command

```
$ rechnung create 01.01.2019 31.03.2019 3 2019 Q1
```
.. code:: zsh

$ rechnung create-invoices 2019 10

will create invoices for all customers who have a contract starting before and ending after october 2019.

You can force overwrite of existing invoices by giving the *--force/-f* option

will create invoices for all customers for the period from Jan 1st 2019 to Mar 31 2019 which is 3 months in the year 2019 and the suffix Q1.
.. code:: zsh

Of course the amount of months and the year could be parsed from the given dates, but we found it more failsafe if they are explicitly given.
$ rechnung create-invoices --force 2019 10

Individual invoices can be created by giving a specific customer id (cid)

This step will generate the invoice yaml files. These files are meant to be imported into your bookkeeping system. You can inspect them and even adjust/correct them if you spot errors.
.. code:: zsh

### PDF Creation
$ rechnung create-invoices -c 1000 2019 10


After creating your invoices you can doublecheck for correctness.

Rendering invoices (create pdf files)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If everything is correct, you are ready to create your pdf invoice documents.

```
$ rechnung render
```
.. code:: zsh

$ rechnung render-all

This command will render all invoice yaml files, which have no corresponding pdf file. I.e. if you happen to spot an error in an invoice pdf. Simply delete the pdf file, correct the mistake in the invoice yaml, and run the command again.

### Invoice Delivery
Sending invoices
~~~~~~~~~~~~~~~~

If you want to use the included mail delivery service, you should customize the invoice mail template to your needs: *templates/invoice_mail_template.j2*.
If you want to use the included mail delivery service, you should customize the invoice mail template to your needs: *assets/invoice_mail_template.j2*.

After doing that, you can send all the invoices you just created to your customers:

```
$ rechnung send 2019 09
```
.. code:: zsh

$ rechnung send 2019 09


This command will send all invoices with the given suffix to the customer given
in the invoice yaml file.

And that's it!

## Copyright
Copyright
---------

F. Rämisch, 2019
Paul Spooren, 2019
* Florian Rämisch, 2019
* Paul Spooren, 2019

## License
License
-------

GNU General Public License v3
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/index.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: db653583af1b66e7d64bec72de431ba5
tags: 645f666f9bcd5a90fca523b33c5a78b7
30 changes: 30 additions & 0 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. rechnung documentation master file, created by
sphinx-quickstart on Thu Oct 17 16:06:37 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

rechnung - file based cli for invoice and contract management
=============================================================

*rechnung* is a file based tool to manage invoices and contracts. It's designed for tech people, who'd like to generate bullet proof invoices without leaving their well known environment: the terminal.

*rechnung* provides easy-to-use batch functions and an intuitive CLI to all functionality.To allow for even the craziest modifications, all generated content, can be reedited by yourself, scripts or whatever you like, as everything is stored in files.

Getting started
===============

.. toctree::
:maxdepth: 2
:caption: Contents:

readme
modules

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

Authors, Copyright, License
===========================

*rechnung* is developed by Florian Rämisch and Paul Spooren on behalf of *Westnetz w.V.* and *Reudnetz w.V.* two independent not-for-profit internet service providers (ISPs). It is licensed under the `GNU General Public License v3 <https://www.gnu.org/licenses/gpl-3.0.en.html>`_. Copyright is by *Florian Rämisch and Paul Spooren, 2019*.
Loading