Skip to content
Ross Addison edited this page May 6, 2021 · 9 revisions

Welcome to the yii2-h2h-core wiki!

General Introduction:

Thank-you for taking an interest in this project. And thank-you to Yiisoft for relentless unpaid hours no doubt in providing a secure php framework.

The sole pupose of this project is to be a teaching aid, in understanding Yii2. It is also functional and is used in a Window Cleaning Business. Its functionality is hopefully simple. Create a daily clean or round by adding houses to it. Collect the cash, mark this against the clean, and if amounts are large, make out an invoice to an internally signed up online payer who will login, see the invoice owed, and pay through Braintree, Elavon, or Stripe or some other Payment Provider.

3rd May 2021

I have modified about 30% of the Invoiceplane Opensource software which is written in php codeigniter into php Yii2. The language folder here is entirely Invoiceplane's. I have consistently used the language cues so that other languages can use this system. This module is tied into the frontend and is essentially not a standalone module because it is linked into the Product or House table. I am hoping to pull out and remove this dependency in a separate repository that will model itself around the original Invoiceplane table structure that uses Client tables rather than h2h's Product or House tables. If I had know I was going this far with this project, I would have chosen Client tables instead of Product tables however my curiosity was always in developing multitiered dependent dropdowns from Kartik. In addition a large portion of Invoiceplane's javascript is used here and has also been adapted. Right now the Invoice module:

  • Creates email templates allowing for the input of field information.
  • Uses modified pdf templates normal, overdue, and paid.
  • Archives pdfs when the email is sent.
  • Allows for attachments to the email and keeps record of these attachments in the database.
  • As mentioned above, allows a multilanguage interface in the settings section.
  • Complies with not displaying or using the Invoiceplane name or logo anywhere in the package according to the licence here https://wiki.invoiceplane.com/en/1.0/general/license although the pdf templates use the invoiceplane graphics overdue, and paid.
  • Does not use the codeigniter framework which Invoiceplane uses. Codeigniter libraries have been adapted into Yii2 classes using the yii\base\Component.

There are definitely areas where Yii2 code would have been more suitable than Codeigniter but I have tried to leave enough of the original algorithm developed by Kovah so that other developers can use this structure as a clone.

Hopefully some of this code will be useful to Invoiceplane developers, particularly the classes, if they decide to move to Yii2 although this is not likely since Yii3 is on its way at this stage.

4th May 2021

Over the next few days, as part of testing, I am going to be building a sample of data that can be used to demo the project. This will be stored in a separate folder under the frontend migrations so that users will have the choice of including ie. copying and pasting these migration files into the main migration folder. It has been my intention to keep the package data free from the outset since this more often than not exposes and therefore irons out careless bugs that I have included in the package, including integrity constraint violations, without intent of course.

5th May 2021

To register an online payer:

  1. Make sure you create a new role: Online Payer which is used by the InvoicesController.
  2. Make sure you create a permission 'Make payment online' which is used by the Open and Paid action under the InvoicesController
  3. Make sure you register a user under 'Invoicing' under 'Signup an Invoice Payer'.
  4. Assign the role Online Payer to the new user using the Admin menu.
  5. Under Revenue...House you will need to assign this new Online Payer user who will pay for the Householder.
Clone this wiki locally