Finance background jobs – behaviour and tables
Steps and tables of the posting, exchange rate, average rate, integrity, recovery fee, interest, pass-through, subscription and QUiCK job types.
Overview
The finance jobs call the same shared entry points as the manual buttons; they create invoices only through finance/invoice::addInvoice().
Job types
| Type | Behaviour | Tables |
|---|---|---|
contir_general (hourly) | contir->runGeneralAuto(30): automatic posting of at most 30 unposted "general" invoices (rebuild, debit = credit match, total and coverage validation, status=3) | contir_entrie, entry, entry_item, contir_rule |
fxrate_sync (13:00) | currencies from the configured currencies (without HUF) plus EUR and USD always; window yesterday–today, with a backlog from the day before the last MNB day (max 30 days); dlbtfxrate->syncRange(from, to, currencies, 'MNB') | exchange_rate |
avgrate_daily (03:00) | with the admin transaction, invoice, bank account and cash register models, recalcAvgRateChain() for every non-HUF bank account and active foreign currency cash register (as the manual button; closed periods are not written) | transaction, invoice, bankaccount, cash register master |
integrity_check (hourly :07, or one check from a template with check_code) | getDueChecks() of the report/integrity model (template-scheduled ones are skipped) or getCheckByCode(); run([code], scope, 'cron', 0); discrepancies (max 200 rows) into the details and a warning log; for a scheduled list a result e-mail only on discrepancy or error | tables of the check |
recovery_fee (hourly :10) | finance/recovery::processForCronqueue(): first revoke fee documents without legal basis (revokeUnjustified(500), never deletes settled ones), then overdue open customer invoices (max 200, only partners with recovery_fee_auto, a removed document is not brought back); per invoice a EUR document at the MNB rate of the first day of delay, ATK tax code, addInvoice() + addInvoiceData(), total from the items; optional PDF; notification only if something happened | invoice, invoice_item, invoice_data, transaction_settlement, transaction_item, compensation_item |
interest_doc (hourly :15, or queued from the screen for one client) | finance/interestdoc::processForCronqueue(company_id): (1) revoke documents without legal basis, (2) finalise documents under calculation (finaliseDoc; for settled principal with the actual settlement dates) or refresh them (max 400), check final but deviating documents, (3) issue for overdue invoices without a document yet; arithmetic in the dlbtinterest library; requires a live recovery fee document | interest_period, interest_rule, invoice, invoice_correction, transaction_settlement, transaction_item, compensation_item |
contract_passthrough_scan (every 2 minutes) | contract/passthrough::processScanForCronqueue(): active pass-through leases; matches incoming cost invoices to the property through the label connector (value_norm); for each new match a scheduled dedup row and a contract_passthrough job; issues no invoice | contract, contract_passthrough, property, label, label_link, invoice |
contract_passthrough (dispatch only) | from scheduled rows (max 50) a draft (status=0) outgoing invoice to the tenant with the contract's mark-up and the source invoice's items, addInvoice() + addInvoiceData(); on error markError; with automatic invoice PDF switched on, a PDF into the issuer's customer invoice Drive folder, linked to the invoice. Manual test: contract/passthrough::run (cron secret) | as above |
subscription_lifecycle (00:20) | dlbtpayment->runLifecycle() (expired trial and cancellation → expired; charge → active or past_due; renewal; cancellation at period end; warning before expiry; long unpaid → suspended), then dlbtbilling->applyPendingPlans() and invoiceMonthlyUsage() | tables of the payment and billing libraries |
quick_invoice (03:45) | clients with a QUiCK API key; per client dlbtquickimport->run(client_id, last 35 days, 0, true) — the same engine as the manual button; dedup on invoice number; one client's error does not stop the others | company_auth, invoice |
quick_image (04:00, +5 min if candidates remain) | masterdata/quickimage::runDaily(): fetchForInvoice() for QUiCK invoices without an image, attempt counter; report with candidate, attached, no image and error counts | invoice, doc_link, company_auth |