Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCRM 5991 - Barcode plugin #256

Merged
merged 5 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ UCRM plugins are compatible with UCRM 2.10.0+
* That's it, let UCRM run the plugin repeatedly or click to execute it on demand.

## List of available plugins
| Name | Description |
| ----------- | ------------- |
| [SMS Gateway Integration](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/sms-twilio) | Integrates Twilio SMS gateway which enables UCRM to send SMS to clients triggered by custom defined events, e.g. client's service gets suspended. |
| [QuickBooks Online](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/quickbooks-online) | Sync financial data from UCRM into QB Online |
| [FIO CZ](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/fio_cz) | Automatic payments import and matching with clients - from WISP's FIO bank account |
| [Client Signup](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/ucrm-client-signup) | Enables any visitor to register as a new client through a public web form |
| [KMZ Map](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/kmz-map) | Provides a frontend Google Map for clients to view tower coverage. |
| [Invoice CSV Export](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/invoice-csv-export) | Configurable export of invoices into CSV, can be used for a manual export to 3rd party accounting tools. |
| [Revenue Report](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/revenue-report) | Revenue report grouped by products or services, shown under the Reporting main menu section. |
| [Facturas Argentina AFIP](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/argentina-afip-invoices) | Plugin para obtener CAE (Facturacion electronica) en Argentina |
| Name | Description |
|-------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| [SMS Gateway Integration](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/sms-twilio) | Integrates Twilio SMS gateway which enables UCRM to send SMS to clients triggered by custom defined events, e.g. client's service gets suspended. |
| [QuickBooks Online](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/quickbooks-online) | Sync financial data from UCRM into QB Online |
| [FIO CZ](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/fio_cz) | Automatic payments import and matching with clients - from WISP's FIO bank account |
| [Client Signup](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/ucrm-client-signup) | Enables any visitor to register as a new client through a public web form |
| [KMZ Map](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/kmz-map) | Provides a frontend Google Map for clients to view tower coverage. |
| [Invoice CSV Export](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/invoice-csv-export) | Configurable export of invoices into CSV, can be used for a manual export to 3rd party accounting tools. |
| [Revenue Report](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/revenue-report) | Revenue report grouped by products or services, shown under the Reporting main menu section. |
| [Facturas Argentina AFIP](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/argentina-afip-invoices) | Plugin para obtener CAE (Facturacion electronica) en Argentina |
| [Barcode generator](https://github.com/Ubiquiti-App/UCRM-plugins/tree/master/plugins/barcode-generator) | Barcode generator |

## Plugins / API scripts from other sources
* [Client Signup Extended](https://www.charuwts.com/plugins/ucrm-signup) - Extended version of Client Signup Plugin
Expand Down
63 changes: 63 additions & 0 deletions plugins/barcode-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Barcode generator
This plugin generates SVG image of one or two dimensional barcode which can be included into financial templates.

## Templates implementation
You can add barcode image into template code e.g.:
``<img src="https://www.example.com/crm/_plugins/barcode-generator/public.php?token=USECONFIGURATIONTOKEN&code=DI{{ invoice.number }}{{ totals.totalRaw }}&type=QRCODE&width=200&height=200&color=black">``
> Make sure you have valid SSL certificate, otherwise the barcode won't load when used in PDF or email templates.
> In PDF templates only, you can use `http://localhost/crm/...` as an alternative.

## Required parameters
- `token` - Security token from the plugin configuration in the CRM
- `code` - Content of the barcode
- `type` - Type of barcode
- `with` - With of barcode in pixels
- `height` - Height of barcode in pixels
- `color` - Color of barcode

## Parameter `token`
Due to security reasons fill some random string as a token and use it as a part of request.

## Parameter `type`
Types of barcode:

* C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9
* C39+ : CODE 39 with checksum
* C39E : CODE 39 EXTENDED
* C39E+ : CODE 39 EXTENDED + CHECKSUM
* C93 : CODE 93 - USS-93
* S25 : Standard 2 of 5
* S25+ : Standard 2 of 5 + CHECKSUM
* I25 : Interleaved 2 of 5
* I25+ : Interleaved 2 of 5 + CHECKSUM
* C128 : CODE 128
* C128A : CODE 128 A
* C128B : CODE 128 B
* C128C : CODE 128 C
* EAN2 : 2-Digits UPC-Based Extension
* EAN5 : 5-Digits UPC-Based Extension
* EAN8 : EAN 8
* EAN13 : EAN 13
* UPCA : UPC-A
* UPCE : UPC-E
* MSI : MSI (Variation of Plessey code)
* MSI+ : MSI + CHECKSUM (modulo 11)
* POSTNET : POSTNET
* PLANET : PLANET
* RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
* KIX : KIX (Klant index - Customer index)
* IMB : IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
* IMBPRE : IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200- pre-processed
* CODABAR : CODABAR
* CODE11 : CODE 11
* PHARMA : PHARMACODE
* PHARMA2T : PHARMACODE TWO-TRACKS
* DATAMATRIX : DATAMATRIX (ISO/IEC 16022)
* PDF417 : PDF417 (ISO/IEC 15438:2006)
* QRCODE : QR-CODE
* RAW : 2D RAW MODE comma-separated rows
* RAW2 : 2D RAW MODE rows enclosed in square parentheses

## Example of code parameter
### QRCODE - "QR Platba" in the Czechia
``<img src="https://www.example.com/crm/_plugins/barcode-generator/public.php?token=RANDOMtokenFROMconfiguration&code=SPD*1.0*ACC:CZ2806000000000168540115*AM:{{ totals.totalRaw }}*CC:CZK*MSG:{{ client.name }}*X-VS:{{ invoice.number }}&type=QRCODE&width=75&height=75&color=black">``
Binary file added plugins/barcode-generator/barcode-generator.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions plugins/barcode-generator/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
composer.phar
/vendor/
/ucrm.json
/data/
.ucrm*
23 changes: 23 additions & 0 deletions plugins/barcode-generator/src/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "ucrm-plugins/barcode-generator",
"description": "UCRM plugin for generating barcodes",
"license": "MIT",
"autoload": {
"psr-4": {
"UBarcode\\": [
"src/"
]
}
},
"require": {
"monolog/monolog": "^2.7",
"symfony/http-foundation": "^6.0",
"ubnt/ucrm-plugin-sdk": "^0.10.0",
"symfony/filesystem": "^6.4",
"tecnickcom/tc-lib-barcode": "^2.2",
"nette/utils": "^4.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
}
}
Loading
Loading