# Reconciliation logic

The reconciliation is run to match 2 data sources. One is the e-invoice that is present with ClearTax, other is the SR or the PR data which is present in the customer's ERP. After matching, each invoice is categorised into different buckets based on logics mentioned below-

| Category                                                           | Logic                                                                                                                                                                                                         |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:green;background-color:green;">**Match**</mark> |                                                                                                                                                                                                               |
| <mark style="background-color:green;">Exact</mark>                 | If all the 13 fields match exactly on LHS and RHS                                                                                                                                                             |
| <mark style="background-color:yellow;">Suggested</mark>            | <p>- If all the document identifier fields match and one of the amount field does not match<br>- If all the amount fields match but one of the document identifier fields does not match</p>                  |
| Low                                                                | Threshold of amount mismatch is +1 MYR to -1 MYR                                                                                                                                                              |
| Medium                                                             | Threshold of amount mismatch is +5 MYR to -5 MYR                                                                                                                                                              |
| High                                                               | Threshold of amount mismatch is +15 MYR to -15 MYR                                                                                                                                                            |
| <mark style="color:red;background-color:red;">Mismatch</mark>      | <p>- If more than one of the document identifier fields does not match<br>- If the document identifier fields match but one or more of the amounts fields mismatch by a difference of more than +- 15 MYR</p> |
| <mark style="color:orange;">Missing</mark>                         |                                                                                                                                                                                                               |
| Missing in EInv                                                    | Present in sales data but not found in EInv data                                                                                                                                                              |
| Missing in Sales                                                   | Present in EInv data but not found in sales data                                                                                                                                                              |
