Files
accounted/scripts/.skill-body-manifest.json
T
Mattsson cb3ef45f14 feat(assets): atomic asset disposal workflow (avyttring, utrangering, verksamhetsoverlatelse) (#1391)
* feat(assets): atomic asset disposal workflow (avyttring, utrangering, verksamhetsoverlatelse)

Disposal books depreciation to the disposal date, clears cost and
accumulated depreciation, books gain (3973) or loss (7973), applies
output VAT on third-party sales, honors the ML 5 kap. 38 §
verksamhetsoverlatelse exemption, and recalculates ML 15 kap. jamkning
server-side from tax years and original input VAT. The voucher, the
disposal-date depreciation schedule and the immutable register state
commit in one dedicated commit_asset_disposal RPC transaction that
delegates voucher numbering to commit_journal_entry.

Fixes #325

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(assets): harden disposal per review and pg-real findings

- commit_asset_disposal now uses the NULL-safe caller_is_company_member()
  guard (tenant-guard ratchet) and passes the allowed 'user_accept'
  commit_method instead of the unlisted 'asset_disposal' value
- disposal metadata invariants validated in the RPC (non-negative
  proceeds/VAT, VAT requires a treatment, VAT <= gross, scrap carries no
  proceeds) since the RPC is independently callable
- new FK and CHECK constraints added NOT VALID + VALIDATE CONSTRAINT so
  the migration never blocks writes on the hot journal_entries table
- disposeAsset paginates fiscal periods and depreciation schedules with
  fetchAllRows; jamkning_remaining_years keeps a valid 0 (?? not ||)
- engine imports shared AssetDisposalType/AssetJamkningDirection/
  VatTreatment unions; post-commit reload retries once and logs before
  surfacing, so a transient read cannot masquerade as a failed disposal
- dispose page parses Swedish-formatted amounts (125 000,50) and blocks
  submission on unparseable proceeds
- assets pg tests write disposal attributes in the disposal transition
  itself and gain a regression test that the register is frozen after

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 09:59:52 +02:00

435 lines
16 KiB
JSON

{
"horizontal/swedish-accounting-compliance": {
"hash": "2f04bdd94e9523ef25cff4530cf8b24c6f153dee437bb54d1befacbfdabe5305",
"version": 4
},
"horizontal/swedish-accounting-compliance/bas-kontoplan": {
"hash": "0d1b05466568344be0afd4b360d582db23331ae4f1b4b05681cc92c50d099bdb",
"version": 2
},
"horizontal/swedish-accounting-compliance/bfl-bfnar": {
"hash": "676a6dac3ed2b5104c42d59f1e7d7a591498a5ad175192a8e24f83b3e1700c83",
"version": 2
},
"horizontal/swedish-accounting-compliance/changes-2025-2026": {
"hash": "ffc4c5d618bb8840f43fd48c8d4a3e464768e84abdaeb49da016e0051b260964",
"version": 3
},
"horizontal/swedish-accounting-compliance/sie4": {
"hash": "0b73718716d3aab442c25bb0d0fa8057087481fe86f6792e28403dd03fb5af11",
"version": 1
},
"horizontal/swedish-accounting-compliance/skatteverket": {
"hash": "9605f2b56989119b3cac2081a84cc7dbf7bc73e10e40d8648b917b4cff06bacf",
"version": 3
},
"horizontal/swedish-asset-accounting": {
"hash": "790a9d8e712167409b9d626e24f01250df81de26e41e19f4b272db37410dea65",
"version": 4
},
"horizontal/swedish-asset-accounting/accounts-and-registry": {
"hash": "b33d044b36d290aebb3677ae82020e0890aff3664070f2d1ec510f38b63793f4",
"version": 1
},
"horizontal/swedish-asset-accounting/depreciation": {
"hash": "f764c19f11c8613ba5014ca2767ddb1ae2926928e04c3abb43444ba27c286aec",
"version": 1
},
"horizontal/swedish-asset-accounting/leasing-and-disposal": {
"hash": "cefd92341d2946c97ae10f456634a7cf569b7d0eab65d9ca9f8ca7017675f66e",
"version": 2
},
"horizontal/swedish-e-invoicing": {
"hash": "287a9a7d4239de8db25b941345bb9b418e5fcf5b4dd65963c06b68215f54b2ce",
"version": 6
},
"horizontal/swedish-e-invoicing/consumer-and-b2c": {
"hash": "ebcb2c7e888497b61a5b25616314ae620f40d220c93c07a48aa4a49d00ac2068",
"version": 2
},
"horizontal/swedish-e-invoicing/european-mandates": {
"hash": "62e68fed6dff28d411b1fbe3ed60aeb25034bd7ff74e97c0ec16ac8c456076f7",
"version": 2
},
"horizontal/swedish-e-invoicing/implementation-guide": {
"hash": "dd13aa80a8df4f5f44343133d5f885f1f7f1e914d73ffb5924f0296ead151439",
"version": 2
},
"horizontal/swedish-e-invoicing/legal-and-regulatory": {
"hash": "c1a2f945d60264d2b3e088c2d206be1048aa86688957f67c8047f653c8e48755",
"version": 2
},
"horizontal/swedish-e-invoicing/market-provider-pricing": {
"hash": "e9527da2e738cefc32990758f6cbfb5f90e12e911938836dea5a1f6a69e3609b",
"version": 2
},
"horizontal/swedish-e-invoicing/peppol-bis-billing": {
"hash": "71605dec0d6fe35175a2c40492fccdf04bf6dff9e1aa773e24fad449bdabd460",
"version": 1
},
"horizontal/swedish-e-invoicing/peppol-network": {
"hash": "f751c3eac89dddac792e6f7993c2084300c0d70a3e6133cc309e49e9d818b829",
"version": 2
},
"horizontal/swedish-e-invoicing/swedish-cius-and-specifics": {
"hash": "538084e9f20585466adde5aafff03accaa3d7a24c11120014034706c2a01c60d",
"version": 2
},
"horizontal/swedish-financial-reporting": {
"hash": "4fc9d925de42b6a1c4658b960f269f97cf7035cd2041658d17e1883480d9be4b",
"version": 3
},
"horizontal/swedish-financial-reporting/arsredovisning-structure": {
"hash": "ae4789f2e72d8b372aafdf0ff0a0211a871b1dd62be76be836fe3cb66d6fe276",
"version": 1
},
"horizontal/swedish-financial-reporting/bolagsverket-filing": {
"hash": "893fd5c00be8f4c8c4a2cfc4058c071b7821f290f9527240cfba6bccb1760cdc",
"version": 1
},
"horizontal/swedish-financial-reporting/ink2-form-logic": {
"hash": "66b2a41ee2217089af8022c3ca36894a4df727536769ea84f77facb337ebe1d1",
"version": 1
},
"horizontal/swedish-invoice-compliance": {
"hash": "e59a5cad1da2e4d21cdc495939c92f457280020da82e3c3b84ee830c08d72398",
"version": 5
},
"horizontal/swedish-invoice-compliance/invoice-rules": {
"hash": "00f8b5a1e2883595f470216f1200d88481de9dc6aab3520bac7ab4589922a386",
"version": 2
},
"horizontal/swedish-payroll": {
"hash": "8cbedb0245ae1f3a042bc2310d9563424ed58ef9fc6f3e853693844323653faa",
"version": 4
},
"horizontal/swedish-payroll/agi-filing": {
"hash": "91aa490472fafff434088301dd193ed474589b36ae22bdaab640b42bc3b3c255",
"version": 1
},
"horizontal/swedish-payroll/bas-7xxx": {
"hash": "6e7167788b3d2f9442163e29b77e79703bfc3394ff90223d2d9d096554638437",
"version": 1
},
"horizontal/swedish-payroll/benefits": {
"hash": "bb4ead2f45691bc84c09b7433e3b2c719c93b54f702978cfd362b125ae9c8ca2",
"version": 1
},
"horizontal/swedish-payroll/deductions-lonevaxling": {
"hash": "9d05b0e114ed2bc10285a0c304e5f488ee37a4977975336a76c91c1f312f0137",
"version": 1
},
"horizontal/swedish-payroll/f-skatt": {
"hash": "f8d2bd87e76497e7c7e5fbb65de5c77e28f75b603608341a8d8f05f94e8bb974",
"version": 1
},
"horizontal/swedish-payroll/ob-overtime": {
"hash": "4d4e079ae3178ab070ebd696c020d2598352e706430354de0f4bcbfcfcdbc471",
"version": 2
},
"horizontal/swedish-payroll/sick-pay": {
"hash": "ba6b5dbdbb8e00edb9c592aae2185980ca52aa20888434bc5761ca307de712dd",
"version": 1
},
"horizontal/swedish-payroll/social-charges": {
"hash": "f5ea138688fc769581d73575c7ec05b15c97a3c3f30ac698631441ba5ed07e77",
"version": 2
},
"horizontal/swedish-payroll/tax-tables": {
"hash": "7fbd2be587104f26caf18d28e058d6e9ac5ea3fb167a0990650442b1ffccd9b5",
"version": 1
},
"horizontal/swedish-payroll/travel-expenses": {
"hash": "3ed4af7d164d2a3877ded04115081ea5c837b1397c966b40c9e09284c8f4b4bf",
"version": 1
},
"horizontal/swedish-payroll/vacation-pay": {
"hash": "9a29f4e333b51cd85074d8650705d09dfcba42301c61a508a7b0967ee9d4a5e8",
"version": 1
},
"horizontal/swedish-project-accounting": {
"hash": "273e3dcce1d4582264694231668fb4c555379cf5f40e19ebc65b34d8bd284c51",
"version": 3
},
"horizontal/swedish-project-accounting/accounts-and-entries": {
"hash": "16dba1ef3553d06dcd34bbb7d95c34f4af1738222fb08145f2ed511d176b1b89",
"version": 1
},
"horizontal/swedish-project-accounting/implementation-patterns": {
"hash": "db59db720c4df2eaacbdcd0b3f36e02172f3763ac6949865123ac29db7966c3b",
"version": 1
},
"horizontal/swedish-project-accounting/k2-k3-revenue-recognition": {
"hash": "6065ee97e019543b89dc42ee422ea3139d6dd84097b882c353423bfb3b25094e",
"version": 1
},
"horizontal/swedish-project-accounting/sie4-project-dimensions": {
"hash": "b92b0c58ee793c15abb46ed81f2fbd47abdbecbc3f0ffe986d19e7331c373e94",
"version": 1
},
"horizontal/swedish-project-accounting/tax-and-grants": {
"hash": "b43e2655a415ad59ebd5b87e8e505adf80b821bc96487fac9e542eaa2cdfbdad",
"version": 1
},
"horizontal/swedish-sie-import-export": {
"hash": "6d003ee8c3439058f60c63ff5f2ca153cf6c1b6657bda56754352a6d409bd831",
"version": 3
},
"horizontal/swedish-sie-import-export/bas-sru": {
"hash": "7fb1f664b69f5cce897938115d730d00e736d81b6216b6aa13990fc3db95259a",
"version": 2
},
"horizontal/swedish-sie-import-export/encoding": {
"hash": "eaa520fe47638fd521d27d0f9d6315d5c15f47eed2b4df408c9e9addba10c7d8",
"version": 1
},
"horizontal/swedish-sie-import-export/record-types": {
"hash": "1a83c6c67eea2476bef8c13e1d96e4817b9313b2566ca4a1c91456975087e84e",
"version": 1
},
"horizontal/swedish-sie-import-export/validation-rules": {
"hash": "8b08c3d09757fe261bbab469e8d30cb51b960f423d57ada622cadd17a92c9598",
"version": 1
},
"horizontal/swedish-sru-filing": {
"hash": "5a8f288a668b8c67f6f77986d45ceb1921fe483c8d1c00a28039a8fb89f584c4",
"version": 5
},
"horizontal/swedish-sru-filing/sru-codes": {
"hash": "90b588d78894bc7c546c5bff42c1c43a339c21db4efd51f8b4a0930e2609db83",
"version": 2
},
"horizontal/swedish-tax-planning": {
"hash": "99b87fac9eacf0ad168434c2bce99f21cdb8a53cb26ccabb64ba291b9059aa24",
"version": 3
},
"horizontal/swedish-tax-planning/312-regler": {
"hash": "f6fd1e6edb45cc31ec990586b08f9e68aa09be15b6e072874c0770bde941a649",
"version": 1
},
"horizontal/swedish-tax-planning/kapitalforsakring": {
"hash": "3119126a58c9c3729d34303cb5f36c27c75e664e5048544fea2e24a6ac71d3fd",
"version": 1
},
"horizontal/swedish-tax-planning/koncernbidrag": {
"hash": "a3870a1cdec023285cb7b6939dab1f31034c878c9dc9b986c737fc7a6852f14a",
"version": 1
},
"horizontal/swedish-tax-planning/overavskrivningar": {
"hash": "77b6f5219e5313c027684271552d799fba8156e6665a9ff16def93ba6caac6de",
"version": 1
},
"horizontal/swedish-tax-planning/periodiseringsfond": {
"hash": "b76ea9e0127040855f722e756ee2bbf4018821c1b8d93496cc2225a09c1a1f38",
"version": 1
},
"horizontal/swedish-tax-planning/ranteavdragsbegransningar": {
"hash": "b34bd57865b790dfa9a8165b04bac06549d197c18fac56894dc4e7fad22745a7",
"version": 1
},
"horizontal/swedish-tax-planning/strategy-and-interactions": {
"hash": "58f4e825c927998b60a7ef47ec9f75ea58bf801727b6c621662cda6654773019",
"version": 1
},
"horizontal/swedish-vat": {
"hash": "e0b55b8c5fafa4dd6bb28f71616637470c72f31df2cb7f8894bfbc40f49bf578",
"version": 3
},
"horizontal/swedish-vat/vat-compliance-reference": {
"hash": "12cf0d3b485b506dc52ad44a251e1c4507948ad3378cd70210ef972b9f482c87",
"version": 1
},
"horizontal/swedish-year-end-closing": {
"hash": "ec90a8ecb3b36379350c7d7ae4e93bb50197d41a38a4c2091538320e59fc83b9",
"version": 3
},
"horizontal/swedish-year-end-closing/closing-process": {
"hash": "bce8e129860dd26c04e5e406dc9312e2d42dea6aa8c0139f168de43529abf939",
"version": 2
},
"horizontal/swedish-year-end-closing/journal-entries": {
"hash": "acd171ade0305bcbb4142e0f9817482f845dc6e1b3620a62eb36b6e8eef6110a",
"version": 2
},
"horizontal/swedish-year-end-closing/k2-vs-k3": {
"hash": "e3fa066d0e1fe4284661df669736241daf05e08599f893b40f5a6f94722d0bce",
"version": 2
},
"horizontal/swedish-year-end-closing/legal-framework": {
"hash": "7624ca77cc9c5fe1830ea6dad2bba52b563238b44414c3cddbece651293ef144",
"version": 2
},
"horizontal/swedish-year-end-closing/pitfalls-and-rates": {
"hash": "2f68d58b2ccf25853452327d7c4e62793e2463f9e0213499e138bdec6bcbc23e",
"version": 2
},
"horizontal/swedish-year-end-closing/reporting-and-filing": {
"hash": "80673a4262cab034451d4daf69ce629cc8a5a1544240cea66afe858fef7526e8",
"version": 2
},
"horizontal/swedish-year-end-closing/tax-calculations": {
"hash": "522dcbc3dcb223482c7fc0cff307e921efcbbc19fa849b99d5e540fbb366e8f6",
"version": 2
},
"modifier/holding-ab": {
"hash": "b8426f432969cf23d10dbe169227d7f8c0b2bbc19f8e8d1a2f3b511fcb25ecbd",
"version": 3
},
"modifier/holding-ab/312-holding": {
"hash": "0df3e7cda2c612c4b9a91e4f5751b16c1567ea9d8628701757eb3756abe83228",
"version": 2
},
"modifier/holding-ab/aktieagartillskott": {
"hash": "96979e5d66f91aca5eee84f19a9370e656c0817796c7d33704423af96f5b3f3a",
"version": 2
},
"modifier/holding-ab/koncernbidrag": {
"hash": "f692b7a0aabe18ca25330acace7b889fcc1a303d928189b2ecdd5110e8e87097",
"version": 2
},
"modifier/holding-ab/kupongskatt-cfc": {
"hash": "e61b29e6be5e77bf0cf48937d3e5a03c9702c0945b69e6065ef83c27e61104ea",
"version": 2
},
"modifier/holding-ab/moms-holdingbolag": {
"hash": "9da07121d466834835b3ed8d5d8ad89c21df38dc89d07832e2337cfacd93b4cd",
"version": 2
},
"modifier/holding-ab/naringsbetingade-andelar": {
"hash": "8d1bb3b9ea02f3a04ca27c8ee7f3c40051255eb4b7fa72918df08a65b16ff97c",
"version": 2
},
"modifier/holding-ab/omstrukturering": {
"hash": "f9f52e8343809f1382e6aaf9882d1ca478cdaa38472c9d53b1b1410c76e26285",
"version": 2
},
"modifier/holding-ab/ranteavdrag": {
"hash": "b240d994a88daa13db9e0a8961ee6ddac57d5fb171b84fda6857c9b6ff85858b",
"version": 2
},
"modifier/mixed-verksamhet": {
"hash": "da6405e557094a7462139a586e3f6a40ccdcaed380990b19230a64a658788cc0",
"version": 3
},
"modifier/mixed-verksamhet/fordelningsnyckel-metoder": {
"hash": "5ca417bc9cbdc1fd3286061f94c3b485b417660beb2910e3fbc23280aa582cb9",
"version": 2
},
"modifier/mixed-verksamhet/frivillig-skattskyldighet-fastighet": {
"hash": "a5db6de348099214497f3c8c782dca57f5cdbc0ecf7c83e5b2cf467be3ca9c3d",
"version": 2
},
"modifier/mixed-verksamhet/holdingbolag-avdragsratt": {
"hash": "21151fb4bcb173e01183e74ca49b62d8774afdb424cae9481c75b1f8275cac39",
"version": 2
},
"modifier/mixed-verksamhet/jamkning-mechanics": {
"hash": "f2d39dd682adcc00f07ec0ee3336a17329883fa973ab096d148e7f2d30c3b723",
"version": 2
},
"modifier/single-shareholder-ab-fmb": {
"hash": "ccf0cb583c7f4ae58801f1e1bc58f2ed78c1d78febd979d882c565534b3e167d",
"version": 4
},
"vertical/bygg-hantverk": {
"hash": "fe046e23d98a4ff6ae35df0e0023ccf9168aa8dc63376b569402a026bb6d9f4a",
"version": 3
},
"vertical/bygg-hantverk/kollektivavtal": {
"hash": "8df2ea51abfc0323bb5cb15fc80f8319d53dface71823e680be3ad818d8e8e4f",
"version": 2
},
"vertical/bygg-hantverk/momsregler": {
"hash": "06d8415d93d25b011d0ebc142652b89c78a71fb204c0b79e5c3a9b32caa02b02",
"version": 2
},
"vertical/bygg-hantverk/pagaende-arbeten": {
"hash": "34fb23d739320cf5751b9a6d62f4346eb5bce2ca8006c5273af003144600d48f",
"version": 2
},
"vertical/bygg-hantverk/praxis": {
"hash": "0205bba6b1ba205c6df8ff557b1d4962e672dac7f07cc8eb7bceb379a2c48b7f",
"version": 2
},
"vertical/bygg-hantverk/rot-faktura-exempel": {
"hash": "9007433f888d8924370a5064eb7f2cef77c2c5c4fdc994cc9c78622a1f31b9d0",
"version": 2
},
"vertical/e-handel": {
"hash": "d1f7fc4c6e9870c2b8112800b85e10057b396a8972c153f3a84a3762343d4adc",
"version": 3
},
"vertical/e-handel/dac7-rapportering": {
"hash": "3ef510c39c1a1f1218e926ca141f0756557f32d7657c5e80846ed7ea5393e0dc",
"version": 2
},
"vertical/e-handel/dropshipping-kedjetransaktioner": {
"hash": "8a449c781bc908dd06524b8f4d337bec2d1cd1693a026bd8dbe8fbde711d2f9e",
"version": 2
},
"vertical/e-handel/kollektivavtal-lager-e-handel": {
"hash": "3130e2f3d04f89b2f55bb9b6af9d6e006d7b97ca8d47a661574911b7ccadca52",
"version": 2
},
"vertical/e-handel/konsumentratt": {
"hash": "66c91b4d36af7ed04f3adc6e9c1ea58cde561a2c223e50120cab8d0716ae3ff8",
"version": 2
},
"vertical/e-handel/marketplace-deemed-supplier": {
"hash": "41f683310ba98d4914f318d3e8b6c99a6f2cc393c9296ab9c4658bd5199c0132",
"version": 2
},
"vertical/e-handel/oss-ioss-mekanik": {
"hash": "94521265f9058f657e9f2f8c02ba129238e2067c1a3691465f75df814a71a655",
"version": 2
},
"vertical/e-handel/payment-providers": {
"hash": "52854656bcde98ce7c5e5896de23fe64cddc4b17cc29b0d01d4f9551dc652232",
"version": 2
},
"vertical/e-handel/skv-stallningstaganden-katalog": {
"hash": "f630352b6a514041bfb12d3780e6a983f0556bca13a5712bba77e1a1abe0e4c5",
"version": 2
},
"vertical/e-handel/vouchers-presentkort": {
"hash": "d7bf91f0eb5aa60f116861f218ee3cd8a2eac6a613126883e0be981d350e577b",
"version": 2
},
"vertical/konsult-it": {
"hash": "af181b70fa0c9ccc993d17b1cf6ed3d66eda16d28026d679ef472286a09162cd",
"version": 3
},
"vertical/konsult-it/3-12-rules": {
"hash": "412c18f873236a941e4c72910ccae174805bbb68ddb220352caf67a451f62433",
"version": 2
},
"vertical/konsult-it/consultant-vs-employee": {
"hash": "e07710aad7ef5b3bce3a83a4b760b4a853f7066ba825bf322b6af3c8a9de7eb9",
"version": 2
},
"vertical/konsult-it/cross-border-payroll": {
"hash": "9d904488b7966ff9af72043483035bc6d18013e00a1fcccc5a17e294432a9eb0",
"version": 2
},
"vertical/konsult-it/electronic-services-classification": {
"hash": "6dbf5448e9985ebfd42e005c4abee834a4adb6b4a3500326af0bfd9332c37241",
"version": 2
},
"vertical/konsult-it/invoice-templates": {
"hash": "924fb88d62abe4a6c211952b40850b39579c6b5a04afd2d23acf9b183dbafddf",
"version": 2
},
"vertical/konsult-it/software-capitalization": {
"hash": "6e87a0e45e58b9d45796c3257a3162f98bd0c9a211c5d2d53e7f1114bf8d5a47",
"version": 2
},
"vertical/reklambyra-marknadsforing": {
"hash": "ef0343360b9c3f2a110bf318505c0001a282d6073dcc15959cd6a22cf341993b",
"version": 3
},
"vertical/software-saas-ai": {
"hash": "a5a8a9a73230e5d0e18c30fe3a3a8a428e21df409deecd782c6683cb9c42f334",
"version": 2
}
}