Command line billing.
Add the downloaded directory to your path.
- SQLAclhemy: sudo pip install SQLAlchemy
- prettytable: sudo pip install prettytable
- Pystache sudo pip install pystache
lk init db_path.sqlite
Init command disregards the currently selected database as this could cause data loss.
The active database is selected by the environment variable LK_DB_PATH. It should contain a path to an SQLite database.
Lakki is able to start a shell session with the variable set:
lk shell db_path.sqlite
If a relative path is specified, it is converted to an absolute path before starting the shell.
lk config set setting-name value
lk config get \[setting-name\]
lk config list
Required. Seller name, displayed in invoices.
Required. Seller street address, displayed in invoices.
Second row of the street address.
Required. Seller ZIP code, displayed in invoices.
Required. Seller city, displayed in invoices.
Required. Seller IBAN, displayed in invoices.
Required. Seller bank name, displayed in invoices.
Required. Seller bank BIC, displayed in invoices.
Required. Seller local company number, displayed in invoices.
Seller VAT number, displayed in invoices.
Seller country, displayed in invoices.
Number of the next invoice. Incremented every time an invoice is created.
Default number of days from the generation of the bill.
Handle of the default recipient of the bills.
Percentage of default VAT to add.
Path to the template for the invoice
Template of the bill filename. Available tokens:
Two-digit day of the month
Two-digit month
Four-digit year
Number of the invoice
Invoice parameters.
lk client add handle
Client may be added incomplete, but it may not be used until all required settings are set.
lk client set handle setting-name setting-value
lk client get handle setting-name
lk client remove handle
Clients with billed invoices may not be removed.
lk client list
lk client show \[--json\] client_number
Required. Name of the client, displayed in invoices.
Required. Address of the client, displayed in invoices.
Required. ZIP code of the client, displayed in invoices.
Required. City of the client, displayed in invoices.
Country of the client, displayed in invoices.
Number of the client. If not set, the id of the client in DB is used.
All invoice commands target the latest non-billed invoice unless invoice number is specified.
lk invoice add \[--invoice-number 1\] \[--date 1970-01-01\] \[--due-date 1970-01-14\] \[--due-days 14\]
If invoice number is specified, the number of the next invoice is not incremented. This can be used to bring in invoices generated by other sources having their own distinct sequences.
lk invoice remove \[--invoice-number 1\]
Billed invoices cannot be removed.
lk invoice show \[--json\] \[--invoice-number 1\]
lk invoice generate \[--filename output.html\] \[--template template.html\] \[invoice-number\]
If filename is omitted, a filename is generated using the default template.
lk invoice bill \[--invoice-number 1\]
lk invoice unbill \[--invoice-number 1\]
Unbilling marks the bill as unbilled, but does not generate a new bill to void it.
All row commands target the latest non-billed invoice unless invoice number is specified.
Invoices that are billed cannot be edited.
lk row add \[--invoice-number 1\] \[--vat 22%\] title price-per-unit \[units\]
Default number for units is one.
lk row remove \[--invoice-number 1\] row-index
lk row set \[--invoice-number 1\] row-index setting-name setting-value
lk row get \[--invoice-number 1\] row-index setting-name
All composite commands target the latest non-billed invoice unless invoice number is specified.
Invoices that are billed cannot be edited.
lk composite add \[--invoice-number 1\] \[--vat 22%\] title
lk composite remove \[--invoice-number 1\] row-index
lk composite sub \[--invoice-number 1\] \[--row-index\] title unit_price \[number_of_units\]
number_of_units is 1 by default.
lk composite subremove \[--invoice-number 1\] row-index
lk composite set \[--invoice-number 1\] row-index setting-name setting-value
lk composite get \[--invoice-number 1\] row-index setting-name
lk subrow mv \[--invoice-number 1\] src-row-index target-row-index subrow-index
Event handlers are shell commands that are executed when an event is triggered.
-
bill Triggered when an invoice is billed. Arguments:
-
unbill Triggered when an invoice is unbilled. Arguments:
-
generate Triggered when an invoice HTML has been generated.
lk event add event-name command
lk event remove [--id id] [--event event --index index]
Index is the number of the event handler displayed in lk event list.
lk event set [--id id] [--event event --index index] setting_name
setting_value
Index is the number of the event handler displayed in lk event list.
lk event get [--id id] [--event event --index index] setting_name
Index is the number of the event handler displayed in lk event list.
lk event list \[event-name\]
- Increment the invoice number only when setting as billed.