@diy-accounting-uk/diya-gl 1.2.60 → 1.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/data/filing/ct600-v3.toml +1 -0
- package/dist/app/data/releases.json +52 -0
- package/dist/app/data/render-unrepresentable/ltd.json +2 -0
- package/dist/app/lib/calculators/ltd.js +2 -0
- package/dist/app/lib/ixbrl-accounts.js +40 -5
- package/dist/app/lib/ixbrl-summary-book.js +7 -1
- package/dist/app/lib/provenance-data.js +2 -2
- package/dist/app/products/ltd.js +3 -0
- package/package.json +1 -1
|
@@ -1950,6 +1950,7 @@ section = "Losses, deficits and excess amounts"
|
|
|
1950
1950
|
format = "money-composite"
|
|
1951
1951
|
element = "LossesOfTradesUK"
|
|
1952
1952
|
xmlPath = "/IRenvelope/CompanyTaxReturn/LossesDeficitsAndExcess/AmountArising/LossesOfTradesUK"
|
|
1953
|
+
sheetCell = "Financialaccounts.xlsx!CT600!Q206"
|
|
1953
1954
|
|
|
1954
1955
|
[[box]]
|
|
1955
1956
|
number = 785
|
|
@@ -1793,6 +1793,58 @@
|
|
|
1793
1793
|
"scorecard": "101608 passed, 0 warnings, 0 failed"
|
|
1794
1794
|
}
|
|
1795
1795
|
}
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"tag": "diya-gl-v1.2.60",
|
|
1799
|
+
"date": "2026-10-27",
|
|
1800
|
+
"formatVersion": "diya-gl/1",
|
|
1801
|
+
"engineVersion": "1.2.60+602620de",
|
|
1802
|
+
"taxDataHash": "51bdff60e993",
|
|
1803
|
+
"reconciledCommit": "54e8731a91279975e61b1a232fbb67fda89515f0",
|
|
1804
|
+
"templates": {
|
|
1805
|
+
"bst": {
|
|
1806
|
+
"hash": "0d003e10e00c",
|
|
1807
|
+
"scorecard": "812 passed, 0 warnings, 0 failed"
|
|
1808
|
+
},
|
|
1809
|
+
"taxi": {
|
|
1810
|
+
"hash": "1ff69654d64d",
|
|
1811
|
+
"scorecard": "700 passed, 0 warnings, 0 failed"
|
|
1812
|
+
},
|
|
1813
|
+
"se": {
|
|
1814
|
+
"hash": "064605ae76ed",
|
|
1815
|
+
"scorecard": "8015 passed, 0 warnings, 0 failed"
|
|
1816
|
+
},
|
|
1817
|
+
"ltd": {
|
|
1818
|
+
"hash": "a65ab09cf35c",
|
|
1819
|
+
"scorecard": "101608 passed, 0 warnings, 0 failed"
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"tag": "diya-gl-v1.2.61",
|
|
1825
|
+
"date": "2026-10-28",
|
|
1826
|
+
"formatVersion": "diya-gl/1",
|
|
1827
|
+
"engineVersion": "1.2.61+f657819b",
|
|
1828
|
+
"taxDataHash": "51bdff60e993",
|
|
1829
|
+
"reconciledCommit": "54e8731a91279975e61b1a232fbb67fda89515f0",
|
|
1830
|
+
"templates": {
|
|
1831
|
+
"bst": {
|
|
1832
|
+
"hash": "0d003e10e00c",
|
|
1833
|
+
"scorecard": "812 passed, 0 warnings, 0 failed"
|
|
1834
|
+
},
|
|
1835
|
+
"taxi": {
|
|
1836
|
+
"hash": "1ff69654d64d",
|
|
1837
|
+
"scorecard": "700 passed, 0 warnings, 0 failed"
|
|
1838
|
+
},
|
|
1839
|
+
"se": {
|
|
1840
|
+
"hash": "064605ae76ed",
|
|
1841
|
+
"scorecard": "8015 passed, 0 warnings, 0 failed"
|
|
1842
|
+
},
|
|
1843
|
+
"ltd": {
|
|
1844
|
+
"hash": "a65ab09cf35c",
|
|
1845
|
+
"scorecard": "101608 passed, 0 warnings, 0 failed"
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1796
1848
|
}
|
|
1797
1849
|
]
|
|
1798
1850
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"cell/Financialaccounts.xlsx!Admin!M21": "Hub sheet calculation cells; views render specific fields only.",
|
|
16
16
|
"cell/Financialaccounts.xlsx!Admin!N7": "Hub sheet calculation cells; views render specific fields only.",
|
|
17
17
|
"cell/Financialaccounts.xlsx!CT600!AJ128": "Hub sheet calculation cells; views render specific fields only.",
|
|
18
|
+
"cell/Financialaccounts.xlsx!CT600!Q206": "Box 780 reads a trading loss, which only a loss-making year carries; the page shows a cell only when it holds a figure.",
|
|
18
19
|
"cell/Financialaccounts.xlsx!CT600!W137": "Hub sheet calculation cells; views render specific fields only.",
|
|
19
20
|
"cell/Financialaccounts.xlsx!CorporationTax!A33": "Corporation tax working cells; form shows computation only.",
|
|
20
21
|
"cell/Financialaccounts.xlsx!CorporationTax!A34": "Corporation tax working cells; form shows computation only.",
|
|
@@ -696,6 +697,7 @@
|
|
|
696
697
|
"section/accounting-profit-to-tax-profit-bridge/tax-profit-the-bridge-computes": "The page has no profit-bridge view; the bridge from accounting profit to tax profit is not printed anywhere on the books page.",
|
|
697
698
|
"section/accounting-profit-to-tax-profit-bridge/tax-profit-the-sheet-carries": "The page has no profit-bridge view; the bridge from accounting profit to tax profit is not printed anywhere on the books page.",
|
|
698
699
|
"section/ct600-as-filed/box-395-tax": "Box 395 tax is the CT600 straddle-period figure (an accounting period spanning two financial years); like its sibling straddle boxes, the CT600 form carries no box for it.",
|
|
700
|
+
"section/ct600-as-filed/box-780-trading-loss-arising": "Box 780 reads a trading loss, which only a loss-making year carries; the page shows a cell only when it holds a figure.",
|
|
699
701
|
"section/journal-category-vat-netting/advertising-promotion-entertainment-purchases-a/downstream": "The journal-category-vat-netting report is a reconciliation table (categoryNettingLines, products/ltd.js) explaining how a gross journal figure nets into a statement cell; no page view is this table.",
|
|
700
702
|
"section/journal-category-vat-netting/advertising-promotion-entertainment-purchases-a/gross": "The journal-category-vat-netting report is a reconciliation table (categoryNettingLines, products/ltd.js) explaining how a gross journal figure nets into a statement cell; no page view is this table.",
|
|
701
703
|
"section/journal-category-vat-netting/advertising-promotion-entertainment-purchases-a/net": "The journal-category-vat-netting report is a reconciliation table (categoryNettingLines, products/ltd.js) explaining how a gross journal figure nets into a statement cell; no page view is this table.",
|
|
@@ -2018,6 +2018,7 @@ function buildCt600(corporationTax, pl, admin) {
|
|
|
2018
2018
|
}
|
|
2019
2019
|
if (corporationTax.K22 > 0) sheet.Z70 = corporationTax.K22;
|
|
2020
2020
|
if (corporationTax.K26 > 0) sheet.Z72 = corporationTax.K26;
|
|
2021
|
+
if (corporationTax.K22 < 0) sheet.Q206 = -corporationTax.K22;
|
|
2021
2022
|
if (corporationTax.K24 > 0) sheet.AJ76 = corporationTax.K24;
|
|
2022
2023
|
sheet.AJ74 = (sheet.Z70 || 0) - (sheet.Z72 || 0);
|
|
2023
2024
|
sheet.AJ92 = Math.max(sheet.AJ74, 0) + (sheet.AJ76 || 0);
|
|
@@ -2535,6 +2536,7 @@ function attributeLtdResults(attribution, context) {
|
|
|
2535
2536
|
a.set(CT600, "N128", a.get(CT, "F34"));
|
|
2536
2537
|
a.set(CT600, "Z70", a.get(CT, "K22"));
|
|
2537
2538
|
a.set(CT600, "Z72", a.get(CT, "K26"));
|
|
2539
|
+
a.set(CT600, "Q206", a.get(CT, "K22"));
|
|
2538
2540
|
a.set(CT600, "AJ76", a.get(CT, "K24"));
|
|
2539
2541
|
a.set(CT600, "AJ74", a.cells(CT600, "Z70", "Z72"));
|
|
2540
2542
|
a.set(CT600, "AJ92", a.cells(CT600, "AJ74", "AJ76"));
|
|
@@ -19,6 +19,7 @@ import { readIxbrl, IxbrlError } from "./ixbrl-reader.js";
|
|
|
19
19
|
export { IxbrlError };
|
|
20
20
|
|
|
21
21
|
const MATURITY = "MaturitiesOrExpirationPeriodsDimension";
|
|
22
|
+
const CURRENT_INSTRUMENT = "FinancialInstrumentCurrentNon-currentDimension";
|
|
22
23
|
const EQUITY_CLASS = "EquityClassesDimension";
|
|
23
24
|
const PPE_CLASS = "PropertyPlantEquipmentClassesDimension";
|
|
24
25
|
|
|
@@ -91,7 +92,31 @@ export const MAPPING_TABLE = [
|
|
|
91
92
|
note: "WithinOneYear; posts as a trade creditor, which the balance sheet shows within one year",
|
|
92
93
|
},
|
|
93
94
|
{ concept: "AccruedLiabilitiesNotExpressedWithinCreditorsSubtotal", figure: "otherCreditors", account: "2100", note: "WithinOneYear" },
|
|
94
|
-
{ concept: "TaxationSocialSecurityPayable", figure: "
|
|
95
|
+
{ concept: "TaxationSocialSecurityPayable", figure: "taxationSocialSecurity", account: "2100", note: "WithinOneYear" },
|
|
96
|
+
{
|
|
97
|
+
concept: "AccruedLiabilities",
|
|
98
|
+
dimension: CURRENT_INSTRUMENT,
|
|
99
|
+
member: "CurrentFinancialInstruments",
|
|
100
|
+
figure: "accruals",
|
|
101
|
+
account: "2100",
|
|
102
|
+
note: "on a context that also carries WithinOneYear",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
concept: "BankBorrowingsOverdrafts",
|
|
106
|
+
dimension: MATURITY,
|
|
107
|
+
member: "WithinOneYear",
|
|
108
|
+
figure: "bankLoansOverdrafts",
|
|
109
|
+
account: "2100",
|
|
110
|
+
note: "with or without the WithinOneYear member",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
concept: "BankBorrowingsOverdrafts",
|
|
114
|
+
dimension: MATURITY,
|
|
115
|
+
member: "AfterOneYear",
|
|
116
|
+
figure: "bankLoansAfterOneYear",
|
|
117
|
+
account: "2600",
|
|
118
|
+
note: "a part of creditorsAfterOneYear, which states it",
|
|
119
|
+
},
|
|
95
120
|
{
|
|
96
121
|
concept: "Creditors",
|
|
97
122
|
dimension: MATURITY,
|
|
@@ -321,7 +346,8 @@ function balanceSheetAt(set, endDay, notes, label) {
|
|
|
321
346
|
set.instant("CalledUpShareCapitalNotPaidNotExpressedAsCurrentAsset", endDay),
|
|
322
347
|
]);
|
|
323
348
|
const provisions = set.instant("ProvisionsForLiabilitiesBalanceSheetSubtotal", endDay);
|
|
324
|
-
const
|
|
349
|
+
const bankLoansAfterOneYear = set.instant("BankBorrowingsOverdrafts", endDay, { [MATURITY]: "AfterOneYear" });
|
|
350
|
+
const afterOneYear = set.instant("Creditors", endDay, { [MATURITY]: "AfterOneYear" }) ?? bankLoansAfterOneYear;
|
|
325
351
|
if (provisions) notes.push(`${label}: provisions for liabilities of ${provisions} are added to creditors after more than one year.`);
|
|
326
352
|
|
|
327
353
|
const equityClasses = set.find("Equity", null, (fact) => fact.period.instant === endDay && Object.keys(fact.dimensions).length === 1);
|
|
@@ -354,8 +380,14 @@ function balanceSheetAt(set, endDay, notes, label) {
|
|
|
354
380
|
otherCreditors: sumDefined([
|
|
355
381
|
set.maturity("OtherCreditors", endDay, ["WithinOneYear", null]),
|
|
356
382
|
set.maturity("AccruedLiabilitiesNotExpressedWithinCreditorsSubtotal", endDay, ["WithinOneYear", null]),
|
|
357
|
-
set.maturity("TaxationSocialSecurityPayable", endDay, ["WithinOneYear", null]),
|
|
358
383
|
]),
|
|
384
|
+
taxationSocialSecurity: set.maturity("TaxationSocialSecurityPayable", endDay, ["WithinOneYear", null]),
|
|
385
|
+
accruals: set.instant("AccruedLiabilities", endDay, {
|
|
386
|
+
[CURRENT_INSTRUMENT]: "CurrentFinancialInstruments",
|
|
387
|
+
[MATURITY]: "WithinOneYear",
|
|
388
|
+
}),
|
|
389
|
+
bankLoansOverdrafts: set.maturity("BankBorrowingsOverdrafts", endDay, ["WithinOneYear", null]),
|
|
390
|
+
bankLoansAfterOneYear,
|
|
359
391
|
creditorsWithinOneYear: set.instant("Creditors", endDay, { [MATURITY]: "WithinOneYear" }),
|
|
360
392
|
creditorsAfterOneYear: sumDefined([afterOneYear, provisions]),
|
|
361
393
|
provisions,
|
|
@@ -544,10 +576,13 @@ function problem(message) {
|
|
|
544
576
|
return new IxbrlError(message);
|
|
545
577
|
}
|
|
546
578
|
|
|
579
|
+
// The lines that add up to the creditors falling due within one year.
|
|
580
|
+
const WITHIN_LINES = ["bankLoansOverdrafts", "tradeCreditors", "corporationTax", "taxationSocialSecurity", "otherCreditors", "accruals"];
|
|
581
|
+
|
|
547
582
|
function checkBalance(year, label) {
|
|
548
583
|
const s = year;
|
|
549
584
|
const current = s.currentAssets ?? sumOf([s.stocks, s.debtors, s.cashAtBank].map((v) => v ?? 0));
|
|
550
|
-
const within = s.creditorsWithinOneYear ?? sumOf(
|
|
585
|
+
const within = s.creditorsWithinOneYear ?? sumOf(WITHIN_LINES.map((line) => s[line] ?? 0));
|
|
551
586
|
const net = (s.fixedAssets ?? 0) + current - within - (s.creditorsAfterOneYear ?? 0);
|
|
552
587
|
const equity = s.capitalAndReserves ?? s.netAssets;
|
|
553
588
|
if (s.netCurrentAssets !== undefined && !close(current - within, s.netCurrentAssets)) {
|
|
@@ -587,7 +622,7 @@ function checkTotals(year, label, regime) {
|
|
|
587
622
|
if (over || under)
|
|
588
623
|
throw problem(`The ${label} current assets of ${s.currentAssets} differ from the lines under it, which add up to ${lines}.`);
|
|
589
624
|
}
|
|
590
|
-
const creditors = sumDefined(
|
|
625
|
+
const creditors = sumDefined(WITHIN_LINES.map((line) => s[line]));
|
|
591
626
|
if (s.creditorsWithinOneYear !== undefined && creditors !== undefined) {
|
|
592
627
|
const over = creditors - s.creditorsWithinOneYear > WITHIN;
|
|
593
628
|
const under = s.creditorsWithinOneYear - creditors > WITHIN && regime === "small";
|
|
@@ -70,7 +70,13 @@ function sheetOf(balanceSheet) {
|
|
|
70
70
|
const stocks = n(balanceSheet.stocks);
|
|
71
71
|
const debtors = n(balanceSheet.debtors);
|
|
72
72
|
const currentAssets = balanceSheet.currentAssets ?? stocks + debtors + n(balanceSheet.cashAtBank);
|
|
73
|
-
const lineCreditors =
|
|
73
|
+
const lineCreditors =
|
|
74
|
+
n(balanceSheet.bankLoansOverdrafts) +
|
|
75
|
+
n(balanceSheet.tradeCreditors) +
|
|
76
|
+
n(balanceSheet.corporationTax) +
|
|
77
|
+
n(balanceSheet.taxationSocialSecurity) +
|
|
78
|
+
n(balanceSheet.otherCreditors) +
|
|
79
|
+
n(balanceSheet.accruals);
|
|
74
80
|
const within = balanceSheet.creditorsWithinOneYear ?? lineCreditors;
|
|
75
81
|
const corporationTax = n(balanceSheet.corporationTax);
|
|
76
82
|
const calledUp = n(balanceSheet.calledUpShareCapital);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
export const PROVENANCE_DATA = {
|
|
14
14
|
formatVersion: "diya-gl/1",
|
|
15
|
-
engineVersion: "1.2.
|
|
15
|
+
engineVersion: "1.2.62+2c4a0a8c",
|
|
16
16
|
taxDataHash: "51bdff60e993",
|
|
17
17
|
reconciledCommit: "54e8731a91279975e61b1a232fbb67fda89515f0",
|
|
18
18
|
templates: {
|
|
@@ -29,7 +29,7 @@ export const PROVENANCE_DATA = {
|
|
|
29
29
|
scorecard: "8015 passed, 0 warnings, 0 failed",
|
|
30
30
|
},
|
|
31
31
|
ltd: {
|
|
32
|
-
hash: "
|
|
32
|
+
hash: "b90d8b0f54a0",
|
|
33
33
|
scorecard: "101608 passed, 0 warnings, 0 failed",
|
|
34
34
|
},
|
|
35
35
|
},
|
package/dist/app/products/ltd.js
CHANGED
|
@@ -1223,6 +1223,7 @@ export const CELL_MAP = [
|
|
|
1223
1223
|
["CT600", "Y135", "**Box 440: corporation tax net of marginal rate relief**", "gl-cor:taxAmount (ct600.box440)", "CT600 as filed", 0],
|
|
1224
1224
|
["CT600", "Y118", "Box 327: associated companies, first financial year", "gl-cor:count (ct600.box327)", "CT600 as filed", 1],
|
|
1225
1225
|
["CT600", "Y120", "Box 328: associated companies, second financial year", "gl-cor:count (ct600.box328)", "CT600 as filed", 1],
|
|
1226
|
+
["CT600", "Q206", "Box 780: trading loss arising", "gl-cor:amount (ct600.box780)", "CT600 as filed", 1],
|
|
1226
1227
|
["CT600", "Z114", "Box 620: franked investment income", "gl-cor:amount (ct600.box620)", "CT600 as filed", 1],
|
|
1227
1228
|
// ── Published P&L (column B is last year, column F this year) ──
|
|
1228
1229
|
["PubP&L", "F7", "Sales Turnover", "gl-cor:amount (pubPL.salesTurnover)","Published P&L", 1],
|
|
@@ -1580,6 +1581,7 @@ const CT600_CELLS = [
|
|
|
1580
1581
|
"AK66",
|
|
1581
1582
|
"Z70",
|
|
1582
1583
|
"Z72",
|
|
1584
|
+
"Q206",
|
|
1583
1585
|
"AJ74",
|
|
1584
1586
|
"AJ76",
|
|
1585
1587
|
"AJ92",
|
|
@@ -4231,6 +4233,7 @@ export function checkCompliance(results, expected, taxData, calculateExpectedTax
|
|
|
4231
4233
|
check("CT600: turnover = published P&L turnover", num(ct600.AK66), num(pubPL.F9));
|
|
4232
4234
|
check("CT600: trading profits = CT profit after capital allowances", num(ct600.Z70), onTheForm(num(corporationTax.K22)));
|
|
4233
4235
|
check("CT600: losses brought forward = CT losses brought forward", num(ct600.Z72), num(corporationTax.K26));
|
|
4236
|
+
check("CT600: trading loss arising = the loss on the working sheet", num(ct600.Q206), Math.max(-num(corporationTax.K22), 0));
|
|
4234
4237
|
check("CT600: net trading profits = trading profits - losses brought forward", num(ct600.AJ74), num(ct600.Z70) - num(ct600.Z72));
|
|
4235
4238
|
check("CT600: interest received = CT interest received", num(ct600.AJ76), num(corporationTax.K24));
|
|
4236
4239
|
// Box 235 is box 165 plus box 170 whatever box 165 is (HMRC rule 9332),
|