skills/vendix-auto-entries/SKILL.md
Automatic journal entry system: event-driven accounting, AutoEntryService, AccountingEventsListener, account mapping cascade, and mapping-key sync. Trigger: When adding automatic accounting flows, modifying auto-entry logic, adding mapping keys, or debugging missing journal entries.
npx skillsauth add rzyfront/vendix vendix-auto-entriesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
apps/backend/src/domains/store/accounting/auto-entries/auto-entry.service.tsapps/backend/src/domains/store/accounting/auto-entries/accounting-events.listener.tsapps/backend/src/domains/store/accounting/account-mappings/account-mapping.service.tsapps/backend/prisma/seeds/default-account-mappings.seed.tsapps/frontend/src/app/private/modules/store/accounting/components/account-mappings/account-mappings.component.tsDomain service emits an EventEmitter2 event after business success. AccountingEventsListener catches the event, normalizes amounts with Number(), and calls AutoEntryService. AutoEntryService resolves mapping keys, validates balance/account/fiscal period, then creates posted accounting entries.
Accounting failures are logged in listeners and must not roll back the already-completed business transaction.
AccountMappingService.getMapping(org_id, mapping_key, store_id?) resolves:
accounting_account_mappings.DEFAULT_ACCOUNT_MAPPINGS fallback in code.Mapping key convention: {event}.{account_role}. Cost-center variants use {event}.{role}.{cost_center}.
invoice.validatedpayment.receivedcredit_sale.createdexpense.approvedexpense.paidpayroll.approvedpayroll.paidorder.completedrefund.completedpurchase_order.receivedpurchase_order.paymentinventory.adjustedlayaway.payment_receivedlayaway.completedinstallment_payment.receivedsettlement.paiddepreciation.posteddisposal.fixed_assetwithholding.appliedstock_transfer.completedcash_register.openedcash_register.closedcash_register.movementar.written_offap.payment_registeredap.written_offcommission.calculatedwallet.creditedwallet.debitedexpense.refundedexpense.cancelledaccounting.saas_subscription_payment.succeededintercompany_transfer.shipped and intercompany_transfer.received are generated internally from stock_transfer.completed when fiscal scope is STORE and source/destination stores differ.0.001.entry_date.chart_of_accounts for the organization.AE-{YEAR}-{000001} per organization/year.vendix-accounting-rules.DEFAULT_ACCOUNT_MAPPINGS in account-mapping.service.ts.MAPPING_DEFAULTS in default-account-mappings.seed.ts.account-mappings.component.ts.AutoEntryService.onXxx() handler and ensure lines balance.accounting_entry_type_enum mapping in createAutoEntry().@OnEvent() listener with try/catch and numeric normalization.When operating_scope=ORGANIZATION and fiscal_scope=STORE, a cross-store stock transfer is operationally allowed but fiscally intercompany. The stock_transfer.completed listener calls AutoEntryService.onStockTransferCompleted(), which branches to intercompany handling through FiscalScopeService.isIntercompanyTransfer().
Required mapping keys:
intercompany_transfer.shipped.receivable — debit CxC vinculados, default PUC 1365.intercompany_transfer.shipped.inventory — credit inventory from source store, default PUC 1435.intercompany_transfer.received.inventory — debit inventory in destination store, default PUC 1435.intercompany_transfer.received.payable — credit CxP vinculados, default PUC 2355.Rules:
intercompany_transactions with origin='stock_transfer', source_type='stock_transfer', and source_id=transfer_id.DEFAULT_ACCOUNT_MAPPINGS, default-account-mappings.seed.ts, and frontend labels are not fully aligned. When adding or debugging mappings, check all three files. Some SaaS and wallet/AP/AR keys exist in one source but not another.
Failed to create auto-entry.organization_id is present and a fiscal period is open.chart_of_accounts.(source_type, source_id).vendix-accounting-rulesvendix-prisma-migrationsvendix-prisma-seedvendix-backenddevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.