# Manage billing codes with pkbcodes

Last modified on $Date: 2005-10-09 23:02:24 +0200 (So, 09. Okt 2005) $

Some people like lawyers for example need to be able to invoice their own clients for printouts. To address such needs, CUPS features the possibility to attach a particular billing code to each print job, and of course, PyKota can make use of it.

To use a billing code when printing, you have to pass an additionnal argument to the `lp` command, for example for a client named `smith` this could be something like :

    $ lp -o job-billing=smith the_file_to_print.ps

For PyKota to be able to maintain statistics per billing code, you first have to add these billing codes to PyKota's database. This is the main goal of the `pkbcodes` command line tool.

But `pkbcodes` also allows you to add a textual description to each billing code, to delete them, to reset billing code specific counters, and finally to list existing billing codes.

With the help of the `unknown_billingcode` directive in `pykota.conf`, you can decide what happens when a billing code is encountered when printing, and this billing code is not yet in PyKota's database. Automatically adding it to the database is a common choice, which saves time for the PyKota administrator.

Finally, the `overwrite_jobticket` directive in `pykota.conf` allows you to overwrite the job billing information at the latest stage of printing, for example if the application used to print doesn't allow end users to give a value to the billing code when submitting the print job.

## Reference

            pkbcodes
            -v--version
            -h--help
            -a--add
            -d--delete

              -D desc
              --description desc

            -l--list
            -r--reset
            -s--skipexisting