1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# 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**.
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.
* Naturally, you should have your server configured to run PHP files with a PHP
backend.
* BusinessAdmin does not have a user management system. Anyone who has access
to the URL, has access to the system and all its data. It's therefore
necessary that you implement HTTP basic authentication. Refer to the
documentation of your server for how to do that.
## 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.php you can enter your MySQL details (host, database, username,
password, server port).
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)
* `files_folder_external`: an HTTP(S) URL to the same files folder
* `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.
## Permissions
The files folder will be used to put generated invoices in. Make your server
user (usually `www-data`) full permissions to this folder.
## 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!
1. First note down your current version number from the About page in
BusinessAdmin.
1. Update the directory.
1. Make sure you restore your personal settings in `/conf.php` and
`/classes/constants.php`, if these files were updated.
1. 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.
# ToDo
## Features
* Make it possible to edit more, specifically:
* The order to which an assignment is linked
* The contact to which an order is linked
* Different languages for different contacts
* Add a calendar plugin to the date fields
* Appendices feature: upload custom documents and link them to assignments (for functional designs, specifications, etc.)
* Sorting for offers
* Currently, the 'collapse sidebar' feature uses a session. It would be better to set a cookie with unlimited lifetime.
# Changelog
### 0.2 (Feb 10, 2015)
0.2.1 Sort clients, contacts and assignments.
0.2.2 Allow deletion of offers (foreign key constraint set to cascade rather
than restrict).
### 0.1 (Feb 6, 2015)
It's now possible to assign float values to the amount of hours you work on an
assignment (as opposed to integer values).
|