System oprettede finansposteringer
Forfatter:
Dato:
Formål #
Her følger en teknisk gennemgang af, hvordan Sapera automatisk genererer finansposteringer.
Sapera genererer automatisk finansposteringer, f.eks. når en faktura bogføres eller en dagsafslutning fra kassen udføres. De posteringer, der genereres automatisk, er markeret med et “ErSystem” flag, og de kan IKKE slettes eller ændres.
Selvfølgelig kan de ikke slettes/ændres efter at de er blevet bogført – dette gælder både for manuelle og automatiske posteringer. Automatiske posteringer kan imidlertid ende i en posteringskladde, der er indstillet til IKKE at bogføre automatisk, f.eks. når en faktura bogføres. Dette giver mulighed for, at posteringerne ligger i en posteringskladde, så bogholderen/revisoren kan kontrollere dem. Det er dog ikke muligt for bogholderen eller revisoren at fjerne eller ændre disse posteringer, da de repræsenterer f.eks. et afsluttet salg/web-salg, faktura eller en købsfaktura. Revisoren eller bogholderen kan dog foretage nye korrigerende posteringer, før bilaget bogføres.
Vi anvender udtrykket “bogfør” både for handlingen med at generere kladdeposteringerne (fra fakturaer, købsfakturaer osv.) samt for at bogføre selve posteringskladden. Ofte vil posteringskladderne, som systemet benytter ved genererer, være indstillet til automatisk bogføring. Derfor vil et klik på “bogfør” fra fakturaen medføre, at de genererede posteringer bliver bogført direkte og ikke blot ender i en posteringskladde. Ikke desto mindre understøtter vi, at posteringerne kan ende i en posteringskladde med henblik på gennemgang af revisor/bogholder, før den endelige bogføring foretages. Men som tidligere nævnt kan selv disse kladdeposteringer ikke ændres/slettes.
Følgende gennemgang er beskrivelse af algoritmerne. De tjener til at illustrere algoritmens logik og de trin, der er involveret i generering af finansposteringer i Sapera-systemet.
Algoritmerne er afhængige af opsætningen af følgende emner:
- Finansopsætning
- Konti
- Momstyper
- Indbetalingsmuligheder
- Udbetalingsmuligheder
- Produktkategorier
- Produktindstillinger
- Kortudstedere (betalingskort)
- Organisatoriskenheder
- Betalingsbetingelser
- Kundekategorier
- Leverandørkategorier
- Indstillinger
– Lager
– Købsfaktura
Algoritmer #
Følgende felter benyttes fra finansopsætning
[Standard kundekonto]
[Standard leverandørkonto]
[Konto til automatisk registrering af faktura betaling] – hvis tom benyttes [standard bankkonto]
[Standard bankkonto]
[Standard kontantkonto]
[Automatisk udlign faktura]
[Afrundningskonto]
[Standard indbetalingsmulighed]
[Standard tilgodeseddelkonto]
[Lager justeringskonto]
[Årets resultat konto]
Indstillinger:
[Er lager modul aktiveret] – defineret under indstilling – Lager
[Opret ikke lagerposteringer] – defined under indstilling – Købsfaktura
Fra produktkategori benyttes:
[Er auto bogføring af lager tilladt]
[Lager tilgangskonto]
[Brugt tilgangskonto]
[Lager afgangskonto]
[Brugt afgangskonto]
[Vareforbrugskonto]
[Brugt vareforbrugskonto]
[Rabatkonto]
Fra produktindstillinger benyttes:
[Type] – mulige værdier er Lager, Ydelse, Sammensat og Samlet. Kun ydelsesprodukter understøtter ikke lagertransaktioner (de genererer dog skygge transaktioner).
Fra indbetalingsmuligheder benytes:
[Indbetalingsmulighed – finanskonto]
Credit card issuer properties:
[credit card issuer account]
Invoice
Invoice properties:
[organizational unit]
[debtor account] – account set in debtor preferences for [organizational unit] or [default debtor account]
Each invoice item has/can have following properties:
[quantity]
– product from inventory set on the line.
[location] – product location that has [organizational unit] set.
[category] – product has product category, most settings on category depends on [organizational unit].
[instance] *optional – concrete product instance set on the line.
[used] *optional – represents if instance is sold/bought back as used or new.
[sales account] – taken from product category or selected manually by user.
[exempt vat] – if set on item then VAT is 0%.
[VAT type] – taken from [sales account], but if [exempt vat] is set – no VAT type is used for item.
[amount before discount] – item price multiplied by item quantity.
[discount amount] – amount of discount provided on item automatically or manually.
[amount] – [amount before discount] minus [discount]
[item stock subtraction account] – depending on [used] it is either [subtraction account] or [used subtraction account] from category.
[item cost of sales account] – depending on [used] it is either [cost of sales account] or [used cost of sales account] from category.
[is cost only] – flag on item that means that system should book only cost value of item.
[contra account] *optional
[contra customer] *optional
[cost price] – average cost price of stock entries related to the item in stock appendix.
[cost amount] – [cost price] * [quantity]
[instance costs] – item can represent cost added to instance, so if cost is added after instance is sold, we book cost selling as part of booking of current invoice as if we sell that cost at same moment.
[instance purchase] – item represents purchase of [instance]
[should book stock consumption] – system should book stock consumption entries for item. It is true if [is stock used] and [is auto book stock allowed] is set,
supports stock, not a [instance purchase], not [is cost only][has used vat] – is true when [instance purchase] is false, [used] is true, [exempt vat] is false, item has [instance]
[used vat account] – defined on [VAT type]
[used vat rate] – defined on [VAT type]
[instance purchase price]
[used vat base] – difference between [amount] and [instance purchase price]
[used vat amount] – [used vat rate] out of [used vat base]
EPay payment properties:
[payment amount]
Stock adjustments:
[adjustment amount] – in case cost price of stock entry related to invoice item changes, system books that diff. It can happen durring delivery on stock or manual changes on stock entry.
For each line system generates:
Step | What is generated | |
1 | Normal case
If used vat applies
| [is cost only] is set
|
2 |
| |
3 | if [settle invoices automatically] is set
| |
4 | if [should book stock consumption]
| |
5 | if [instance costs] is added after instance is sold
| |
6 | In case of EPay payment
| |
7 | In case of stock adjustment
|
Aggregation rules: line’s financial entries will be aggregated with other lines’ entries except if the line has [instance] or has property “Book standalone” set to true.
Purchase invoice
Purchase invoice properties:
[organizational unit]
[creditor account] – account set in creditor preferences for [organizational unit] or [default supplier account]
[loading and discounts]
[expected total]
[total]
[payment type] – can be FIK, Account, Cash, ManualBankPayment
[should book automatic payment] – if [payment type] is Cash, ManualBankPayment
[automatic payment account] – has value in case [should book automatic payment]. In case of Cash it is [cash default account], in case of ManualBankPayment [bank default account]
Each purchase invoice item has/can have following properties:
[quantity]
– product from inventory set on the line.
[location] – product location that has [organizational unit] set.
[category] – product has product category, most settings on category depends on [organizational unit].
[instance] *optional – concrete product instance set on the line.
[exempt vat] – if set on item then VAT is 0%.
[item loading and discounts part] – part of [loading and discounts] that are distributed among items of purchase invoice.
[expected total difference] – part of difference between [expected total] and [total]
[amount with VAT] – item price multiplied by item quantity + VAT percent on top + [item loading and discounts part]
[amount without VAT] – [amount with VAT] excluding VAT percent.
[contra account] *optional
[stock account] – in all cases is [stock addition account]
[item cost of sales account]
[manual stock adjustment account] – account entered on making an item credit note
Stock adjustment and difference between negative line price and stock entry price:
[cost price adjustment] – diff between price on purchase item and real cost price on stock entry
[item stock adjustment account] – either [manual stock adjustment account] or [stock adjustment account] or [item cost of sales account]
Accounting generation:
Step | What is generated |
1 | For each line in purchase invoice:
|
2 | If [expected total] is not equal to [total]
|
3 | If [is stock used] and not [purchase invoice, skip stock booking] and [instance costs] is added after instance is sold:
|
4 | If [should book automatic payment]
|
5 |
|
Outgoing payment
[creditor account] – account set in creditor preferences for [organizational unit] or [default supplier account]
Purchase invoice properties:
[amount] – total of purchase invoice
Manual entry:
[amount] – amount of manual entry source
For each purchase invoice or manual entry system generates:
Step | What is generated |
1 |
|
Settlement
Sale properties:
[global discount]
Sale item properties:
[organizational unit]
[debtor account] – account set in debtor preferences for [organizational unit] or [default debtor account]
[sales account] – taken from product category
[amount before discount] – item price multiplied by item quantity.
[discount amount] – amount of discount provided on item automatically or manually.
[amount] – [amount before discount] minus [discount]
[instance] *optional – concrete product instance set on the line.
[used] *optional – represents if instance is sold/bought back as used or new.
[VAT type] – taken from [sales account]
[used vat account] – defined on [VAT type]
[used vat rate] – defined on [VAT type]
[instance purchase price]
[used vat base] – difference between [amount] and [instance purchase price]
[used vat amount] – [used vat rate] out of [used vat base]
[item global discount part] – item part of [global discount]
[item stock subtraction account] – depending on [used] it is either [subtraction account] or [used subtraction account] from category.
[item cost of sales account] – depending on [used] it is either [cost of sales account] or [used cost of sales account] from category.
[cost price] – average cost price of stock entries related to the item in stock appendix.
[cost amount] – [cost price] * [quantity]
Regular payments properties:
[payment amount]
[payment type] – options: Cash, CreditCard, MobilePay, DebtorAccount, GiftCard, RefundCoupon, ForeignCurrency, Voucher, NotIntegrated, LoyaltyPoints
[incoming payment option] – couple
[payment account] – either [incoming payment option account] or [credit card issuer account] for CreditCard [payment type]
Specific payments properties:
[specific payment amount]
[specific payment type] – options: CashBack, Rounding, DebtorAccountMoneyBack, RefundCouponIssuing
[specific payment account] – by [specific payment type]: CashBack – account of [default cash payment option], Rounding – [rounding account], DebtorAccountMoneyBack – [debtor account], RefundCouponIssuing – [refund account]
Stock adjustments:
[adjustment amount] – in case cost price of stock entry related to invoice item changes, system books that diff. It can happen durring delivery on stock or manual changes on stock entry.
For each sale system generates:
Step | What is generated | |
1 | For each sale item:
If used vat applies
| |
2 | For each return item
If used vat applies
| |
3 | For each regular payments: | |
If [payment type] is not DebtorAccount
| If [payment type] is DebtorAccount
| |
4 | For each specific payment:
| |
5 | In case of stock adjustment
|
Stock draft
Stock draft properties:
[generate accounting entries] – if system should book accounting on booking stock draft entries.
Stock entry:
[quantity]
– product from inventory set on the line.
[instance] *optional – concrete product instance set on the line.
[used] *optional – represents if instance is sold/bought back as used or new.
[item stock subtraction account] – depending on [used] it is either [subtraction account] or [used subtraction account] from category.
[item stock addition account] – depending on [used] it is either [addition account] or [used addition account] from category.
[item stock account] – depending on [quantity] it is either [item stock addition account] for positive value or [item stock subtraction account] for negative.
[item cost of sales account] – depending on [used] it is either [cost of sales account] or [used cost of sales account] from category.
[cost amount] – [cost price] * [quantity]
For each stock entry in scope of draft with [generate accounting entries] option system generates:
Step | What is generated | |
1 |
|
Stock transfer
Stock transfer draft properties:
[book accounting] – if system should book accounting on processing transfer.
Stock transfer entry properties:
[quantity]
[cost price]
[sales price]
[organizational unit]
[supplier]
[customer]
[use sales price] – on booking accounting
[item accounting price] – system uses [cost price], but if [use sales price] then it uses [sales price]
– product from inventory set on the line.
[instance] *optional – concrete product instance set on the line.
[used] *optional – represents if instance is sold/bought back as used or new.
[item stock subtraction account] – depending on [used] it is either [subtraction account] or [used subtraction account] from category.
[item stock addition account] – depending on [used] it is either [addition account] or [used addition account] from category.
[item cost of sales account] – depending on [used] it is either [cost of sales account] or [used cost of sales account] from category.
[item sales account] – depending on [used] it is either [sales account] or [used sales account] from category.
[cost amount to book] – [item accounting price] * [quantity]
[sales amount to book] – [sales price] * [quantity]
[creditor account] – account set in creditor preferences for [supplier] on [organizational unit] or [default supplier account]
[debtor account] – account set in debtor preferences for debtor on [organizational unit] or [default debtor account]
For each stock transfer entry in scope of draft with [book accounting] option system generates:
Step | What is generated | |
1 | If [quantity] is greater than 0
| If [quantity] is less than 0
|
End of year
Account properties:
[type]
[closing account]
[organizational unit]
[actor]
[pending amount] – sum of entries grouped by [organizational unit] and [actor]
[actual closing account] – either [closing account] if filled or [yearly result account]
For each account with [pending amount] not equal 0 system generates:
Step | What is generated | |
1 | For Profit And Loss account:
| For Balance Sheet account
|
VAT booking of draft entry
Draft entry could have a [VAT type]. So when it is booked the following financial entries are generated.
Draft entry properties:
[VAT type rate] – rate is defined on VAT type and is 0% if no VAT type is defined on the entry
[amount]
[account]
[VAT type account] – account defined on VAT type
[VAT amount] – calculated by formula
[amount] / (100% + [VAT type rate]) * [VAT type rate]
[amount without VAT] –
[amount] - [VAT amount]
[EU VAT type rate] – EU rate is defined on VAT type
[EU VAT amount] –
[amount] * [EU VAT type rate]
[EU VAT incoming account]
[EU VAT reverse account]
Step | What is generated | |
1 | if [vat type rate] is empty system creates
| if [vat type rate] is not empty system creates
|
2 | if [EU VAT type rate] is not empty
|

Troels var med på Cloud Retail Systems-rejsen helt fra begyndelsen i 2016. Han er udviklingschef og partner hos CRS, hvor hans ansvarsområder bla. består i udvikling af Sapera.