You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Settings/register.d/bookkeeping-cost-centers-dimensions.json
+49-32Lines changed: 49 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -276,50 +276,64 @@
276
276
},
277
277
"x-openregister-aggregations": {
278
278
"segmentPnl": {
279
-
"description": "Segment P&L for this dimension (cost-center rows only): sum of GLLine amounts whose costCenterCode equals this record's code, including child cost-centers rolled up via parentCode per REQ-CC-005. Consumes GLLine.costCenterCode = @self.code with eliminationFlag = false. Scoped dimensionType = cost-center.",
280
-
"join": {
281
-
"schema": "GLLine",
282
-
"condition": "GLLine.costCenterCode = @self.code AND GLLine.eliminationFlag = false"
279
+
"description": "Segment P&L per cost-center (REQ-CC-005): debit/credit sums of non-eliminated GLLine amounts, grouped by costCenterCode + periodId + accountNumber. Returns EVERY cost-center; narrow to one with the extraFilter query params (?costCenterCode=...). It does not correlate on @self — no caller supplies a parent row. Parent roll-up over the parentCode tree is NOT included here; byCostCenterHierarchy does that through the join.",
280
+
"from": "GLLine",
281
+
"where": {
282
+
"eliminationFlag": false
283
283
},
284
284
"groupBy": [
285
+
"costCenterCode",
285
286
"GLLine.fiscalYearId",
286
-
"GLLine.accountNumber"
287
+
"accountNumber"
287
288
],
288
-
"operations": {
289
-
"totalDebit": {
290
-
"field": "GLLine.amount",
291
-
"operation": "sum",
292
-
"condition": "GLLine.side = 'debit'"
289
+
"metrics": [
290
+
{
291
+
"metric": "sum",
292
+
"field": "amount",
293
+
"condition": {
294
+
"side": "debit"
295
+
},
296
+
"as": "totalDebit"
293
297
},
294
-
"totalCredit": {
295
-
"field": "GLLine.amount",
296
-
"operation": "sum",
297
-
"condition": "GLLine.side = 'credit'"
298
+
{
299
+
"metric": "sum",
300
+
"field": "amount",
301
+
"condition": {
302
+
"side": "credit"
303
+
},
304
+
"as": "totalCredit"
298
305
}
299
-
}
306
+
]
300
307
},
301
308
"segmentPnlByCostObject": {
302
-
"description": "Segment P&L for this dimension (cost-object rows only): sum of GLLine amounts whose kostenDragerCode equals this record's code per REQ-CC-005. Replaces the retired KostenDrager.segmentPnl. Scoped dimensionType = cost-object.",
303
-
"join": {
304
-
"schema": "GLLine",
305
-
"condition": "GLLine.kostenDragerCode = @self.code AND GLLine.eliminationFlag = false"
309
+
"description": "Segment P&L per cost-object (REQ-CC-005): debit/credit sums of non-eliminated GLLine amounts, grouped by costCarrierCode + periodId + accountNumber. Returns EVERY cost-object; narrow to one with the extraFilter query params (?costCarrierCode=...). Replaces the retired KostenDrager.segmentPnl; the field is costCarrierCode — kostenDragerCode is not declared on GLLine and matched nothing.",
310
+
"from": "GLLine",
311
+
"where": {
312
+
"eliminationFlag": false
306
313
},
307
314
"groupBy": [
315
+
"costCarrierCode",
308
316
"GLLine.fiscalYearId",
309
-
"GLLine.accountNumber"
317
+
"accountNumber"
310
318
],
311
-
"operations": {
312
-
"totalDebit": {
313
-
"field": "GLLine.amount",
314
-
"operation": "sum",
315
-
"condition": "GLLine.side = 'debit'"
319
+
"metrics": [
320
+
{
321
+
"metric": "sum",
322
+
"field": "amount",
323
+
"condition": {
324
+
"side": "debit"
325
+
},
326
+
"as": "totalDebit"
316
327
},
317
-
"totalCredit": {
318
-
"field": "GLLine.amount",
319
-
"operation": "sum",
320
-
"condition": "GLLine.side = 'credit'"
328
+
{
329
+
"metric": "sum",
330
+
"field": "amount",
331
+
"condition": {
332
+
"side": "credit"
333
+
},
334
+
"as": "totalCredit"
321
335
}
322
-
}
336
+
]
323
337
},
324
338
"spentToDate": {
325
339
"description": "Sum of GL debit postings tagged to this cost-center dimension (recursive over descendant cost-centers via parentCode self-relation) per REQ-CPA-106. Excludes eliminated intercompany lines. Scoped dimensionType = cost-center.",
@@ -390,14 +404,17 @@
390
404
},
391
405
"byCostCenterHierarchy": {
392
406
"description": "Hierarchical roll-up of GL amounts per AnalyticalDimension[dimensionType=cost-center].parentCode tree per REQ-CD-007. Child cost-center sums propagate to parents through the self-relation; drives drill-down navigation. Declarative (ADR-031). Re-targeted from CostCenter to AnalyticalDimension per REQ-ADIM-101.",
Copy file name to clipboardExpand all lines: lib/Settings/shillinq_register.json
+22-15Lines changed: 22 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -5509,27 +5509,34 @@
5509
5509
},
5510
5510
"x-openregister-aggregations": {
5511
5511
"segmentPnl": {
5512
-
"description": "Segment P&L for this project: sum of GLLine amounts whose projectCode equals this record's code per REQ-CC-005. Shape is sufficient for WBSO time-per-project join per REQ-CC-007.",
5513
-
"join": {
5514
-
"schema": "GLLine",
5515
-
"condition": "GLLine.projectCode = @self.code AND GLLine.eliminationFlag = false"
5512
+
"description": "Segment P&L per project (REQ-CC-005): debit/credit sums of non-eliminated GLLine amounts, grouped by projectCode + periodId + accountNumber. Returns EVERY project; narrow to one with the extraFilter query params (?projectCode=...), which is what the REST endpoint passes through. It does not correlate on @self: no caller supplies a parent row, and an unanswerable @self reference now raises rather than filtering on null. Shape is sufficient for the WBSO time-per-project join per REQ-CC-007.",
5513
+
"from": "GLLine",
5514
+
"where": {
5515
+
"eliminationFlag": false
5516
5516
},
5517
5517
"groupBy": [
5518
+
"projectCode",
5518
5519
"GLLine.fiscalYearId",
5519
-
"GLLine.accountNumber"
5520
+
"accountNumber"
5520
5521
],
5521
-
"operations": {
5522
-
"totalDebit": {
5523
-
"field": "GLLine.amount",
5524
-
"operation": "sum",
5525
-
"condition": "GLLine.side = 'debit'"
5522
+
"metrics": [
5523
+
{
5524
+
"metric": "sum",
5525
+
"field": "amount",
5526
+
"condition": {
5527
+
"side": "debit"
5528
+
},
5529
+
"as": "totalDebit"
5526
5530
},
5527
-
"totalCredit": {
5528
-
"field": "GLLine.amount",
5529
-
"operation": "sum",
5530
-
"condition": "GLLine.side = 'credit'"
5531
+
{
5532
+
"metric": "sum",
5533
+
"field": "amount",
5534
+
"condition": {
5535
+
"side": "credit"
5536
+
},
5537
+
"as": "totalCredit"
5531
5538
}
5532
-
}
5539
+
]
5533
5540
},
5534
5541
"costsIncurredToDate": {
5535
5542
"description": "Sum of GL expense-account postings tagged to this project via GLLine.subLedgerRef (REQ-CPA-006).",
0 commit comments