> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transitive.app/llms.txt
> Use this file to discover all available pages before exploring further.

# data_conflict

> Two values in the CargoWise documents do not agree.

The status is **Failed**.

> **Subtotal does not match** `data_conflict`
>
> The subtotal (CargoWise OSExGSTVATAmount, SAT SubTotal) is 1000.00 MXN. Expected: 990.00 MXN. The lines added together must equal this amount.

## What it means

The message names the field, the value that Transitive received, the value that agrees with the other data, and the check that failed. The tables below give each field and each check.

## How to correct it

Correct the value in CargoWise. Then send the document again, or stamp it by hand.

## Totals and header

The totals, the currency and the payment method of an invoice or a credit note.

### Subtotal

CargoWise field: `OSExGSTVATAmount`. SAT field: `SubTotal`.

| Check | Rule |
| - | - |
| `lines_sum` | The lines added together must equal this amount. |

### VAT (totals and header)

CargoWise field: `OSGSTVATAmount`. SAT field: `TotalImpuestosTrasladados`.

| Check | Rule |
| - | - |
| `lines_sum` | The lines added together must equal this amount. |
| `no_taxed_lines` | No line carries VAT, so the document cannot carry VAT. |

### Total

CargoWise field: `OSTotal`. SAT field: `Total`.

| Check | Rule |
| - | - |
| `subtotal_plus_taxes` | The total must equal the subtotal plus the transferred taxes, minus the withheld taxes. |
| `credit_within_invoice` | A credit note cannot be more than the invoice that it credits. |
| `matches_stamped_cfdi` | This value must be the same as in the stamped CFDI of the related invoice. |

### Currency

CargoWise field: `OSCurrency`. SAT field: `Moneda`.

| Check | Rule |
| - | - |
| `same_currency` | A credit note must use the currency of the invoice that it credits. |
| `matches_stamped_cfdi` | This value must be the same as in the stamped CFDI of the related invoice. |
| `matches_receipt` | A reversal must repeat this value of the receipt that it reverses. |

### Exchange rate

CargoWise field: `ExchangeRate`. SAT field: `TipoCambio`.

| Check | Rule |
| - | - |
| `rate_explains_totals` | The foreign total multiplied by the exchange rate must equal the local total. |

### Payment method

SAT field: `MetodoPago`.

| Check | Rule |
| - | - |
| `one_value` | The document must give one value. It gives more than one. |

## Issuer

The company and the RFC that issue the CFDI.

### CargoWise company

| Check | Rule |
| - | - |
| `matches_company` | This value must be the one of the company that issues the CFDI. |

### Issuer RFC

SAT field: `Emisor Rfc`.

| Check | Rule |
| - | - |
| `matches_company` | This value must be the one of the company that issues the CFDI. |

## Debtor

The data of the debtor that the CFDI must carry.

### Debtor code

CargoWise field: `OrganizationCode`.

| Check | Rule |
| - | - |
| `one_value` | The document must give one value. It gives more than one. |

### Debtor RFC

SAT field: `Receptor Rfc`.

| Check | Rule |
| - | - |
| `matches_receipt` | A reversal must repeat this value of the receipt that it reverses. |
| SAT CFDI40146 | The SAT allows the debtor name PUBLICO EN GENERAL only with the general-public RFC. |

## Lines

Each line of an invoice or a credit note.

### VAT (lines)

SAT field: `Traslado Importe`.

| Check | Rule |
| - | - |
| `base_times_rate` | The VAT of a line must equal its base multiplied by its rate. |

## Receipts and payments

A receipt, its payments and the invoices that it pays. The <Tooltip tip="Payment complement. A CFDI that records a payment on a PPD invoice.">REP</Tooltip> uses these data.

### Amount paid

CargoWise field: `OSTotal`. SAT field: `Monto`.

| Check | Rule |
| - | - |
| `one_value` | The document must give one value. It gives more than one. |
| `applied_equals_total` | The amounts applied to invoices must add up to the receipt total. |
| `matches_receipt` | A reversal must repeat this value of the receipt that it reverses. |

### Invoices paid

SAT field: `DoctoRelacionado`.

| Check | Rule |
| - | - |
| `applied_once` | A payment can apply to each invoice one time only. |

### Applied amount

CargoWise field: `OSPaidAmount`. SAT field: `ImpPagado`.

| Check | Rule |
| - | - |
| `within_balance` | A payment cannot be more than the balance of the invoice. |
| `already_paid` | The invoice is already fully paid, so it cannot receive another payment. |
| SAT CRP20244 | The amount applied to an invoice cannot be more than its previous balance (ImpSaldoAnt). Only on **Stamp by hand**. |

### Previous balance

SAT field: `ImpSaldoAnt`.

| Check | Rule |
| - | - |
| `balance_chain` | The previous balance must equal the balance that the last stamped payment left. |

### Remaining balance

SAT field: `ImpSaldoInsoluto`.

| Check | Rule |
| - | - |
| `balance_after_payment` | The remaining balance must equal the previous balance minus the amount paid. |

### Tax base

SAT field: `BaseDR`.

| Check | Rule |
| - | - |
| `matches_stamped_cfdi` | This value must be the same as in the stamped CFDI of the related invoice. |

### Taxes

SAT field: `ImpuestosDR`.

| Check | Rule |
| - | - |
| `matches_stamped_cfdi` | This value must be the same as in the stamped CFDI of the related invoice. |

### Payment reference

CargoWise field: `CheckNumberOrPaymentRef`. SAT field: `NumOperacion`.

| Check | Rule |
| - | - |
| `matches_receipt` | A reversal must repeat this value of the receipt that it reverses. |

## Related documents

The invoice that a credit note or a payment refers to.

### Related invoice

SAT field: `CfdiRelacionados`.

| Check | Rule |
| - | - |
| `one_value` | The document must give one value. It gives more than one. |

### SAT UUID

CargoWise field: `GovernmentNumber`. SAT field: `UUID`.

| Check | Rule |
| - | - |
| `one_value` | The document must give one value. It gives more than one. |
| `matches_recorded_uuid` | The SAT UUID must be the one that Transitive recorded for the related invoice. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.