Cost Control
You know what happens when a file overlaps one you have already imported, and how to replace an item deliberately.
Accounting files overlap. A month gets re-issued with corrections, or an export covers a range you have already brought in. The import's fourth step, **Matching**, exists for exactly this.
KOSMA automatically matches data with the same **reference**, **text**, **amount** and **payment date**. This data is not imported again.
So a line identical on those four fields to an item already in the set is recognised and skipped. Importing the same file twice does not double your cost items.
Each line is shown as one of:
| State | What it means | | ------------ | ------------------------------------------------------------- | | **Existing** | already in the set | | **Matched** | this incoming line matched an existing item — not re-imported | | **New** | nothing matched it; it will be added | | **Replaced** | you dropped this line onto an existing item |
Use **Show automatically matched data** to see what was matched rather than only what is new. Worth doing on a re-import: the matched list is your evidence that the overlap was handled.
Matching is exact on those four fields, so a **corrected** line does not match — a re-issued invoice with a different amount arrives as **New** while the original sits there as **Existing**. Left alone you get both.
To make one supersede the other: **drag the new line onto the existing cost item.** It is then marked **Replaced**. If you drop the wrong pair, **Undo replacement** on the row reverses it.
That is the whole answer to "the invoice changed": import, then drag the corrected line onto the one it supersedes, before you finish.
1. **Copy the set first** — offered in step 3, and re-imports are the case it is for. 2. **Tag the import** with its timestamp, so this run can be filtered out again later. 3. **Work through the Matching step** rather than clicking past it. It is the only point at which a replacement can be made. 4. **Afterwards, run Find Duplicates** in the [Cost Item List](/kb/article/work-with-the-cost-item-list). It catches the pairs that differed just enough not to match and that nobody dragged together.
The risk in a re-import is not duplication of *identical* lines — that is handled. It is the near-miss: a corrected amount, a payment date that moved, a reference the accountant retyped. Those arrive as new items and both count.
Find Duplicates and the timestamp tag are the two tools for finding them again.
Markdown