Professional Documents
Culture Documents
Change Record
Date Author Version Change Reference
30-Mar-2020 Mohammed Arif 1.0 Initial Version
04-Apr-2020 Abraham Thomas 2.0 Reviewed and changed incorporated
08-Apr-2020 Abraham Thomas 3.0 Additional info on java library added
Distribution
Copy No. Name Location
Document References
Sl No. Document Name Location
1
2
3
4
5
6
Note to holders:
If you receive an electronic copy of this document and print it out, please write your name on the cover
page, for document control purposes.
If you receive a hard copy of this document, please write your name on the front cover, for document
control purposes.
1 Introduction................................................................................................5
1.1 About This Document.............................................................................5
1.1.1 About Oracle Functional Services................................................5
2 QR Code - Requirement...............................................................................6
3 Set Up.........................................................................................................8
3.1 Code Files................................................................................................8
4 Implementation........................................................................................10
4.1 Generating the QR Code.......................................................................10
4.2 Using the QR Code during Invoice Print................................................10
5 Known Issues.............................................................................................11
QR Code Printing on Invoices in EBS was necessitated by the new directives from Tax Authorities in
India with respect to GST
The data/string for generation of QR code will be initiated by Invoice Registration Portal (IRP) on
successful e-registration of the invoice. The legislative update patch planned will support the
features of capturing the inbound information received back as per prescribed way in our
application. Means the string for generation of QR code will be available once the e-invoice process
is completed.
Generate Tax invoice from ERP : The legislative update patch will support user configurable options
for customers to opt for e-invoice generation process for B2B supplies which is applicable for tax
payers having turnover more than one hundred crore of rupees
User will have an option to extract the invoice information as per Government prescribed schema
where all mandatory information will be captured and the same will be processed as an xml file in a
batch mode
GST Suvidha Providers (GSP) are expected to pull this outbound file generated from ERP
GSP need to convert the data received into prescribed json file format and communicate the same to
IRP as per the prescribed process using the API's provided by IRP
GSP to receive back the feedback received from IRP and decrypt the same
GSP to send back specified inbound information received back from IRP
Customer is required to run a process in ERP which will append the tax invoices with inbound
information received back from GSP and complete the tax invoice generation process in ERP.
Oracle India Localization will not provide any out of the box solution for printing the tax invoice. Tax
payers will have to customize the invoice printing as per their business requirements and all the
mandatory data points required for printing the tax invoice will be made available in the applications.
Based on the above, QR Code generation with the below details is required to be generated.
o Invoice value
QR Code Generation using java code is already developed and is available in published repositories
of Maven Community.
https://repo1.maven.org/maven2/net/glxn/qrgen/
At the command line of the EBS MT server the below command will give the version
Java – version
core-1.7.jar
https://mvnrepository.com/artifact/com.google.zxing/core/1.7
javase-1.7.jar
https://mvnrepository.com/artifact/com.google.zxing/javase/1.7
qrgen-1.2.jar
https://repo1.maven.org/maven2/net/glxn/qrgen/1.2/
Upload all jar archives in lib folder $COMMON_TOP/java/lib and execute loadjava command in
database:
loadjava -force -genmissing -r -user apps/password@instance -verbose core-1.7.jar
loadjava -force -genmissing -r -user apps/password@instance -verbose javase-1.7.jar
loadjava -force -genmissing -r -user apps/password@instance -verbose qrgen-1.2.jar
Create a java procedure to call the qrcode generation related code from the class file
net.glxn.qrgen.QRCode
use the image type from net.glxn.qrgen.image.ImageType
declare a ByteArrayOutputStream variable and collect the QRCODE Image into this variable
try {
java.io.OutputStream outStr = retBlob.setBinaryStream(0);
outStr.write(invqr.toByteArray());
outStr.flush();
} finally {
invqr.close();
}
return retBlob;
}
}
/
connect to EBS database as APPS and execute the java stored procedure.
Once the stored Procedure is compiled, create a database function to call the java
procedure
//Sample Code
CREATE OR REPLACE function XXVRT_getQRImage(p_text in varchar2) return BLOB as
LANGUAGE JAVA
NAME 'XXVRTQRCodeGenerator.XXVRTgetQrCode(java.lang.String) return
oracle.sql.BLOB';
/
declare
qrCode Blob;
v_Invoice_num Varchar2(100);
v_invoice_id number;
begin
select trx_number into v_Invoice_num from ra_customer_trx_all where
customer_trx_id=v_invoice_id;
qrCode := XXVRT_getQRImage(v_Invoice_num);
end;
Within the RTF, Blob has to be converted to CLOB as BLOB is not supported. For the same simple
code as below can be used.
While generating the XML tags in the code use the above function and pass BLOB object so
that the returned CLOB object is passed to RTF.
Use the below command in the field in the RTF to print the QRCode. Please find the below
sample code and RTF and sample output.