@natrave/shared-entities 8.16.0 → 8.17.0

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.
@@ -4,6 +4,7 @@ export declare enum FinanceAuditAction {
4
4
  ENTRY_DELETED = "entry_deleted",
5
5
  ITEM_SETTLED = "item_settled",
6
6
  ITEM_UNSETTLED = "item_unsettled",
7
+ ITEM_ADJUSTED = "item_adjusted",
7
8
  RECONCILED = "reconciled"
8
9
  }
9
10
  //# sourceMappingURL=finance-audit-action.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"finance-audit-action.enum.d.ts","sourceRoot":"","sources":["../../../src/finance/enums/finance-audit-action.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,kBAAkB;IAC5B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IAEjC,UAAU,eAAe;CAC1B"}
1
+ {"version":3,"file":"finance-audit-action.enum.d.ts","sourceRoot":"","sources":["../../../src/finance/enums/finance-audit-action.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,kBAAkB;IAC5B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IAEjC,aAAa,kBAAkB;IAE/B,UAAU,eAAe;CAC1B"}
@@ -4,6 +4,7 @@ var FinanceAuditAction = /* @__PURE__ */ ((FinanceAuditAction2) => {
4
4
  FinanceAuditAction2["ENTRY_DELETED"] = "entry_deleted";
5
5
  FinanceAuditAction2["ITEM_SETTLED"] = "item_settled";
6
6
  FinanceAuditAction2["ITEM_UNSETTLED"] = "item_unsettled";
7
+ FinanceAuditAction2["ITEM_ADJUSTED"] = "item_adjusted";
7
8
  FinanceAuditAction2["RECONCILED"] = "reconciled";
8
9
  return FinanceAuditAction2;
9
10
  })(FinanceAuditAction || {});
@@ -8,6 +8,8 @@ export declare class FinanceEntryItem {
8
8
  label: string;
9
9
  sublabel: string | null;
10
10
  amountCents: number | null;
11
+ customAmountCents: number | null;
12
+ exempt: boolean;
11
13
  expectedOn: string | null;
12
14
  settledOn: string | null;
13
15
  settledBy: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"finance-entry-item.entity.d.ts","sourceRoot":"","sources":["../../../src/finance/finance-entry-items/finance-entry-item.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAqBvE,qBAoBa,gBAAgB;IAE3B,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,EAAE,MAAM,CAAC;IAQhB,WAAW,EAAE,kBAAkB,CAAC;IAShC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IASzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB"}
1
+ {"version":3,"file":"finance-entry-item.entity.d.ts","sourceRoot":"","sources":["../../../src/finance/finance-entry-items/finance-entry-item.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAyBvE,qBAyBa,gBAAgB;IAE3B,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,EAAE,MAAM,CAAC;IAQhB,WAAW,EAAE,kBAAkB,CAAC;IAShC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAOjC,MAAM,EAAE,OAAO,CAAC;IAQhB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IASzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB"}
@@ -66,6 +66,21 @@ __decorateClass([
66
66
  comment: "Valor pr\xF3prio do item. Nulo = unit_amount_cents do lan\xE7amento."
67
67
  })
68
68
  ], FinanceEntryItem.prototype, "amountCents", 2);
69
+ __decorateClass([
70
+ Column({
71
+ name: "custom_amount_cents",
72
+ type: "int",
73
+ nullable: true,
74
+ comment: "Valor que o organizador definiu s\xF3 para este pagante. Nulo = o da linha."
75
+ })
76
+ ], FinanceEntryItem.prototype, "customAmountCents", 2);
77
+ __decorateClass([
78
+ Column({
79
+ type: "boolean",
80
+ default: false,
81
+ comment: "O organizador isentou este pagante: vale zero e n\xE3o conta como pendente."
82
+ })
83
+ ], FinanceEntryItem.prototype, "exempt", 2);
69
84
  __decorateClass([
70
85
  Column({
71
86
  name: "expected_on",
@@ -124,6 +139,11 @@ FinanceEntryItem = __decorateClass([
124
139
  ),
125
140
  Check("CHK_finance_entry_items_settlement_pair", '("settled_on" IS NULL) = ("settled_by" IS NULL)'),
126
141
  Check("CHK_finance_entry_items_amount", '"amount_cents" IS NULL OR "amount_cents" >= 0'),
142
+ Check(
143
+ "CHK_finance_entry_items_custom_amount",
144
+ '"custom_amount_cents" IS NULL OR "custom_amount_cents" > 0'
145
+ ),
146
+ Check("CHK_finance_entry_items_adjustment", 'NOT ("exempt" AND "custom_amount_cents" IS NOT NULL)'),
127
147
  Index("IDX_finance_entry_items_entry", ["entryId"]),
128
148
  Index("UQ_finance_entry_items_subject", ["entryId", "subjectType", "subjectRef"], {
129
149
  unique: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "8.16.0",
3
+ "version": "8.17.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",