aboutsummaryrefslogtreecommitdiff

BusinessAdmin

Administration software for small companies

BusinessAdmin is a web-based administration application that helps you, the owner of a small business, keep track of your current projects and clients. It features a built-in PDF invoice generator, mailer and a connection to Braintree to handle electronic payments.

Its intuitive interface lets you use it efficiently from the start. See the Usage section below.

Installation

Cloning

git clone --recursive https://github.com/camilstaps/BusinessAdmin.git

Server configuration

  • If you're going to use this application for sensitive data, you should seriously consider using HTTPS.

  • Every request that is not a file or directory itself should link back to /index.php. The query string should be left intact. For nginx, this means:

try_files $uri $uri/ /index.php$is_args$query_string;

In the appropriate location block.

  • For privacy reasons, the files/ directory should be denied access from all users except the PHP user, and not be accessible from outside.

  • Naturally, you should have your server configured to run PHP files with a PHP backend.

Create a database

BusinessAdmin assumes a MySQL database is setup properly. This can be:

  • A dedicated database only used for BusinessAdmin.
  • A database used with other projects as well. BusinessAdmin can use table prefixes, if you configure it to do so.

Configuration options

There are two files concerned when setting the configuration options.

In conf.private.php you can enter several settings for the database, sending emails and linking to Braintree. You can use conf.private.example.php as an example.

In classes/Constants.php, you should at least set the following options:

  • db_prefix: set if you'd like BusinessAdmin to use table prefixes in the database. For example, with the prefix ba_, tables will get names like ba_offer, ba_client, etc.
  • files_folder: the absolute path to the files folder (this is a folder in the BusinessAdmin directory)
  • url_external: the external HTTP(S) URL to BusinessAdmin
  • url_internal: the same URL, without the domain part

Create database tables and files folder

Open up /install/index.php. When you click 'create tables', it will create all the necessary tables in the database. This is also a first check to see if your MySQL credentials are valid.

In the same file, click 'create folders'. This will create your files and trash folder. This is also a check to make sure that your permissions are correct. You can also create these folders yourself, if you make sure the webserver has permission to it.

Creating a first user

Go to /install/index.php?create_user to create an admin user with a random password. If this user does not have ID 1, its ID will have to be added to user_admins in classes/constants.php to allow this user to add and delete users.

Security

Go to /install/index.php?password_cost to benchmark your system to find an appropriate password cost. Set the constant password_cost in classes/constants.php to this value.

You need to deny any requests for any files in the /files folder.

Permissions

The files folder will be used to put generated invoices in. Make your server user (usually www-data) full permissions to this folder. For privacy reasons, don't give other users access to this directory. Also, don't let it be accessible from outside.

Personalizing

If you add a file /files/logo-correspondence.png (or whatever directory you're using for your files), this image will be used as your logo in generated invoices.

Upgrading

  1. Always make a backup of your current files!
  2. First note down your current version number from the About page in BusinessAdmin.
  3. Update the directory.
  4. Make sure you restore your personal settings in /conf.php and /classes/constants.php, if these files were updated.
  5. Go to /install/upgrade.php and fill in your old version number. This will alter database tables, if necessary.

Usage

Abstract

On the highest level you have clients. These are companies you're in business with. One level lower are contacts. Contacts are the people in a company you're actually dealing with. Clients don't have address information. Contacts do.

Offers are always linked to contacts. That way the system knows which address to choose when generating an invoice. A level deeper we have assignments. One offer can contain multiple assignments. Each assignment has its own rate per hour and VAT percentage. Invoices are generated for offers. This way, you can generate invoices with multiple VAT percentages.

When creating an offer, its status is unaccepted. The idea is that you add an offer already to the system when you send the client a price indication. The Dashboard shows a widget with the amount of unaccepted offers. This helps you keep track of outstanding offer proposals.

Data-items that can be edited are underlined with a blue dotted line. You can double-click to edit them. For example, you could double-click on a contact's name, to open up a small edit form to change his name. This works with all editable data.

Dashboard

The Dashboard gives you an overview of things you may have to do (open invoices, running offers, offers that have not been accepted yet).

Clients

On the Clients page you can manage all your clients. It gives an overview of your clients and has a form to create a new client.

When you click on the details of a client using the arrow button, you will see an overview of the contacts of this client.

Contacts

The Contacts page gives an overview of all contacts. There is also a form to create a new contact.

Offers

The Offers page gives an overview of all offers. Per offer you can change the dates you're working on it, the date you sent the invoice, and the date you received the payment. You can also automatically generate a PDF invoice. You can toggle the accepted status, and view its details.

Assignments

Here you can link new assignments to your offers. You can also edit old assignments.

Trash

When you delete an invoice file, it's not actually deleted. Instead, it's placed in a directory called trash inside your files directory. These files are listed by name and removal time. This way, you never really lose your file.

Changelog

0.5 (Jul 28, 2016)

0.5.3 Frontend updates.
0.5.2 Emails.
0.5.1 Files are hidden from the world.
0.5 Braintree integration.

0.4 (Jul 26, 2016)

0.4.2 Moved offer.payment_received to a separate table payments.
0.4.1 Some users are administrator and can create and delete users.
0.4 User authentication mechanism.

0.3 (Jul 20, 2016)

0.3 Discounts.

0.2 (Feb 10, 2015)

0.2.2 Allow deletion of offers (foreign key constraint set to cascade rather than restrict).
0.2.1 Sort clients, contacts and assignments.

0.1 (Feb 6, 2015)

It is now possible to assign float values to the amount of hours you work on an assignment (as opposed to integer values).