Developer
Example
Difficulty level: Intermediate
Beheer > Integraties > AFAS > Mapping

The AFAS integration does not look up the AFAS article or revenue account per room or per option, but per ledger code. That is the code you enter in i-Reserve on the object or the option in the Account code field. The number of rows in your mapping therefore equals the number of different ledger codes you use — not the number of rooms or options.

How an invoice line travels to AFAS

  1. You set an Account code on an object or option, for example 8010.
  2. When that object or option is booked, the invoice line carries that code.
  3. When sending to AFAS, the integration looks up the mapping row with that code as its key.
  4. The value of that mapping row goes to AFAS. What that value is depends on the invoice mode (see the table).
  5. No mapping row found? Then the line falls back to the integration's default value.

Which mapping per invoice mode

Invoice modeMappingBecomes in AFASWithout a mapping row
FiEntries (incl VAT) / FiEntries (excl VAT)articlemappingRevenue (ledger) account on the journal entryDefault revenue account
Direct Invoice (FbDirectInvoice)itemmappingAFAS articleDefault article code
Invoices (KnSalesInvoice)articlemappingAFAS articleNo default: the line is sent without an article

Note: in Direct Invoice mode articlemapping is not used, only itemmapping. The mappings for cost centre (costcentermapping) and project (projectmapping) work the same way: they are also keyed on the ledger code.

Example 1: rooms with their own options

A conference centre has 10 rooms. Each room has 20 options: coffee, lunch, projector, flip chart, and so on. That is 200 options. If every option gets its own ledger code, you need 200 mapping rows. There is no need for that.

Instead, give all options of the same kind the same ledger code:

In i-ReserveAccount code
All 10 rooms (room hire)8000
Catering options in all rooms (coffee, lunch, drinks)8010
AV options in all rooms (projector, microphone, screen)8020
Other options (flip chart, cloakroom)8030

The mapping in the AFAS integration then needs only 4 rows, for example in Direct Invoice mode:

MappingKey (i-Reserve ledger code)Value (AFAS article)
itemmapping8000ROOMHIRE
itemmapping8010CATERING
itemmapping8020AV
itemmapping8030OTHER

In a FiEntries mode you enter the same keys under articlemapping, with the AFAS revenue account as the value.

Example 2: generic options

A generic option is created once and then applies to all objects. It is one option with one ledger code. However often and in whichever room it is booked, the invoice line always carries the same code, so you need one mapping row for it.

Example: the generic option Coffee & tea has account code 8010. Whether it is booked in room 1 or room 10, AFAS always receives the same article through the row 8010 → CATERING.

Tip: have you created the same option (the same coffee, the same projector) separately for each room? Turn it into a generic option. That saves maintenance outside AFAS too: you change a price in one place.

Example 3: a cost centre per room

Do you want to see the revenue per room on its own cost centre in AFAS? costcentermapping is also keyed on the ledger code. Each room then needs its own code, for example 8000-01 to 8000-10. That gives 10 rows for room hire (in the article and the cost centre mapping). The options can stay grouped by kind, as in example 1.

So first decide which level of detail you want to see in AFAS, and choose your ledger codes in i-Reserve at exactly that level.

Defaults and pitfalls

  • Same code in i-Reserve and AFAS? You still need a mapping row, for example 8010 → 8010. Without a mapping row, AFAS does not receive the i-Reserve code but the default value.
  • Option without an account code? The invoice line then falls back straight to the Default revenue account (FiEntries) or the Default article code (Direct Invoice).
  • Everything to the same AFAS article? Then you need no mapping at all: just fill in the Default article code.
  • Discounts have their own ledger code. Remember to add it to the mapping if discounts must go to a different article or account.

See also: AFAS invoicing: invoice modes and payment bookings.