-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the invoice wiki!
Aim: To develop a similar invoicing system to InvoicePlane integrating with the latest Jquery, and security features of Yii3 using wampserver as a test platform for WAMP and also Ubuntu 22.04 LTS for LAMP.
To Do's - Longer Term Goals
1. Integration of Payment GatewaysPCI Compliant Stripe, Amazon Pay, Braintree, and Mollie have been introduced.
2. Accountant Role with the ability of an accountant/bookkeeper to record payments against invoices.
3. Include a Company Private Detail specific logo on a pdf invoice.
4. Acceptance Tests for Invoice
5. Further validation and exceptions to be included in testing of e-Invoicing using PeppolHelper.
6. Filters to be introduced on grids
7. Improve Generator index template using Yiisoft functions.
8. Include Product images
9. Integrate https://github.com/php-finance/double-entry
10. Remove all $s variables passed to views since the variable is defined under config/params.php
11. Upskilling on Docker.
'yiisoft/view' => [ 'basePath' => '@views', 'parameters' => [ 'assetManager' => Reference::to(AssetManager::class), 'urlGenerator' => Reference::to(UrlGeneratorInterface::class), 'currentRoute' => Reference::to(CurrentRoute::class), 'translator' => Reference::to(TranslatorInterface::class), // yii-invoice - Below parameters are specifically used in views/layout/invoice 's' => Reference::to(SettingRepository::class), 'session' => Reference::to(SessionInterface::class), 'datehelper' => Reference::to(DateHelper::class), 'pageSizeLimiter' => Reference::to(PageSizeLimiter::class), 'gridComponents' => Reference::to(GridComponents::class) ], ],
Pdf template construction upon emailing.
Work on info issues
Work In Progress - Shorter Term Goals
Psalm Level 2 - Testing
Dead Code Removal with Psalm 3 Testing
Language array generator using Google Translate
All invoices with dates falling within CompanyPrivate start and end dates will have the specific logo uploaded
for this CompanyPrivate record attached to these invoices.
CompanyPrivate logo will be automatically input on invoice/quotes depending on whether the date of the invoice falls between the start and end date.
Introducing Paypal.
Introducing India's PayTm payment gateway's QR code method of payment and comparing this with Stripe's method.
A General Sales Tax (GST) Tax System will have to be implemented first for this purpose.
Testing Credit Notes against Invoices with refunds (if payment made) linked to each of the payment gateways.
9th November 2024
1. Retest the .env and autoload files with Psalm Level 1 and filter_var function. Changes made.
2. public/index.php and yii console file at the root tested. Changes made.
3. The build database boolean value appears under performance on the application's menu now and warns if it has not been set back to false after setup.
4. Include a php-space-filter-var-test.php function for testing .env values at the command line using the filter_var function.
5. If signup fails due to no internet connection, token 'disabled' with: 'already_used_token' and a time value. The admin has to make the signed up userinv status active.
7th November 2024
1. Remove the email field from userinv entity/table although the relation getUser is used to retrieve the email field in the user table.
2. The User entity email field is shown 'disabled' in the userinv forms.
3. If the user signs up on a localhost with no connection to the internet they will be able to login provided the admin makes their account active via. userinv
31st October 2024
1. Reconfigured config/common/params to accomodate yiisoft/mailer-symfony
2. Tested SignUpController, ForgotController and are functional.
3. Added additional email headers for authorisation.
24th October 2024
1. yiisoft/mailer backward compatibility corrections. pull requests 104 - 109
2. MessageBodyTemplate(s) removed.
3. ->withCharSet('UTF-8') added to messages
4. yiisoft/bootstrap5 dev-master used in an attempt to remove composer-dependency-checker Yiisoft\Yii\Bootstrap5\AlertType unknown sybmol error https://github.com/rossaddison/invoice/actions/runs/11365127873/job/31612623182
5. Previous MessageBodyTemplates moved into ->withTextBody
6. Slight adjustment/improvement to resources/views/layout/alert with AlertVariants assigned to variables outside the match statement.
7. mailert->withAttached changed to withAttachments
8. self-imposed more disciplined approach to using branches and pull requests
Testing of above changes on one.com and beging yii3 discussion on webhooks use with Telegram and testing with one.com
23rd October 2024
Telegram
1. 10 step instructions for using Telegram under Settings ... View ... Telegram tab to setup client/customer payment notifications
2. getUpdates tested and functional
3. A webhook is currently not being used because payment notifications are being sent to the admin only. No messages are being sent from customers.
4. Currently messages from the admin's telegram account to the bot can be retrieved using the manual getUpdates
$settingRepositoryTelegramToken = $settingRepository->getSetting('telegram_token');
// chat id of first message (usually admin's personal non-bot telegram chat id) sent to bot
// since the admin will be receiving payment notification messages from the bot
$telegramChatId = $settingRepository->getSetting('telegram\_chat\_id');
$telegramHelper = new TelegramHelper(
$settingRepositoryTelegramToken,
$this->logger
);
$this->telegramBotApi = $telegramHelper->getBotApi();
$sendMessage = $this->telegramBotApi->sendMessage($telegramChatId, 'Hello World');
5. Next: Use Telegram to automatically send a Telegram Invoice to any client that is in the chat group.
13th October 2024
Forgot Password
1. User clicks on 'I forgot my password' on login form.
2. src/Auth/Controller/ForgotPasswordController. function forgot - Request Password Reset Token Form is presented for User to enter email address
3. When the form is submitted, an email with a masked link is sent to the user's inbox.
4a. A viewInjection site/forgotalert is presented encouraging the user to click on the link in their inbox.
4b. A viewInjection site/forgotfailed is presented, if the sites senderEmail has not been setup encouraging the user to setup their config/common/params.php senderEmail.
5. When the masked link is clicked, the src/Auth/ResetPasswordController.php function resetpassword unmasks the token.
6. A form with a 'new password' field and a 'verify new password' field is presented if the now unmasked token matches the 32bit string in Token->token with type 'request-password-reset'
7. As soon as this form is submitted, the following algorithm https://github.com/yiisoft/yii2-app-advanced/blob/master/frontend/models/ResetPasswordForm.php is followed:
1.) setPassword in User
2.) nullify PasswordResetToken by setting the Token:token to null but retaining the Token:type
so that the token can no longer be used.
3.) generateAuthKey in Identity
8. A viewInjection site/resetpasswordsuccess 'Password Reset' is shown if the password has changed.
9. A viewInjection site/resetpasswordfailed 'An error occurred while trying to send your password reset email. Please review the application logs or contact the system administrator.' is shown if the password has failed.
10. A logger interface records the failed error messages.
11. Testing site one.com settings have been included in the shared hosting FAQ
7th October 2024
User signup:
1. src/Auth/Controller/SignUpController function signup - Signup Form is hydrated or filled with login i.e. username, password, and email address
2. A user count is made, and if this is the first user i.e count == 1, the user is assigned an admin role. Otherwise an observer role is allocated. Viewed at resources/rbac/assignments.php
3a. An email verification token is generated with a random string of 32 and then Masked with Yiisoft\Security\TokenMask before sending by email.
3b. The type of the token i.e. email-verification-token, is stored along with the unmasked token in the token table which holds the different types of tokens.
4. A try-catch statement will raise an exception if the email is not sent and therefore redirect.
5. As soon as the user clicks on the link in their inbox, the config/common/routes/routes.php userinv/signup/{language}/{token} route is used.
6. There is no AccessChecker Middleware on this route => for security...the use of the email-verification-token.
7. A new window is opened when the link is clicked, and arguments language, and token in route are used, and the token is then unmasked.
8. The timestamped email-verification-token is split into its token and timestamp, allowing an hour (3600 secs) as limit for user to verify via email.
9. The identity of the user is then found by means of this token referring to src/auth/tokenRepository.
10. If the 'signup_automatically_assign_client' has been setup by the admin under Settings...General, the observer user will be assigned one client automatically. This client is identified with the same email address as the user.
11. The admin has a flash message 'on button' option to choose this option after signing in once signed up.
12. Quotes and invoices can then be automatically created for this client without the need to assign a client manually to the userinv (extension table of user) account.
13. The client index has been consolidated freeing up space.
14. The client form has required and essential fields appearing first at the top. The client entity adopts this ordering of fields as well.
15. Bugfix on the company_logo_and_address
16. Settings ... General includes two new settings 'Assign a client to user upon signing up' and 'Assign a client with default minimum age of eighteen to the user upon signing up'. Included in defaults in InvoiceController.
17. Removed the password field on the extension table userinv since the password is hashed in the user table.
18. Added an email field to the signup form
19, There is no need for a user_id field in the Identity entity because the hasOne Identity relation in the User table automatically creates this
20. Bugfix Auth/Token 'type' changed from integer to string
21. The column types in the Client Entity have been improved.
22. The size of an email field in the User table is a standard 254 characters.
23. The salt, email, and the passwordresettoken fields have been removed from userinv (InvoicePlanes user table) since these will be handled independently by the the token and identity table.
24. The token table will be saving the different types of tokens. The token table can be moved to a 'blog-api' but will be kept inclusive for the time being.
25. Include an additional setting in common/config/params symfony-mailer 'enabled' as a checked used in the SignUpController.php
Next: Forgot Password link on login form and reset-password-token and remember-me-token.
Tip: For testing puposes, truncating tables i.e. emptying them of rows, will reset the autoincrement counter on each table in mySql i.e. check all tables ... 'with selected' dropdown ... 'Delete data or table' ... 'Empty'
25th September 2024
A separate codeql.yml file has been autogenerated by Github because this is a public repository.
This has been done to:
1. enable AI suggestions through codeql using rossaddison/invoice ... settings ... code security ... advanced setup.
2. support jQuery who have now included codeQL in their workflows recently.
3. eliminate the need to constantly check jQuery for vulnerabilities in their javascript.
Reference: Limitations of Autofix suggestions
18th September 2024
A 'stop logging in' and 'stop signing up' setting appear in the settings...view tab and is related to the src\ViewInjection\LayoutViewInjection.php
Grids Quote, Inv, Product, Client can be sorted on the index.php and the guest.php side
Apply propertyTranslatorProviderInterface to Login and SignUp Form
Invoices can be marked as 'sent' using single button on inv/index so that invoice appears on client side.
A selection of invoices can be copied which is useful for batch invoice processing from inv/index.php.
CodeQL has been included in workflow actions and the Snyke bot is being used to check for security vulnerabilities.
40 security vulnerabilities were removed. Responsible files have been removed.
jQuery is to be informed of 12 security vulnerabilities using their latest beta version. All responsible files have been removed from the directory ...src\Invoice\Asset\jquery-ui-1.14.0
Set .env YII_DEBUG default value to non-empty. If the value is not empty so there is a value after the = sign it will be evaluated as a string first and then as true. YII_DEBUG= equates to false whereas YII_DEBUG=false equates to true because it is not empty.
Scrutinizer used for code analysis. scrutinizer.yml appears at the root.
bootstrap 4 data-toggle to bootstrap 5 data-bs-toggle.
javascript vulnerability in emailtemplate.js removed with separate view grid linked to the emailtemplate index.
yiisoft-yii-view-renderer replaces yiisoft/yii-view
3rd August 2024
Psalm Level 1 Testing Completed using below file format.
<plugins><pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/></plugins>
<projectFiles>
<directory name="config" />
<directory name="resources/views" />
<directory name="src" />
<file name="public/index.php"/>
<file name="yii"/>
<file name="autoload.php"/>
<ignoreFiles>
<directory name="vendor/yiisoft/requirements/src" />
</ignoreFiles>
</projectFiles>
Requirements checker can be run at the command prompt e.g. C:\wamp64\www\invoice>php requirements.php
The requirements.php file sits in the root folder.
Requirements Checker This script checks if your server configuration meets the requirements for running Yii application. It checks if the server is running the right version of PHP, if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
Check conclusion:
-----------------
PHP version: OK
PDO MySQL extension: OK
Intl extension: OK
-----------------------------------------
Errors: 0 Warnings: 0 Total checks: 3
The nullable: true relations getPostalAddress, getDelivery, and getDeliveryLocation have been removed in favour of using
repository access to the inv related tables in order to retrieve relevant information.
What's next: Telegram integration
13th July 2024
2. Folders p and q completed.
5th July 2024
Apply backward compatibility for new yiisoft/yii-view-renderer:
1. config/common/params adjusted and namespace use Yiisoft\Yii\View\ViewRenderer;
changed to use Yiisoft\Yii\View\Renderer\ViewRenderer;
Redundant routes removed...config/common/routes/routes.php
Psalm level 1 testing of invoice/config folder
Psalm level 1 testing of all invoice/resources/views/invoice folder started.
1. Folders z to r completed.
Psalm Level 1 file future psalm.xml
<plugins><pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/></plugins> <projectFiles> <directory name="config" /> <directory name="resources/views/invoice" /> <directory name="src" /> <file name="public/index.php"/> <file name="yii"/> <file name="autoload.php"/> </projectFiles>
What's next: Psalm Level 1 testing of views q to ...
What's after Psalm Testing: Integrating vjiks Telegram Api for hopefully client invoice payment notifications.
22nd June 2024
1. Include a requirements checker under FAQ's using newish repo 'yiisoft/requirements'.
2. Tested the Generator with a dummy Entity and updated the Generator with a few additional fixes.
3. Included actual ini_get values under the performance section on the main menu.
4. Alphabetical reordering of composer .json. (Except Payment Providers and rossaddison/ temporary forks which will be removed later).
5. docker-compose.yml does not require the version number anymore.
14th June 2024
1. The form for creating email templates i.e. resources/views/invoice/emailtemplate/form.php has been split into form_invoice and form_quote
2. All the form inputs have been html encoded and the forms have been converted to using Yiisoft php code instead of the HTML.
3. The generator has been used to help develop the new InvSentLog Entity and has been upgraded. Further refinements will naturally occur with continued use of the Generator.
4. Purpose of InvSentLog: Log or record all invoices that have been sent by email to a specific customer. The index can be filtered according to invoice number on both the Client and Admin side.
5. The Admin side can also filter the emails according to client name. The user associated with this client is also shown.
6. An additional field has been created for Client i.e. Title. The dropdown for this is built from the language folder invoice\resources\messages\en\app.php.
7. jQuery has been upgraded to the latest. i.e. ui 1.13.2 to 1.13.3. and 3.6.0 to 3.7.1
8. The UserInv index now includes the function revoke all roles i.e. revoke the Accountant and Observer role . Excludes the Administrator role.
9. A few temporary forks i.e. rossaddison/... have been created whilst vjik is busy with the upgrades. These will be removed later.
10. The mailer had a bug which has been fixed and has been tested with a few emails.
24th April 2024
Include stopLoggingIn and stopSigningUp variable into the LayoutViewInjection
Include these variables into main.php
Replace currentRoute with RouteArguments in InvoiceController.php
The $debugMode variable now is linked to the .env file. Alter the debugMode in the .env file now instead of the LayoutViewInjection. If the $_ENV['BUILD_DATABASE'] environment variable is linked directly in the config/common params.php file it results in performance degradation so leave the setitng on 'false' for the moment.
13th April 2024
1. Create a function userinv/guestlimit which stores a guest user's page size limiter selector's last choice.
2. This value is then specific to the user and separate from the default_page_size limiter.
3. Introduce all the invoice statuses to the guest grid.
4. Create a separate payment guest index page for logged in users with clients.
5. Create a separate payment online log guest index page for logged in users with clients.
6. Added the extra field to user inv: ListLimit
7. Adjusted the layouts i.e. ...resources/views/layout guest.php, main.php, and invoice.php to better reflect the logo.
8. Adjusted the pdfHelper to accomodate additional templates. It should be noted that mpdfHelper is not bootstrap compatible.
9. Include two filters InvNumer and Inv Amount Total into the guest grid.
10. Include the additional Invoice statuses into the InvRepository statuses array.
11. Include an addition buttonsGuest function into the PageSizeLimiter widget used for guest users paying off Invoices.
2nd April 2024
1. The debug mode setting, normally situated in ..\views\layout\invoice\main.php, has been moved to the
..\src\ViewInjection\LayoutViewInjection.php return array i.e. 'debugMode' => true,
2. A few basic front pages have been created for the site using BootstrapBrain Wavelight Free Template to illustrate the common view injection.
3. All dependency classes e.g. bsb- have been removed from the template and just raw bootstrap 5 code remains
4. An acknowledgement link has been included on the about page.
5. A soletrader layout template has been created to illustrate the ..\src\ViewInjection\CommonViewInjection.php pages. i.e. ..resources\views\layout\templates\soletrader\main.php
6. The front pages use the variables declared in the CommonViewInjection.php pages.
7. The Mollie Payment Api has been introduced. https://github.com/mollie/mollie-api-php A redirectUrl and not a webhookUrl is being used. After clients make payment on the Mollie site, they are redirected back with the invoice_url_key. This is matched with Mollie's metadata invoice_url_key. A payment table appears above the invoice view on successful payment.
8. Invoices are accepting payments. TODO: Refunds will be available on balancing credit notes if the invoice has a payment.
9. Updated custom fields index.
10. Payment gateways Amazon, Stripe, and Mollie have been tested.
11. Functions within the PaymentInformationController have been renamed from 'form' to 'inform' to better reflect the fact that data is not being captured on a form for pci compliance purposes.
12. Additional invoice statuses have been included in inv/getStatuses(Translator $translator) namely unpaid, reminder, letter, claim, judgement, enforcement, credit_invoice_for_invoice, loss
8th March 2024
Update the client index with filters firstname surname, and a mini table of invoices per client using Entity Client ArrayCollection
to build the ArrayCollection up and use its count and toArray function to count the number of invoices
and produce outstanding balance details respectively
27 February 2024
Psalm Level 1 Testing of Form Hydration, and Form Model Implementation
Transfering of relevant code to the Generator templates.
Creation of two bootstrap modal widgets src\Widget\Bootstrap5ModalInv.php, and src\Widget\Bootstrap5ModalQuote.php
p>Further integration of the entity into the form constructs for the rest of the entities.
11 December 2023
https://github.com/yiisoft/form/issues/298
Form Hydration, Form Model for Client, ClientNote, and Setting have been completed.
18 November 2023
Do not use 'Reset' word in the context of changing a password. Use 'Change' instead. Pull request 602 under development.
So reset switched to change on all files
The reset password aspect of yii3 is still being developed
25 September 2023
Bugfix $ucR variable undefined. Retain within controller rather than view.
Testing on yii3i.co.uk
.htaccess file located at root (yii3i.co.uk/) rebasing to /yii3i (main folder yii3-i-main) directing to public folder
RewriteEngine On RewriteBase /yii3i RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC] RewriteRule ^ %1 [L,NE,R=302] RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
24 September 2023
Multiple Product Image Gallery can be created for each product under Product ... Index ... View ... View ... Product Images
Sales Report by Product/Task
Bug Fix InvItemAllowanceCharge Edit.
20 August 2023
Each Product has an additional field called Additional Item Property Name and Value. These product properties can be added from the product view.
A number of Additional Properties can be added to a product now by means of the Product Property Entity.
Introduce Peppol (src\Invoice\Helpers\Peppol\PeppolHelper)
An Ecosio validated 0 error xml e-invoice can be generated.
Introduce StoreCove (src\Invoice\Helpers\StoreCove\StoreCoveHelper)
A Storecove Json Encoded Invoice can be generated.
Requirement 1:
With VAT enabled - VAT Invoices can now be created.
Requirement 2:
Store Cove Api connection functions have been created. (src\Invoice\InvoiceController.php store_cove_call_api)
Requirement 3:
Xml electronic invoices - Can be output if the following sequence is followed:
a: A logged in Client sets up their Peppol details on their side via Client...View...Options...Edit Peppol Details for e-invoicing.
b: A quote is created and sent by the Administrator to the Client.
c: A logged in Client creates a sales order from the quote with their purchase order number, purchase order line number, and their contact person in the modal.
d: A logged in Client, on each of the sales order line items, inputs their line item purchase order reference number, and their purchase order line number. (Mandatory or else exception will be raised).
e: A logged in Administrator, requests that terms and conditions be accepted.
f: A logged in Client accepts the terms and conditions.
g: A logged in Administrator, updates the status of the sales order from assembled, approved, confirmed, to generate.
h: A logged in Administrator can generate an invoice if the sales order status is on 'generate'
i: A logged in Administrator can now generate a Peppol Xml Invoice using today's exchange rates setup on Settings...View...Peppol Electronic Invoicing...One of From Currency and One of To Currency
j: Peppol exceptions will be raised.
22 March 2023
Preparation for Peppol e-Invoicing: UBL classes created using num-num/ubl-invoice. See folder src/Invoice/Ubl. Psalm Level 1 tested.
Html of invoice can be created - modal_inv_to_html - under View...Options
Logo introduced on invoices
A common company logo and address template created under invoice/setting/views.
A sumex extension table of table Invoice created. - Generating a sumex pdf is in its infancy.
Removed extensions causing DOM errors. F12 not carrying any errors.
Simplified Introductory Slider
Created 3 additional 'Yes/No' settings for 1. Stream (G Icon) 2. Archive (folder icon) 3. Html code (code icon) under Pdf Settings
Archives are saving consistently under src/Invoice/Uploads/Archives
Bugfix: Delete inv item redirects to interim page properly.
Bugfix: Cannot delete item if Invoice has 'sent' status.
Zugferd Invoices are archived under Invoice/Uploads/Temp/Zugferd wiht a random string filename.
04 March 2023
Introduce ZugferdHelper and ZugferXml
LoginForm and SignUp form - Extend both forms with RulesProviderInterfacehttps://github.com/yiisoft/form/pull/249
Psalm Level 1 Testing - 0 errors
23 February 2023
Psalm Level 1 Testing - 1 error - Framework related
ERROR: ImplementedReturnTypeMismatch - vendor/yiisoft/form/src/FormModel.php:218:33 - The inherited return type 'iterable>' for Yiisoft\Validator\RulesProviderInterface::getRules is different to the implemented return type for Yiisoft\Form\FormModel::getrules 'array' (see https://psalm.dev/123) public function getRules(): array
31 January 2023
Psalm Level 2 Testing - 0 errors
Bug Fix: Edit Task
28 January 2023
Helpers\CountryHelper\get_country_list
The following code is functional but results in UnresolvableInclude: Worth coming back to.
Psalm Level 2 Testing - Submission 1
`/**
- Returns an array list of cldr => country, translated in the language $cldr.
- If there is no translated country list, return the english one.
- @param string $cldr
- @return mixed
/
public function get_country_list(string $cldr) : mixed
{
$new_aliases = new Aliases(['@helpers' => DIR, '@country_list' => '@helpers/Country-list']);
$file = $new_aliases->get('@country_list') .DIRECTORY_SEPARATOR. $cldr .DIRECTORY_SEPARATOR.'country.php';
$default_english = $new_aliases->get('@country_list') .DIRECTORY_SEPARATOR.'en'.DIRECTORY_SEPARATOR.'country.php';
if (file_exists($file)) {
/* - @psalm-suppress UnresolvableInclude
/
return (include $file);
} else {
/* - @psalm-suppress UnresolvableInclude
*/
return (include $default_english);
}
}
`
27 January 2023
Psalm Level 3 Testing (0 errors)
Testing
Upgrade Amazon Pay: 2.4.0 => 2.5.1
Test Amazon Pay with a Client logon.
1. Client has been registered as a User via Yii Demo.
2. Client's User id has been transferred to UserInv via Settings ... User Account...+ by means of an Admin logon
3. Client's client_id has been assigned to their user_id via Settings ... User Account ...Assigned Clients by means of an Admin logon.
Remove unknown region 'gb' bug. Admin must select one of three amazon regions in dropdown under Settings ... Online Payment.
Include Amazon's 3 standard regions ie. North America, Europe, and Japan in regions dropdown on Amazon_pay Settings Payment Gateway.
If region is not set, default to 'eu' in PaymentInformation/amazon_get_region
Include default time/zone under InvoiceController
23 January 2023
Psalm Level 3 Testing (0 errors)
Improve security of client viewing their quotes/invoices online with following code in InvController/url_key function
// After signup the user was included in the userinv using Settings...User Account...+ $user_inv = $uiR->repoUserInvUserIdquery($currentUser_getId); // The client has been assigned to the user id using Setting...User Account...Assigned Clients $user_client = $ucR->repoUserClientqueryCount($currentUser_getId, $inv->getClient_id()) === 1 ? true : false; if ($user_inv && $user_client) {
If the currentUser getId returns a null value they are a guest. See documentation. Yiisoft/CurrentUser
Note: The Psalm PossiblyNullArgument has to be suppressed here to allow for a possible null value here for validation of Yiisoft guest status.
No user with Yiisoft guest status is allowed in.
3 January 2023
Uzbek Introduced
Psalm Level 7,6,5,4 Testing (0 errors)
2 January 2023
Psalm Level 7,6,5,4 Testing (0 errors)
30 December 2022
12 Post-setup Steps to Introducing Azerbaijani language
1. config/web/params {locales}
2. views/layout/invoice.php {az_Asset and menu construction}
3a. views/layout/main.php {menu construction}
3b. views/layout/guest.php {menu construction}
4. SettingRepository/locale_language_array
5. Settings...Views...Google Translate...select locale from dropdown
6. Generator... Translate src/Invoice/Language/English/ip_lang.php
7. Generator... Translate src/Invoice/Language/English/gateway_lang.php
8. Generator... Translate src/Invoice/Language/English/app_lang {copied from ...resources/messages/en/app.php
9. Retrieve from ...views/invoice/generator/output_overwrite
10. copy output_overwrite/_ip_lang to src/Invoice/Language/{new language}
11. copy output_overwrite/_gateway_lang to src/Invoice/Language/{new language}
12. copy output_overwrite/_app.php to ...resources/messages/{new locale}
Psalm level 4 php ./vendor/bin/psalm --alter --issues=InvalidReturnType,MissingReturnType,LessSpecificReturnType,MissingParamType --dry-run
29 December 2022
Psalm Level 4 Testing (0 errors)
Using Generator...Translate{language file} and Setting...View...Google Translate...locale,
Afrikaans, Russian, German, Ukrainian, Vietnamese language folders generated using Google Translate
Locale related files adjusted:
...src/Invoice/Setting/SettingRepository/locale_language_array/{insert the locale}
...src/Invoice/Asset/i18nAsset/{create your file with class name the same as the file name}
...resources/views/layout/main.php/{insert the language menu item}
...resources/views/layout/invoice.php{insert the 'use' namespace, 'case', and menu item.
...adjust the config/params 'locales' setting.
28 December 2022
Google Translate included to generate language files ie. ip_lang.php, gateway_lang.php, app.php for a locale.
[Build your cloud project](https://console.cloud.google.com/iam-admin/serviceaccounts/details/ %20%20%20%20%20%20%20%20//%20{unique_project_id}/keys?project={your_project_name})
Steps to get the Json file that must be saved in src/Invoice/google_tranlate_unique_folder
1: Download https://curl.haxx.se/ca/cacert.pem into active c:\wamp64\bin\php\php8.1.12 folder
2: Select your project that you created under https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts?supportedpurview=project'
3: Click on Actions icon and select Manage Keys
4: Add Key
5: Choose the Json File option and Download the file to src/Invoice/Google_translate_unique_folder
6: You will have to enable the Cloud Translation API and provide your billing details. You will be charged 0 currency
7: Move the file from views/generator/output_overwrite to eg. src/Invoice/Language/{your language}
Step to choose a locale for translation: Settings...View...Google Translate...{dropdown}...save
Steps to generate eg. ip_lang.php
1: Generator ...Translate English\ip_lang.php
2: Either copy the array from off the screen or move it from ..resources/views/generator/output_overwrite into the appropriate folder
3. The separator ie. 'YYYY' will enable you to do a search and replace ie search 'YYYY' and replace ', to provide a comma separating each array item from the screen outputted array with a comma.
4. Dont forget to restart Netbeans 16 after adjusting C:\Program Files\NetBeans-16\netbeans\etc\netbeans.conf and inserting "-J-Dfile.encoding=UTF-8"
to parameter "netbeans_default_options". when dealing with languages with special characters.
26th December 2022
Include additional demo languages
24th December 2022
1. Retesting Sending of invoices by email.
2. Remove 55 Psalm Errors mostly related to Issue #5
3. Psalm Level 7,6,5,4 Testing using Psalm 5.4 instead of 4.3
4. Auditing of Setting...View...Invoice...Default Public Template and Mark Invoices Sent Copy
.
5. Moved rossaddison/yii-invoice to rossaddison/yii3-i.
6. Resynced rossaddison/yii-invoice fork.
20th December 2022
1. Moved repository into separate working folder under blog, and blog-api for separate github workflow purposes.
2. Invoice works separately from blog. There are no hyperlinks to blog.
3. The Entity User's relations to comment and post have been removed since these are no longer needed.
However the user that is registered under the demo still has to be added to the userinv table using Setting...User Account.
4. New Setting: Invoices marked as 'sent' when copying so that a client can view them online immediately without having to be sent by email. See Settings...View...Invoices...Other Settings. This is also useful for testing a series of invoices against a payment gateway.
5. A checkbox 'sandbox' has been added to the SettingsRepository/payment_gateways array for amazon_pay, and braintree. If you plan to use a language other than English, you will need to include 'online_payment_sandbox' => 'Sandbox',
in the corresponding src/Invoice/Language/{your_language}/gateway_lang.php file. ie. check that the gateway_lang.php in the English folder corresponds with your language folder.
6. The omnipay payment gateway with stripe will give the following warning (which is not recommended to accept):
Payment failed. Please try again. Response: Sending credit card numbers directly to the Stripe API is generally unsafe. We suggest you use test tokens that map to the test card you are using, see https://stripe.com/docs/testing.
You will have to go into https://dashboard.stripe.com/settings/integration and toggle the following screen.
7. Github Static Analysis: Psalm Level 7,6,5,4 testing - errors 0
8. The function src\User\Console\AssignRoleCommand and CreateCommand is functional as the observer role can be assigned to a client with the result ending up as an assignment in ...invoices/resources/rbac
How to reach Psalm level 4 the following code is needed to suppress Psalm errors on level 4:
9. Braintree Payment Gateway has been introduced.
/** * @psalm-suppress InvalidReturnType, InvalidReturnStatement, UndefinedInterfaceMethod */
This will need to be looked at later.
10th December 2022
Github Static Analysis: Psalm Level 7,6,5,4 testing - errors 0
1. Payment and Merchant (Online log) views upgraded to GridView.
2. A subarray has been added to the gateway array under SettingRepository/payment_gateways function 'version' => array( 'type' => 'checkbox', 'label' => 'Omnipay Version' )
This is to facilitate the introduction of PCI compliant gateways. The two pci compliant tested gateways introduced here are: Stripe version 10 and Amazon_Pay.
3. If the above 'Omnipay version' checkbox is left unchecked for the specific gateway, you are implying that it is PCI compliant.
4. Uncheck 'Omnipay version' for Stripe Version 10 and the latest Amazon_Pay which have been introduced here.
5. The guest url has been removed from the guest view. The user/client when logged in with 'observer role', has a list of enabled gateways in a list under options under the guest's invoice view.
6. Stripe version 10 is PCI compliant because their js.stripe.com/v3 cdn is dealt with directly and no credit card details are shared.
7. Amazon Pay is PCI compliant because the user/client has to be logged into amazon.co.uk before they can use the Amazon Button. No credit card details are shared.
8. The PaymentInformationForm includes place to enter credit card details but this form only presents itself with Omnipay version checked gateways.
9. The PaymentInformationController handles Omnipay and PCI compliant gateways.
10. Amazon_Pay has been integrated with productType set to PayOnly (see function form) so clients can pay if they have an Amazon Account.
11. Register as a developer under Stripe to test the Omnipay Integration.
12. The following code under ...resources/views/invoice/paymentinformation/payment_information_stripe_pci is of importance.
. 'async function initialize() {' // To avoid Error 422 Unprocessible entity // const { clientSecret } = await fetch("/create.php", { // method: "POST", // headers: { "Content-Type": "application/json" }, // body: JSON.stringify({ items }), // }).then((r) => r.json()); . 'const { clientSecret } = {"clientSecret": "'. $client_secret .'"};' . 'elements = stripe.elements({ clientSecret });' . 'const paymentElementOptions = {' . 'layout: "tabs"' . '};' . 'const paymentElement = elements.create("payment", paymentElementOptions);' . 'paymentElement.mount("#payment-element");' . '}'
13. Stripe version 10 is working for debit/credit cards and for bacs. Login as a user with observer role.
14. Amazon Pay v2.40 is working if you are signed in to Amazon concurrently. Login as a user with observer role.
15. The PaymentController and MerchantController guest related functions adopt the same approach as the InvController:
`// Get the current user and determine from (@see Settings...User Account) whether they have been given
// either guest or admin rights. These rights are unrelated to rbac and serve as a second
// 'line of defense' to support role based admin control.
// Retrieve the user from Yii-Demo's list of users in the User Table
$user = $this->user_service->getUser();
// Use this user's id to see whether a user has been setup under UserInv ie. yii-invoice's list of users
$userinv = ($uiR->repoUserInvUserIdcount((string)$user->getId()) > 0
? $uiR->repoUserInvUserIdquery((string)$user->getId())
: null);
// Determine what clients have been allocated to this user (@see Settings...User Account)
// by looking at UserClient table
// eg. If the user is a guest-accountant, they will have been allocated certain clients
// A user-quest-accountant will be allocated a series of clients
// A user-guest-client will be allocated their client number by the administrator so that
// they can view their invoices and make payment
$user_clients = (null!== $userinv ? $ucR->get_assigned_to_user($user->getId()) : []);`
To configure Amazon Pay you will need your Merchant ID, Public Key, Public Key ID and Private Key.
To find your keys and IDs:
- sign in to your Amazon Payments merchant account in Seller Central
- click Integration, and then click Integration Central
- select your Integration channel
- choose your ecommerce solution provider, or choose self-developed
- choose your payment type in the Payment type dropdown
- click Get instructions, and then click Create keys in the Instructions section
To enable the Sign in with Amazon button on your website, you will need a Client ID/Store ID.
To create a Client ID/Store ID or to manage applications:
- sign in to your Amazon Payments merchant account in Seller Central
- choose Amazon Pay (Production View) from the dropdown on top of the page
- click Integration within the navigation bar, and then click Integration Central
- scroll to the end the page and click View Client ID/Store ID(s), or click Create new Client ID/Store ID
Api Key - private key not used in the package and not to be shown to anybody. It can be stored in the database if you choose.
Publishable Key eg. pk_... - Goto Stripe DashBoard at https://dashboard.stripe.com and store in Setting...View...Online Payment...Stripe
Secret Key eg sk_... - Goto Stripe DashBoard at https://dashboard.stripe.com and store in Setting...View...Online Payment...Stripe
All keys viewed by phpMyAdmin are encoded with Crypt and bear no resemblance to the original keys.
javascript $client_secret
in views/invoice/paymentinformation/payment_information_stripe_pci.php - generated by Payment Intent in PaymentInformationController/get_stripe_pci_client_secret based on data passed to payment intent.
...resources/views/layout/invoice.php and quest.php incorporate the following settings which will load either the Stripe asset or the Amazon Pay Asset
// '0' => PCI Compliant version $s->getSetting('gateway_stripe_version') == '0' ? $assetManager->register(stripe_v10_Asset::class) : ''; $s->getSetting('gateway_amazon_pay_version') == '0' ? $assetManager->register(amazon_pay_v2_4_Asset::class) : '';
Enable these Payment Gateways under Settings...Views...Online Payment
11th November 2022
Bug fix: Include Integration 18.066. Paginators working with external status by inserting status into urlArguments.
OffsetPagination::widget() ->menuClass('pagination justify-content-center') ->paginator($paginator) // No need to use page argument since built-in. Use status bar value passed from urlGenerator to quote/guest ->urlArguments(['status'=>$status]) ->render(), )
8th November 2022
Add tabs draft, sent, viewed, approved, canceled, rejected to client view quote
Add tabs draft, sent, viewed, paid to client view invoice
4th November 2022
Psalm level 7,6,5,4 testng - 0 errors
Bugfixing quotes and invoices
Moved views to resources.
25th October 2022
Invoice, Quote, Product, UserInv GridView adjusted for latest Gridview code adjustments. Product table can now be sorted.
All tables sort with descending ie. minus sign attached to Sort:: array's id ie. -id
$sort = Sort::only(['status_id','number','date_created','date_due','id','client_id']) // (@see vendor\yiisoft\data\src\Reader\Sort // - => 'desc' so -id => default descending on id // Show the latest quotes first => -id ->withOrderString($query_params['sort'] ?? '-id');
The email config params mentioned in 11th October, now have to be linked to the Email Sending Method on Setting...Email...Email Sending Method.
The following code added to the end of the latest yiisoft/demo composer.json ensures that rossaddison/yii-invoice
will work with psr-3. The dev-psr-3 branch will be picked up.
"rossaddison/mpdf": "*"
Psalm Level - 7,6,5,4 Testing - 0 errors
Include start date and end date on CompanyPrivate Entity
Archived pdf can now be sent automatically with singular email attachment using Setting...View...Email...Attach Quote/Invoice on email?
MailerHelper/yii_mailer_send function
$path_info = pathinfo($pdf_template_target_path); $path_info_file_name = $path_info['filename']; $email_attachments_with_pdf_template = $email->withAttached(File::fromPath(FileHelper::normalizePath($pdf_template_target_path), $path_info_file_name, 'application/pdf') );
11h October 2022
Psalm Level - 7,6,5,4 Testing - 0 errors
Setting...View...Email shows some config/params.php settings using SettingRepository config_params
function.
public function config_params() : array { $config = ConfigFactory::create(new ConfigPaths(dirname(dirname(dirname(__DIR__))), 'config/'), null); $params = $config->get('params'); $config_array = [ 'esmtp_scheme' =>$params['symfony/mailer']['esmtpTransport']['scheme'], 'esmtp_host'=>$params['symfony/mailer']['esmtpTransport']['host'], 'esmtp_port'=>$params['symfony/mailer']['esmtpTransport']['port'], 'use_send_mail'=>$params['yiisoft/mailer']['useSendmail'] == 1 ? $this->trans('true') : $this->trans('false'), ]; return $config_array; }
Continue with auditing of settings
Bug fix with test data
4th October 2022
Psalm Level 4 Testing Complete - 150 errors removed.
1st October 2022
Files can be attached to invoices. Security measure is_uploaded_file php
function using specifically a tmp file. See InvController/attachment_move_to function.
Add adjustments to Generator Templates
21st September 2022
Simplify accesschecker permissions to 4 basic permissions ie. editInv, and viewInv, and editPayment and viewPayment and editUser for all controllers.
Inclusion of Yii's php form code replacing Html code on forms mailer_quote and mailer_invoice.
Psalm Level 6 - 155 errors removed. Remaining errors are yii-demo related.
Psalm Level 5 - 47 errors removed. Remaining errors are yii-demo related.
YiiMailer (adaptation of Symfonymailer) replaces phpmailer utilizing the code provided in yii-demo.
Files can be attached to emails using Send Email under Dropdown Options menu on the Quote/Invoice View Yii. Setting up the email templates is optional.
Users with observer role can view the quotes or invoices, and then access the 'approve or reject section' by using the guest url on the quote or invoice and pasting it into the browser.
Inclusion of below code in config/params and adjustments to MailerHelper and TemplateHelper to facilitate emailing.
Email Templates are working through javascript and parsing of data to build the template is functional.
Note: Yii's php textbox, rather than preferably a textarea, is currently used to display the email template.
Emailing of quotes/invoices with adjustment to config.params. 'yiisoft/mailer' => [ 'messageBodyTemplate' => [ 'viewPath' => '@src/Contact/mail', ], 'fileMailer' => [ 'fileMailerStorage' => '@runtime/mail', ], 'useSendmail' => false, 'writeToFiles' => false, ], 'symfony/mailer' => [ 'esmtpTransport' => [ 'scheme' => 'smtp', // "smtps": using TLS, "smtp": without using TLS. 'host' => 'mail.btinternet.com', 'port' => 25, 'username' => '[email protected]', 'password' => 'yourpassword', 'options' => [], // See: https://symfony.com/doc/current/mailer.html#tls-peer-verification ], ],
Navbar on invoice layout includes an offcanvas Menu that works with the 'burger icon' menu button if NOT a full screen and moves in from the left.
Role: Observer included so customers can view their quotes, invoices, and payments online.
To assign the observer role to a client so they can view their invoices online.
Step 1: Sign up user using Yii-demo
Step 2: Signed in as Administrator, make sure this new user is a client ie. Client...View...New
Step 3: As administatrator, make sure this user has Guest (read/only) permissions under Settings...User Account
Step 4: Add signed up client / user to Settings...User Account table and use Assigned Clients 'burger' to add/associate this client to their user id.
Step 5: Use assignRole 'observer' and user id from User Account to assign observer permissions to this user/client.
C:\wamp64\www\yii-invoice>yii user/assignRole observer 3
Step 6: Create some invoices for this user/client signed in as Administrator and add payments.
Step 7: Login as user/client and view the invoices and associated payments that you as Administrator have created for them.
The yii logo is called up permanently in the navbar with the logo located in the public folder.
The login logo previously located under Settings ... General has been moved to Settings...Company Private Details.
Each Company Private Detail record can now have their own logo/icon
This is useful for a company logo that evolves with time, older invoices retaining their older logo.
Use Yii's Form::tag() ->post($urlGenerator->generate(...$action)) ->enctypeMultipartFormData() ->csrf($csrf) ->id('CompanyPrivateForm') ->open()
on forms instead of Html form tag
C:\wamp64\www\yii-invoice>php ./vendor/bin/psalm --alter --issues=InvalidNullableReturnType, InvalidReturnType, MissingReturnType, LessSpecificReturnType, MismatchingDocblockParamType, MismatchingDocblockReturnType, MissingParamType --dry-run
20th August 2022
Menu font enlarged.
Psalm Level 7 testing using php ./vendor/bin/psalm
at command prompt: 0 errors.
Upgraded index for Quote and Invoice - sortable headers
Include a three input box Start of tax year date under Settings..View..Taxes for Tax Reporting.
Include a Y-m-d H:i:s format for invoicing.
ReportsSales by Client, Sales by Date, Payment History, and Invoice Aging completed.
Move invoice/index schema code to Generator...Schema
Setting...UserAccount functional. Payment...Enter functional.
Invoices cannot be edited once paid. The read only flag is used on the invoice and buttons are disabled.
5th August 2022 - The Dashboard has been put up. Once Sumex is further developed it will be added to the dashboard. Accessible by menu: Dashboard
To avoid issues concerning psr3 and unvoided return types in mpdf/mpdf I have forked the latest mpdf/mpdf development repo and made adjustments to the relevant files.
The fork rossaddison/mpdf has been included in the composer.json file. Although at this stage it will run using version mpdf/mpdf 8.016, using psr 2, I have the reassurance that these errors concerning void will not show up in Yii
29th July 2022 - Psalm testing using 'php ./vendor/bin/psalm' at command prompt - static errors removed. Info issues reduced from 2800 to 2000.
The client view now includes client's details, quotes, invoices, notes, and custom fields tabs.
Relevant javascript has been added to client.js ... load_client_notes, and save_client_notes.
21st July 2022
Invoice/Layout/main.php has been moved to @views/layout/invoice.php. The cldr setting value is given the $session->get('_language') value by means of the locale dropdown.
The $s value is configured for the @views/layout/invoice.php. (different to the demo layout ie. views/layout/main.php) in config/params.php yii-soft/view Reference::to and NOT by means of the InvoiceController . The $s value is necessary in this layout to record the current locale in the cldr setting if it is selected BEFORE login. ie. ~$s->save_session_locale_to_cldr($session->get('_language') ?? ($s->getSetting('cldr') ? $s->getSetting('cldr') : 'en'));~
jquery 1.13.2 which has just been released is now the default. jquery 1.13.0 has been removed.
In demo mode, the menu now includes the ability to test data with pre-setup clients, products, groups, tax rates. A deinstall feature of demo clients(2), products(2) is available.
Two additional settings under the Settings tab-index help with this eg. Install test data and Use test data. These work with Generator...Remove Test Data...Reset Test Data
Datepickers now change automatically according to the locale dropdown with eg. views/client/form.php javascript function at the bottom.
Individual datepickers have been removed, and only one datepicker is used on the @views/layout/invoice.php page. ...php $js11 = "$(function () {". '$(".form-control.input-sm.datepicker").datepicker({dateFormat:"'.$datehelper->datepicker_dateFormat() .'", firstDay:'.$datehelper->datepicker_firstDay() .', changeMonth: true' .', changeYear: true' .', yearRange: "-50:+10"' .', clickInput: true' .', constrainInput: false' .', highlightWeek: true' .' });'. '});'; echo Html::script($js11)->type('module');
Every setting under views/invoice/setting/views is being audited by a $s->where('number_format')
which tooltips why and where the setting is used.
config/params.php : Uncommenting Synctables (Table structure relatively permanent now) and assigning READ_AND_WRITE parameter to below with significant performance improvement.
\Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::class => [ 'mode' => \Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider::MODE_READ_AND_WRITE, 'file' => 'runtime/schema.php', ],
Inclusion of all countries from https://en.wikipedia.org/wiki/ISO_4217
9th July 2022 - Psalm testing using ./vendor/bin/psalm at the command prompt is now complete. 155 static errors and redundant code removed.
Issue 439: BelongsTo relation not updating on edit of relation field eg. Product' relation field tax rate is not editing and updating. Absolute Clear Cache path is located under SettingsController clear function and it will have to be adjusted to your setup in debug mode. public function clear() $directory = "C:\wamp64\www\yii-invoice\public\assets";
The SettingsController clear cache function is functional without an absolute path now.
The LAMP administrator will have to add sufficient permission to the public assets folder using the sudo chown -R username folderpath
command before assets can be deleted in debug mode.
Quote - The Quote is functional ie. can be pdf'd ~but the emailing aspect has to be developed.~and the emailing aspect has been tested with sendmail. Testing with SMTP is in progress.
Invoice - The Invoice is functional ie. can be pdf'd and archived but the emailing aspect has to be developed. and sendmail is functional.
Recurring invoices - Functional but not fully tested.
Payment - Can be recorded against an Invoice. The latest version in League/Omnipay v3.2 will be setup with a few of the major payment providers added to the composer.json
User Custom Fields - not started yet.
File Attachments - not started yet.
Settings...View(Debug mode ie. Red) - These are being used.
Settings...View(Non-Debug mode ie. Not Red) - Some are being used. Their functionality is currently being analysed in Invoiceplane.--
The userinv table is an extension of yii/demo's user table and contains all the critical user information.
Setting Up
The settings table builds up initially with a default array of settings via the InvoiceController if they do not exist ie. setting 'default_settings_exist' does not exist.
Generator
The code generator templates have been adapted according to the latest demo updates.
Annotations
The lengthy Entity annotations have been replaced with the more concise Attributes coding structure. eg. * @ORM\Column(type="string")
replaced with #[ORM\Column(type: "string")]
. However issue 439 is currently relevant here.
Demo Mode
A demo mode variable located in src\Invoice\Layout\main.php ie. $demo_mode
can be set to false to remove performance settings and the clear cache tool. All areas in red will be removed.
Jquery
Jquery 3.6.0 (March 2nd 2021) version is being used for custom fields, and smaller modals. Temporarily, Invoiceplane's dependencies.js file is being used in AppAsset. The modals are dependent on it.
Html Tags on Views
Views can be improved with more Yii related tags ie. using Html::tag
. Html::encode is mandatory or compulsory or always present.
Paginator
The length of the lists can be changed via setting/view: default_list_limit
Locales
The SettingRepository load_language_folder
function accepts the dropdown locale through yiisoft/demo's $session->get('_language')
function: this setting takes precedence over the database 'default_language' setting when set.
Client's language different to locale_derived_language or fallback settings 'default_language'
When printing occurs, the client's language ensures the documentation is printed out in his/her language using $session->get('print_language')
The session variable print_language
is reset after printing.
Languages
Any words used not in the Invoiceplane folders, will be translated using Yii's translation methodology.
The above menu's language can be created in ...resources/messages for a specific language.
Language folders can be imported from Invoiceplane but the following code must be inserted in each file declare(strict_types=1);
within that folder.
Steps to include a language
1. Include the language folder in src/Invoice/Language after including declare(strict_types) in each file.
2. Include the new language in SettingsRepository's locale_language_array
3. Adjust the config/params.php locales array.
4. Adjust the views/layout/main.php menu.
5. Adjust each of the resources/messages folders language array.
6. CJK (C(hinese) J(apanese) K(orean) Languages In order to view a file with non-embedded CJK (chinese-japanese-korean) fonts, you - and other users - need to download the Asian font pack for Adobe Reader for the languages: Chinese (Simplified), Chinese (Traditional), Korean, and Japanese For Windows For Mac
If spaces appear where the language should appear whilst viewing using eg. Chrome default PDF reader, add the extension - Chrome PDF Viewer 2.3.164.
7. When copying, and pasting the Chinese Simplified folder make sure that you remove the space between the Chinese and Simplified. ie. ChineseSimplified. This is camelcase.
Netbeans: How to include UTF-8 in Netbeans
Set encoding used in Netbeans globally to UTF-8. Added in netbeans.conf "-J-Dfile.encoding=UTF-8" to parameter "netbeans_default_options". This unfortunately has to be done everytime you edit a file with 'special letters'. So edit the file with the UTF-8 setting above, save it, and then remove the above setting from Netbeans.conf.
File Location: C:\Program Files\NetBeans-16\netbeans\etc\netbeans.conf open with notepad cntrl+F netbeans_default_options
Improved Features
A start tax year date eg. 06/04/2022 can be setup under view so that reports will use this by default as their start date.
The invoice aging report includes the invoice number(s) of the outstanding balance.
The Sales by Client report includes more specifics including the Sales without Tax, Item Tax, and Invoice Tax, and Sales Inclusive amount.
The Sales by Date (aka Sales by Year) report breaks each Sales per Client into quarters over the selected years.
Multiple products of quantity of 1 can be selected from the products lookup with the 'burger' or '3 horizontal lines' icon whilst in quote.
Multiple items can be deleted under the options button with 'Delete Item'.
Company details are divided into public and private. The profile table is intended for multiple profiles especially when email addresses, and mobile numbers change.
If a Tax -Rate is set to default, it will be used on all new quotes and invoices. ie. A Quote Tax Rate will be created from this Tax Rate automatically and will be created and used on all new quotes. The same will apply to all invoices.
If you want to create a quote or an invoice group, specific to a client, use the Setting...Group feature to setup a Group identifier eg. JOE for the JOE Ltd Company. The next id will be appended to JOE ie. JOE001.
Products and Tasks can be entered separately on an invoice and are mutually exclusive so if you enter a task you cannot enter a product at the same time.
Deprecated Original Features
Themes will be introduced at a later date.
It is not intended to deprecate any of the features currently in InvoicePlane.
Proposed Features
Upgrading the forms to include the demo's php or server based form structure.
An interlinked basic bookkeeping system to audit transactions and produce an audit trail of invoices and payments
Security
All Entity properties initialized before the construct should be private. The private property is accessed through a public getter method as built below the construct.
Reasons for using a simplified id
as a primary key in all the tables
See {relationName}_{outerKey}, the outerKey being the primary key, structure. Eg. the field tax_rate_id
in the Product table is a relation or a foreign key in the Product table equal and pointing to its parent table's Tax Rate's id
so the relation name variable in Entity: Product must be $tax_rate
and joined with the outerKey as $id
you get $tax_rate_id
which matches the foreign key $tax_rate_id
in Entity: Product If the primary key in the Tax Rate table was named something like tax_rate_id and not id then the relation could not be given a name.
Future Work
Psalm static testing and removing of INFO suggestions.
Yiisoft's Mailer function incorporated using adminEmail as default config param for userinv->email.
A new feature of product custom fields has to be developed.
Client Custom Fields dependency on client_custom_fields.js will be removed as has been done for Payment Custom Fields.
Redundant functions generated by the Generator have to be deleted.
Work in progress
The client/view has been developed but the index under the Client View has to be rebuilt using the code similar to the new Invoice index.
The dashboard is being developed with Sumex still to be incorporated.
All the settings in the setting view, still have to be linked to their specific purpose by consulting with the Original Invoiceplane code. Progress on this has been made especially with the Email tab.
All forms have to be modified from Html to Yii3's php based form structure.
Email Template
User custom fields have to be developed.
Accessing a quote using the url_key in the browser is possible now by a customer. The url_key is retrieved at the bottom of the quote by admin and pasted into an email. Login as a user who has the observer role with user_id 7, (after the 6 dummy users in demo) to test the customer's login ability. The customer can be sent the url_key (instead of the actual quote) by email. The user can then accept or reject the quote online using this url_key. This quote can then be copied to an invoice by the administrator if accepted by the customer.