Module Ultimateqrcode EN: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
Line 9: Line 9:
<!-- END interlang links -->
<!-- END interlang links -->


[[Category:Complementary modules]]
[[Category:Add-on modules]]
[[Category:Ultimateqrcode]]
[[Category:Ultimateqrcode]]
{{TemplateDocDev}}
{{TemplateDocDev}}
{{TemplateDocUtil}}
{{TemplateDocUtil}}
=Information=
=Informations=
{{TemplateModuleInfo
{{TemplateModuleInfo
|modulename=Ultimateqrcode
|modulename=Ultimateqrcode
Line 20: Line 20:
|webbuy={{LinkToPluginDownloadDoliStore|keyword=ultimateqrcode}}
|webbuy={{LinkToPluginDownloadDoliStore|keyword=ultimateqrcode}}
|status=stable
|status=stable
|prerequisites=
|prerequisites=PHP 8.2 or above, PHP GD extension
|minversion=17.0.0
|minversion=25.0.0
|note=Compatible with Dolibarr v24
|note=Compatible with Dolibarr v25 and PHP 8.5
}}
}}
UltimateQRcode adds '''QR codes''' to Dolibarr records (third parties, contacts, products, commercial documents, projects…). Each QR code encodes the fields you choose, can carry a logo in its centre and prints on a 120 × 57 mm label. Person records also get a '''vCard QR code''' that a smartphone scans to add the contact to its address book.
----
= Requirements =
{| class="wikitable"
! Item !! Version
|-
| '''Dolibarr''' || 25.0.0 or above
|-
| '''PHP''' || 8.2 or above (tested up to PHP 8.5)
|-
| '''PHP extension''' || GD (PNG image generation)
|-
| '''Dolibarr modules''' || No mandatory module. Tabs only appear on objects whose module is enabled (Invoices, Stocks, Projects…)
|}
The ''chillerlan/php-qrcode'' and ''michelf/php-markdown'' libraries are shipped with the module: no Composer installation is needed.
----


= Installation =
= Installation =


# Download the module and place it in the <code>htdocs/custom/ultimateqrcode/</code> directory
# Download the <code>module_ultimateqrcode-25.0.x.zip</code> archive from the [https://www.dolistore.com DoliStore]
# From Dolibarr: '''Home → Setup → Modules/Applications'''
# In Dolibarr: '''Home → Setup → Modules/Applications''', tab '''Deploy/install external app/module''', upload the archive. Otherwise, unzip the archive into <code>htdocs/custom/</code>: you must get <code>htdocs/custom/ultimateqrcode/</code>
# Find the '''UltimateQRcode''' module in the ''Atoo-Net'' section and activate it
# Find the '''UltimateQRcode''' module in the list and enable it
# Permissions must be configured per user group (see [[#Rights_and_permissions|Rights and permissions]])
# Grant the permissions to users or groups (see [[#Permissions|Permissions]])
 
: '''Upgrading from an earlier version:''' replace the <code>ultimateqrcode</code> folder, then '''disable and re-enable''' the module so that Dolibarr reloads the tabs and permissions.


----
----


= Module configuration =
= Module setup =


Access the configuration via '''Home → Setup → Modules/Applications → UltimateQRcode''' (wrench icon) or directly through the administration menu.
Open the setup page from '''Home → Setup → Modules/Applications → UltimateQRcode''' (gear icon).


The configuration page has three tabs.
The setup page has four tabs: '''QR codes''', '''QR with logo''', '''User guide''' and '''About'''.


== "QR codes" tab (free generator) ==
== "QR codes" tab (free generator) ==


[[File:Ultimateqrcode-admin-qrcodes-fr.png|center|900px|Free QR code generator]]
[[File:Ultimateqrcode-v25-admin-qrcodes-en.png|center|900px|Free QR code generator]]


This tab provides a '''on-demand QR code generator''':
This tab is an '''on-demand QR code generator''': the QR code created here is not linked to any Dolibarr record and can encode any content.


{| class="wikitable"
{| class="wikitable"
! Field !! Description
! Field !! Description
|-
|-
| '''Data''' || The content to encode: URL, email address, free text, vCard, etc.
| '''Enter here the data to encode in the QR code''' || The content to encode: URL, e-mail address, phone number, free text…
|-
|-
| '''ECC''' || Error correction level:<br/>• '''L''' (≈7% — smallest): minimum size<br/>• '''M''' (≈15%): common usage<br/>• '''Q''' (≈25%): good resilience<br/>• '''H''' (≈30% — best): very resilient (recommended with logo)
| '''Quality''' || Error correction level:<br/>• '''Low''' (L, ≈ 7 %): most compact QR code<br/>• '''Medium''' (M, ≈ 15 %): common use<br/>• '''Quartile''' (Q, ≈ 25 %): good resistance<br/>• '''High''' (H, ≈ 30 %): very resistant to dirt and scratches
|-
|-
| '''Size''' || Dot size (from 1 to 10 pixels per QR module)
| '''Size''' || From 1 to 10 pixels per QR code module
|-
|-
| '''GENERATE''' button || Generates and immediately displays the QR code
| '''GENERATE''' button || Generates and displays the QR code
|-
| '''PRINT LABEL''' button || Opens the QR code on a 120 × 57 mm label (see [[#Label printing|Label printing]])
|}
|}
Click on '''Like this''' in the help text to see a generation example.


== "QR with logo" tab ==
== "QR with logo" tab ==


[[File:Ultimateqrcode-admin-qrwithlogo-fr.png|center|900px|QR generator with embedded logo]]
[[File:Ultimateqrcode-v25-admin-qrwithlogo-en.png|center|900px|QR code generator with logo]]


This tab allows generating a '''QR code with a logo embedded in the center''':
This tab creates a '''free QR code carrying a logo in its centre'''. Generated QR codes are kept in the module's temporary folder and can be displayed again, printed or deleted.


{| class="wikitable"
{| class="wikitable"
! Field !! Description
! Item !! Description
|-
| '''Enter here the data to encode in the QR code''' || URL or content to encode
|-
|-
| '''Data''' || URL or content to encode (default: https://www.atoo-net.com/)
| '''Size''' || From 2 to 10, controls the image resolution
|-
|-
| '''Size''' || From 1 to 10 — controls the resolution of the generated image
| '''Logo table''' || Logos available in <code>documents/mycompany/logos/</code>, with size, date, preview (magnifier), rename and delete. The radio button selects the logo to embed
|-
|-
| '''Choose a file''' || PNG logo to embed in the center of the QR code
| '''GENERATE''' button || Creates the QR code with the selected logo
|-
|-
| '''GENERATE''' button || Generates the QR code with the logo and saves it
| '''UPLOAD''' || Adds a new logo (PNG recommended)
|-
|-
| '''Select a QR code to display''' || Choose from previously generated QR codes to display
| '''Select a QR code to display''' + '''DISPLAY''' || Displays a QR code generated earlier
|-
|-
| '''DISPLAY''' button || Displays the selected QR code
| '''Bin''' icon || Deletes the selected QR code, after confirmation
|-
|-
| '''Trash''' icon || Deletes the selected QR file (with confirmation)
| '''PRINT LABEL''' button || Prints the displayed QR code on a 120 × 57 mm label
|}
|}


The '''Uploaded logos''' section lists all uploaded PNG files, with their size and upload date. A delete button is available on each row.
: '''Note:''' error correction is '''forced to High''', because the logo hides part of the matrix.
 
== "User guide" tab ==
 
[[File:Ultimateqrcode-v25-admin-guide-en.png|center|900px|Built-in user guide]]


: '''Note:''' The recommended ECC level for a QR code with logo is '''H''' (30%), as the logo masks part of the code — error correction compensates.
The full user guide can be read directly in Dolibarr, in the user's language (French, English, German, Spanish or Italian).


== "About" tab ==
== "About" tab ==


Displays information about the module version, the author and the link to the documentation.
Shows the module version, author, licence and links to the documentation.


----
----


= Usage in records =
= Use in records =


The module adds a '''QR code''' tab in the records of the following objects:
The module adds a '''QR code''' tab to the records of the following 16 objects:


{| class="wikitable"
{| class="wikitable"
! Object !! Added tab(s)
! Object !! Added tab !! vCard QR code
|-
| Third party || QR code + QR-Url (separate tabs)
|-
|-
| Contact || QR code
| Third party || QR code || Yes
|-
|-
| Product / Service || QR code
| Contact / Address || QR code || Yes
|-
|-
| Lot / Serial number || QR code
| User || QR code || Yes
|-
|-
| Warehouse || QR code
| Member || QR code || Yes
|-
|-
| Proposal (Quote) || QR code
| User group || QR code ||
|-
|-
| Customer order || QR code
| Product / Service || QR code ||
|-
|-
| Supplier order || QR code
| Lot / Serial number || QR code ||
|-
|-
| Customer invoice || QR code
| Warehouse || QR code ||
|-
|-
| Supplier invoice || QR code
| Commercial proposal || QR code ||
|-
|-
| Contract || QR code
| Sales order || QR code ||
|-
|-
| Intervention || QR code
| Purchase order || QR code ||
|-
|-
| Project || QR code
| Customer invoice || QR code ||
|-
|-
| Member (foundation) || QR code
| Supplier invoice || QR code ||
|-
|-
| User group || QR code
| Contract || QR code ||
|-
|-
| User || QR code
| Intervention || QR code ||
|-
|-
| Project || QR code ||
|}
|}


== Common QR code tab structure ==
== Common layout of the QR code tab ==
 
'''[New in v24]''' Each QR code tab is now organized in '''five sections''':


=== Section 1 — Settings bar ===
Each QR code tab is organised in '''five areas'''.


[[File:Ultimateqrcode-v24-settings-panel-fr.png|center|900px|Settings panel: size, ECC quality and logo selection]]
=== Area 1 — Settings bar ===


At the top of each QR code tab, a settings bar allows configuring:
At the top of the tab, a settings bar lets you choose:


{| class="wikitable"
{| class="wikitable"
! Setting !! Description
! Setting !! Description
|-
|-
| '''Size''' || QR code resolution (from 2 to 10 pixels per module). The higher the value, the larger and more readable the QR code.
| '''Size''' || QR code resolution, from 2 to 10 pixels per module
|-
|-
| '''Quality (ECC)''' || Error correction level: Low (L ≈ 7%), Medium (M ≈ 15%), Quartile (Q ≈ 25%), High (H ≈ 30%).
| '''Quality''' || Error correction: Low (L), Medium (M), Quartile (Q) or High (H)
|-
|-
| '''Logo''' || PNG logo embedded in the center of the QR code, selectable from uploaded logos.
| '''Logo''' || Logo embedded in the centre of the QR code, chosen in the table of area 2
|}
|}


: '''Note:''' When a logo is selected, the ECC quality is automatically '''forced to High (H)''' to ensure readability despite the logo. The mention ''(Forced to High with a logo)'' is displayed next to the selector.
: '''Note:''' as soon as a logo is selected, the quality is '''forced to High (H)''' and the note ''(Forced to High with a logo)'' appears next to the selector.


These settings are saved '''independently per object type''' (invoice, quote, order, etc.) and apply to both displayed QR codes (data and URL).
These settings are saved '''per object type''' (invoices, proposals, orders…) and apply to every QR code of the tab.


=== Section 2 — Logo selection table ===
=== Area 2 — Logo selection table ===


The table lists available logos in the <code>documents/mycompany/logos/</code> directory:
The table lists the logos of the <code>documents/mycompany/logos/</code> folder:


{| class="wikitable"
{| class="wikitable"
! Column !! Description
! Column !! Description
|-
|-
| '''Radio''' || Radio button to select the logo (or "''No logo''")
| '''Radio button''' || Selects the logo, or "''No logo''"
|-
|-
| '''Logo''' || PNG file name with preview icon
| '''Logo''' || File name
|-
|-
| '''Size''' || File size in bytes
| '''Size''' || File size in bytes
|-
|-
| '''Date''' || Last upload date
| '''Date''' || Upload date
|-
|-
| '''Preview''' || Magnifying glass icon to preview the logo
| '''Preview''' || Magnifier to display the logo
|-
|-
| '''Actions''' || Rename and delete icons
| '''Actions''' || Rename and delete
|}
|}


An upload form at the bottom of the page allows adding new PNG logos.
A form at the bottom of the page uploads new logos.


: '''Security:''' If the logo is too large relative to the QR code capacity, the module automatically switches to no-logo mode to prevent an error. A message is logged in the Dolibarr logs.
: '''Safety:''' if the logo is too large for the QR code capacity, the module generates the QR code without the logo instead of failing, and records the incident in the Dolibarr log.


=== Section 3 — Configurable data QR code ===
=== Area 3 — Data QR code ===


[[File:Ultimateqrcode-thirdparty-qrcode-top-fr.png|center|900px|QR code tab of a third party — field selection]]
[[File:Ultimateqrcode-v25-thirdparty-qrcode-en.png|center|900px|QR code tab of a third party: fields, data QR code, URL QR code and vCard QR code]]


The user selects the '''fields to include in the QR code''' via checkboxes:
You choose the '''fields to encode''' by ticking them:


* The left column contains the checkbox
* the checkbox includes or excludes the field;
* The center column shows the field label and its current value (grayed out if unchecked)
* the middle column shows the label and the current value of the field (greyed out when unticked);
* The right column displays the '''generated QR code''' (with or without logo depending on the selection)
* the generated QR code is displayed next to the table, with or without logo, together with the '''PRINT LABEL''' button.


Available fields depend on the object:
Fields available per object:


{| class="wikitable"
{| class="wikitable"
! Object !! Available fields
! Object !! Available fields
|-
|-
| Third party || Company, Address, Zip code, City, Country, Phone, Email, URL + Extra fields
| Third party || Company, Address, Zip code, Town, Country, Phone, Email, URL
|-
|-
| Product || Ref., Label, Description, Price excl. tax, Price incl. tax, Barcode, Weight, Volume, URL + Extra fields
| Contact || First name, Last name, Phone, Mobile phone, Email, Address, Zip code, Town, Country, URL
|-
|-
| Warehouse || Label, Location short name, Description, Address, Zip code, City, Country, URL + Extra fields
| User || Login, First name, Last name, Phone, Mobile phone, Email, Address, Zip code, Town, Country, URL
|-
|-
| User || Login, First name, Last name, Phone, Mobile, Email, Address, Zip code, City, Country, URL + Extra fields
| Member || First name, Last name, Phone, Personal phone, Email, Address, Zip code, Town, Country, URL
|-
|-
| Contact || Title, First name, Last name, Company, Position, Phone, Mobile, Email, Address, etc.
| User group || Group name, Description, URL
|-
|-
| Invoice || Ref., Customer ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax, Total incl. tax, Public note, URL
| Product / Service || Ref., Label, Description, Price excl. tax, Price incl. tax, Barcode, Weight, Volume, URL
|-
|-
| (others) || Fields specific to each object
| Lot / Serial number || Lot/Serial, Eat-by date, Sell-by date, URL
|-
| Warehouse || Label, Short location name, Description, Address, Zip code, Town, Country, URL
|-
| Commercial proposal || Ref., Customer ref., Company, Email, Phone, Date, End of validity date, Total excl. tax, Total incl. tax, Public note, URL
|-
| Sales order || Ref., Customer ref., Company, Email, Phone, Date, Total excl. tax, Total incl. tax, Public note, URL
|-
| Purchase order || Ref., Supplier ref., Company, Email, Phone, Date, Total excl. tax, Total incl. tax, Public note, URL
|-
| Customer invoice || Ref., Customer ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax, Total incl. tax, Public note, URL
|-
| Supplier invoice || Ref., Supplier ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax, Total incl. tax, Public note, URL
|-
| Contract || Ref., Customer ref., Supplier ref., Company, Email, Phone, Contract date, Public note, URL
|-
| Intervention || Ref., Company, Email, Phone, Date, Description, URL
|-
| Project || Ref., Project label, Company, Email, Phone, Start date, End date, Public note, URL
|}
|}


: '''Note:''' '''Extra fields''' (complementary attributes) defined in Dolibarr are automatically added to the list of available fields.
: '''Note:''' the '''extra fields''' filled in on the record are added to the list automatically, as ''Extra field: label''. Those created by other modules are ignored.
 
The displayed QR code is '''clickable''': clicking opens the [[#Label_printing|label printing]] window.
 
=== Section 4 — Record URL QR code ===
 
[[File:Ultimateqrcode-thirdparty-qrcode-bottom-fr.png|center|900px|QR code tab — bottom part with URL QR and Save/Cancel buttons]]


The bottom part displays:
=== Area 4 — Record URL QR code ===


* The label '''URL of the [object] record'''
On the right (or below the table, depending on the screen width), the tab shows:
* The clickable link to the Dolibarr record
* A second '''QR code encoding the direct URL''' to the record (also clickable for label printing)
* The '''SAVE''' and '''CANCEL''' buttons


=== Section 5 — vCard QR code (Contact, User, Third party, Member) ===
* the '''Record URL''' label followed by a link to the record;
* a second '''QR code encoding the direct URL''' of the record, also printable on a label;
* at the bottom of the page, the '''SAVE''' and '''CANCEL''' buttons.


[[File:Ultimateqrcode-v24-contact-vcard-fr.png|center|900px|vCard QR code on a contact record]]
=== Area 5 — vCard QR code (Third party, Contact, User, Member) ===


'''Contact''', '''User''', '''Third party''' (company) and '''Member''' records have an additional '''vCard QR code''' at the bottom of the page.
[[File:Ultimateqrcode-v25-contact-vcard-en.png|center|900px|vCard QR code on a contact record]]


Scanning this QR code with a smartphone allows adding the contact directly to the phone directory. The encoded vCard content is displayed in plain text below the QR code.
The '''Third party''', '''Contact''', '''User''' and '''Member''' records also show a '''vCard QR code'''. Scanned with a smartphone, it offers to add the contact straight to the address book. The encoded vCard 3.0 content is displayed in plain text next to the QR code.


=== Live Preview ===
=== Live preview ===


'''[New in v24]''' QR codes update '''in real time''' when the user changes:
The QR codes are updated '''in real time''' when you change:
* the QR code size
* the size;
* the ECC quality level
* the quality;
* the selected logo
* the logo;
* the checked fields (data QR)
* the ticked fields.


'''No page reload is required.''' The preview uses an AJAX request with a 300 ms delay to prevent excessive calls. This feature is available on all '''16 QR pages''' of the module.
'''No page reload is needed.''' The preview uses an AJAX request sent 300 ms after the last change. It works on all 16 QR code tabs.


=== Automatic default field selection ===
=== Automatic default field selection ===


On first display (no saved configuration), the module automatically selects fields whose value is not empty. This ensures a relevant QR code from the first opening.
On first display, as long as no configuration has been saved, the module ticks the fields that are filled in on the record. The QR code is therefore relevant from the very first opening.


=== Saving the configuration ===
=== Saving the configuration ===


Check/uncheck the desired fields then click '''SAVE'''. The selection is saved and applies to '''all objects of the same type''' (one configuration per object type, global).
Tick or untick the fields, then click '''SAVE'''. The selection applies to '''all objects of the same type''' (one configuration per object type).


----
----


= QR code tab — Examples by object =
= QR code tab — Examples per object =


== Customer invoice ==
== Customer invoice ==


'''[New in v24]'''
[[File:Ultimateqrcode-v25-invoice-qrcode-en.png|center|900px|QR code tab of an invoice with embedded logo]]
 
[[File:Ultimateqrcode-v24-invoice-qr-complete-fr.png|center|900px|QR code tab of an invoice with embedded logo]]


Example configuration for a customer invoice: '''Ref.''', '''Company''', '''Email''', '''Phone''', '''Invoice date''', '''Payment due date''', '''Total excl. tax''' and '''Total incl. tax''' checked. The ''expert_dolibarr.png'' logo is selected and embedded in the center of the QR code. The ECC quality is automatically forced to High (H).
Example on a customer invoice: '''Ref.''', '''Company''', '''Email''', '''Phone''', '''Invoice date''', '''Payment due date''', '''Total excl. tax''', '''Total incl. tax''' and '''URL''' are ticked. The ''expert_dolibarr.png'' logo is embedded in the centre of both QR codes and the quality is forced to High (H).


== Product ==
== Product ==


[[File:Ultimateqrcode-product-qrcode-fr.png|center|900px|QR code tab of a product]]
[[File:Ultimateqrcode-v25-product-qrcode-en.png|center|900px|QR code tab of a product]]


Example configuration for a product: '''Ref.''' and '''Label''' checked, along with the extra fields '''Ecotax''' and '''ControlHistoryLink'''. The QR encodes these four concatenated values.
On a product, the QR code can encode the reference, label, prices, barcode, weight and volume: handy for shelf or storeroom labelling.


== Warehouse ==
== Warehouse ==


[[File:Ultimateqrcode-stock-qrcode-fr.png|center|900px|QR code tab of a warehouse]]
[[File:Ultimateqrcode-v25-stock-qrcode-en.png|center|900px|QR code tab of a warehouse]]


Useful for physical identification of storage locations. The '''Location short name''' field allows specifying the storage area.
Useful to identify storage locations physically. The '''Short location name''' field specifies the area (aisle, rack…).


== User ==
== User ==


[[File:Ultimateqrcode-user-qrcode-fr.png|center|900px|QR code tab of a user]]
The user QR code encodes the business contact details (login, first name, last name, phones, email, address…), and the vCard QR code adds them to an address book. Handy for badges or internal business cards.
 
The user QR code encodes contact information (login, first name, last name, phone, mobile, email, country...). Handy for badges or internal business cards.


: '''Note:''' The user QR code tab is only visible to the user themselves or to users with permission to read user records.
: '''Note:''' the QR code tab of a user is only visible to the user themselves or to users allowed to read user records.


----
----


= QR-Url tab (Third parties only) =
= Reusable QR code image (QR with logo) =
 
[[File:Ultimateqrcode-thirdparty-qrurl-fr.png|center|900px|QR-Url tab of a third party with logo]]


Third party records have a '''second QR tab''' called '''QR-Url''', specialized in generating QR codes '''with an embedded logo''' encoding the record URL.
To get a '''QR code image with a logo''' to reuse elsewhere (website, brochure, e-mail signature), use the '''QR with logo''' setup tab:


Features:
# enter the record URL or any other content in the input field;
 
# choose the size and the logo, then click '''GENERATE''';
{| class="wikitable"
# display the QR code again at any time with '''Select a QR code to display''', print it or delete it.
! Element !! Function
|-
| '''Size''' (1-10) || Resolution of the generated QR code
|-
| '''Choose a file''' + '''UPLOAD LOGO''' || Upload a PNG logo to embed in the center
|-
| '''Select a QR code to display''' || Choose from previously generated QR codes for this third party
|-
| '''DISPLAY''' button || Displays the selected QR code
|-
| '''Uploaded logos''' section || List of available logos with download and delete options
|}


The displayed QR encodes the URL of the third party record, with the chosen logo inserted in the center of the image.
: '''Note:''' the former "QR-Url" tab of third parties, which the module no longer declared, has been removed. The record URL QR code remains available in area 4 of every QR code tab.


----
----
Line 316: Line 336:
= Label printing =
= Label printing =


[[File:Ultimateqrcode-label-print-fr.png|center|700px|Label printing window 120×57mm]]
[[File:Ultimateqrcode-v25-label-print-en.png|center|466px|120 × 57 mm label]]
 
The '''PRINT LABEL''' button, or a click on a QR code, opens a '''print window''' in '''120 × 57 mm''' format, suited to common label printers.


Clicking on a QR code in any tab opens a '''print popup window''' optimized for labels in '''120 × 57 mm''' format (compatible with standard label printers).
The label of a record contains:
* '''on the left''': the data QR code;
* '''in the centre''': the key information of the record (reference, third party, total…, depending on the object);
* '''on the right''': the record URL QR code.


The label contains:
The generators of the '''QR codes''' and '''QR with logo''' tabs print the QR code they have just created in the same way.
* '''Left''': the configurable data QR code
* '''Center''': key text information (reference, label, name, etc. depending on the object)
* '''Right''': the record URL QR code


The window automatically triggers the browser's print dialog.
The window opens the browser print dialog automatically.


: '''Note:''' For optimal printing on adhesive labels, set the printer to the 120×57mm format and disable margins in the browser's print settings.
: '''Note:''' for best results on adhesive labels, set the printer to the 120 × 57 mm format and remove the margins in the browser print options.


----
----


= Rights and permissions =
= Permissions =


[[File:Ultimateqrcode-permissions-fr.png|center|700px|UltimateQRcode module permissions]]
[[File:Ultimateqrcode-v25-permissions-en.png|center|900px|UltimateQRcode module permissions]]


The module defines two permission levels, to be assigned per user group in '''Setup → Users & Groups''':
The module defines two permissions, granted per user or per group in '''Users & Groups''':


{| class="wikitable"
{| class="wikitable"
! Permission !! Description !! Effect
! Permission !! Effect
|-
|-
| '''Read qrcode outcomes''' || Read QR codes || Allows viewing QR code tabs and displaying generated QR codes
| '''Read QR codes''' || Shows the QR code tabs and the generated QR codes
|-
|-
| '''Create/Modify qrcode outcomes''' || Create / Modify || Allows checking/unchecking fields and saving the configuration
| '''Create / Modify QR codes''' || Lets the user tick or untick fields and save the configuration
|}
|}


: '''Note:''' Without the '''Read''' permission, QR code tabs are not visible. Without the '''Write''' permission, the user can see QR codes but cannot modify the field selection.
: '''Note:''' without the read permission, the QR code tabs are hidden. Without the modify permission, the user sees the QR codes but cannot change the field selection. Uploading, renaming and deleting logos is reserved to administrators.


----
----


= What's new and v24 compatibility =
= What's new and v25 compatibility =


'''[New in v24]''' UltimateQRcode module version 24 brings the following improvements:
Version 25.0.0 aligns UltimateQRcode with Dolibarr 25.


== New features ==
{| class="wikitable"
! Change !! Detail
|-
| '''Minimum versions''' || Dolibarr 25.0.0 and PHP 8.2
|-
| '''PHP 8.4 and 8.5''' || No deprecation raised by the module: descriptor properties aligned with the core, "About" page without warning
|-
| '''Payment tabs''' || The "QR code" tabs of customer and supplier payments, which pointed to missing pages (404 error), have been removed
|-
| '''QR-Url tab''' || The orphan page of the former QR-Url tab of third parties has been deleted; the documentation now points to the '''QR with logo''' tab
|-
| '''Translated permissions''' || Both permissions are now displayed in the user's language ("Read QR codes", "Create / Modify QR codes")
|-
| '''vCard display''' || The vCard content and multi-line addresses are displayed properly, without a visible "\n" and without page overflow
|-
| '''Extra fields''' || The "Extra field" label is translated (it used to show "ExtraField")
|-
| '''User guide''' || New setup tab showing the full guide in the 5 languages
|-
| '''Continuous integration''' || Every PHP file of the module is checked with <code>php -l</code> under PHP 8.4 and 8.5
|}
 
== v24 history ==
 
=== New features in v24 ===


{| class="wikitable"
{| class="wikitable"
! Feature !! Description
! Feature !! Description
|-
|-
| '''Per-page settings''' || Size, ECC quality and logo configurable directly on each QR code record page
| '''Per-record settings''' || Size, quality and logo configurable directly in each QR code tab
|-
|-
| '''Embedded logo''' || Ability to embed a PNG logo in the center of each QR code, on all pages
| '''Embedded logo''' || PNG logo in the centre of every QR code, on all pages
|-
|-
| '''Live preview''' || Real-time QR code update when changing size, ECC, logo or checked fields (AJAX, no reload)
| '''Live preview''' || Real-time QR code update when changing size, quality, logo or ticked fields
|-
|-
| '''vCard QR code''' || vCard QR code for contacts, users, third parties and members allowing direct addition to the phone directory
| '''vCard QR code''' || For third parties, contacts, users and members
|-
|-
| '''Logo management''' || Upload, preview, rename and delete logos from each record interface
| '''Logo management''' || Upload, preview, rename and delete logos from each record
|}
|}


== Dolibarr v24 compatibility ==
=== Dolibarr v24 compatibility ===


{| class="wikitable"
{| class="wikitable"
! Fix !! Detail
! Fix !! Detail
|-
|-
| '''Module icon''' || Added the <code>.png</code> extension in the <code>$this->picto</code> property of the module descriptor, as per the Dolibarr v23+ warning.
| '''Module picto''' || <code>.png</code> extension added to the <code>$this->picto</code> property of the descriptor
|-
|-
| '''Currency''' || Replaced <code>$conf->currency</code> (deprecated) with <code>getDolCurrency()</code>.
| '''Currency''' || <code>getDolCurrency()</code> instead of <code>$conf->currency</code> (deprecated)
|-
|-
| '''Constants''' || Replaced direct assignment <code>$conf->global->XXX = value</code> (deprecated) with <code>dolibarr_set_const()</code>.
| '''Constants''' || <code>dolibarr_set_const()</code> instead of writing directly into <code>$conf->global</code>
|}
|}


== Bug fixes ==
=== Bug fixes in v24 ===


{| class="wikitable"
{| class="wikitable"
! Bug !! Fix
! Bug !! Fix
|-
|-
| Invoice tab not found || Fixed the tab key casing in the module descriptor.
| Invoice tab not found || Case of the tab key fixed in the descriptor
|-
|-
| Obsolete admin parameter || Removed the "QR code display size (in pixels)" parameter, now obsolete with the per-page size setting.
| Obsolete setup parameter || "QR code display size (in pixels)" removed, replaced by the size setting of each record
|-
|-
| Logo overflow || Added a try/catch mechanism to handle capacity overflow when the logo is too large: automatic fallback to no-logo mode.
| Logo too large || Automatic fallback to no logo instead of an error
|}
|}


== Translations ==
=== Translations in v24 ===


Added missing translation keys in '''5 language files''' (FR, EN, DE, ES, IT) for new features: ECC quality selection, logo management, and all object types.
Missing translation keys added in the 5 languages (FR, EN, DE, ES, IT): quality, logo management and all object types.


----
----
Line 402: Line 448:


; '''The QR code is empty or shows "No data"'''
; '''The QR code is empty or shows "No data"'''
: No field is checked, or all checked fields have an empty value in the record. Check at least one field with a value and click SAVE.
: No field is ticked, or the ticked fields are empty on the record. Tick at least one filled-in field and click SAVE.


; '''The label does not print at the correct size'''
; '''The label does not print at the right size'''
: Verify that the printer paper format is correctly set to 120×57mm. Disable margins in the browser's print settings.
: Check that the printer paper format is set to 120 × 57 mm and remove the margins in the browser print options.


; '''Extra fields do not appear'''
; '''Extra fields do not appear'''
: Complementary attributes must be defined in '''Setup → Complementary attributes''' for the relevant object.
: Only extra fields '''filled in''' on the record are offered. They are defined in the setup of the relevant module (for example '''Third parties → Extra attributes''').


; '''The QR code with logo is not readable'''
; '''The QR code with logo cannot be read'''
: The logo covers too much surface area. Use a smaller logo (ideally square, less than 100×100 pixels) or increase the ECC level to '''H''' to improve error correction. With module v24, the ECC quality is automatically forced to '''H''' when a logo is selected.
: The logo covers too much surface. Use a smaller, ideally square, logo. The quality is already forced to High (H) as soon as a logo is selected.


; '''The QR code displays without logo even though I selected one'''
; '''The QR code is displayed without logo although I selected one'''
: The logo is probably too large relative to the encoded content. The module automatically switches to no-logo mode to prevent an error. Try with a smaller logo or reduce the number of checked fields.
: The logo is too large for the encoded content: the module then generates the QR code without the logo. Try a smaller logo or tick fewer fields.


; '''QR codes do not update when I change settings'''
; '''The QR codes are not updated when I change the settings'''
: The live preview requires JavaScript to be enabled in the browser. Check that no script blocker is active. QR codes update automatically 300 ms after each change.
: The live preview requires JavaScript. Check that no script blocker is active.


; '''The QR code tab does not appear on some records'''
; '''The QR code tab does not appear on some records'''
: Verify that the module is activated and that the user has the '''Read qrcode outcomes''' permission.
: Check that the module is enabled, that the Dolibarr module of the object is enabled too, and that the user has the '''Read QR codes''' permission. After an upgrade, disable then re-enable UltimateQRcode.
 
; '''Where has the QR-Url tab of third parties gone?'''
: It has been removed. The record URL QR code is in the QR code tab (area 4), and the '''QR with logo''' setup tab creates reusable images.


----
----
Line 430: Line 479:
* [[Module_Ultimateqrcode_ES|Español]]
* [[Module_Ultimateqrcode_ES|Español]]
* [[Module_Ultimateqrcode_IT|Italiano]]
* [[Module_Ultimateqrcode_IT|Italiano]]
* [https://www.dolistore.com Dolistore]
* [https://www.dolistore.com/search.php?search_query=ultimateqrcode UltimateQRcode on the DoliStore]
* [https://www.atoo-net.com Atoo-Net]
* [https://www.atoo-net.com Atoo-Net]

Navigation menu