Explore Categories

 

 PDF

Developer Guide for KSA e-Invoicing

e-Invoice enablement for the company and voucher type

To enable e-Invoicing for the company and a voucher type; new storage ‘IsEInvoiceKSA’ is introduced. 

;; to Check e-invoice yes or no

[Field: IsEInvoice] 

Use : Logical Field

Set : $IsEInvoiceKSA

Field name for an e-Invoice number

To store the e-Invoice number, new storage and a field have been introduced.

;; to get e-invoice Number

[Field : KSA eInvoice Number]

Use        : NameField
Set        : $VcheInvUniqNo

New part for QR code

 To print the QR code, a part is added to the existing GCC invoice for Saudi Arabia customers. Developers need to add part eInvoice QR Code.

[Part: eInvoice QR Code]

;; Use Below System Formula to get QR Code Information in Print Format


           QR Code         : @@EInvoiceQRCodeKsa : Yes
           Line            : eInvoice QRC Details
           Width           : 35 mms
           Height          : 35 mms

Customising Invoices

Since there have been many changes at Sales Color, direct changes to Sales Color has been restricted. To make changes or for new invoices, changes should be triggered from Printed Invoices.

Example

[#Form : Printed Invoice]

Add: Switch: At Beginning: VCH Print Format : New Print Invoice :  @@IsSales
[!Form: New Print Invoice]
;; Delete All Part And Page Size
  Delete : Part
  Delete : Top Part
  Delete : Bottom Part
  Delete : Page Break
  Delete : Width
  Delete : Height
  Delete : Space Bottom
  Delete : Space Top

Functions introduced for integration

$$GetHash

The function $$GetHash to retrieve hash value in a field, and it takes six parameters.

Syntax

$$GetHash:<VoucherNumber>:<VoucherTypeName>:<VATAmount>:<TotalInvoiceAmountIncluingVAT>:<EntryDate>:<EntryTime>

$$SaveHash

This function is to save the value of the voucher. This function takes one parameter. This function should be called if there are no errors while importing.

Syntax

 $$SaveHash: <EncodeHashValue>

Example

[Function: Import eInvoice Vouchers]

Variable : HashVar   : String

00: New Object: Voucher


/* Call GetHash function before saving voucher object and save the value in variable. ;; This Function needs 6 mandatory parameters */

01 : Set : HashVar :$$GetHash:##VoucherNumber:##VoucherTypeName:##VATAmount: +                           ##TotalInvoiceAmountIncludingVAT:##EntryDate:##EntryTime
02 : Save Target


/* After saving voucher call SaveHash function. However, the value of hash should be saved only if there is no error. Hence we shall call the SaveHash function based on a condition i.e. SaveHash function should be called only when there is no error. To check error we are using $$LastError */


03 : Do If: ($$IsEmpty:$$LastError) : Call: SaveHash:##HashVar

Note : Function GetHash and SaveHash are additional functions developed  for this utility only, hence these functions 
will not be available in the Function browser of TallyPrime Developer. 
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */