Explore Categories

 

 PDF

Reasons for Rejection of e-Invoice and Resolutions

NIC has published the following error codes, error message, the reasons for the errors and the corresponding resolutions to help you resolve errors faced during e-Invoice upload to the NIC portal.

If the error message is not available here, check the page published by NIC https://einv-apisandbox.nic.in/api-error-codes-list.html

.highlight { font-weight: bold; background-color: rgb(248, 233, 150); } #searchInput { border: 2px solid #CCE0F4; border-radius: 5px; font-size: 14px; width: 50%; } .searchContainerScroll { background-color: white; position: fixed; top: 70px; box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); padding: 15px 15px 5px 15px; transition: top 1s; } .searchContainer { width: 100%; min-width: 300px; background-color: white; padding: 15px 15px 5px 0px; top: -10px; }
 
 

Most Frequent Errors/Rejections

Resolution for Inactive GSTIN/UIN

Sometimes, when you try to upload vouchers to e-Invoice portal, it gets rejected by the portal with reason as cancelled, inactive or suspended GSTIN/UIN. When a party’s GSTIN is inactive, you’ll need to convert the voucher from B2B to B2C.

If there are many vouchers for the same party, handling each one individually can be time-consuming.

From TallyPrime Release 5.1, you can easily identify such vouchers in the Rejected by e-Invoice System section, where inactive GSTINs are grouped separately. You can then select multiple vouchers at once and convert them from B2B to B2C.

Let’s go through the steps to manage a rejected voucher due to an inactive GSTIN/UIN.

  1. Press Alt+G (Go To) > type or select e-Invoice.
  2. Drill down from Rejected by e-Invoice System.
    In TallyPrime release 5.1 onwards you will find separate grouping of Inactive GSTIN/UIN for easy identification
  3. Select one or more vouchers using Spacebar.
  4. Press Alt+V (Convert to B2C)
    e-Invoice-inactive-GSTIN

    TallyPrime will convert the vouchers from B2B to B2C. Now as you convert voucher to B2C, you don’t need to upload to e-Invoice portal.

Understanding Rejection Terms: TallyPrime vs e-Invoice

As the rejection messages are based on GSTIN, the terminologies in TallyPrime vary in some instances. Hence, we have provided a table to facilitate a better understanding between TallyPrime and e-Invoice terminology.

e-Invoice Terminology TallyPrimeTerminology Length
Field Location Bill from place (Rel 2.1) &  Invoice bill from place (Rel 3.0) – F11:Company Feature 3 to 50 (Alpha)
Field Document Number Invoice Number / Voucher Number 16 (Alpha-Numeric) with / or –
State Field is Required For all Invoices – its company State field (F11:Company Features> Enable Goods and Services Tax (GST) > Check State in Bill from place)  
For specific Invoice – its Party (Party Details / Consignee Details using Ctrl+I (More Details or Dispatch From Details section under e-Invoice Details using Ctrl+I (More Details)
Field Address 1 For All invoices – its company addresses Address 1 – 1 to 100 (Alpha Numeric)
Field Address 2 For specific Invoices – Its Party master – Check ledger master or party details for buyer and consignee – 1st Line / 2 refers to 2nd line Address 2 – 3 to 100 (Alpha Numeric)
Field Legal Name For all transactions – its company: Mailing Name 3 to 100 (Alpha Numeric)
For specific Invoice – Its Party: Mailing Name
Field Product Description Stock Item name 3 to 100 (Alpha Numeric)
Field POS  Place of Supply – In party details/supplementary details check Place of Supply  
Recipient Pin Code Buyer PIN code – Check party master or party details screens with PIN code 6 digits
Recipient should be SEZ Buyer details – Registration type should be SEZ  
State code does not match For All Transactions – State name is not selected in the list in F11:Company Features  
For specific Invoices – State name is not selected properly in Party details / Place of supply
GSTIN is inactive or cancelled Verify GSTIN status / If cancelled or inactive Registration type should be Unregister & e-Invoice Not required  

 

Error Message/Scenario  Reason for Error Resolution

IRN is already generated and registered with GSTN Lookup Portal by other IRP

 

You can perform Get IRN from TallyPrime to connect to only the einvoice1 portal. In case you have manually generated IRN on the einvoice2 portal (e-invoice2.gst.gov.in), you will not be able to perform Get IRN/cancellation from TallyPrime. 

You can perform one of the following:

  • Cancel the current e-Invoice generation request done in the e-invoice2 portal and send a new request for e-Invoice.
  • Generate an e-Invoice only on the e-invoice1 portal.
The field Location must be a string with a minimum length of 3 and a maximum length of 50 Location is not as per the required format

The field Location refers to the Invoice bill from place set under the GST Details of the F11 (Company Features). You can check it on the following path:

F11 (Company Feature) > Enable Goods and Service Tax (GST) > GST Details.

If the Invoice bill from place is lesser than 3 characters or greater than 50 characters, then the vouchers get rejected by the e-Invoice system.

Here’s how to resolve the error in such vouchers.

If you are using TallyPrime Release 3.0 and later, then follow the steps given below:

  1. Identify the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Rejected by e-Invoice System section, and identify the vouchers with the Reason for Rejection.
  2. Specify the Invoice bill from place.
    1. Press F11 (Company Features) > set Enable Goods and Services Tax (GST) to Yes.
    2. Invoice bill from place: Specify the name of the location you want to use for billing.
      Ensure that the name consists of minimum 3 characters and a maximum of 50 characters
      .
  3. Generate e-Invoice for the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Rejected by e-Invoice System section.
    3. Open the voucher and generate the e-Invoice.

If you are using TallyPrime Release 2.1 and earlier, then the vouchers will be found in the Missing/Invalid Information section. You need to ensure that Invoice bill from place is specified in the required format.

The field document number must match the expression'((a-zA-Z1-9)(1)(a-zA-Z0-9/-)(0,15))$’

(or)

The document number doesn’t match with regular expression

Document Number is not as per the required format

Document Number references to the Voucher No. enter during voucher creation. A Document Number must fulfill the following criteria:

  1. Cannot be empty
  2. Should be maximum 16 characters
  3. Should not have space
  4. The only special character allowed is / (forward slash)
  5. The first character should not be 0 or / (forward slash)

Here’s how to resolve the error in such vouchers.

If you are using TallyPrime Release 3.0 and later, then follow the steps given below:

  1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
  2. Drill down from the Uncertain Transactions (Corrections needed) section.
  3. Open the voucher, enter the correct document number, and generate the e-Invoice.

If you are using TallyPrime Release 2.1 and earlier, then the vouchers will be found in the Information required for e-Invoice not provided section. You need to ensure that the document number is correct.

The Document date should not be a future date.

The Document Date specified is of future Date

e-Invoice generated for future day that is, not equal to the current date. Check the Document date that is being passed and it should not be of a date greater than today’s date.

The State field is required State code is not specified

State code refers to the State selected under F11 (Company Features) or in the ledger of the party for which the invoice is recorded. When you do not specify the State, you will not be be able to generate an e-Invoice.

You can check the State on the following paths:

  • F11 (Company Feature) > Enable Goods and Service Tax (GST) > GST Details.
  • Press Alt+G (Go To) > Alter Master > Ledger > type or select the name of the Ledger for which the invoice is recorded, and press Enter.

Here’s how to resolve the error in such vouchers.

If you are using TallyPrime Release 3.0 and later, then follow the steps given below:

  1. Identify the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Information required for e-Invoice not provided section, and you will find the vouchers.
  2. As per the master in which the State is incorrect:
    Press F11 (Company Features) > set Enable Goods and Services Tax (GST) to Yes, and specify the correct State.
    Or 
    Press Alt+G (Go To) > Alter Master > Ledger > type or select the name of the Ledger for which the invoice is recorded and press Enter, and specify the correct State.
  3. Generate e-Invoice for the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Information required for e-Invoice not provided section.
    3. Open the voucher and generate e-Invoice.

If you are using TallyPrime Release 2.1 and earlier, then the vouchers will be found in the Mismatch due to tax amount modified in voucher section. You need to ensure that the State is selected under F11 (Company Features) and the ledger created for the party.

The field Address 1 must be a string with a minimum length of 1 and maximum length of 100 Address 1/Address 2 is not as per the required format

The maximum length of address allowed is 200 characters (100 against address line 1 and 100 against address line 2). Tally will combine and incorporate the maximum possible characters in first and second address lines (after truncating to nearest word). However, if address is beyond 200 characters it will get rejected by NIC. Hence ensure the Party masters and Company dispatch address and in accordance with this. Please remove any additional information (Ex: Contact person name / phone / e-mail etc. mentioned as part of address.) that is not relevant or is not a property of address.

The field Address 2 must be a string with a minimum length of 3 and maximum length of 100
The pin code does not match with state code of supplier The available PIN Code XXX of Buyer does not belong to his/her State

Consider that you have selected a state in the party ledger but specified the Pincode of another state. In such cases, the e-Invoice will not get generated.

Here’s how to resolve the error in such vouchers.

If you are using TallyPrime Release 3.0 and later, then follow the steps given below:

  1. Identify the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between Buyer (Bill To) State and Pincode, and you will find the vouchers.
  2. Change the State or the Pincode of the party.
    1. Press Alt+G (Go To) > Alter Master > Ledger > type or select the name of the Ledger for which the invoice is recorded and press Enter
    2. Specify the correct State or the Pincode in the party ledger and press Ctrl+A to save.
  3. Generate e-Invoice for the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between Buyer (Bill To) State and Pincode.
    3. Open the voucher and generate e-Invoice.

If you are using TallyPrime Release 2.1 and earlier, then the vouchers will be found in the Information required for e-Invoice not provided section. You need to ensure that the State and Pincode specified in the party ledger match.

The JSON value could not be converted to System.Nullable`1[System.Int32]. Path: $.Data.EwbDtls.Distance | LineNumber: 0 | BytePositionInLine: 1969 The entered Pin to Pin Distance is invalid

This message is shown when both e-Invoice and e-Way Bill is generated. The distance provided in e-Way Bill details is invalid. Please check

https://ewaybillgst.gov.in/Others/P2PDistance.aspx

to validate the proper Distance

The field Legal Name must be a String with a minimum length of 3 and maximum length of 100 The field Legal Name is not as per the required format

Legal Name is the Entity registered Business with a specific Name. Under Mailing Name, ensure the Legal Name of the Business is provided to captured and should hold Min 3 to max 100 characters.

The field Transport document number must match the regular expression Transporter Document Number is not as per the required format

Transporter document number in the e-Way Bill Details should follow the below validation

  1. Document number should be 15 characters
  2. Only capital letters are allowed
The field rounding off amount must be between 99 and -99

Reason1 : Ledger type is selected as “Invoice Rounding” in expenses, sales ledger or duty ledger, selected under expenses or sales, where enabled the option invoice rounding and accepted, later changed to the duty ledger.

Reason2 : This error even occurs in vouchers, where round-off is not used. The reason for this could be in any of the ledgers used in the invoice type of ledger would have been chosen as Invoice rounding. This could be in the party, sales, or additional ledger

Reason1

Alter the expense and sales ledger

  • Set the Type of Ledger option to Not Applicable.

Alter the duty ledger

  1. Set Type of Ledger to Not Applicable.
  2. Press Backspace > select Duties & Taxes and press Ctrl+A to accept accept the ledger and transaction.

Reason2

  • We suggest changing the accounting group to Expenses, then Set the Type of Ledger option to Not Applicable.
The field Product Description must be a String with a minimum length of 3 and the maximum length of 300

The Stock item name is not as per the required format

Stock item Name is the product, which is dealt with for any Business, ensure the stock item Name provided should hold Min 3 to max 100 characters.

Recipient cannot be SEZ for – {0} transaction

SEZ GSTIN has been passed as GSTIN in Recipient details for the specified type of transaction

Only the Registration type is configured as Regular, however, its being SEZ party – party type should be configured ie., in the party master alteration > enable set/alter GST details > Under Party type select “SEZ”

Duplicate IRN

You might be attempting to create an IRN that is already generated.

When trying to generate an e-invoice, you will receive a duplicate IRN if the IRN number has already been generated, cancelled, and repassed with another entry in the same cancelled voucher or with a previous voucher number with a new invoice.

Say for Voucher No 1, you have generated an e-invoice, which you have cancelled later. If you are now generating an e-invoice for another voucher with the same voucher number, you will be prompted with a duplicate IRN error.

In this case, record the new voucher with a separate voucher number. Also, remove the IRN from the e-invoice details and then generate the e-invoice through the new voucher.

  • In case the IRN/QR code does not exist for the said invoice, then instead of re-generating, you can use “Get IRN”. If not done within 72 hours, then this solution works. 
  • In case voucher is deleted by any chance, and due to numbering it is showing, then we need to recommend not to delete voucher and insert same voucher and use get IRN and in case it greater than 72 hours then raise credit note.
The HSN – {0} does not belong to Goods

The provided HSN Code is not a valid HSN code for Goods.

In a ledger or stock item, when the Type of Supply is selected as Goods, but the HSN/SAC belongs to Service, the e-Invoice with the ledger does not get generated.

Here’s how to resolve the error in such vouchers.

  1. Identify the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between HSN/SAC and Type of Supply, and identify the vouchers.
  2. Change the HSN/SAC in the ledger.
    1. Press Alt+G (Go To) > Alter Master > Ledger > type or select the name of the Ledger for which the invoice is recorded and press Enter.
    2. Enter the correct HSN/SAC and press Ctrl+A to save.
  3. Generate e-Invoice for the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between HSN/SAC and Type of Supply, and identify the vouchers.
    3. Open the voucher and generate e-Invoice.

Verify the details from below link:
https://services.gst.gov.in/services/searchhsnsac

The HSN – {0} does not belong to Service

The provided SAC Code is not a valid SAC code for Services.

In a ledger or stock item, when the Type of Supply is selected as Service, but the HSN/SAC belongs to Goods, the e-Invoice with the ledger does not get generated.

Here’s how to resolve the error in such vouchers.

  1. Identify the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between HSN/SAC and Type of Supply, and identify the vouchers.
  2. Change the HSN/SAC in the ledger.
    1. Press Alt+G (Go To) > Alter Master > Ledger > type or select the name of the Ledger for which the invoice is recorded and press Enter.
    2. Enter the correct HSN/SAC and press Ctrl+A to save.
  3. Generate e-Invoice for the vouchers.
    1. Press Alt+G (Go To), type or select e-Invoice, and press Enter.
    2. Drill down from the Mismatch in e-Invoice Details section > Mismatch between HSN/SAC and Type of Supply, and identify the vouchers.
    3. Open the voucher and generate e-Invoice.

Verify the details from below link
https://services.gst.gov.in/services/searchhsnsac

e-Way Bill Errors

Error Message Reason for Error Resolution Error Code

The distance between the pincodes given is too high or low.

The provided distance is incorrect. A difference of +/- 10% is allowed, and distance must fall within that range.

If you are using TallyPrime Release 3.0 and later, then you can navigate to the link for the calculation of the distance from within the product.

  1. During voucher creation, set Provide e-Way Bill details to Yes.
    The 
    e-Way Bill Details screen appears.
  2. Press Alt+L (Calculate Distance on Portal).

You will be redirected to the portal on which you can calculate the distance between the pincodes.

However, if you are using TallyPrime Release 2.1 or earlier, then you can open the following link on a browser and calculate the distance between the pincodes:

https://ewaybillgst.gov.in/Others/P2PDistance.aspx

4013

The distance between the pincodes given is too high

The provided distance is incorrect. A difference of +/- 10% is allowed, and distance must fall within that range.

 

If you are using TallyPrime Release 3.0 and later, then you can navigate to the link for the calculation of the distance from within the product.

  1. During voucher creation, set Provide e-Way Bill details to Yes.
    The 
    e-Way Bill Details screen appears.
  2. Press Alt+L (Calculate Distance on Portal).

You will be redirected to the portal on which you can calculate the distance between the pincodes.

However, if you are using TallyPrime Release 2.1 or earlier, then you can open the following link on a browser and calculate the distance between the pincodes:

https://ewaybillgst.gov.in/Others/P2PDistance.aspx

4038

Invoice Errors

Error Message Reason for Error Resolution Error Code

Error while validating invoice

The request JSON payload is not as per the currently used e-Invoice request schema

Please refer to the API developer portal for details

https://einv-apisandbox.nic.in/

2140

Error while cancelling invoice

Some unexpected error has occurred while cancelling the e-Invoice

Please check the request payload and header and try again. If issue is unresolved, contact helpdesk with complete details of the request.

2141

Invoice does not belongs to the user GSTIN

User is attempting to perform some operations on IRN which does not belong to the currently logged in user

Certain operations cannot be carried out on other’s IRNs, such as cancellation

2143

Unable to create IRN, Pls. try after some time

Due to some unexpected scenario, IRN could not be generated at the moment

Please try after some time. If issue persists, contact helpdesk with complete details of the issue

2146

Unable to sign invoice, Pl try after some time

Some unexpected error has occurred while signing the Invoice

Please try after some time. If issue persists, contact helpdesk with complete details of the issue

2147

Requested IRN data is not available

User is trying to do some operation on an IRN which is not available in the eInvoice system

Please check whether IRN is correct or the operation is being carried out within permitted time duration.

2148

IRN details are not found

When trying to Get IRN info, this error is received when user has changed either Doc number, Doc Date and Doc Type post generating the IRN.

Don’t fire the same request simultaneously. This results in one request giving the error as ‘Duplicate IRN request’. Best way to avoid firing of IRN request repeatedly for the same request, is update in your system with IRN number when the response comes back. Next time check the IRN, if it is not there, then fire for IRN.

2154

Supplier GSTIN is required

Request payload dos not have supplier GSTIN

Supplier GSTIN is mandatory

2155

Invalid format – fromDate(The correct format is dd/MM/yyyy)

User is passing wrong date format for fromDate

Date format should be in dd/MM/yyyy. Please refer to the request JSON schema

2156

Invalid format – toDate (The correct format is dd/MM/yyyy)

User is passing wrong date format for toDate

Date format should be in dd/MM/yyyy. Please refer to the request JSON schema

2157

Invalid value for reverse charge applicable field

Invalid value has been sent for the attribute to pass whether reverse charge applicable

Please refer to the request JSON schema

2159

Reverse Charge is not applicable for this transaction

Trying to set ‘Reverse Charges applicable’ for transactions other than B2B transaction

Check the ‘Reverse Charges Applicable’ parameter as per the current type of transaction

2162

The document date should not be future date.

Attempting to set future date for the document date

Check the document date being passed

2163

Request for IRN is neither from supplier GSTIN or e-Commerce GSTIN

Logged in user GSTIN does not match with either the supplier GSTIN or eCommerce GSTIN

If a supplier is registering the invoice, GSTIN passed in the request header should match with the supplier GSTIN. If an eCommerce operator is registering the invoice, GSTIN in header should match with the eCommerce operator’s GSTIN in the request payload

2169

For Intra-state transaction, IGST amount is not applicable; only CGST and SGST amounts are applicable

IGST amount is being passed for Intra State transaction where as CGST and SGST are applicable.

Please check the applicable taxes for current transaction. If the State code of Point of Supply (POS) of recipient is same is state code of Supplier, then CSGT and SGST applies. However, under exception circumstances as per rule if IGST is applicable for intrastate transaction, then pass the ‘IGST_on_IntraState_Supply’ flag as ‘Y’ with IGST value so that system can process your request.

2172

You have exceeded the limit of number of items

User has passed the requests payload with more number of items

Please check the number of line items being passed. Please refer to the specific API for large number of items. If limit for that API is also exceeded, contact helpdesk with invoice details

2173

For inter-state transaction, CGST and SGST amounts are not applicable; only IGST amount is applicable

CGST and SGST taxes are being passed for inter state transactions

Please check the applicable taxes for current transaction. If the State code of Point of Supply (POS) of recipient is different than the state code of Supplier, then IGST applies. Pl check the details.

2174

HSN code(s)-{0} is invalid

Wrong HSN code is being passed

Pl check the HSN code being passed and cross-check the correctness of HSN code on e-invoice portal. Still, if you feel it is correct, then please send the details to the helpdesk for verification at e-invoice system side.

Verify the details from below link

https://services.gst.gov.in/services/searchhsnsac

2176

Unit Quantity Code(s)-{0} is/are not as per master

Invalid unit code has been passed

Please pass the correct unit code as per the master provided for e-invoice. Check the correct unit code in the portal under Search > Master codes. If the unit code is not matching with your required unit, you may have to convert unit to one existing in the master list of unit code.

2177

Taxable value of all items is not equal to total taxable value

Sum of taxable amounts of all items should be equal to invoice level taxable amount.

Please check the request payload for the taxable value validation. Total Taxable Value = Taxable value of all line items

2182

SGST value of all items is not equal to total SGST Value

Sum of SGST amounts of all items should be equal to invoice level SGST amount

Please check the request payload for the SGST value validation.

2183

CGST value of all items must be equal to total CGST value

Sum of CGST amounts of all items should be equal to invoice level CGST amount

Please check the request payload for the CGST value validation.

2184

IGST value of all items must be equal to total IGST Value

Sum of IGST amounts of all items should be equal to invoice level IGST amount

Please check the request payload for the IGST value validation.

2185

Cess value of all items must be equal to total Cess Value

Sum of Cess amounts of all items should be equal to invoice level Cess amount

Please check the request payload for the Cess value validation.

2186

State Cess Value of all items must be equal to total State CessValue

Sum of State Cess amounts of all items should be equal to invoice level State Cess amount

Please check the request payload for the State Cess value validation.

2187

Total Invoice Value is not matching with calculated value

Invoice level total value has not been calculated as per the passed values.

Invoice level total value is equal to totals of all the total item value plus other charges minus discount with tolerance limit of +/- One. Pl refer to the validations in sandbox portal.

2189

TotAmt value should be equal to (Qty * UnitPrice) for HSN {0}

Total amount for the specified item is incorrect

Item level total amount should be the product of quantity and unit price

2192

For Sl. No. {0}, Taxable Value (AssAmt) value is not equal to (TotAmt – Discount)

Incorrect assessable amount is passed for the specified item.

For the specific item, assessable amount should be arrived at by deducting discount from total amount

2193

For Sl. No {0}, Total item value does not match with taxable and tax values of that item

Total item value passed is incorrect.

Total item value should be sum of assessable value, all tax and cess values, other charges with tolerance limit of +/- One. Please refer to the validations in the portal.

2194

e-Commerce GSTIN is not registered as TCS-GSTIN

The eCommerce GSTIN passed does not belong to the type Tax Collector

Please check the GSTIN type at the common portal. If it is TCS in common portal still it is showing the error, contact the helpdesk with GSTIN details

2195

State code {0} is invalid for dispatch details or ship details

Wrong state code is passed in dispatch or ship details

Please refer to the state codes in the portal at Search -> Master Codes

2200

Invalid Port Code

Wrong port code is passed in dispatch or ship details

Please refer to the port codes in the portal at Search -> Master Codes

2201

Invalid Country Code

Wrong country code is passed in dispatch or ship details

Please refer to the country codes in the portal at Search -> Master Codes

2202

Invalid Foreign Currency

Wrong foreign currency code is passed in dispatch or ship details

Please refer to the foreign currency codes in the portal at Search -> Master Codes

2203

Supplier and recipient GSTIN should not be the same.

Same GSTIN has been passed for Supplier and Buyer GSTIN.

Self generated Invoice are not allowed for e-invoice generation.

2211

The recipient GSTIN cannot be URP for supply type {0}

Un Registered Person (URP) is passed wrongly for B2B type of transaction.

For this type of transaction, actual GSTIN needs to be passed.

2212

The supplier GSTIN cannot be URP

URP has been set as the Supplier GSTIN

Supplier GSTIN can not be URP

2213

The date must be lesser or equal to todays date (or) please check the date format

Date is passed which is not in the expected range

Date passed should be of today or yesterday

2218

The from date should be equal or earlier than the to date

From date is set as future date

From date can not be future date

2219

Incorrect date format in document details

Document date format is wrong

Provide the document date in the format dd/MM/yyyy

2225

For Sl. No {0}, SGST and CGST amounts are not equal

For the specified item, CGST and SGST amounts are not equal

CGST and SGST amounts should be same for the specified item.

2227

Item list cannot be empty

There are no items in the item list

There should be at least one item in the item list

2228

This IRN cannot be cancelled because e-way bill has been generated , you can cancel e-way bill and then try cancelling IRN

User has tempted to cancel an IRN which has an active E Way Bill

IRN can not be cancelled unless the associated E Way Bill is cancelled. Cancel the E Way Bill first and then cancel the IRN

2230

Cannot generate e-Invoice as the supplier GSTIN – {0} is SEZ

SEZ GSTIN user is trying to generate the eInvoice

eInvoice is not applicable for SEZ supplier

2231

POS is incorrect for {0} transaction

POS is sent other than 96 for the specified type of transaction

Send Other Country code (96) for POS state code for the specified transaction type

2232

Duplicate SI numbers are not allowed in line items

Duplicate serial number for the items has been sent in the item list.

The serial number of the items in the item list should be unique in an invoice.

2233

For Sl. No {0}, SGST and CGST amount passed does not match with taxable value and tax rate

Wrong SGST and CGST amounts are passed for the specified item in the item list.

Correct values for the SGST and CGST amounts have to be passed. SGST and CGST values should be equal to [taxable value X tax rate / 2] for that line item with tolerance limit of +/- One.

2234

For Sl. No {0}, IGST amount passed is not matching with taxable value and tax rate

Wrong IGST amount is passed for the specified item in the item list.

Correct value for the IGST amount has to be passed. IGST value should be equal to [taxable value X tax rate] for that line item with tolerance limit of +/- One.

2235

For Sl. No {0}, Quantity is not passed

Value for quantity is missing for the specified item in the item list

Send the quantity for the specified item

2238

For Sl. No {0}, Unit Quantity Code (UQC) is not passed

Value for unit is missing for the specified item in the item list

Send the value for unit for the specified item

2239

For Sl. No {0}, GST rate of tax is incorrect or not as notified

Wrong GST rate is passed for the specified item in the item list.

Correct value for the GST rate has to be passed. Standard tax Rates are 0, 0.5, 1, 2, 3, 5, 12, 18, 28

2240

Recipient POS is incorrect for transaction type {0}

For the specified type of transaction, POS passed is 96 – Other Country

For the specified transaction type, POS can not be 96, pass a valid state code. Please refer to the State Codes in the portal under Search -> Master Codes

2242

POS code is invalid

Invalid State code has been passed for the POS

Pass correct State code for POS. Please refer to the State Codes in the portal under Search -> Master Codes

2243

Recipient pincode is not provided for the transaction – {0}

Recipient PIN code is missing for the specified transaction type.

For the specified type of transaction, PIN code is mandatory under Recipient details.

2244

Recipient should be SEZ for transaction {0}

Non SEZ GSTIN has been passed as the GSTIN in Recipient details for the given type of transaction.

For the given type of transaction GSTIN in Recipient details should be of SEZ

2247

Recipient has to be URP in case of Export transactions

In case of export, Recipient GSTIN has not been set to ‘URP’

In case of export , GSTIN in Recipient details should be ‘URP’

2248

Combination of goods and service items are not allowed for inter state transaction with POS same as the supplier state

Items list has entries for both goods and services for inter state transaction

Items of both goods and services are not allowed in same invoice for inter state transaction

2249

Requested Payload is empty

Empty payload is received

Pass proper payload in the request

2255

Invalid Signature

The data is altered or improper public key is used for verification of the signed content

Make sure that the correct public key is used for verification of the signed content. The public keys are available for download from the portal, which are used in specific time periods.

2256

Supplier GSTIN state code does not match with the state code passed in supplier details

The state code passed and first two digits of the GSTIN passed in the Supplier details do not match

In the Supplier details, first two digits of the GSTIN should match the state code passed. Tally maps the State code against each state internally. In case user has created any state manually and are used, the said error triggers. Select the State from the given list of States.

2258

Invalid supplier state code

State code passed in the Supplier Details is incorrect

Pass the correct State code in the Supplier Details. For State code master, visit the portal under Search -> Master Codes

2259

The recipient state code is invalid

State code passed in the Recipient Details is incorrect

Pass the correct State code in the Recipient Details. For State code master, visit the portal under Search -> Master Codes

2260

The recipient state code is incorrect for {0} transaction

State code under Recipient Details is sent other than 96, for the specified type of transaction

Send Other Country code (96) for State code under Recipient Details, for the specified transaction type

2261

For Intra-state supply, IGST cannot be charged

IGSTonIntra value is set as ‘Y’ but different state codes are mentioned under Supplier Details and POS

When IGSTonIntra value is set as ‘Y’, it should be an intra state transaction and hence State code under Supplier Details should be same as POS under Recipient Details

2262

Recipient GSTIN state code does not match with the state code passed in recipient details

The state code passed and first two digits of the GSTIN passed in the Recipient details do not match.

In the Recipient details, first two digits of the GSTIN should match the state code passed. Tally maps the State Code against each state internally. In case user has created any state manually and are used, the said error triggers. Select the State from the given list of States.

2265

For Sl. No {0}, Cess amount passed does not match with the calculated value

Incorrect Cess amount is passed for the specified line item

Correct Cess amount may be passed for the specified line item

2266

For Sl. No {0}, State Cess amount passed is not as per calculated value

Incorrect State Cess amount is passed for the specified line item

Correct State Cess amount may be passed for the specified line item

2267

IGST on instra state supply is not applicable to export/SEZ transactions

IGSTonIntra has been set for export and SEZ transactions

IGSTonIntra value can not be ‘Y’ for export and SEZ transactions

2268

Recipient state code is incorrect for transaction type {0}

For the specified type of transaction, State code in Recipient Details passed is 96 – Other Country

For the specified transaction type, State code passed in Recipient details can not be 96, pass a valid state code. Please refer to the State Codes in the portal under Search -> Master Codes

2269

The allowed cancellation time limit is crossed, you cannot cancel the IRN

Attempted to cancel the IRN after the time limit

IRN can be cancelled only within the time limit

2270

SHIP TO – state code is not valid statecode for B2B, SEZ and Deemed Export transactions

Invalid State code is passed under Ship To details for B2B, SEZ and Deemed export transaction

Correct state code should be passed under Ship To Details for B2B, SEZ and Deemed export transactions. For valid State codes, may visit the portal under Search -> Master Codes

2271

SHIP TO – PIN code cannot be 999999 for B2B, SEZ and Deemed Export transactions

PIN code under ShipTo Details has been passed as 999999 for B2B, SEZ and Deemed Export transactions

Correct PIN code should be passed under Ship To Details for B2B, SEZ and Deemed export transactions. For valid PIN codes, may visit the portal under Search -> Master Codes

2272

Dispatch from PIN code cannot be 999999

PIN code under Dispatch From Details has been passed as 999999 for B2B, SEZ and Deemed Export transactions

Correct PIN code should be passed under Dispatch From Details for B2B, SEZ and Deemed export transactions. For valid PIN codes, may visit the portal under Search -> Master Codes

2273

Recipient PIN code cannot be 999999 for {0} transaction.

PIN code under Recipient Details has been passed as 999999 for specified type of transactions

Correct PIN code should be passed under Recipient Details for specified type of transactions. For valid PIN codes, may visit the portal under Search -> Master Codes

2274

Recipient PIN code should be 999999 for Direct Export

PIN code under Recipient Details has been passed as other than 999999 for specified type of transactions

999999 as PIN code should be passed under Recipient Details for specified type of transactions.

2275

Supplier PIN code cannot be 999999

PIN code under Supplier Details has been passed as 999999

Correct PIN code should be passed under Supplier Details. For valid PIN codes, may visit the portal under Search -> Master Codes

2276

E-Commerce Opertaor has to pass supplier GSTIN in header to cancel the IRN

in header, supplier GSTIN is missing while eCommerce operator is cancelling the IRN

While eCommerce operator is cancelling the IRN, Supplier GSTIN should be passed in the request header

2277

IRN details cannot be provided as it is generated more than {0} days prior

When trying to Get IRN info, this error is received when user has tried getting IRN info after 3 days.

Note: Currently e-Invoice support for getting IRN info is limited to 3 days from day of Generation. This can be changed by NIC in the future.

 

2283

GSTIN -{0} is invalid.

Recipient GSTIN is invalid or does not exist in e-invoice system

Check the correctness of the GSTIN. If you are sure that it is valid, Pl use the ‘Sync GSTIN from GST CP’ API to get it pulled from the GST Portal. If it is available in GST portal, it will return you with the details. If you get the details, then you can re-fire your request to generate the IRN. If you are not able to verify through API, you can go to einvocie1.gst.gov.in portal and use the ‘Tax Payer / GSTIN’ option in search menu to check the status manually from GST Portal and use ‘Update’ button to get it updated from GST Common Portal. If you are satisfied with result, you can re-fire the request.

3028

Vital Errors

Error Message Reason for Error Resolution Error Code

Invalid Token

1. Token has expired 2. While calling other APIs, wrong GSTIN / User Id/ Token passed in the request header

1. Token is valid for 6 hours , if it has expired, call the Auth. API again and get new token 2. Pass correct values for GSTIN, User Id and Auth Token in the request headers while calling APIs other than Auth API

1005

Authentication failed. Pls. inform the helpdesk

Wrong formation of request payload

Prepare the request payload as per the API documentation

1007

Invalid login credentials

Either UserId or Password are wrong

Pass the correct UserId and Password

1008

Invalid Client-ID/Client-Secret

Either the ClientId or the ClientSecret passed in the request header is wrong

Pass the correct ClientId and the ClientSecret

1010

Decryption of password failed

Auth.API is not able to decrypt the password

Use the correct public key for encrypting the password while calling the Auth API. The public key is sent by mail while providing the access to Production environment as well as available for download from the portal under API user management. This public key is different on Sandbox and Production and it is different from the one used for verification of the signed content.Refer to the developer portal for encryption method used and sample code.

1013

Inactive User

Status of the GSTIN is inactive or not enabled for E Invoice

Please verify whether the GSTIN is active and enabled for E Invoice from the E Invoice portal

1014

Invalid GSTIN for this user

The GSTIN of the user who has generated the auth token is different from the GSTIN being passed in the request header

Send the correct GSTIN in the header for APIs other than Auth API

1015

Decryption of App Key failed

Auth.API is not able to decrypt the password

Use the correct public key for encrypting the appkey while calling the Auth API. The public key is sent by mail while providing the access to Production environment as well as available for download from the portal under API user management. This public key is different on Sandbox and Production and it is different from the one used for verification of the signed content.Refer to the developer portal for encryption method used and sample code.

1016

Incorrect user id/User does not exists

User id passed in request payload is incorrect

Pass the correct user id. If not available, please log in to the portal using the main user id (the one without ‘

1017

Client Id is not mapped to this user

The UserId is not mapped to the ClientId that is being sent as request header

Please send the correct userId for the respective clientId. If using direct integration as well as through GSP or through multiple GSPs, please pass the correct set of ClientId

1018

Incorrect Password

Password is wrong

Use the correct password, if forgotten, may use forgot password option in the portal

1019

Password should contains atleast one upper case, one lower case, one number and one special characters like [%,$,#,@,_,!,*]

Password being set is very simple

Password should contains atleast one upper case, one lower case, one number and one special characters like [%,$,

3003

This username is already registered. Please choose a different username.

User id is already available in the system

Use a different user id

3004

Invalid Mobile Number

The Mobile number provided is incorrect

Provide the correct mobile number, Incase the number has changed, may update it in GSTN Common Portal and try after some time. If issue still persists, contact helpdesk with complete details of the issue.

3006

You have exceeded the limit of creating sub-users

The number of sub user creation limit is exceeded

Up to 10 subusers for each of the main GSTIN and additional places of business can be created

3007

Sub user exists for this user id

There is already a subuser with the same user id is already created

Use a different user id for the sub user creation

3008

Mobile No. is blank for this GSTIN ..Pl use update from GST Common Portal option to get the mobile number, if updated in GST Common Portal.

The GSTIN master data does not have mobile number in eInvoice System

Please get the mobile number updated at the GSTN common portal

3012

Sorry, your GSTIN is deregistered in GST Common Portal

Attempting to use a GSTIN which is cancelled

Please check the status of the GSTIN on the GSTN common portal. If it is active, contact the helpdesk with GSTIN details

3015

There are no subusers for this gstin

Some user action has failed due to internal server issue or unexpected user data

Try after some time, if issue still persists, report to helpdesk with complete details of the issue

3021

The New PassWord And Old PassWord Cannot Be Same

While changing the password, new password can not be same as old password

The New and Ols password should be different while changing the password

3023

Change of password unsuccessfull,pls check the existing password

Password could not be changed since the current password provided is incorrect

Provide the correct current password while changing the password

3024

Already This Account Has Been Freezed

Trying to freeze an account which is already frozen

You can freeze only active account

3025

You are already registered Pl. use already created username and password to login to the system.If you have forgotten username or password,then use Forgot Username or Forgot Passowrd options to get the username and password!!”

Attempting to create another account which is already created

Use forgot password option to retrieve the user name or password in case currently not available

3027

GSTIN is inactive or cancelled

GSTIN is inactive or cancelled by department or tax payer .

Check if the GSTN is correct. If yes, click the Sync GSTIN from GST CP API.

  1. To verify, go to the einvocie1.gst.gov.in portal > click Search > Taxpayer/GSTN.
  2. Mention the GSTIN and Captcha > click Go.
    This displays the GSTN details.
  3. Click the Update from GST Common portal.
    The portal displays the updated status.

If you get the status as Active, then you can restart your request to generate the IRN.

However, if GSTIN is still inactive due to business closure, you can change the said transactions as Sales to Unregistered/Consumer so that such transactions can participate in B2C table

3029

Invalid Gstin

GSTIN provided is incorrect

Provide the correct GSTIN

Verify the GSTIN using below link

https://services.gst.gov.in/services/searchtp

3030

Invalid User Name

Attempting to login with wrong user id

Use the correct user id

3031

Enrolled Transporter not allowed this site

The user who is not registered with GSTN but enrolled as transporter in E Way Bill portal is trying to login to eInvoice system

This is not allowed

3032

Your account has been Freezed as GSTIN is inactive

User is trying to login with an account which is freezed since the GSTIN is not active

Check the status of the GSTIN on the GSTN common portal. If active in common portal, report the same to helpdesk

3033

Your account has been cancelled as GSTIN is inactive

User is trying to login with an account which is cancelled since the GSTIN is not active

Check the status of the GSTIN on the GSTN common portal. If active in common portal, report the same to helpdesk

3034

Your account has been suspended as GSTIN is inactive

User is trying to login with an account which is suspended since the GSTIN is not active

Check the status of the GSTIN on the GSTN common portal. If active in common portal, report the same to helpdesk

3035

Your account has been inactive

Attempting to logging with a user id which is not active

Check the status of the user id, if in freeze state, create a new account

3036

CommonEnrolled Transporter not allowed this site

A user with common enrolled opting is trying to use the eInvoice system

eInvoice system can not be used by the GSTIN which has opted for common enrolment under E Way Bill

3037

Invalid From Pincode or To Pincode

PIN code passed is wrong

Pass the correct PIN code. Check the PIN code on the portal using the below link

https://einvoice1.gst.gov.in/Others/MasterCodes

Select Pincodes from the available radio buttons.
Select State Name, provide Captcha and click on Go to get the list of Pincodes

3042

Something went wrong, please try again after sometime

Attempting to carryout some on the system or passing some data which is not expected

Please check the data or the operation which you have just performed. If issue still persists, please share the complete details to the helpdesk

3043

This registration only for tax payers not GSP.

The option is available for the the Taxpayers and not for GSPs

This option is not available / applicable for GSP

3044

Sorry you are not enabled for e-Invoicing System on Production.

Ineligible taxpayer is trying to register for the eInvoice system

In case the turnover is above 500crores in any of the financial years in GST regime, use the enrol option in eInvoice portal

3046

 

const searchInput = document.getElementById(“searchInput”); const searchContainer = document.getElementById(“searchContainer”); const searchRect = searchInput.getBoundingClientRect(); searchInput.addEventListener(“keyup”, searchShortcut); const brTag = “”; document.addEventListener(‘scroll’, scrollFunction); window.addEventListener(“resize”, scrollFunction); //function to make the searchbox stick to the top when scrolled function scrollFunction() { const tables = document.getElementsByClassName(“TallyGreen”); const heightAdjust = document.getElementById(“heightAdjust”); let tableWidth = 0; //loopthrough all the tables and find out which is the widest to set the width of the search box for (table of tables) { if (table.clientWidth > tableWidth) tableWidth = table.clientWidth; } //if all the table width is 0 that means no table is visible or else set the width to the visible one. if (tableWidth > 0) tableWidth = tableWidth + ‘px’; else if (tableWidth == 0) tableWidth = ‘100%’; //detect for the change in the header class which occurs after the scroll and apply the changes if (document.getElementsByClassName(“after-scroll-wrap”).length > 0) { // if (document.documentElement.scrollTop > 150) { searchContainer.className = ‘searchContainerScroll’; searchContainer.style.width = tableWidth; heightAdjust.style.height = “150px” } else { searchContainer.className = ‘searchContainer’; searchContainer.style.width = tableWidth; heightAdjust.style.height = “0px”; } } function searchShortcut(e) { const inputTag = e.target; const filter = inputTag.value.toUpperCase(); const filterArray = filter.split(‘ ‘); const canvas = inputTag.parentElement.parentElement; const tables = canvas.getElementsByTagName(“tbody”); const rightNav = document.getElementsByClassName(“ez-toc-list ez-toc-list-level-1”)[0]; let resultsCount = 0; // Loop through all the tables for (const table of tables) { tableRows = table.getElementsByTagName(“tr”); const tParent = table.parentElement; let matchFoundInTable = false; // set the table height to auto and capture the height attribute to set it back later if (filter.length > 0) { if (tParent.style.height != “auto”) tParent.setAttribute(“height-data”, tParent.style.height); tParent.style.height = “auto”; } else { tParent.style.height = tParent.getAttribute(“height-data”); } // Loop through the Rows of each Table for (const tableRow of tableRows) { let matchFound = false; let notHeader; // get the value of each cells in the table const tableCells = tableRow.getElementsByTagName(“td”); let content = “”; // put the entire content of the row into one string to check if the row has any match for (const tableCell of tableCells) { content = content + ” ” + (tableCell.innerText || tableCell.textContent); } //check for any matches in the entire row using “AND” logic to make sure the row has all the words let matchFoundInRow = (checkForMatches(filter, content).And) ? true : false; if (content.split(‘ ‘).length > 1) { // find out if it is not a header row notHeader = (content.split(‘ ‘)[1].slice(0, 6) != “Action”) ? true : false; // make sure there is a match and it is not a header if (matchFoundInRow && notHeader) { // if it is a single cell description in a row then hide it else make it visible if (tableCells.length == 1 && filter.length > 0) { tableRow.style.display = “none”; } else if (tableCells.length > 1) { tableRow.style.display = “”; } // loop through each cell in a row for (const tableCell of tableCells) { const cellValue = tableCell.innerText || tableCell.textContent; const cellIndex = cellValue.toUpperCase().indexOf(filter); // find out if the cell has matching value with the input and it is not a single cell description if (matchFoundInRow && tableCells.length > 1) { // if (tableCells.length > 1) { // check if the cell has more sub elements checkForChildren(tableCell, filter); // use the below variables later below, which determine whether there is a match in the row matchFoundInTable = true; matchFound = true; } else { // run the below function anyways. check the function for more details if (tableCells.length > 1) checkForChildren(tableCell, filter) } } } } // if a match is found inside one of the cells then make the row visible if (matchFound && tableCells.length > 1) { tableRow.style.display = “”; // count the number of times a match is found to display at the top resultsCount++; // else hide the row unless its not a header } else if (notHeader) { tableRow.style.display = “none”; } if (filter.length == 0 && tableCells.length == 1) tableRow.style.display = “”; } // if no results are found in the entire table then hide the table if (!matchFoundInTable) { tParent.style.display = “none”; tParent.previousElementSibling.style.display = “none”; // rightNav.style.display = “none”; } else { tParent.style.display = “”; tParent.previousElementSibling.style.display = “”; // rightNav.style.display = “”; } } // check if there is an element exists which displays the number of results let checkNoOfResults = document.getElementById(“noOfResults”); if (!checkNoOfResults) { // if it doesn’t exist then create one const noOfResults = document.createElement(“p”); noOfResults.id = “noOfResults”; noOfResults.style = “font-size: 14px; font-weight: 400″; checkNoOfResults = noOfResults; } // show the number of results found if (resultsCount > 1) checkNoOfResults.innerText = resultsCount + ” results found.”; else if (resultsCount == 1) checkNoOfResults.innerText = resultsCount + ” result found.”; else if (resultsCount == 0) checkNoOfResults.innerText = “No results found.”; // checkNoOfResults.innerText = (resultsCount > 1) ? resultsCount + ” results found.” : resultsCount + ” result found.”; inputTag.parentElement.insertBefore(checkNoOfResults, inputTag.nextElementSibling); // if everything from the input is deleted then remove the no of results if (filter.length == 0) checkNoOfResults.remove(); scrollFunction(); } // function to check for sub-elements if there are any (this is to handle the cells which has bullet points and multiple lines with br tag) function checkForChildren(element, filter) { const count = element.childElementCount; let brExists = false, bulletList = false, multiplePTag = false; //check for specific tags to determine the how to handle the content for (const child of element.children) { if (child.nodeName == “BR”) brExists = true; if (child.nodeName == “UL”) bulletList = true; if (child.nodeName == “P”) multiplePTag = true; } if (brExists) highlightWithBR(element, filter) //if there is bullet list then loop through each list item and highlight the text else if (bulletList) { for (const child of element.children) { if (child.nodeName == “P”) highlightText(child, filter) if (child.nodeName == “UL”) { for (const item of child.children) { highlightText(item, filter) } } } } else if (multiplePTag) { for (const child of element.children) { highlightText(child, filter) } } else highlightText(element, filter) } function highlightWithBR(element, filter) { // split the HTML with br tags const highlightable = element.innerHTML.split(brTag); let cellParts = []; for (child of highlightable) { const dummyTag = document.createElement(“p”); dummyTag.innerHTML = child; // highlight the elements seperatly and put them together into an array cellParts.push(highlightText(dummyTag, filter)); } // combine the array by adding a br tag back and then put that inside the elements HTML element.innerHTML = cellParts.join(brTag); } function generateID() { return Math.random().toString(36).replace(/[^a-z]+/g, ”).substr(2, 10); } function highlightText(tableCell, filter) { const cellValue = tableCell.innerText || tableCell.textContent; const cellIndex = cellValue.toUpperCase().indexOf(filter); const splitStrings = filter.split(‘ ‘); // remove if there is any duplication of words to avoid errors const filterStrings = splitStrings.filter((c, index) => { return splitStrings.indexOf(c) === index; }); let returnHTML; // check for matches in the cell with the “OR” logic since we have already filtered the row with “AND” logic. const matchFound = (checkForMatches(filter, cellValue).Or) ? true : false; let breakPoints = {}; let newPoints = []; if (matchFound) { breakPoints = {}; let stringCount = 0; // check for breakpoints wherever every match for every word starts and ends for (const filterString of filterStrings) { if (filterString.length > 0) { breakPoints[filterString] = findAllMatches(cellValue, filterString); stringCount++; } } // use the breakpoints to ignore any repeatition of highlight action to avoid errors for (let i = stringCount – 1; i >= 1; i–) { const validateStrings = breakPoints[filterStrings[i]] for (let k = 0; k = 0; j–) { const interruptStrings = breakPoints[filterStrings[j]] for (const interruptString of interruptStrings) { try { // capture the places wherever there is an overlap of matches if (validateStrings[k].firstIndex >= interruptString.firstIndex && validateStrings[k].firstIndex { return y.firstIndex – x.firstIndex; }) // returnHTML = tableCell.innerHTML returnHTML = divideAndHighlight(tableCell, pointsArray) tableCell.innerHTML = returnHTML; } else { // if there is no match found then get the plain text and put it inside as HTML (this will remove any existing highlight from it) returnHTML = cellValue; tableCell.innerHTML = cellValue; } // return the html (this is used in highlightWithBR function) return returnHTML; } function findAllMatches(content, filter) { const index = content.toUpperCase().indexOf(filter); let breakPoints = []; if (index > -1) { let firstIndex = index; let secondIndex = index + filter.length; let secondMatch; let count = 0; do { breakPoints.push({ ‘firstIndex’: firstIndex, ‘secondIndex’: filter.length, ‘stringID’: generateID() }); const secondPart = content.slice(secondIndex, content.length); secondMatch = secondPart.toUpperCase().indexOf(filter); count++; if (secondMatch > -1) { secondMatch = secondMatch + secondIndex; firstIndex = secondMatch; secondIndex = secondMatch + filter.length; } } while (secondMatch > -1); } return breakPoints; } function checkForMatches(filterString, content) { let matchCount = 0; let filterIndexArray = []; const filterArray = filterString.split(‘ ‘); let matchFound = { ‘And’: false, ‘Or’: false } for (const filterString of filterArray) { const index = content.toUpperCase().indexOf(filterString); filterIndexArray.push(index); if (index > -1) { matchCount++; } } if (filterArray.length == matchCount) matchFound.And = true; if (matchCount > 0) matchFound.Or = true; return matchFound; } function divideAndHighlight(tableCell, breakPoints) { const textContent = tableCell.innerText || tableCell.textContent; let htmlContent = textContent; i = 0; for (const breakPoint of breakPoints) { const first = breakPoint.firstIndex, second = breakPoint.secondIndex, index = breakPoint.stringCount; const part1 = htmlContent.slice(0, first); const part2 = htmlContent.slice(first, first + second); const part3 = htmlContent.slice(first + second, htmlContent.length); const highlightTag = (part2.length > 0) ? “” + part2 + “” : “”; htmlContent = part1 + highlightTag + part3; i++; } return htmlContent; }
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */