Feature updates and bug fixes#10
Open
welshcoder wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of all, humble apologies for not splitting the different features into separate PR. This is due to the way I've been adding the features. I promise to do better in future...
The summary of the changes are:
Added a second business address. The business actually has two addresses - a registered address of the business, and a correspondence address. This is quite commonplace in the UK. All invoices are required by law to have the registered address, so an invoice template have been added to allow for this.
Company number field - as with the registered address, this is a legal requirement in the UK. It is also different to the tax number, so both are needed.
Terms of Business - I had a requirement to include the terms of business with the quote. I dealt with this by adding two fields for two different terms of business (B2B and B2C). The input fields are using TinyMCE (https://www.tinymce.com/) to provide rich text content using HTML. A quote template has been added to allow for this and there is a selection of terms available in the email quote section.
Invoice cancelling - the original version had only the ability to delete invoices. However, there is a requirement to not delete invoices, but to mark them as cancelled instead (this is for accounting reasons). So, I added an option for invoices to be shown as cancelled instead of being deleted completely. This is a global option for the system, rather than individual invoices.
Project expenses - I needed the ability to assign products to projects as expenses. So, for example, if I use a widget in a project, then I need to record that, with the accounts showing that the cost is taken by the project. It is then possible to assign the expenses to an invoice as you wish. It's quite useful to determine how much a project cost internally.
Stock control - related to the last point, I updated code to reflect the stock quantities as items get used up or replaced back into stock as needed. This is very rudimentary, but good enough for my needs anyway.
Quote to Project - this option was added so that when a quote is accepted by the customer, you can choose "Create Project" on the quote screen and it generates a new project for that work. This is useful to keep the quote associated with a project (and visa versa) because the quote will sometimes have some customer requirements attached to it.
Journal quick link - I added a quick link to the journal for invoices in the invoices list so that it's easier to add or view notes for the invoices.
General bugs fixes - actually, the code worked really well, but PHP7 had some complaints about the classes not using
__constructand required stricter use ofisset(), so I changed those.