Explore Categories

 

 PDF

Printing QR Code in the Customisations

(From TallyPrime Release 1.1)

QR code (Quick Response Code) is a convenient way to store all kinds of data or information in a small space. Now customers can add QR Codes in Tally invoices depending upon the IRN response. By default, this QR Code will have IRN and other information. Generally, QR codes uses to make UPI payments, company details like item details, addresses, phone numbers, E-mail addresses, company websites, URLs, and so on.

From TallyPrime Release 1.1, customers can print QR Code in the transactions like Sales, Credit Note, Debit Note, POS, and Receipt as tax invoice, and so on. This helps the customers to print the required details in the QR Code.

You can now print the QR Code in your customisations as well based on your requirements.  A new attribute QR Code is introduced at the Part level to print the QR Code.

Syntax

[Part: <Part Name>]

   QR Code : <Sub-attribute 1>:<Sub-attribute 2>

Where,

Sub-attribute 1 specifies the text to be enclosed in a QR Code.

Sub-attribute 2 specifies whether the QR Code should have a border or not. This is the optional parameter. The default value is ‘YES’. 

QR Code Usage in TDL

In TDL, the QR Code can be used in the following ways:

  • QR Code with a border using hardcoded text

[Part : TSPLSmpQRCode]

QR Code : “This is the text which will be encoded into the QR Code”

  • QR Code without border using hardcoded text

[Part : TSPLSmpQRCode]

QR Code : “This is the text which will be encoded into the QR Code”: NO

  • QR Code using a function

  [Part : TSPLSmpQRCode]

QR Code : $$<FunctionName>

  • QR Code using field value

       [Part : TSPLSmpQRCode]

        QR Code : #<FieldName>

  • QR Code using variable value

       [Part : TSPLSmpQRCode]

         QR Code : ##<VariableName>

  • QR Code using sub-expression like system formula

        [Part : TSPLSmpQRCode]

        QR Code : @@<ExpressionName>

An additional option of error correction is implemented as a system variable (as it is expected to be an advanced setting), named ‘SVQRErrorCorrectionLevel‘. It is a number variable. With higher error correction level, the ability to sustain “damage” and function even when a part of the QR code image is obscured, defaced or removed, is higher. All QR Code that will be generated in Tally will take error correction from this system variable. The various levels it can hold are as follows:

  • Level ‘0’ : withstands up to 7% damage (known as LOW error correction level)
  • Level ‘1’ : withstands up to 15% damage (known as MEDIUM error correction level)
  • Level ‘2’ : withstands up to 25% damage (known as QUARTILE error correction level)
  • Level ‘3’ : withstands up to 30% damage (known as HIGH error correction level)

Any other number specified in the system variable will be rounded to the nearest value in the range of 0 to 4.  If the value is not specified through the system variable, the default value is taken as ‘0’ i.e, LOW.

  • The higher the error correction level, the more space is required to render the QR Code because the resolution of the QR Code image increases with a higher error correction level.
  • The higher the error correction level, the more damage it can sustain before it becomes unreadable.
  • Level 0 or Level 1 represents the best compromise between space and roughness for general marketing use.
  • Level 2 and Level 3 are generally recommended for industrial environments where keeping the QR Code clean or undamaged will be a challenge.

You can set the system variable ‘SVQRErrorCorrectionLevel’ as given below:

  [System : Variable]

 SVQRErrorCorrectionLevel : 2

  [Variable : SVQRErrorCorrectionLevel]

Type : Number

Example

Consider the use case as a sales executive wants the name of the stock item and its closing balance on his mobile to send it to his customer.

[#Part: STKI Basic]           

 Add  : Right Part    : At End : StockItem QRcode

[Part: StockItem QRcode]            

 Line            : Empty                                                                

 QR Code         : ($Name + “, Closing Balance: ” + $$String:$ClosingBalance) : True

 Width           : 20% screen

 Height          : 20% screen

Output

When the user scans the QR code, he gets the information on his mobile as given below:

Points to Remember

  • The minimum border thickness recommended for a QR code depends on the version of the QR code, so it is recommended to use the border in the QR Code attribute instead of using the border at the part level. Additional border can be specified in Part if required.
  • The QR code library supports UTF-8 Unicode characters.
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */