@happyvertical/smrt-commerce 0.56.1 → 0.57.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.
- package/AGENTS.md +24 -11
- package/README.md +159 -93
- package/agents/accounting-snapshot-mapper.md +3 -3
- package/agents/commercial-ui.md +2 -2
- package/agents/contract-money.md +9 -6
- package/agents/cost-billing.md +3 -6
- package/agents/customer-vendor-ui.md +6 -1
- package/agents/document-money.md +59 -31
- package/agents/invoice-calculations.md +31 -56
- package/agents/invoice-preparation.md +62 -73
- package/agents/invoice-quantity.md +9 -21
- package/agents/minor-unit-migration.md +4 -4
- package/agents/money-calculator.md +7 -8
- package/agents/money-model.md +18 -22
- package/agents/money-upgrade.md +92 -0
- package/agents/revenue-journal.md +2 -2
- package/agents/tax-codes.md +17 -14
- package/agents/tax-summary.md +12 -8
- package/dist/billing/period-close.d.ts.map +1 -1
- package/dist/billing/runtime.d.ts +5 -2
- package/dist/billing/runtime.d.ts.map +1 -1
- package/dist/chunks/{ContractLineItemCollection-DYjhj_pU.js → ContractLineItemCollection-BZcrlrrY.js} +22 -27
- package/dist/chunks/ContractLineItemCollection-BZcrlrrY.js.map +1 -0
- package/dist/chunks/{CustomerCollection-DQIujn4f.js → CustomerCollection-BIPH2ZUx.js} +3 -3
- package/dist/chunks/{CustomerCollection-DQIujn4f.js.map → CustomerCollection-BIPH2ZUx.js.map} +1 -1
- package/dist/chunks/{DocumentTaxCollection-BEpoqXAQ.js → DocumentTaxCollection-DDzlywMW.js} +41 -14
- package/dist/chunks/DocumentTaxCollection-DDzlywMW.js.map +1 -0
- package/dist/chunks/{InvoiceCollection-CKQflFjc.js → InvoiceCollection-cinzAqt6.js} +53 -164
- package/dist/chunks/InvoiceCollection-cinzAqt6.js.map +1 -0
- package/dist/chunks/{TaxCodeCollection-DOpzW4y8.js → TaxCodeCollection-DaBOPG9c.js} +11 -4
- package/dist/chunks/{TaxCodeCollection-DOpzW4y8.js.map → TaxCodeCollection-DaBOPG9c.js.map} +1 -1
- package/dist/chunks/{TaxComponentCollection-Cs2uXwEl.js → TaxComponentCollection-C4zxnyVu.js} +3 -3
- package/dist/chunks/{TaxComponentCollection-Cs2uXwEl.js.map → TaxComponentCollection-C4zxnyVu.js.map} +1 -1
- package/dist/chunks/VendorCollection-D6ZcUYy8.js +100 -0
- package/dist/chunks/VendorCollection-D6ZcUYy8.js.map +1 -0
- package/dist/chunks/{allocation-integrity-DI3G16BN.js → allocation-integrity-WmWyXhtG.js} +6 -6
- package/dist/chunks/{allocation-integrity-DI3G16BN.js.map → allocation-integrity-WmWyXhtG.js.map} +1 -1
- package/dist/chunks/calculations-C9daQLsh.js +82 -0
- package/dist/chunks/calculations-C9daQLsh.js.map +1 -0
- package/dist/chunks/contract-money-EuToOghh.js +301 -0
- package/dist/chunks/contract-money-EuToOghh.js.map +1 -0
- package/dist/chunks/detect-CY9ufaFb.js +328 -0
- package/dist/chunks/detect-CY9ufaFb.js.map +1 -0
- package/dist/chunks/{document-money-DNVhDJyC.js → document-money-DV5t4vlK.js} +389 -63
- package/dist/chunks/document-money-DV5t4vlK.js.map +1 -0
- package/dist/chunks/{invoice-posting-BwV8g7z0.js → invoice-posting-C2i5dOVZ.js} +21 -23
- package/dist/chunks/invoice-posting-C2i5dOVZ.js.map +1 -0
- package/dist/chunks/{revenue-journal-DY9fro8E.js → revenue-journal-LLA9Kh_i.js} +3 -14
- package/dist/chunks/revenue-journal-LLA9Kh_i.js.map +1 -0
- package/dist/chunks/tenant-money-barrier-6TlqUeVj.js +255 -0
- package/dist/chunks/tenant-money-barrier-6TlqUeVj.js.map +1 -0
- package/dist/chunks/{types-LDETvQ1C.js → types-Bbm0Xflc.js} +2 -1
- package/dist/chunks/types-Bbm0Xflc.js.map +1 -0
- package/dist/chunks/{units-CNcjH_eE.js → units-8ElbjVZK.js} +18 -3
- package/dist/chunks/units-8ElbjVZK.js.map +1 -0
- package/dist/collections/ContractCollection.d.ts.map +1 -1
- package/dist/collections/ContractLineItemCollection.d.ts.map +1 -1
- package/dist/collections/InvoiceCollection.d.ts.map +1 -1
- package/dist/collections/InvoiceLineItemCollection.d.ts +0 -30
- package/dist/collections/InvoiceLineItemCollection.d.ts.map +1 -1
- package/dist/collections/TaxCodeCollection.d.ts +5 -1
- package/dist/collections/TaxCodeCollection.d.ts.map +1 -1
- package/dist/collections/TaxSettingsCollection.d.ts +15 -8
- package/dist/collections/TaxSettingsCollection.d.ts.map +1 -1
- package/dist/collections/TaxSummaryReportCollection.d.ts +3 -3
- package/dist/collections/TaxSummaryReportCollection.d.ts.map +1 -1
- package/dist/collections/index.d.ts +0 -1
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/commerce-money-tools.d.ts.map +1 -1
- package/dist/contract-money.d.ts +1 -13
- package/dist/contract-money.d.ts.map +1 -1
- package/dist/document-money-internal.d.ts +7 -3
- package/dist/document-money-internal.d.ts.map +1 -1
- package/dist/document-money.d.ts +1 -11
- package/dist/document-money.d.ts.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +686 -1656
- package/dist/index.js.map +1 -1
- package/dist/invoice-accounting-sync.d.ts.map +1 -1
- package/dist/invoice-mcp.d.ts +3 -3
- package/dist/invoice-mcp.d.ts.map +1 -1
- package/dist/invoice-posting.d.ts +11 -5
- package/dist/invoice-posting.d.ts.map +1 -1
- package/dist/invoice-record-screen.d.ts +1 -1
- package/dist/invoice-record-screen.d.ts.map +1 -1
- package/dist/invoices.d.ts +6 -1
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +2 -2
- package/dist/manifest.json +1041 -863
- package/dist/migrations/invoiceEditorStorage.d.ts +2 -4
- package/dist/migrations/invoiceEditorStorage.d.ts.map +1 -1
- package/dist/migrations/partyLinks.d.ts.map +1 -1
- package/dist/models/Contract.d.ts +10 -4
- package/dist/models/Contract.d.ts.map +1 -1
- package/dist/models/ContractLineItem.d.ts +9 -17
- package/dist/models/ContractLineItem.d.ts.map +1 -1
- package/dist/models/DocumentTax.d.ts.map +1 -1
- package/dist/models/Invoice.d.ts +18 -48
- package/dist/models/Invoice.d.ts.map +1 -1
- package/dist/models/InvoiceLineItem.d.ts +13 -32
- package/dist/models/InvoiceLineItem.d.ts.map +1 -1
- package/dist/models/TaxSettings.d.ts +0 -10
- package/dist/models/TaxSettings.d.ts.map +1 -1
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.d.ts.map +1 -1
- package/dist/playground.js +1 -1
- package/dist/playground.js.map +1 -1
- package/dist/recipes.d.ts +8 -11
- package/dist/recipes.d.ts.map +1 -1
- package/dist/revenue-journal.d.ts +0 -8
- package/dist/revenue-journal.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +2886 -6121
- package/dist/svelte/components/InvoiceEditor.svelte +7 -148
- package/dist/svelte/components/InvoiceEditor.svelte.d.ts +4 -1
- package/dist/svelte/components/InvoiceEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/InvoiceTotals.svelte +14 -118
- package/dist/svelte/components/InvoiceTotals.svelte.d.ts +4 -27
- package/dist/svelte/components/InvoiceTotals.svelte.d.ts.map +1 -1
- package/dist/svelte/components/MoneyInvoiceEditor.svelte +3 -23
- package/dist/svelte/components/MoneyInvoiceEditor.svelte.d.ts +3 -26
- package/dist/svelte/components/MoneyInvoiceEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/index.d.ts +2 -3
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -2
- package/dist/svelte/invoices/calculations.d.ts +3 -108
- package/dist/svelte/invoices/calculations.d.ts.map +1 -1
- package/dist/svelte/invoices/calculations.js +12 -309
- package/dist/svelte/invoices/messages.d.ts +1 -37
- package/dist/svelte/invoices/messages.d.ts.map +1 -1
- package/dist/svelte/invoices/messages.js +1 -37
- package/dist/svelte/invoices/money-editor.d.ts +1 -1
- package/dist/svelte/invoices/money-editor.d.ts.map +1 -1
- package/dist/svelte/invoices/types.d.ts +14 -114
- package/dist/svelte/invoices/types.d.ts.map +1 -1
- package/dist/svelte/playground/InvoicePreparationPreview.svelte +85 -94
- package/dist/svelte/playground/InvoicePreparationPreview.svelte.d.ts.map +1 -1
- package/dist/svelte/playground.js +1 -1
- package/dist/tax/index.d.ts +2 -1
- package/dist/tax/index.d.ts.map +1 -1
- package/dist/tax/standard-codes.d.ts +12 -0
- package/dist/tax/standard-codes.d.ts.map +1 -0
- package/dist/tax/tenant-bootstrap.d.ts +29 -0
- package/dist/tax/tenant-bootstrap.d.ts.map +1 -0
- package/dist/tenant-money-barrier.d.ts +12 -44
- package/dist/tenant-money-barrier.d.ts.map +1 -1
- package/dist/types/index.d.ts +11 -23
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/upgrade/detect.d.ts +129 -0
- package/dist/upgrade/detect.d.ts.map +1 -0
- package/dist/upgrade/money-v2.d.ts +81 -0
- package/dist/upgrade/money-v2.d.ts.map +1 -0
- package/package.json +14 -13
- package/agents/line-amount-migration.md +0 -50
- package/dist/chunks/ContractLineItemCollection-DYjhj_pU.js.map +0 -1
- package/dist/chunks/DocumentTaxCollection-BEpoqXAQ.js.map +0 -1
- package/dist/chunks/InvoiceCollection-CKQflFjc.js.map +0 -1
- package/dist/chunks/InvoiceLineItemCollection-CHm9zdqh.js +0 -467
- package/dist/chunks/InvoiceLineItemCollection-CHm9zdqh.js.map +0 -1
- package/dist/chunks/TaxSettingsCollection-BBTZDH1S.js +0 -319
- package/dist/chunks/TaxSettingsCollection-BBTZDH1S.js.map +0 -1
- package/dist/chunks/calculations-DaHR17il.js +0 -333
- package/dist/chunks/calculations-DaHR17il.js.map +0 -1
- package/dist/chunks/document-money-DNVhDJyC.js.map +0 -1
- package/dist/chunks/invoice-posting-BwV8g7z0.js.map +0 -1
- package/dist/chunks/revenue-journal-DY9fro8E.js.map +0 -1
- package/dist/chunks/tenant-money-barrier-DjRXgMnX.js +0 -135
- package/dist/chunks/tenant-money-barrier-DjRXgMnX.js.map +0 -1
- package/dist/chunks/types-LDETvQ1C.js.map +0 -1
- package/dist/chunks/units-CNcjH_eE.js.map +0 -1
- package/dist/collections/MoneyMigrationDocumentCollection.d.ts +0 -12
- package/dist/collections/MoneyMigrationDocumentCollection.d.ts.map +0 -1
- package/dist/migrations/commerceLineAmounts.d.ts +0 -84
- package/dist/migrations/commerceLineAmounts.d.ts.map +0 -1
- package/dist/models/MoneyMigrationDocument.d.ts +0 -28
- package/dist/models/MoneyMigrationDocument.d.ts.map +0 -1
- package/dist/svelte/components/InvoiceLineEditor.svelte +0 -92
- package/dist/svelte/components/InvoiceLineEditor.svelte.d.ts +0 -8
- package/dist/svelte/components/InvoiceLineEditor.svelte.d.ts.map +0 -1
- package/dist/svelte/invoices/fields.d.ts +0 -6
- package/dist/svelte/invoices/fields.d.ts.map +0 -1
- package/dist/svelte/invoices/fields.js +0 -22
- package/dist/tax/legacy.d.ts +0 -48
- package/dist/tax/legacy.d.ts.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-commerce",
|
|
5
|
-
"packageVersion": "0.
|
|
5
|
+
"packageVersion": "0.57.0",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-commerce:ContractCollection": {
|
|
8
8
|
"name": "contractcollection",
|
|
@@ -217,7 +217,22 @@
|
|
|
217
217
|
"isPublic": true
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
|
-
"decoratorConfig": {
|
|
220
|
+
"decoratorConfig": {
|
|
221
|
+
"api": {
|
|
222
|
+
"include": [
|
|
223
|
+
"list",
|
|
224
|
+
"get",
|
|
225
|
+
"create",
|
|
226
|
+
"update"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"mcp": {
|
|
230
|
+
"include": [
|
|
231
|
+
"list",
|
|
232
|
+
"get"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
221
236
|
"extends": "SmrtCollection",
|
|
222
237
|
"extendsTypeArg": "Contract",
|
|
223
238
|
"exportName": "ContractCollection",
|
|
@@ -412,7 +427,7 @@
|
|
|
412
427
|
]
|
|
413
428
|
}
|
|
414
429
|
],
|
|
415
|
-
"version": "
|
|
430
|
+
"version": "8d7c3fd2"
|
|
416
431
|
},
|
|
417
432
|
"importPath": "@happyvertical/smrt-commerce"
|
|
418
433
|
},
|
|
@@ -518,14 +533,30 @@
|
|
|
518
533
|
"isPublic": true
|
|
519
534
|
}
|
|
520
535
|
},
|
|
521
|
-
"decoratorConfig": {
|
|
536
|
+
"decoratorConfig": {
|
|
537
|
+
"api": {
|
|
538
|
+
"include": [
|
|
539
|
+
"list",
|
|
540
|
+
"get",
|
|
541
|
+
"create",
|
|
542
|
+
"update",
|
|
543
|
+
"delete"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
"mcp": {
|
|
547
|
+
"include": [
|
|
548
|
+
"list",
|
|
549
|
+
"get"
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
},
|
|
522
553
|
"extends": "SmrtCollection",
|
|
523
554
|
"extendsTypeArg": "ContractLineItem",
|
|
524
555
|
"exportName": "ContractLineItemCollection",
|
|
525
556
|
"collectionExportName": "ContractLineItemCollectionCollection",
|
|
526
557
|
"schema": {
|
|
527
558
|
"tableName": "contract_line_items",
|
|
528
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"
|
|
559
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
529
560
|
"columns": {
|
|
530
561
|
"id": {
|
|
531
562
|
"type": "UUID",
|
|
@@ -643,10 +674,6 @@
|
|
|
643
674
|
"notNull": false,
|
|
644
675
|
"default": 0
|
|
645
676
|
},
|
|
646
|
-
"legacy_amount": {
|
|
647
|
-
"type": "INTEGER",
|
|
648
|
-
"notNull": false
|
|
649
|
-
},
|
|
650
677
|
"money_snapshot_id": {
|
|
651
678
|
"type": "TEXT",
|
|
652
679
|
"notNull": false
|
|
@@ -729,7 +756,7 @@
|
|
|
729
756
|
]
|
|
730
757
|
}
|
|
731
758
|
],
|
|
732
|
-
"version": "
|
|
759
|
+
"version": "ef59fe1c"
|
|
733
760
|
},
|
|
734
761
|
"importPath": "@happyvertical/smrt-commerce"
|
|
735
762
|
},
|
|
@@ -838,7 +865,22 @@
|
|
|
838
865
|
"isPublic": true
|
|
839
866
|
}
|
|
840
867
|
},
|
|
841
|
-
"decoratorConfig": {
|
|
868
|
+
"decoratorConfig": {
|
|
869
|
+
"api": {
|
|
870
|
+
"include": [
|
|
871
|
+
"list",
|
|
872
|
+
"get",
|
|
873
|
+
"create",
|
|
874
|
+
"update"
|
|
875
|
+
]
|
|
876
|
+
},
|
|
877
|
+
"mcp": {
|
|
878
|
+
"include": [
|
|
879
|
+
"list",
|
|
880
|
+
"get"
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
},
|
|
842
884
|
"extends": "SmrtCollection",
|
|
843
885
|
"extendsTypeArg": "Customer",
|
|
844
886
|
"exportName": "CustomerCollection",
|
|
@@ -1061,7 +1103,25 @@
|
|
|
1061
1103
|
}
|
|
1062
1104
|
},
|
|
1063
1105
|
"decoratorConfig": {
|
|
1064
|
-
"tableName": "document_taxes"
|
|
1106
|
+
"tableName": "document_taxes",
|
|
1107
|
+
"api": {
|
|
1108
|
+
"include": [
|
|
1109
|
+
"list",
|
|
1110
|
+
"get"
|
|
1111
|
+
]
|
|
1112
|
+
},
|
|
1113
|
+
"mcp": {
|
|
1114
|
+
"include": [
|
|
1115
|
+
"list",
|
|
1116
|
+
"get"
|
|
1117
|
+
]
|
|
1118
|
+
},
|
|
1119
|
+
"cli": {
|
|
1120
|
+
"include": [
|
|
1121
|
+
"list",
|
|
1122
|
+
"get"
|
|
1123
|
+
]
|
|
1124
|
+
}
|
|
1065
1125
|
},
|
|
1066
1126
|
"extends": "SmrtCollection",
|
|
1067
1127
|
"extendsTypeArg": "DocumentTax",
|
|
@@ -1340,7 +1400,22 @@
|
|
|
1340
1400
|
"isPublic": true
|
|
1341
1401
|
}
|
|
1342
1402
|
},
|
|
1343
|
-
"decoratorConfig": {
|
|
1403
|
+
"decoratorConfig": {
|
|
1404
|
+
"api": {
|
|
1405
|
+
"include": [
|
|
1406
|
+
"list",
|
|
1407
|
+
"get",
|
|
1408
|
+
"create",
|
|
1409
|
+
"update"
|
|
1410
|
+
]
|
|
1411
|
+
},
|
|
1412
|
+
"mcp": {
|
|
1413
|
+
"include": [
|
|
1414
|
+
"list",
|
|
1415
|
+
"get"
|
|
1416
|
+
]
|
|
1417
|
+
}
|
|
1418
|
+
},
|
|
1344
1419
|
"extends": "SmrtCollection",
|
|
1345
1420
|
"extendsTypeArg": "Fulfillment",
|
|
1346
1421
|
"exportName": "FulfillmentCollection",
|
|
@@ -1558,7 +1633,23 @@
|
|
|
1558
1633
|
"isPublic": true
|
|
1559
1634
|
}
|
|
1560
1635
|
},
|
|
1561
|
-
"decoratorConfig": {
|
|
1636
|
+
"decoratorConfig": {
|
|
1637
|
+
"api": {
|
|
1638
|
+
"include": [
|
|
1639
|
+
"list",
|
|
1640
|
+
"get",
|
|
1641
|
+
"create",
|
|
1642
|
+
"update",
|
|
1643
|
+
"delete"
|
|
1644
|
+
]
|
|
1645
|
+
},
|
|
1646
|
+
"mcp": {
|
|
1647
|
+
"include": [
|
|
1648
|
+
"list",
|
|
1649
|
+
"get"
|
|
1650
|
+
]
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1562
1653
|
"extends": "SmrtCollection",
|
|
1563
1654
|
"extendsTypeArg": "FulfillmentLineItem",
|
|
1564
1655
|
"exportName": "FulfillmentLineItemCollection",
|
|
@@ -1937,7 +2028,22 @@
|
|
|
1937
2028
|
"isPublic": true
|
|
1938
2029
|
}
|
|
1939
2030
|
},
|
|
1940
|
-
"decoratorConfig": {
|
|
2031
|
+
"decoratorConfig": {
|
|
2032
|
+
"api": {
|
|
2033
|
+
"include": [
|
|
2034
|
+
"list",
|
|
2035
|
+
"get",
|
|
2036
|
+
"create",
|
|
2037
|
+
"update"
|
|
2038
|
+
]
|
|
2039
|
+
},
|
|
2040
|
+
"mcp": {
|
|
2041
|
+
"include": [
|
|
2042
|
+
"list",
|
|
2043
|
+
"get"
|
|
2044
|
+
]
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
1941
2047
|
"extends": "SmrtCollection",
|
|
1942
2048
|
"extendsTypeArg": "Invoice",
|
|
1943
2049
|
"exportName": "InvoiceCollection",
|
|
@@ -2389,34 +2495,6 @@
|
|
|
2389
2495
|
"isStatic": false,
|
|
2390
2496
|
"isPublic": true
|
|
2391
2497
|
},
|
|
2392
|
-
"getSubtotalForInvoice": {
|
|
2393
|
-
"name": "getSubtotalForInvoice",
|
|
2394
|
-
"async": true,
|
|
2395
|
-
"parameters": [
|
|
2396
|
-
{
|
|
2397
|
-
"name": "invoiceId",
|
|
2398
|
-
"type": "string",
|
|
2399
|
-
"optional": false
|
|
2400
|
-
}
|
|
2401
|
-
],
|
|
2402
|
-
"returnType": "Promise<number>",
|
|
2403
|
-
"isStatic": false,
|
|
2404
|
-
"isPublic": true
|
|
2405
|
-
},
|
|
2406
|
-
"getTaxForInvoice": {
|
|
2407
|
-
"name": "getTaxForInvoice",
|
|
2408
|
-
"async": true,
|
|
2409
|
-
"parameters": [
|
|
2410
|
-
{
|
|
2411
|
-
"name": "invoiceId",
|
|
2412
|
-
"type": "string",
|
|
2413
|
-
"optional": false
|
|
2414
|
-
}
|
|
2415
|
-
],
|
|
2416
|
-
"returnType": "Promise<number>",
|
|
2417
|
-
"isStatic": false,
|
|
2418
|
-
"isPublic": true
|
|
2419
|
-
},
|
|
2420
2498
|
"getNextSortOrder": {
|
|
2421
2499
|
"name": "getNextSortOrder",
|
|
2422
2500
|
"async": true,
|
|
@@ -2431,34 +2509,6 @@
|
|
|
2431
2509
|
"isStatic": false,
|
|
2432
2510
|
"isPublic": true
|
|
2433
2511
|
},
|
|
2434
|
-
"recalculateAmounts": {
|
|
2435
|
-
"name": "recalculateAmounts",
|
|
2436
|
-
"async": true,
|
|
2437
|
-
"parameters": [
|
|
2438
|
-
{
|
|
2439
|
-
"name": "invoiceId",
|
|
2440
|
-
"type": "string",
|
|
2441
|
-
"optional": false
|
|
2442
|
-
}
|
|
2443
|
-
],
|
|
2444
|
-
"returnType": "Promise<InvoiceLineItem[]>",
|
|
2445
|
-
"isStatic": false,
|
|
2446
|
-
"isPublic": true
|
|
2447
|
-
},
|
|
2448
|
-
"toAccountingLineItems": {
|
|
2449
|
-
"name": "toAccountingLineItems",
|
|
2450
|
-
"async": true,
|
|
2451
|
-
"parameters": [
|
|
2452
|
-
{
|
|
2453
|
-
"name": "invoiceId",
|
|
2454
|
-
"type": "string",
|
|
2455
|
-
"optional": false
|
|
2456
|
-
}
|
|
2457
|
-
],
|
|
2458
|
-
"returnType": "Promise<AccountingLineItemInput[]>",
|
|
2459
|
-
"isStatic": false,
|
|
2460
|
-
"isPublic": true
|
|
2461
|
-
},
|
|
2462
2512
|
"findByTenant": {
|
|
2463
2513
|
"name": "findByTenant",
|
|
2464
2514
|
"async": true,
|
|
@@ -2496,14 +2546,30 @@
|
|
|
2496
2546
|
"isPublic": true
|
|
2497
2547
|
}
|
|
2498
2548
|
},
|
|
2499
|
-
"decoratorConfig": {
|
|
2549
|
+
"decoratorConfig": {
|
|
2550
|
+
"api": {
|
|
2551
|
+
"include": [
|
|
2552
|
+
"list",
|
|
2553
|
+
"get",
|
|
2554
|
+
"create",
|
|
2555
|
+
"update",
|
|
2556
|
+
"delete"
|
|
2557
|
+
]
|
|
2558
|
+
},
|
|
2559
|
+
"mcp": {
|
|
2560
|
+
"include": [
|
|
2561
|
+
"list",
|
|
2562
|
+
"get"
|
|
2563
|
+
]
|
|
2564
|
+
}
|
|
2565
|
+
},
|
|
2500
2566
|
"extends": "SmrtCollection",
|
|
2501
2567
|
"extendsTypeArg": "InvoiceLineItem",
|
|
2502
2568
|
"exportName": "InvoiceLineItemCollection",
|
|
2503
2569
|
"collectionExportName": "InvoiceLineItemCollectionCollection",
|
|
2504
2570
|
"schema": {
|
|
2505
2571
|
"tableName": "invoice_line_items",
|
|
2506
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"
|
|
2572
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
2507
2573
|
"columns": {
|
|
2508
2574
|
"id": {
|
|
2509
2575
|
"type": "UUID",
|
|
@@ -2589,12 +2655,6 @@
|
|
|
2589
2655
|
"unique": false,
|
|
2590
2656
|
"default": 1
|
|
2591
2657
|
},
|
|
2592
|
-
"invoice_editor_state_json": {
|
|
2593
|
-
"type": "TEXT",
|
|
2594
|
-
"notNull": false,
|
|
2595
|
-
"unique": false,
|
|
2596
|
-
"default": ""
|
|
2597
|
-
},
|
|
2598
2658
|
"unit_price": {
|
|
2599
2659
|
"type": "INTEGER",
|
|
2600
2660
|
"notNull": false,
|
|
@@ -2663,11 +2723,6 @@
|
|
|
2663
2723
|
"unique": false,
|
|
2664
2724
|
"default": 0
|
|
2665
2725
|
},
|
|
2666
|
-
"legacy_amount": {
|
|
2667
|
-
"type": "INTEGER",
|
|
2668
|
-
"notNull": false,
|
|
2669
|
-
"unique": false
|
|
2670
|
-
},
|
|
2671
2726
|
"money_snapshot_id": {
|
|
2672
2727
|
"type": "TEXT",
|
|
2673
2728
|
"notNull": false,
|
|
@@ -2763,21 +2818,21 @@
|
|
|
2763
2818
|
]
|
|
2764
2819
|
}
|
|
2765
2820
|
],
|
|
2766
|
-
"version": "
|
|
2821
|
+
"version": "9b493ddb"
|
|
2767
2822
|
},
|
|
2768
2823
|
"importPath": "@happyvertical/smrt-commerce"
|
|
2769
2824
|
},
|
|
2770
|
-
"@happyvertical/smrt-commerce:
|
|
2771
|
-
"name": "
|
|
2772
|
-
"className": "
|
|
2773
|
-
"qualifiedName": "@happyvertical/smrt-commerce:
|
|
2774
|
-
"collection": "
|
|
2775
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/collections/
|
|
2825
|
+
"@happyvertical/smrt-commerce:PaymentAllocationCollection": {
|
|
2826
|
+
"name": "paymentallocationcollection",
|
|
2827
|
+
"className": "PaymentAllocationCollection",
|
|
2828
|
+
"qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocationCollection",
|
|
2829
|
+
"collection": "paymentallocations",
|
|
2830
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/collections/PaymentAllocationCollection.ts",
|
|
2776
2831
|
"packageName": "@happyvertical/smrt-commerce",
|
|
2777
2832
|
"fields": {},
|
|
2778
2833
|
"methods": {
|
|
2779
|
-
"
|
|
2780
|
-
"name": "
|
|
2834
|
+
"allocatePayment": {
|
|
2835
|
+
"name": "allocatePayment",
|
|
2781
2836
|
"async": true,
|
|
2782
2837
|
"parameters": [
|
|
2783
2838
|
{
|
|
@@ -2786,177 +2841,12 @@
|
|
|
2786
2841
|
"optional": false,
|
|
2787
2842
|
"memberTypes": [
|
|
2788
2843
|
"string",
|
|
2789
|
-
"
|
|
2844
|
+
"object[]",
|
|
2845
|
+
"number"
|
|
2790
2846
|
]
|
|
2791
2847
|
}
|
|
2792
2848
|
],
|
|
2793
|
-
"returnType": "Promise<
|
|
2794
|
-
"isStatic": false,
|
|
2795
|
-
"isPublic": true
|
|
2796
|
-
}
|
|
2797
|
-
},
|
|
2798
|
-
"decoratorConfig": {
|
|
2799
|
-
"tableName": "commerce_money_migration_documents",
|
|
2800
|
-
"api": false,
|
|
2801
|
-
"mcp": false,
|
|
2802
|
-
"cli": false
|
|
2803
|
-
},
|
|
2804
|
-
"extends": "SmrtCollection",
|
|
2805
|
-
"extendsTypeArg": "MoneyMigrationDocument",
|
|
2806
|
-
"exportName": "MoneyMigrationDocumentCollection",
|
|
2807
|
-
"collectionExportName": "MoneyMigrationDocumentCollectionCollection",
|
|
2808
|
-
"schema": {
|
|
2809
|
-
"tableName": "commerce_money_migration_documents",
|
|
2810
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"commerce_money_migration_documents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"migration_id\" TEXT,\n \"document_type\" TEXT DEFAULT 'invoice',\n \"document_id\" TEXT,\n \"state\" TEXT DEFAULT 'prepared',\n \"pre_image_json\" TEXT,\n \"pre_checksum\" TEXT,\n \"post_image_json\" TEXT,\n \"post_checksum\" TEXT\n);",
|
|
2811
|
-
"columns": {
|
|
2812
|
-
"id": {
|
|
2813
|
-
"type": "UUID",
|
|
2814
|
-
"primaryKey": true,
|
|
2815
|
-
"referenceKind": "id",
|
|
2816
|
-
"notNull": true
|
|
2817
|
-
},
|
|
2818
|
-
"slug": {
|
|
2819
|
-
"type": "TEXT",
|
|
2820
|
-
"notNull": true
|
|
2821
|
-
},
|
|
2822
|
-
"context": {
|
|
2823
|
-
"type": "TEXT",
|
|
2824
|
-
"notNull": true,
|
|
2825
|
-
"default": ""
|
|
2826
|
-
},
|
|
2827
|
-
"created_at": {
|
|
2828
|
-
"type": "TIMESTAMP",
|
|
2829
|
-
"notNull": true,
|
|
2830
|
-
"default": "current_timestamp"
|
|
2831
|
-
},
|
|
2832
|
-
"updated_at": {
|
|
2833
|
-
"type": "TIMESTAMP",
|
|
2834
|
-
"notNull": true,
|
|
2835
|
-
"default": "current_timestamp"
|
|
2836
|
-
},
|
|
2837
|
-
"tenant_id": {
|
|
2838
|
-
"type": "UUID",
|
|
2839
|
-
"referenceKind": "tenantId",
|
|
2840
|
-
"notNull": true,
|
|
2841
|
-
"unique": false
|
|
2842
|
-
},
|
|
2843
|
-
"migration_id": {
|
|
2844
|
-
"type": "TEXT",
|
|
2845
|
-
"notNull": false,
|
|
2846
|
-
"unique": false
|
|
2847
|
-
},
|
|
2848
|
-
"document_type": {
|
|
2849
|
-
"type": "TEXT",
|
|
2850
|
-
"notNull": false,
|
|
2851
|
-
"unique": false,
|
|
2852
|
-
"default": "invoice"
|
|
2853
|
-
},
|
|
2854
|
-
"document_id": {
|
|
2855
|
-
"type": "TEXT",
|
|
2856
|
-
"notNull": false,
|
|
2857
|
-
"unique": false
|
|
2858
|
-
},
|
|
2859
|
-
"state": {
|
|
2860
|
-
"type": "TEXT",
|
|
2861
|
-
"notNull": false,
|
|
2862
|
-
"unique": false,
|
|
2863
|
-
"default": "prepared"
|
|
2864
|
-
},
|
|
2865
|
-
"pre_image_json": {
|
|
2866
|
-
"type": "TEXT",
|
|
2867
|
-
"notNull": false,
|
|
2868
|
-
"unique": false
|
|
2869
|
-
},
|
|
2870
|
-
"pre_checksum": {
|
|
2871
|
-
"type": "TEXT",
|
|
2872
|
-
"notNull": false,
|
|
2873
|
-
"unique": false
|
|
2874
|
-
},
|
|
2875
|
-
"post_image_json": {
|
|
2876
|
-
"type": "TEXT",
|
|
2877
|
-
"notNull": false,
|
|
2878
|
-
"unique": false
|
|
2879
|
-
},
|
|
2880
|
-
"post_checksum": {
|
|
2881
|
-
"type": "TEXT",
|
|
2882
|
-
"notNull": false,
|
|
2883
|
-
"unique": false
|
|
2884
|
-
}
|
|
2885
|
-
},
|
|
2886
|
-
"indexes": [
|
|
2887
|
-
{
|
|
2888
|
-
"name": "commerce_money_migration_documents_tenant_id_migration_id_idx",
|
|
2889
|
-
"columns": [
|
|
2890
|
-
"tenant_id",
|
|
2891
|
-
"migration_id",
|
|
2892
|
-
"document_type",
|
|
2893
|
-
"document_id"
|
|
2894
|
-
],
|
|
2895
|
-
"unique": true,
|
|
2896
|
-
"nullsNotDistinct": true
|
|
2897
|
-
},
|
|
2898
|
-
{
|
|
2899
|
-
"name": "commerce_money_migration_documents_slug_context_idx",
|
|
2900
|
-
"columns": [
|
|
2901
|
-
"slug",
|
|
2902
|
-
"context"
|
|
2903
|
-
]
|
|
2904
|
-
},
|
|
2905
|
-
{
|
|
2906
|
-
"name": "commerce_money_migration_documents_migration_id_idx",
|
|
2907
|
-
"columns": [
|
|
2908
|
-
"migration_id"
|
|
2909
|
-
]
|
|
2910
|
-
},
|
|
2911
|
-
{
|
|
2912
|
-
"name": "commerce_money_migration_documents_document_type_idx",
|
|
2913
|
-
"columns": [
|
|
2914
|
-
"document_type"
|
|
2915
|
-
]
|
|
2916
|
-
},
|
|
2917
|
-
{
|
|
2918
|
-
"name": "commerce_money_migration_documents_document_id_idx",
|
|
2919
|
-
"columns": [
|
|
2920
|
-
"document_id"
|
|
2921
|
-
]
|
|
2922
|
-
},
|
|
2923
|
-
{
|
|
2924
|
-
"name": "commerce_money_migration_documents_tenant_id_created_at_idx",
|
|
2925
|
-
"columns": [
|
|
2926
|
-
"tenant_id",
|
|
2927
|
-
"created_at"
|
|
2928
|
-
]
|
|
2929
|
-
}
|
|
2930
|
-
],
|
|
2931
|
-
"version": "c84f4bd2"
|
|
2932
|
-
},
|
|
2933
|
-
"importPath": "@happyvertical/smrt-commerce"
|
|
2934
|
-
},
|
|
2935
|
-
"@happyvertical/smrt-commerce:PaymentAllocationCollection": {
|
|
2936
|
-
"name": "paymentallocationcollection",
|
|
2937
|
-
"className": "PaymentAllocationCollection",
|
|
2938
|
-
"qualifiedName": "@happyvertical/smrt-commerce:PaymentAllocationCollection",
|
|
2939
|
-
"collection": "paymentallocations",
|
|
2940
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/collections/PaymentAllocationCollection.ts",
|
|
2941
|
-
"packageName": "@happyvertical/smrt-commerce",
|
|
2942
|
-
"fields": {},
|
|
2943
|
-
"methods": {
|
|
2944
|
-
"allocatePayment": {
|
|
2945
|
-
"name": "allocatePayment",
|
|
2946
|
-
"async": true,
|
|
2947
|
-
"parameters": [
|
|
2948
|
-
{
|
|
2949
|
-
"name": "input",
|
|
2950
|
-
"type": "object",
|
|
2951
|
-
"optional": false,
|
|
2952
|
-
"memberTypes": [
|
|
2953
|
-
"string",
|
|
2954
|
-
"object[]",
|
|
2955
|
-
"number"
|
|
2956
|
-
]
|
|
2957
|
-
}
|
|
2958
|
-
],
|
|
2959
|
-
"returnType": "Promise<PaymentAllocation[]>",
|
|
2849
|
+
"returnType": "Promise<PaymentAllocation[]>",
|
|
2960
2850
|
"isStatic": false,
|
|
2961
2851
|
"isPublic": true
|
|
2962
2852
|
},
|
|
@@ -3138,7 +3028,26 @@
|
|
|
3138
3028
|
"isPublic": true
|
|
3139
3029
|
}
|
|
3140
3030
|
},
|
|
3141
|
-
"decoratorConfig": {
|
|
3031
|
+
"decoratorConfig": {
|
|
3032
|
+
"api": {
|
|
3033
|
+
"include": [
|
|
3034
|
+
"list",
|
|
3035
|
+
"get"
|
|
3036
|
+
]
|
|
3037
|
+
},
|
|
3038
|
+
"mcp": {
|
|
3039
|
+
"include": [
|
|
3040
|
+
"list",
|
|
3041
|
+
"get"
|
|
3042
|
+
]
|
|
3043
|
+
},
|
|
3044
|
+
"cli": {
|
|
3045
|
+
"include": [
|
|
3046
|
+
"list",
|
|
3047
|
+
"get"
|
|
3048
|
+
]
|
|
3049
|
+
}
|
|
3050
|
+
},
|
|
3142
3051
|
"extends": "SmrtCollection",
|
|
3143
3052
|
"extendsTypeArg": "PaymentAllocation",
|
|
3144
3053
|
"exportName": "PaymentAllocationCollection",
|
|
@@ -3440,7 +3349,22 @@
|
|
|
3440
3349
|
"isPublic": true
|
|
3441
3350
|
}
|
|
3442
3351
|
},
|
|
3443
|
-
"decoratorConfig": {
|
|
3352
|
+
"decoratorConfig": {
|
|
3353
|
+
"api": {
|
|
3354
|
+
"include": [
|
|
3355
|
+
"list",
|
|
3356
|
+
"get",
|
|
3357
|
+
"create",
|
|
3358
|
+
"update"
|
|
3359
|
+
]
|
|
3360
|
+
},
|
|
3361
|
+
"mcp": {
|
|
3362
|
+
"include": [
|
|
3363
|
+
"list",
|
|
3364
|
+
"get"
|
|
3365
|
+
]
|
|
3366
|
+
}
|
|
3367
|
+
},
|
|
3444
3368
|
"extends": "SmrtCollection",
|
|
3445
3369
|
"extendsTypeArg": "Payment",
|
|
3446
3370
|
"exportName": "PaymentCollection",
|
|
@@ -3777,7 +3701,22 @@
|
|
|
3777
3701
|
"isPublic": true
|
|
3778
3702
|
}
|
|
3779
3703
|
},
|
|
3780
|
-
"decoratorConfig": {
|
|
3704
|
+
"decoratorConfig": {
|
|
3705
|
+
"api": {
|
|
3706
|
+
"include": [
|
|
3707
|
+
"list",
|
|
3708
|
+
"get",
|
|
3709
|
+
"create",
|
|
3710
|
+
"update"
|
|
3711
|
+
]
|
|
3712
|
+
},
|
|
3713
|
+
"mcp": {
|
|
3714
|
+
"include": [
|
|
3715
|
+
"list",
|
|
3716
|
+
"get"
|
|
3717
|
+
]
|
|
3718
|
+
}
|
|
3719
|
+
},
|
|
3781
3720
|
"extends": "SmrtCollection",
|
|
3782
3721
|
"extendsTypeArg": "PaymentInstrument",
|
|
3783
3722
|
"exportName": "PaymentInstrumentCollection",
|
|
@@ -4050,7 +3989,22 @@
|
|
|
4050
3989
|
"isPublic": true
|
|
4051
3990
|
}
|
|
4052
3991
|
},
|
|
4053
|
-
"decoratorConfig": {
|
|
3992
|
+
"decoratorConfig": {
|
|
3993
|
+
"api": {
|
|
3994
|
+
"include": [
|
|
3995
|
+
"list",
|
|
3996
|
+
"get",
|
|
3997
|
+
"create",
|
|
3998
|
+
"update"
|
|
3999
|
+
]
|
|
4000
|
+
},
|
|
4001
|
+
"mcp": {
|
|
4002
|
+
"include": [
|
|
4003
|
+
"list",
|
|
4004
|
+
"get"
|
|
4005
|
+
]
|
|
4006
|
+
}
|
|
4007
|
+
},
|
|
4054
4008
|
"extends": "SmrtCollection",
|
|
4055
4009
|
"extendsTypeArg": "PaymentIntent",
|
|
4056
4010
|
"exportName": "PaymentIntentCollection",
|
|
@@ -4368,7 +4322,26 @@
|
|
|
4368
4322
|
"isPublic": true
|
|
4369
4323
|
}
|
|
4370
4324
|
},
|
|
4371
|
-
"decoratorConfig": {
|
|
4325
|
+
"decoratorConfig": {
|
|
4326
|
+
"api": {
|
|
4327
|
+
"include": [
|
|
4328
|
+
"list",
|
|
4329
|
+
"get"
|
|
4330
|
+
]
|
|
4331
|
+
},
|
|
4332
|
+
"mcp": {
|
|
4333
|
+
"include": [
|
|
4334
|
+
"list",
|
|
4335
|
+
"get"
|
|
4336
|
+
]
|
|
4337
|
+
},
|
|
4338
|
+
"cli": {
|
|
4339
|
+
"include": [
|
|
4340
|
+
"list",
|
|
4341
|
+
"get"
|
|
4342
|
+
]
|
|
4343
|
+
}
|
|
4344
|
+
},
|
|
4372
4345
|
"extends": "SmrtCollection",
|
|
4373
4346
|
"extendsTypeArg": "Payout",
|
|
4374
4347
|
"exportName": "PayoutCollection",
|
|
@@ -4770,7 +4743,7 @@
|
|
|
4770
4743
|
]
|
|
4771
4744
|
}
|
|
4772
4745
|
],
|
|
4773
|
-
"version": "
|
|
4746
|
+
"version": "7f5f7bfd"
|
|
4774
4747
|
},
|
|
4775
4748
|
"importPath": "@happyvertical/smrt-commerce"
|
|
4776
4749
|
},
|
|
@@ -5041,6 +5014,11 @@
|
|
|
5041
5014
|
"name": "code",
|
|
5042
5015
|
"type": "string",
|
|
5043
5016
|
"optional": false
|
|
5017
|
+
},
|
|
5018
|
+
{
|
|
5019
|
+
"name": "tenantId",
|
|
5020
|
+
"type": "string",
|
|
5021
|
+
"optional": true
|
|
5044
5022
|
}
|
|
5045
5023
|
],
|
|
5046
5024
|
"returnType": "Promise<TaxCode | null>",
|
|
@@ -5048,7 +5026,22 @@
|
|
|
5048
5026
|
"isPublic": true
|
|
5049
5027
|
}
|
|
5050
5028
|
},
|
|
5051
|
-
"decoratorConfig": {
|
|
5029
|
+
"decoratorConfig": {
|
|
5030
|
+
"api": {
|
|
5031
|
+
"include": [
|
|
5032
|
+
"list",
|
|
5033
|
+
"get",
|
|
5034
|
+
"create",
|
|
5035
|
+
"update"
|
|
5036
|
+
]
|
|
5037
|
+
},
|
|
5038
|
+
"mcp": {
|
|
5039
|
+
"include": [
|
|
5040
|
+
"list",
|
|
5041
|
+
"get"
|
|
5042
|
+
]
|
|
5043
|
+
}
|
|
5044
|
+
},
|
|
5052
5045
|
"extends": "SmrtCollection",
|
|
5053
5046
|
"extendsTypeArg": "TaxCode",
|
|
5054
5047
|
"exportName": "TaxCodeCollection",
|
|
@@ -5160,7 +5153,22 @@
|
|
|
5160
5153
|
"packageName": "@happyvertical/smrt-commerce",
|
|
5161
5154
|
"fields": {},
|
|
5162
5155
|
"methods": {},
|
|
5163
|
-
"decoratorConfig": {
|
|
5156
|
+
"decoratorConfig": {
|
|
5157
|
+
"api": {
|
|
5158
|
+
"include": [
|
|
5159
|
+
"list",
|
|
5160
|
+
"get",
|
|
5161
|
+
"create",
|
|
5162
|
+
"update"
|
|
5163
|
+
]
|
|
5164
|
+
},
|
|
5165
|
+
"mcp": {
|
|
5166
|
+
"include": [
|
|
5167
|
+
"list",
|
|
5168
|
+
"get"
|
|
5169
|
+
]
|
|
5170
|
+
}
|
|
5171
|
+
},
|
|
5164
5172
|
"extends": "SmrtCollection",
|
|
5165
5173
|
"extendsTypeArg": "TaxComponent",
|
|
5166
5174
|
"exportName": "TaxComponentCollection",
|
|
@@ -5302,102 +5310,34 @@
|
|
|
5302
5310
|
"name": "tenantId",
|
|
5303
5311
|
"type": "string",
|
|
5304
5312
|
"optional": false
|
|
5305
|
-
},
|
|
5306
|
-
{
|
|
5307
|
-
"name": "create",
|
|
5308
|
-
"type": "any",
|
|
5309
|
-
"optional": true
|
|
5310
|
-
}
|
|
5311
|
-
],
|
|
5312
|
-
"returnType": "Promise<TaxSettings | null>",
|
|
5313
|
-
"isStatic": false,
|
|
5314
|
-
"isPublic": true
|
|
5315
|
-
},
|
|
5316
|
-
"beginMoneyMigration": {
|
|
5317
|
-
"name": "beginMoneyMigration",
|
|
5318
|
-
"async": true,
|
|
5319
|
-
"parameters": [
|
|
5320
|
-
{
|
|
5321
|
-
"name": "tenantId",
|
|
5322
|
-
"type": "string",
|
|
5323
|
-
"optional": false
|
|
5324
|
-
},
|
|
5325
|
-
{
|
|
5326
|
-
"name": "requestedMigrationId",
|
|
5327
|
-
"type": "string",
|
|
5328
|
-
"optional": true
|
|
5329
5313
|
}
|
|
5330
5314
|
],
|
|
5331
|
-
"returnType": "Promise<
|
|
5315
|
+
"returnType": "Promise<TaxSettings>",
|
|
5332
5316
|
"isStatic": false,
|
|
5333
5317
|
"isPublic": true
|
|
5318
|
+
}
|
|
5319
|
+
},
|
|
5320
|
+
"decoratorConfig": {
|
|
5321
|
+
"api": {
|
|
5322
|
+
"include": [
|
|
5323
|
+
"get",
|
|
5324
|
+
"create",
|
|
5325
|
+
"update"
|
|
5326
|
+
]
|
|
5334
5327
|
},
|
|
5335
|
-
"
|
|
5336
|
-
"
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
{
|
|
5340
|
-
"name": "tenantId",
|
|
5341
|
-
"type": "string",
|
|
5342
|
-
"optional": false
|
|
5343
|
-
},
|
|
5344
|
-
{
|
|
5345
|
-
"name": "migrationId",
|
|
5346
|
-
"type": "string",
|
|
5347
|
-
"optional": false
|
|
5348
|
-
}
|
|
5349
|
-
],
|
|
5350
|
-
"returnType": "Promise<void>",
|
|
5351
|
-
"isStatic": false,
|
|
5352
|
-
"isPublic": true
|
|
5353
|
-
},
|
|
5354
|
-
"restoreLegacyMoneyModel": {
|
|
5355
|
-
"name": "restoreLegacyMoneyModel",
|
|
5356
|
-
"async": true,
|
|
5357
|
-
"parameters": [
|
|
5358
|
-
{
|
|
5359
|
-
"name": "tenantId",
|
|
5360
|
-
"type": "string",
|
|
5361
|
-
"optional": false
|
|
5362
|
-
},
|
|
5363
|
-
{
|
|
5364
|
-
"name": "migrationId",
|
|
5365
|
-
"type": "string",
|
|
5366
|
-
"optional": false
|
|
5367
|
-
}
|
|
5368
|
-
],
|
|
5369
|
-
"returnType": "Promise<void>",
|
|
5370
|
-
"isStatic": false,
|
|
5371
|
-
"isPublic": true
|
|
5372
|
-
},
|
|
5373
|
-
"beginMoneyRollback": {
|
|
5374
|
-
"name": "beginMoneyRollback",
|
|
5375
|
-
"async": true,
|
|
5376
|
-
"parameters": [
|
|
5377
|
-
{
|
|
5378
|
-
"name": "tenantId",
|
|
5379
|
-
"type": "string",
|
|
5380
|
-
"optional": false
|
|
5381
|
-
},
|
|
5382
|
-
{
|
|
5383
|
-
"name": "migrationId",
|
|
5384
|
-
"type": "string",
|
|
5385
|
-
"optional": false
|
|
5386
|
-
}
|
|
5387
|
-
],
|
|
5388
|
-
"returnType": "Promise<void>",
|
|
5389
|
-
"isStatic": false,
|
|
5390
|
-
"isPublic": true
|
|
5328
|
+
"mcp": {
|
|
5329
|
+
"include": [
|
|
5330
|
+
"get"
|
|
5331
|
+
]
|
|
5391
5332
|
}
|
|
5392
5333
|
},
|
|
5393
|
-
"decoratorConfig": {},
|
|
5394
5334
|
"extends": "SmrtCollection",
|
|
5395
5335
|
"extendsTypeArg": "TaxSettings",
|
|
5396
5336
|
"exportName": "TaxSettingsCollection",
|
|
5397
5337
|
"collectionExportName": "TaxSettingsCollectionCollection",
|
|
5398
5338
|
"schema": {
|
|
5399
5339
|
"tableName": "tax_settings",
|
|
5400
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT
|
|
5340
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
|
|
5401
5341
|
"columns": {
|
|
5402
5342
|
"id": {
|
|
5403
5343
|
"type": "UUID",
|
|
@@ -5470,17 +5410,6 @@
|
|
|
5470
5410
|
"type": "TEXT",
|
|
5471
5411
|
"notNull": false,
|
|
5472
5412
|
"unique": false
|
|
5473
|
-
},
|
|
5474
|
-
"money_model": {
|
|
5475
|
-
"type": "TEXT",
|
|
5476
|
-
"notNull": false,
|
|
5477
|
-
"unique": false,
|
|
5478
|
-
"default": "legacy"
|
|
5479
|
-
},
|
|
5480
|
-
"money_migration_id": {
|
|
5481
|
-
"type": "TEXT",
|
|
5482
|
-
"notNull": false,
|
|
5483
|
-
"unique": false
|
|
5484
5413
|
}
|
|
5485
5414
|
},
|
|
5486
5415
|
"indexes": [
|
|
@@ -5518,7 +5447,7 @@
|
|
|
5518
5447
|
]
|
|
5519
5448
|
}
|
|
5520
5449
|
],
|
|
5521
|
-
"version": "
|
|
5450
|
+
"version": "2af5863d"
|
|
5522
5451
|
},
|
|
5523
5452
|
"importPath": "@happyvertical/smrt-commerce"
|
|
5524
5453
|
},
|
|
@@ -5639,7 +5568,25 @@
|
|
|
5639
5568
|
}
|
|
5640
5569
|
},
|
|
5641
5570
|
"decoratorConfig": {
|
|
5642
|
-
"tableName": "tax_summary_reports"
|
|
5571
|
+
"tableName": "tax_summary_reports",
|
|
5572
|
+
"api": {
|
|
5573
|
+
"include": [
|
|
5574
|
+
"list",
|
|
5575
|
+
"get"
|
|
5576
|
+
]
|
|
5577
|
+
},
|
|
5578
|
+
"mcp": {
|
|
5579
|
+
"include": [
|
|
5580
|
+
"list",
|
|
5581
|
+
"get"
|
|
5582
|
+
]
|
|
5583
|
+
},
|
|
5584
|
+
"cli": {
|
|
5585
|
+
"include": [
|
|
5586
|
+
"list",
|
|
5587
|
+
"get"
|
|
5588
|
+
]
|
|
5589
|
+
}
|
|
5643
5590
|
},
|
|
5644
5591
|
"extends": "SmrtReportCollection",
|
|
5645
5592
|
"extendsTypeArg": "TaxSummaryReport",
|
|
@@ -5939,7 +5886,22 @@
|
|
|
5939
5886
|
"isPublic": true
|
|
5940
5887
|
}
|
|
5941
5888
|
},
|
|
5942
|
-
"decoratorConfig": {
|
|
5889
|
+
"decoratorConfig": {
|
|
5890
|
+
"api": {
|
|
5891
|
+
"include": [
|
|
5892
|
+
"list",
|
|
5893
|
+
"get",
|
|
5894
|
+
"create",
|
|
5895
|
+
"update"
|
|
5896
|
+
]
|
|
5897
|
+
},
|
|
5898
|
+
"mcp": {
|
|
5899
|
+
"include": [
|
|
5900
|
+
"list",
|
|
5901
|
+
"get"
|
|
5902
|
+
]
|
|
5903
|
+
}
|
|
5904
|
+
},
|
|
5943
5905
|
"extends": "SmrtCollection",
|
|
5944
5906
|
"extendsTypeArg": "Vendor",
|
|
5945
5907
|
"exportName": "VendorCollection",
|
|
@@ -6145,6 +6107,7 @@
|
|
|
6145
6107
|
"order",
|
|
6146
6108
|
"lease",
|
|
6147
6109
|
"agreement",
|
|
6110
|
+
"supplier_quote",
|
|
6148
6111
|
"purchase_order",
|
|
6149
6112
|
"wholesale_order",
|
|
6150
6113
|
"production_order",
|
|
@@ -6183,7 +6146,12 @@
|
|
|
6183
6146
|
"discountTotal": {
|
|
6184
6147
|
"type": "integer",
|
|
6185
6148
|
"required": false,
|
|
6186
|
-
"default": 0
|
|
6149
|
+
"default": 0,
|
|
6150
|
+
"_meta": {
|
|
6151
|
+
"ui": {
|
|
6152
|
+
"format": "money"
|
|
6153
|
+
}
|
|
6154
|
+
}
|
|
6187
6155
|
},
|
|
6188
6156
|
"taxAmount": {
|
|
6189
6157
|
"type": "integer",
|
|
@@ -6640,7 +6608,7 @@
|
|
|
6640
6608
|
]
|
|
6641
6609
|
}
|
|
6642
6610
|
],
|
|
6643
|
-
"version": "
|
|
6611
|
+
"version": "8d7c3fd2"
|
|
6644
6612
|
},
|
|
6645
6613
|
"importPath": "@happyvertical/smrt-commerce"
|
|
6646
6614
|
},
|
|
@@ -6691,6 +6659,7 @@
|
|
|
6691
6659
|
"order",
|
|
6692
6660
|
"lease",
|
|
6693
6661
|
"agreement",
|
|
6662
|
+
"supplier_quote",
|
|
6694
6663
|
"purchase_order",
|
|
6695
6664
|
"wholesale_order",
|
|
6696
6665
|
"production_order",
|
|
@@ -6729,7 +6698,12 @@
|
|
|
6729
6698
|
"discountTotal": {
|
|
6730
6699
|
"type": "integer",
|
|
6731
6700
|
"required": false,
|
|
6732
|
-
"default": 0
|
|
6701
|
+
"default": 0,
|
|
6702
|
+
"_meta": {
|
|
6703
|
+
"ui": {
|
|
6704
|
+
"format": "money"
|
|
6705
|
+
}
|
|
6706
|
+
}
|
|
6733
6707
|
},
|
|
6734
6708
|
"taxAmount": {
|
|
6735
6709
|
"type": "integer",
|
|
@@ -7234,7 +7208,7 @@
|
|
|
7234
7208
|
"className": "PurchaseContract",
|
|
7235
7209
|
"qualifiedName": "@happyvertical/smrt-commerce:PurchaseContract",
|
|
7236
7210
|
"collection": "contracts",
|
|
7237
|
-
"description": "Supplier-side contracts, including purchase and production orders.",
|
|
7211
|
+
"description": "Supplier-side contracts, including supplier quotes, purchase and production orders.",
|
|
7238
7212
|
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
7239
7213
|
"packageName": "@happyvertical/smrt-commerce",
|
|
7240
7214
|
"fields": {
|
|
@@ -7276,6 +7250,7 @@
|
|
|
7276
7250
|
"order",
|
|
7277
7251
|
"lease",
|
|
7278
7252
|
"agreement",
|
|
7253
|
+
"supplier_quote",
|
|
7279
7254
|
"purchase_order",
|
|
7280
7255
|
"wholesale_order",
|
|
7281
7256
|
"production_order",
|
|
@@ -7314,7 +7289,12 @@
|
|
|
7314
7289
|
"discountTotal": {
|
|
7315
7290
|
"type": "integer",
|
|
7316
7291
|
"required": false,
|
|
7317
|
-
"default": 0
|
|
7292
|
+
"default": 0,
|
|
7293
|
+
"_meta": {
|
|
7294
|
+
"ui": {
|
|
7295
|
+
"format": "money"
|
|
7296
|
+
}
|
|
7297
|
+
}
|
|
7318
7298
|
},
|
|
7319
7299
|
"taxAmount": {
|
|
7320
7300
|
"type": "integer",
|
|
@@ -7454,7 +7434,7 @@
|
|
|
7454
7434
|
"required": false,
|
|
7455
7435
|
"related": "Vendor",
|
|
7456
7436
|
"_meta": {
|
|
7457
|
-
"description": "The vendor
|
|
7437
|
+
"description": "The vendor supplying this quote or purchase contract."
|
|
7458
7438
|
}
|
|
7459
7439
|
}
|
|
7460
7440
|
},
|
|
@@ -7616,10 +7596,539 @@
|
|
|
7616
7596
|
]
|
|
7617
7597
|
}
|
|
7618
7598
|
},
|
|
7619
|
-
"extends": "Contract",
|
|
7620
|
-
"exportName": "PurchaseContract",
|
|
7621
|
-
"collectionExportName": "PurchaseContractCollection",
|
|
7622
|
-
"abstractDeclaredApi": null,
|
|
7599
|
+
"extends": "Contract",
|
|
7600
|
+
"exportName": "PurchaseContract",
|
|
7601
|
+
"collectionExportName": "PurchaseContractCollection",
|
|
7602
|
+
"abstractDeclaredApi": null,
|
|
7603
|
+
"schema": {
|
|
7604
|
+
"tableName": "contracts",
|
|
7605
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
|
|
7606
|
+
"columns": {
|
|
7607
|
+
"id": {
|
|
7608
|
+
"type": "UUID",
|
|
7609
|
+
"primaryKey": true,
|
|
7610
|
+
"referenceKind": "id",
|
|
7611
|
+
"notNull": true
|
|
7612
|
+
},
|
|
7613
|
+
"slug": {
|
|
7614
|
+
"type": "TEXT",
|
|
7615
|
+
"notNull": true
|
|
7616
|
+
},
|
|
7617
|
+
"context": {
|
|
7618
|
+
"type": "TEXT",
|
|
7619
|
+
"notNull": true,
|
|
7620
|
+
"default": ""
|
|
7621
|
+
},
|
|
7622
|
+
"_meta_type": {
|
|
7623
|
+
"type": "TEXT",
|
|
7624
|
+
"notNull": true
|
|
7625
|
+
},
|
|
7626
|
+
"_meta_data": {
|
|
7627
|
+
"type": "JSON",
|
|
7628
|
+
"notNull": false
|
|
7629
|
+
},
|
|
7630
|
+
"created_at": {
|
|
7631
|
+
"type": "TIMESTAMP",
|
|
7632
|
+
"notNull": true,
|
|
7633
|
+
"default": "current_timestamp"
|
|
7634
|
+
},
|
|
7635
|
+
"updated_at": {
|
|
7636
|
+
"type": "TIMESTAMP",
|
|
7637
|
+
"notNull": true,
|
|
7638
|
+
"default": "current_timestamp"
|
|
7639
|
+
},
|
|
7640
|
+
"tenant_id": {
|
|
7641
|
+
"type": "UUID",
|
|
7642
|
+
"referenceKind": "tenantId",
|
|
7643
|
+
"notNull": false
|
|
7644
|
+
},
|
|
7645
|
+
"contract_type": {
|
|
7646
|
+
"type": "TEXT",
|
|
7647
|
+
"notNull": false
|
|
7648
|
+
},
|
|
7649
|
+
"status": {
|
|
7650
|
+
"type": "TEXT",
|
|
7651
|
+
"notNull": false
|
|
7652
|
+
},
|
|
7653
|
+
"subtotal": {
|
|
7654
|
+
"type": "INTEGER",
|
|
7655
|
+
"notNull": false,
|
|
7656
|
+
"default": 0
|
|
7657
|
+
},
|
|
7658
|
+
"discount_total": {
|
|
7659
|
+
"type": "INTEGER",
|
|
7660
|
+
"notNull": false,
|
|
7661
|
+
"default": 0
|
|
7662
|
+
},
|
|
7663
|
+
"tax_amount": {
|
|
7664
|
+
"type": "INTEGER",
|
|
7665
|
+
"notNull": false,
|
|
7666
|
+
"default": 0
|
|
7667
|
+
},
|
|
7668
|
+
"total_amount": {
|
|
7669
|
+
"type": "INTEGER",
|
|
7670
|
+
"notNull": false,
|
|
7671
|
+
"default": 0
|
|
7672
|
+
},
|
|
7673
|
+
"currency": {
|
|
7674
|
+
"type": "TEXT",
|
|
7675
|
+
"notNull": false,
|
|
7676
|
+
"default": "USD"
|
|
7677
|
+
},
|
|
7678
|
+
"line_amount_type": {
|
|
7679
|
+
"type": "TEXT",
|
|
7680
|
+
"notNull": false,
|
|
7681
|
+
"default": "exclusive"
|
|
7682
|
+
},
|
|
7683
|
+
"tax_rounding_scope": {
|
|
7684
|
+
"type": "TEXT",
|
|
7685
|
+
"notNull": false,
|
|
7686
|
+
"default": "line"
|
|
7687
|
+
},
|
|
7688
|
+
"seller_tax_registrations_json": {
|
|
7689
|
+
"type": "TEXT",
|
|
7690
|
+
"notNull": false
|
|
7691
|
+
},
|
|
7692
|
+
"party_tax_id": {
|
|
7693
|
+
"type": "TEXT",
|
|
7694
|
+
"notNull": false
|
|
7695
|
+
},
|
|
7696
|
+
"money_snapshot_id": {
|
|
7697
|
+
"type": "TEXT",
|
|
7698
|
+
"notNull": false
|
|
7699
|
+
},
|
|
7700
|
+
"issue_date": {
|
|
7701
|
+
"type": "TIMESTAMP",
|
|
7702
|
+
"notNull": false
|
|
7703
|
+
},
|
|
7704
|
+
"due_date": {
|
|
7705
|
+
"type": "TIMESTAMP",
|
|
7706
|
+
"notNull": false
|
|
7707
|
+
},
|
|
7708
|
+
"expiry_date": {
|
|
7709
|
+
"type": "TIMESTAMP",
|
|
7710
|
+
"notNull": false
|
|
7711
|
+
},
|
|
7712
|
+
"reference": {
|
|
7713
|
+
"type": "TEXT",
|
|
7714
|
+
"notNull": false,
|
|
7715
|
+
"default": ""
|
|
7716
|
+
},
|
|
7717
|
+
"notes": {
|
|
7718
|
+
"type": "TEXT",
|
|
7719
|
+
"notNull": false,
|
|
7720
|
+
"default": ""
|
|
7721
|
+
},
|
|
7722
|
+
"terms": {
|
|
7723
|
+
"type": "TEXT",
|
|
7724
|
+
"notNull": false,
|
|
7725
|
+
"default": ""
|
|
7726
|
+
},
|
|
7727
|
+
"channel_id": {
|
|
7728
|
+
"type": "TEXT",
|
|
7729
|
+
"notNull": false,
|
|
7730
|
+
"default": ""
|
|
7731
|
+
},
|
|
7732
|
+
"customer_id": {
|
|
7733
|
+
"type": "UUID",
|
|
7734
|
+
"referenceKind": "foreignKey",
|
|
7735
|
+
"notNull": false,
|
|
7736
|
+
"foreignKey": {
|
|
7737
|
+
"table": "customers",
|
|
7738
|
+
"column": "id",
|
|
7739
|
+
"onDelete": "NO ACTION",
|
|
7740
|
+
"onUpdate": "CASCADE"
|
|
7741
|
+
}
|
|
7742
|
+
},
|
|
7743
|
+
"vendor_id": {
|
|
7744
|
+
"type": "UUID",
|
|
7745
|
+
"referenceKind": "foreignKey",
|
|
7746
|
+
"notNull": false,
|
|
7747
|
+
"foreignKey": {
|
|
7748
|
+
"table": "vendors",
|
|
7749
|
+
"column": "id",
|
|
7750
|
+
"onDelete": "NO ACTION",
|
|
7751
|
+
"onUpdate": "CASCADE"
|
|
7752
|
+
}
|
|
7753
|
+
}
|
|
7754
|
+
},
|
|
7755
|
+
"indexes": [
|
|
7756
|
+
{
|
|
7757
|
+
"name": "contracts_slug_context_meta_type_idx",
|
|
7758
|
+
"columns": [
|
|
7759
|
+
"tenant_id",
|
|
7760
|
+
"slug",
|
|
7761
|
+
"context",
|
|
7762
|
+
"_meta_type"
|
|
7763
|
+
],
|
|
7764
|
+
"unique": true,
|
|
7765
|
+
"nullsNotDistinct": true
|
|
7766
|
+
},
|
|
7767
|
+
{
|
|
7768
|
+
"name": "contracts_meta_type_idx",
|
|
7769
|
+
"columns": [
|
|
7770
|
+
"_meta_type"
|
|
7771
|
+
]
|
|
7772
|
+
},
|
|
7773
|
+
{
|
|
7774
|
+
"name": "contracts_tenant_id_created_at_idx",
|
|
7775
|
+
"columns": [
|
|
7776
|
+
"tenant_id",
|
|
7777
|
+
"created_at"
|
|
7778
|
+
]
|
|
7779
|
+
},
|
|
7780
|
+
{
|
|
7781
|
+
"name": "contracts_customer_id_idx",
|
|
7782
|
+
"columns": [
|
|
7783
|
+
"customer_id"
|
|
7784
|
+
]
|
|
7785
|
+
},
|
|
7786
|
+
{
|
|
7787
|
+
"name": "contracts_vendor_id_idx",
|
|
7788
|
+
"columns": [
|
|
7789
|
+
"vendor_id"
|
|
7790
|
+
]
|
|
7791
|
+
}
|
|
7792
|
+
],
|
|
7793
|
+
"version": "7f5f7bfd"
|
|
7794
|
+
},
|
|
7795
|
+
"importPath": "@happyvertical/smrt-commerce"
|
|
7796
|
+
},
|
|
7797
|
+
"@happyvertical/smrt-commerce:Estimate": {
|
|
7798
|
+
"name": "estimate",
|
|
7799
|
+
"className": "Estimate",
|
|
7800
|
+
"qualifiedName": "@happyvertical/smrt-commerce:Estimate",
|
|
7801
|
+
"collection": "contracts",
|
|
7802
|
+
"description": "Quote or proposal for a customer",
|
|
7803
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
7804
|
+
"packageName": "@happyvertical/smrt-commerce",
|
|
7805
|
+
"fields": {
|
|
7806
|
+
"created_at": {
|
|
7807
|
+
"type": "datetime",
|
|
7808
|
+
"required": false
|
|
7809
|
+
},
|
|
7810
|
+
"updated_at": {
|
|
7811
|
+
"type": "datetime",
|
|
7812
|
+
"required": false
|
|
7813
|
+
},
|
|
7814
|
+
"tenantId": {
|
|
7815
|
+
"type": "text",
|
|
7816
|
+
"required": false,
|
|
7817
|
+
"_meta": {
|
|
7818
|
+
"sqlType": "UUID",
|
|
7819
|
+
"nullable": true,
|
|
7820
|
+
"__tenancy": {
|
|
7821
|
+
"isTenantIdField": true,
|
|
7822
|
+
"autoFilter": true,
|
|
7823
|
+
"required": false,
|
|
7824
|
+
"autoPopulate": true,
|
|
7825
|
+
"nullable": true,
|
|
7826
|
+
"mode": "optional",
|
|
7827
|
+
"field": "tenantId",
|
|
7828
|
+
"allowSuperAdminBypass": false
|
|
7829
|
+
}
|
|
7830
|
+
}
|
|
7831
|
+
},
|
|
7832
|
+
"contractType": {
|
|
7833
|
+
"type": "text",
|
|
7834
|
+
"required": false
|
|
7835
|
+
},
|
|
7836
|
+
"status": {
|
|
7837
|
+
"type": "text",
|
|
7838
|
+
"required": false,
|
|
7839
|
+
"description": "Where the order or agreement stands, for example draft, sent, accepted or completed.",
|
|
7840
|
+
"_meta": {
|
|
7841
|
+
"description": "Where the order or agreement stands, for example draft, sent, accepted or completed."
|
|
7842
|
+
},
|
|
7843
|
+
"enum": [
|
|
7844
|
+
"draft",
|
|
7845
|
+
"sent",
|
|
7846
|
+
"accepted",
|
|
7847
|
+
"declined",
|
|
7848
|
+
"completed",
|
|
7849
|
+
"cancelled"
|
|
7850
|
+
]
|
|
7851
|
+
},
|
|
7852
|
+
"subtotal": {
|
|
7853
|
+
"type": "integer",
|
|
7854
|
+
"required": false,
|
|
7855
|
+
"default": 0,
|
|
7856
|
+
"description": "The amount before tax.",
|
|
7857
|
+
"_meta": {
|
|
7858
|
+
"description": "The amount before tax.",
|
|
7859
|
+
"ui": {
|
|
7860
|
+
"format": "money"
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7863
|
+
},
|
|
7864
|
+
"discountTotal": {
|
|
7865
|
+
"type": "integer",
|
|
7866
|
+
"required": false,
|
|
7867
|
+
"default": 0,
|
|
7868
|
+
"_meta": {
|
|
7869
|
+
"ui": {
|
|
7870
|
+
"format": "money"
|
|
7871
|
+
}
|
|
7872
|
+
}
|
|
7873
|
+
},
|
|
7874
|
+
"taxAmount": {
|
|
7875
|
+
"type": "integer",
|
|
7876
|
+
"required": false,
|
|
7877
|
+
"default": 0,
|
|
7878
|
+
"description": "The tax charged.",
|
|
7879
|
+
"_meta": {
|
|
7880
|
+
"description": "The tax charged.",
|
|
7881
|
+
"ui": {
|
|
7882
|
+
"format": "money"
|
|
7883
|
+
}
|
|
7884
|
+
}
|
|
7885
|
+
},
|
|
7886
|
+
"totalAmount": {
|
|
7887
|
+
"type": "integer",
|
|
7888
|
+
"required": false,
|
|
7889
|
+
"default": 0,
|
|
7890
|
+
"description": "The full amount, tax included.",
|
|
7891
|
+
"_meta": {
|
|
7892
|
+
"description": "The full amount, tax included.",
|
|
7893
|
+
"ui": {
|
|
7894
|
+
"format": "money"
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
},
|
|
7898
|
+
"currency": {
|
|
7899
|
+
"type": "text",
|
|
7900
|
+
"required": false,
|
|
7901
|
+
"default": "USD",
|
|
7902
|
+
"description": "The currency of the amounts.",
|
|
7903
|
+
"_meta": {
|
|
7904
|
+
"description": "The currency of the amounts.",
|
|
7905
|
+
"ui": {
|
|
7906
|
+
"widget": "currency"
|
|
7907
|
+
}
|
|
7908
|
+
}
|
|
7909
|
+
},
|
|
7910
|
+
"lineAmountType": {
|
|
7911
|
+
"type": "text",
|
|
7912
|
+
"required": false,
|
|
7913
|
+
"default": "exclusive",
|
|
7914
|
+
"enum": [
|
|
7915
|
+
"exclusive",
|
|
7916
|
+
"inclusive",
|
|
7917
|
+
"none"
|
|
7918
|
+
]
|
|
7919
|
+
},
|
|
7920
|
+
"taxRoundingScope": {
|
|
7921
|
+
"type": "text",
|
|
7922
|
+
"required": false,
|
|
7923
|
+
"default": "line",
|
|
7924
|
+
"enum": [
|
|
7925
|
+
"line",
|
|
7926
|
+
"document"
|
|
7927
|
+
]
|
|
7928
|
+
},
|
|
7929
|
+
"sellerTaxRegistrationsJson": {
|
|
7930
|
+
"type": "text",
|
|
7931
|
+
"required": false
|
|
7932
|
+
},
|
|
7933
|
+
"partyTaxId": {
|
|
7934
|
+
"type": "text",
|
|
7935
|
+
"required": false
|
|
7936
|
+
},
|
|
7937
|
+
"moneySnapshotId": {
|
|
7938
|
+
"type": "text",
|
|
7939
|
+
"required": false
|
|
7940
|
+
},
|
|
7941
|
+
"issueDate": {
|
|
7942
|
+
"type": "datetime",
|
|
7943
|
+
"required": false,
|
|
7944
|
+
"description": "The date it was issued or placed.",
|
|
7945
|
+
"_meta": {
|
|
7946
|
+
"description": "The date it was issued or placed."
|
|
7947
|
+
}
|
|
7948
|
+
},
|
|
7949
|
+
"dueDate": {
|
|
7950
|
+
"type": "datetime",
|
|
7951
|
+
"required": false,
|
|
7952
|
+
"description": "The date payment or delivery is due.",
|
|
7953
|
+
"_meta": {
|
|
7954
|
+
"description": "The date payment or delivery is due."
|
|
7955
|
+
}
|
|
7956
|
+
},
|
|
7957
|
+
"expiryDate": {
|
|
7958
|
+
"type": "datetime",
|
|
7959
|
+
"required": false,
|
|
7960
|
+
"description": "The last day the price or offer is good for.",
|
|
7961
|
+
"_meta": {
|
|
7962
|
+
"description": "The last day the price or offer is good for."
|
|
7963
|
+
}
|
|
7964
|
+
},
|
|
7965
|
+
"reference": {
|
|
7966
|
+
"type": "text",
|
|
7967
|
+
"required": false,
|
|
7968
|
+
"default": "",
|
|
7969
|
+
"description": "Your own number or note for finding this later, such as a purchase order or quote number.",
|
|
7970
|
+
"_meta": {
|
|
7971
|
+
"description": "Your own number or note for finding this later, such as a purchase order or quote number."
|
|
7972
|
+
}
|
|
7973
|
+
},
|
|
7974
|
+
"notes": {
|
|
7975
|
+
"type": "text",
|
|
7976
|
+
"required": false,
|
|
7977
|
+
"default": "",
|
|
7978
|
+
"description": "Anything worth remembering about this.",
|
|
7979
|
+
"_meta": {
|
|
7980
|
+
"description": "Anything worth remembering about this.",
|
|
7981
|
+
"ui": {
|
|
7982
|
+
"widget": "textarea"
|
|
7983
|
+
}
|
|
7984
|
+
}
|
|
7985
|
+
},
|
|
7986
|
+
"terms": {
|
|
7987
|
+
"type": "text",
|
|
7988
|
+
"required": false,
|
|
7989
|
+
"default": "",
|
|
7990
|
+
"description": "The conditions agreed, such as deposits, payment or delivery conditions.",
|
|
7991
|
+
"_meta": {
|
|
7992
|
+
"description": "The conditions agreed, such as deposits, payment or delivery conditions.",
|
|
7993
|
+
"ui": {
|
|
7994
|
+
"widget": "textarea"
|
|
7995
|
+
}
|
|
7996
|
+
}
|
|
7997
|
+
},
|
|
7998
|
+
"channelId": {
|
|
7999
|
+
"type": "text",
|
|
8000
|
+
"required": false,
|
|
8001
|
+
"default": "",
|
|
8002
|
+
"description": "Where it came from, for example your shop, a marketplace or a phone call.",
|
|
8003
|
+
"_meta": {
|
|
8004
|
+
"description": "Where it came from, for example your shop, a marketplace or a phone call."
|
|
8005
|
+
}
|
|
8006
|
+
},
|
|
8007
|
+
"customerId": {
|
|
8008
|
+
"type": "foreignKey",
|
|
8009
|
+
"required": true,
|
|
8010
|
+
"related": "Customer",
|
|
8011
|
+
"_meta": {
|
|
8012
|
+
"required": true
|
|
8013
|
+
}
|
|
8014
|
+
}
|
|
8015
|
+
},
|
|
8016
|
+
"methods": {
|
|
8017
|
+
"rebindMoneyRead": {
|
|
8018
|
+
"name": "rebindMoneyRead",
|
|
8019
|
+
"async": false,
|
|
8020
|
+
"parameters": [
|
|
8021
|
+
{
|
|
8022
|
+
"name": "capability",
|
|
8023
|
+
"type": "DocumentMoneyReadRebindCapability",
|
|
8024
|
+
"optional": false
|
|
8025
|
+
},
|
|
8026
|
+
{
|
|
8027
|
+
"name": "db",
|
|
8028
|
+
"type": "DatabaseInterface",
|
|
8029
|
+
"optional": false
|
|
8030
|
+
}
|
|
8031
|
+
],
|
|
8032
|
+
"returnType": "this",
|
|
8033
|
+
"isStatic": false,
|
|
8034
|
+
"isPublic": true
|
|
8035
|
+
},
|
|
8036
|
+
"isDraft": {
|
|
8037
|
+
"name": "isDraft",
|
|
8038
|
+
"async": false,
|
|
8039
|
+
"parameters": [],
|
|
8040
|
+
"returnType": "boolean",
|
|
8041
|
+
"isStatic": false,
|
|
8042
|
+
"isPublic": true
|
|
8043
|
+
},
|
|
8044
|
+
"isAccepted": {
|
|
8045
|
+
"name": "isAccepted",
|
|
8046
|
+
"async": false,
|
|
8047
|
+
"parameters": [],
|
|
8048
|
+
"returnType": "boolean",
|
|
8049
|
+
"isStatic": false,
|
|
8050
|
+
"isPublic": true
|
|
8051
|
+
},
|
|
8052
|
+
"isCompleted": {
|
|
8053
|
+
"name": "isCompleted",
|
|
8054
|
+
"async": false,
|
|
8055
|
+
"parameters": [],
|
|
8056
|
+
"returnType": "boolean",
|
|
8057
|
+
"isStatic": false,
|
|
8058
|
+
"isPublic": true
|
|
8059
|
+
},
|
|
8060
|
+
"isExpired": {
|
|
8061
|
+
"name": "isExpired",
|
|
8062
|
+
"async": false,
|
|
8063
|
+
"parameters": [],
|
|
8064
|
+
"returnType": "boolean",
|
|
8065
|
+
"isStatic": false,
|
|
8066
|
+
"isPublic": true
|
|
8067
|
+
},
|
|
8068
|
+
"isOverdue": {
|
|
8069
|
+
"name": "isOverdue",
|
|
8070
|
+
"async": false,
|
|
8071
|
+
"parameters": [],
|
|
8072
|
+
"returnType": "boolean",
|
|
8073
|
+
"isStatic": false,
|
|
8074
|
+
"isPublic": true
|
|
8075
|
+
},
|
|
8076
|
+
"recalculateTotals": {
|
|
8077
|
+
"name": "recalculateTotals",
|
|
8078
|
+
"async": true,
|
|
8079
|
+
"parameters": [],
|
|
8080
|
+
"returnType": "Promise<void>",
|
|
8081
|
+
"isStatic": false,
|
|
8082
|
+
"isPublic": true
|
|
8083
|
+
},
|
|
8084
|
+
"initialize": {
|
|
8085
|
+
"name": "initialize",
|
|
8086
|
+
"async": true,
|
|
8087
|
+
"parameters": [],
|
|
8088
|
+
"returnType": "Promise<this>",
|
|
8089
|
+
"isStatic": false,
|
|
8090
|
+
"isPublic": true
|
|
8091
|
+
},
|
|
8092
|
+
"save": {
|
|
8093
|
+
"name": "save",
|
|
8094
|
+
"async": true,
|
|
8095
|
+
"parameters": [],
|
|
8096
|
+
"returnType": "Promise<this>",
|
|
8097
|
+
"isStatic": false,
|
|
8098
|
+
"isPublic": true
|
|
8099
|
+
},
|
|
8100
|
+
"saveDerived": {
|
|
8101
|
+
"name": "saveDerived",
|
|
8102
|
+
"async": true,
|
|
8103
|
+
"parameters": [
|
|
8104
|
+
{
|
|
8105
|
+
"name": "capability",
|
|
8106
|
+
"type": "DocumentMoneyWriteCapability",
|
|
8107
|
+
"optional": false
|
|
8108
|
+
}
|
|
8109
|
+
],
|
|
8110
|
+
"returnType": "Promise<this>",
|
|
8111
|
+
"isStatic": false,
|
|
8112
|
+
"isPublic": true
|
|
8113
|
+
}
|
|
8114
|
+
},
|
|
8115
|
+
"decoratorConfig": {
|
|
8116
|
+
"tenantScoped": {
|
|
8117
|
+
"mode": "optional"
|
|
8118
|
+
},
|
|
8119
|
+
"tableName": "contracts",
|
|
8120
|
+
"tableStrategy": "sti"
|
|
8121
|
+
},
|
|
8122
|
+
"extends": "SalesContract",
|
|
8123
|
+
"exportName": "Estimate",
|
|
8124
|
+
"collectionExportName": "EstimateCollection",
|
|
8125
|
+
"validationRules": [
|
|
8126
|
+
{
|
|
8127
|
+
"field": "customerId",
|
|
8128
|
+
"rule": "required",
|
|
8129
|
+
"fieldType": "foreignKey"
|
|
8130
|
+
}
|
|
8131
|
+
],
|
|
7623
8132
|
"schema": {
|
|
7624
8133
|
"tableName": "contracts",
|
|
7625
8134
|
"ddl": "CREATE TABLE IF NOT EXISTS \"contracts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_type\" TEXT,\n \"status\" TEXT,\n \"subtotal\" INTEGER DEFAULT 0,\n \"discount_total\" INTEGER DEFAULT 0,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"seller_tax_registrations_json\" TEXT,\n \"party_tax_id\" TEXT,\n \"money_snapshot_id\" TEXT,\n \"issue_date\" TIMESTAMP,\n \"due_date\" TIMESTAMP,\n \"expiry_date\" TIMESTAMP,\n \"reference\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT '',\n \"terms\" TEXT DEFAULT '',\n \"channel_id\" TEXT DEFAULT '',\n \"customer_id\" UUID,\n \"vendor_id\" UUID\n);",
|
|
@@ -7810,16 +8319,16 @@
|
|
|
7810
8319
|
]
|
|
7811
8320
|
}
|
|
7812
8321
|
],
|
|
7813
|
-
"version": "
|
|
8322
|
+
"version": "5f2accf4"
|
|
7814
8323
|
},
|
|
7815
8324
|
"importPath": "@happyvertical/smrt-commerce"
|
|
7816
8325
|
},
|
|
7817
|
-
"@happyvertical/smrt-commerce:
|
|
7818
|
-
"name": "
|
|
7819
|
-
"className": "
|
|
7820
|
-
"qualifiedName": "@happyvertical/smrt-commerce:
|
|
8326
|
+
"@happyvertical/smrt-commerce:Order": {
|
|
8327
|
+
"name": "order",
|
|
8328
|
+
"className": "Order",
|
|
8329
|
+
"qualifiedName": "@happyvertical/smrt-commerce:Order",
|
|
7821
8330
|
"collection": "contracts",
|
|
7822
|
-
"description": "
|
|
8331
|
+
"description": "Customer purchase order",
|
|
7823
8332
|
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
7824
8333
|
"packageName": "@happyvertical/smrt-commerce",
|
|
7825
8334
|
"fields": {
|
|
@@ -7884,7 +8393,12 @@
|
|
|
7884
8393
|
"discountTotal": {
|
|
7885
8394
|
"type": "integer",
|
|
7886
8395
|
"required": false,
|
|
7887
|
-
"default": 0
|
|
8396
|
+
"default": 0,
|
|
8397
|
+
"_meta": {
|
|
8398
|
+
"ui": {
|
|
8399
|
+
"format": "money"
|
|
8400
|
+
}
|
|
8401
|
+
}
|
|
7888
8402
|
},
|
|
7889
8403
|
"taxAmount": {
|
|
7890
8404
|
"type": "integer",
|
|
@@ -8135,8 +8649,8 @@
|
|
|
8135
8649
|
"tableStrategy": "sti"
|
|
8136
8650
|
},
|
|
8137
8651
|
"extends": "SalesContract",
|
|
8138
|
-
"exportName": "
|
|
8139
|
-
"collectionExportName": "
|
|
8652
|
+
"exportName": "Order",
|
|
8653
|
+
"collectionExportName": "OrderCollection",
|
|
8140
8654
|
"validationRules": [
|
|
8141
8655
|
{
|
|
8142
8656
|
"field": "customerId",
|
|
@@ -8334,16 +8848,16 @@
|
|
|
8334
8848
|
]
|
|
8335
8849
|
}
|
|
8336
8850
|
],
|
|
8337
|
-
"version": "
|
|
8851
|
+
"version": "b7d1f971"
|
|
8338
8852
|
},
|
|
8339
8853
|
"importPath": "@happyvertical/smrt-commerce"
|
|
8340
8854
|
},
|
|
8341
|
-
"@happyvertical/smrt-commerce:
|
|
8342
|
-
"name": "
|
|
8343
|
-
"className": "
|
|
8344
|
-
"qualifiedName": "@happyvertical/smrt-commerce:
|
|
8855
|
+
"@happyvertical/smrt-commerce:Lease": {
|
|
8856
|
+
"name": "lease",
|
|
8857
|
+
"className": "Lease",
|
|
8858
|
+
"qualifiedName": "@happyvertical/smrt-commerce:Lease",
|
|
8345
8859
|
"collection": "contracts",
|
|
8346
|
-
"description": "
|
|
8860
|
+
"description": "Rental or lease agreement",
|
|
8347
8861
|
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
8348
8862
|
"packageName": "@happyvertical/smrt-commerce",
|
|
8349
8863
|
"fields": {
|
|
@@ -8408,7 +8922,12 @@
|
|
|
8408
8922
|
"discountTotal": {
|
|
8409
8923
|
"type": "integer",
|
|
8410
8924
|
"required": false,
|
|
8411
|
-
"default": 0
|
|
8925
|
+
"default": 0,
|
|
8926
|
+
"_meta": {
|
|
8927
|
+
"ui": {
|
|
8928
|
+
"format": "money"
|
|
8929
|
+
}
|
|
8930
|
+
}
|
|
8412
8931
|
},
|
|
8413
8932
|
"taxAmount": {
|
|
8414
8933
|
"type": "integer",
|
|
@@ -8659,8 +9178,8 @@
|
|
|
8659
9178
|
"tableStrategy": "sti"
|
|
8660
9179
|
},
|
|
8661
9180
|
"extends": "SalesContract",
|
|
8662
|
-
"exportName": "
|
|
8663
|
-
"collectionExportName": "
|
|
9181
|
+
"exportName": "Lease",
|
|
9182
|
+
"collectionExportName": "LeaseCollection",
|
|
8664
9183
|
"validationRules": [
|
|
8665
9184
|
{
|
|
8666
9185
|
"field": "customerId",
|
|
@@ -8858,16 +9377,16 @@
|
|
|
8858
9377
|
]
|
|
8859
9378
|
}
|
|
8860
9379
|
],
|
|
8861
|
-
"version": "
|
|
9380
|
+
"version": "22b448c6"
|
|
8862
9381
|
},
|
|
8863
9382
|
"importPath": "@happyvertical/smrt-commerce"
|
|
8864
9383
|
},
|
|
8865
|
-
"@happyvertical/smrt-commerce:
|
|
8866
|
-
"name": "
|
|
8867
|
-
"className": "
|
|
8868
|
-
"qualifiedName": "@happyvertical/smrt-commerce:
|
|
9384
|
+
"@happyvertical/smrt-commerce:Agreement": {
|
|
9385
|
+
"name": "agreement",
|
|
9386
|
+
"className": "Agreement",
|
|
9387
|
+
"qualifiedName": "@happyvertical/smrt-commerce:Agreement",
|
|
8869
9388
|
"collection": "contracts",
|
|
8870
|
-
"description": "
|
|
9389
|
+
"description": "Service or maintenance agreement",
|
|
8871
9390
|
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
8872
9391
|
"packageName": "@happyvertical/smrt-commerce",
|
|
8873
9392
|
"fields": {
|
|
@@ -8932,7 +9451,12 @@
|
|
|
8932
9451
|
"discountTotal": {
|
|
8933
9452
|
"type": "integer",
|
|
8934
9453
|
"required": false,
|
|
8935
|
-
"default": 0
|
|
9454
|
+
"default": 0,
|
|
9455
|
+
"_meta": {
|
|
9456
|
+
"ui": {
|
|
9457
|
+
"format": "money"
|
|
9458
|
+
}
|
|
9459
|
+
}
|
|
8936
9460
|
},
|
|
8937
9461
|
"taxAmount": {
|
|
8938
9462
|
"type": "integer",
|
|
@@ -9183,8 +9707,8 @@
|
|
|
9183
9707
|
"tableStrategy": "sti"
|
|
9184
9708
|
},
|
|
9185
9709
|
"extends": "SalesContract",
|
|
9186
|
-
"exportName": "
|
|
9187
|
-
"collectionExportName": "
|
|
9710
|
+
"exportName": "Agreement",
|
|
9711
|
+
"collectionExportName": "AgreementCollection",
|
|
9188
9712
|
"validationRules": [
|
|
9189
9713
|
{
|
|
9190
9714
|
"field": "customerId",
|
|
@@ -9382,16 +9906,16 @@
|
|
|
9382
9906
|
]
|
|
9383
9907
|
}
|
|
9384
9908
|
],
|
|
9385
|
-
"version": "
|
|
9909
|
+
"version": "39d75a3f"
|
|
9386
9910
|
},
|
|
9387
9911
|
"importPath": "@happyvertical/smrt-commerce"
|
|
9388
9912
|
},
|
|
9389
|
-
"@happyvertical/smrt-commerce:
|
|
9390
|
-
"name": "
|
|
9391
|
-
"className": "
|
|
9392
|
-
"qualifiedName": "@happyvertical/smrt-commerce:
|
|
9913
|
+
"@happyvertical/smrt-commerce:SupplierQuote": {
|
|
9914
|
+
"name": "supplierquote",
|
|
9915
|
+
"className": "SupplierQuote",
|
|
9916
|
+
"qualifiedName": "@happyvertical/smrt-commerce:SupplierQuote",
|
|
9393
9917
|
"collection": "contracts",
|
|
9394
|
-
"description": "
|
|
9918
|
+
"description": "Supplier quotation received from a vendor; acceptance does not create an order.",
|
|
9395
9919
|
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/Contract.ts",
|
|
9396
9920
|
"packageName": "@happyvertical/smrt-commerce",
|
|
9397
9921
|
"fields": {
|
|
@@ -9456,7 +9980,12 @@
|
|
|
9456
9980
|
"discountTotal": {
|
|
9457
9981
|
"type": "integer",
|
|
9458
9982
|
"required": false,
|
|
9459
|
-
"default": 0
|
|
9983
|
+
"default": 0,
|
|
9984
|
+
"_meta": {
|
|
9985
|
+
"ui": {
|
|
9986
|
+
"format": "money"
|
|
9987
|
+
}
|
|
9988
|
+
}
|
|
9460
9989
|
},
|
|
9461
9990
|
"taxAmount": {
|
|
9462
9991
|
"type": "integer",
|
|
@@ -9591,10 +10120,10 @@
|
|
|
9591
10120
|
"description": "Where it came from, for example your shop, a marketplace or a phone call."
|
|
9592
10121
|
}
|
|
9593
10122
|
},
|
|
9594
|
-
"
|
|
10123
|
+
"vendorId": {
|
|
9595
10124
|
"type": "foreignKey",
|
|
9596
10125
|
"required": true,
|
|
9597
|
-
"related": "
|
|
10126
|
+
"related": "Vendor",
|
|
9598
10127
|
"_meta": {
|
|
9599
10128
|
"required": true
|
|
9600
10129
|
}
|
|
@@ -9706,12 +10235,12 @@
|
|
|
9706
10235
|
"tableName": "contracts",
|
|
9707
10236
|
"tableStrategy": "sti"
|
|
9708
10237
|
},
|
|
9709
|
-
"extends": "
|
|
9710
|
-
"exportName": "
|
|
9711
|
-
"collectionExportName": "
|
|
10238
|
+
"extends": "PurchaseContract",
|
|
10239
|
+
"exportName": "SupplierQuote",
|
|
10240
|
+
"collectionExportName": "SupplierQuoteCollection",
|
|
9712
10241
|
"validationRules": [
|
|
9713
10242
|
{
|
|
9714
|
-
"field": "
|
|
10243
|
+
"field": "vendorId",
|
|
9715
10244
|
"rule": "required",
|
|
9716
10245
|
"fieldType": "foreignKey"
|
|
9717
10246
|
}
|
|
@@ -9906,7 +10435,7 @@
|
|
|
9906
10435
|
]
|
|
9907
10436
|
}
|
|
9908
10437
|
],
|
|
9909
|
-
"version": "
|
|
10438
|
+
"version": "8e2a6f1c"
|
|
9910
10439
|
},
|
|
9911
10440
|
"importPath": "@happyvertical/smrt-commerce"
|
|
9912
10441
|
},
|
|
@@ -9980,7 +10509,12 @@
|
|
|
9980
10509
|
"discountTotal": {
|
|
9981
10510
|
"type": "integer",
|
|
9982
10511
|
"required": false,
|
|
9983
|
-
"default": 0
|
|
10512
|
+
"default": 0,
|
|
10513
|
+
"_meta": {
|
|
10514
|
+
"ui": {
|
|
10515
|
+
"format": "money"
|
|
10516
|
+
}
|
|
10517
|
+
}
|
|
9984
10518
|
},
|
|
9985
10519
|
"taxAmount": {
|
|
9986
10520
|
"type": "integer",
|
|
@@ -10524,7 +11058,12 @@
|
|
|
10524
11058
|
"discountTotal": {
|
|
10525
11059
|
"type": "integer",
|
|
10526
11060
|
"required": false,
|
|
10527
|
-
"default": 0
|
|
11061
|
+
"default": 0,
|
|
11062
|
+
"_meta": {
|
|
11063
|
+
"ui": {
|
|
11064
|
+
"format": "money"
|
|
11065
|
+
}
|
|
11066
|
+
}
|
|
10528
11067
|
},
|
|
10529
11068
|
"taxAmount": {
|
|
10530
11069
|
"type": "integer",
|
|
@@ -11048,7 +11587,12 @@
|
|
|
11048
11587
|
"discountTotal": {
|
|
11049
11588
|
"type": "integer",
|
|
11050
11589
|
"required": false,
|
|
11051
|
-
"default": 0
|
|
11590
|
+
"default": 0,
|
|
11591
|
+
"_meta": {
|
|
11592
|
+
"ui": {
|
|
11593
|
+
"format": "money"
|
|
11594
|
+
}
|
|
11595
|
+
}
|
|
11052
11596
|
},
|
|
11053
11597
|
"taxAmount": {
|
|
11054
11598
|
"type": "integer",
|
|
@@ -11188,7 +11732,7 @@
|
|
|
11188
11732
|
"required": false,
|
|
11189
11733
|
"related": "Vendor",
|
|
11190
11734
|
"_meta": {
|
|
11191
|
-
"description": "The vendor
|
|
11735
|
+
"description": "The vendor supplying this quote or purchase contract."
|
|
11192
11736
|
}
|
|
11193
11737
|
},
|
|
11194
11738
|
"productId": {
|
|
@@ -11581,7 +12125,12 @@
|
|
|
11581
12125
|
"discountTotal": {
|
|
11582
12126
|
"type": "integer",
|
|
11583
12127
|
"required": false,
|
|
11584
|
-
"default": 0
|
|
12128
|
+
"default": 0,
|
|
12129
|
+
"_meta": {
|
|
12130
|
+
"ui": {
|
|
12131
|
+
"format": "money"
|
|
12132
|
+
}
|
|
12133
|
+
}
|
|
11585
12134
|
},
|
|
11586
12135
|
"taxAmount": {
|
|
11587
12136
|
"type": "integer",
|
|
@@ -12098,7 +12647,12 @@
|
|
|
12098
12647
|
"discountTotal": {
|
|
12099
12648
|
"type": "integer",
|
|
12100
12649
|
"required": false,
|
|
12101
|
-
"default": 0
|
|
12650
|
+
"default": 0,
|
|
12651
|
+
"_meta": {
|
|
12652
|
+
"ui": {
|
|
12653
|
+
"format": "money"
|
|
12654
|
+
}
|
|
12655
|
+
}
|
|
12102
12656
|
},
|
|
12103
12657
|
"taxAmount": {
|
|
12104
12658
|
"type": "integer",
|
|
@@ -12748,9 +13302,9 @@
|
|
|
12748
13302
|
"type": "integer",
|
|
12749
13303
|
"required": false,
|
|
12750
13304
|
"default": 0,
|
|
12751
|
-
"description": "The price of one, before tax.",
|
|
13305
|
+
"description": "The price of one, before discount; includes tax when the document's prices include tax.",
|
|
12752
13306
|
"_meta": {
|
|
12753
|
-
"description": "The price of one, before tax.",
|
|
13307
|
+
"description": "The price of one, before discount; includes tax when the document's prices include tax.",
|
|
12754
13308
|
"ui": {
|
|
12755
13309
|
"format": "money"
|
|
12756
13310
|
}
|
|
@@ -12822,13 +13376,11 @@
|
|
|
12822
13376
|
"taxAmount": {
|
|
12823
13377
|
"type": "integer",
|
|
12824
13378
|
"required": true,
|
|
12825
|
-
"default": 0
|
|
12826
|
-
},
|
|
12827
|
-
"legacyAmount": {
|
|
12828
|
-
"type": "integer",
|
|
12829
|
-
"required": false,
|
|
13379
|
+
"default": 0,
|
|
12830
13380
|
"_meta": {
|
|
12831
|
-
"
|
|
13381
|
+
"ui": {
|
|
13382
|
+
"format": "money"
|
|
13383
|
+
}
|
|
12832
13384
|
}
|
|
12833
13385
|
},
|
|
12834
13386
|
"moneySnapshotId": {
|
|
@@ -12839,9 +13391,9 @@
|
|
|
12839
13391
|
"type": "integer",
|
|
12840
13392
|
"required": false,
|
|
12841
13393
|
"default": 0,
|
|
12842
|
-
"description": "The line
|
|
13394
|
+
"description": "The line amount: net of discount, and including tax only when the document's prices include tax.",
|
|
12843
13395
|
"_meta": {
|
|
12844
|
-
"description": "The line
|
|
13396
|
+
"description": "The line amount: net of discount, and including tax only when the document's prices include tax.",
|
|
12845
13397
|
"ui": {
|
|
12846
13398
|
"format": "money"
|
|
12847
13399
|
}
|
|
@@ -12900,11 +13452,11 @@
|
|
|
12900
13452
|
"isStatic": false,
|
|
12901
13453
|
"isPublic": true
|
|
12902
13454
|
},
|
|
12903
|
-
"
|
|
12904
|
-
"name": "
|
|
12905
|
-
"async":
|
|
13455
|
+
"initialize": {
|
|
13456
|
+
"name": "initialize",
|
|
13457
|
+
"async": true,
|
|
12906
13458
|
"parameters": [],
|
|
12907
|
-
"returnType": "
|
|
13459
|
+
"returnType": "Promise<this>",
|
|
12908
13460
|
"isStatic": false,
|
|
12909
13461
|
"isPublic": true
|
|
12910
13462
|
},
|
|
@@ -12924,11 +13476,6 @@
|
|
|
12924
13476
|
"name": "capability",
|
|
12925
13477
|
"type": "DocumentMoneyWriteCapability",
|
|
12926
13478
|
"optional": false
|
|
12927
|
-
},
|
|
12928
|
-
{
|
|
12929
|
-
"name": "legacy",
|
|
12930
|
-
"type": "boolean",
|
|
12931
|
-
"optional": false
|
|
12932
13479
|
}
|
|
12933
13480
|
],
|
|
12934
13481
|
"returnType": "Promise<this>",
|
|
@@ -13033,7 +13580,7 @@
|
|
|
13033
13580
|
],
|
|
13034
13581
|
"schema": {
|
|
13035
13582
|
"tableName": "contract_line_items",
|
|
13036
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"
|
|
13583
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"contract_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"description\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"product_id\" UUID,\n \"sku\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"billing_period\" TEXT DEFAULT '',\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
13037
13584
|
"columns": {
|
|
13038
13585
|
"id": {
|
|
13039
13586
|
"type": "UUID",
|
|
@@ -13151,10 +13698,6 @@
|
|
|
13151
13698
|
"notNull": false,
|
|
13152
13699
|
"default": 0
|
|
13153
13700
|
},
|
|
13154
|
-
"legacy_amount": {
|
|
13155
|
-
"type": "INTEGER",
|
|
13156
|
-
"notNull": false
|
|
13157
|
-
},
|
|
13158
13701
|
"money_snapshot_id": {
|
|
13159
13702
|
"type": "TEXT",
|
|
13160
13703
|
"notNull": false
|
|
@@ -13237,7 +13780,7 @@
|
|
|
13237
13780
|
]
|
|
13238
13781
|
}
|
|
13239
13782
|
],
|
|
13240
|
-
"version": "
|
|
13783
|
+
"version": "ef59fe1c"
|
|
13241
13784
|
},
|
|
13242
13785
|
"importPath": "@happyvertical/smrt-commerce"
|
|
13243
13786
|
},
|
|
@@ -13733,7 +14276,10 @@
|
|
|
13733
14276
|
"default": 0,
|
|
13734
14277
|
"description": "Tax-exclusive base in integer minor units.",
|
|
13735
14278
|
"_meta": {
|
|
13736
|
-
"description": "Tax-exclusive base in integer minor units."
|
|
14279
|
+
"description": "Tax-exclusive base in integer minor units.",
|
|
14280
|
+
"ui": {
|
|
14281
|
+
"format": "money"
|
|
14282
|
+
}
|
|
13737
14283
|
}
|
|
13738
14284
|
},
|
|
13739
14285
|
"taxMinor": {
|
|
@@ -13742,7 +14288,10 @@
|
|
|
13742
14288
|
"default": 0,
|
|
13743
14289
|
"description": "Tax total in integer minor units.",
|
|
13744
14290
|
"_meta": {
|
|
13745
|
-
"description": "Tax total in integer minor units."
|
|
14291
|
+
"description": "Tax total in integer minor units.",
|
|
14292
|
+
"ui": {
|
|
14293
|
+
"format": "money"
|
|
14294
|
+
}
|
|
13746
14295
|
}
|
|
13747
14296
|
},
|
|
13748
14297
|
"recoverableMinor": {
|
|
@@ -13751,7 +14300,10 @@
|
|
|
13751
14300
|
"default": 0,
|
|
13752
14301
|
"description": "Recoverable purchase tax in integer minor units.",
|
|
13753
14302
|
"_meta": {
|
|
13754
|
-
"description": "Recoverable purchase tax in integer minor units."
|
|
14303
|
+
"description": "Recoverable purchase tax in integer minor units.",
|
|
14304
|
+
"ui": {
|
|
14305
|
+
"format": "money"
|
|
14306
|
+
}
|
|
13755
14307
|
}
|
|
13756
14308
|
}
|
|
13757
14309
|
},
|
|
@@ -14610,7 +15162,12 @@
|
|
|
14610
15162
|
"creditedAmount": {
|
|
14611
15163
|
"type": "integer",
|
|
14612
15164
|
"required": true,
|
|
14613
|
-
"default": 0
|
|
15165
|
+
"default": 0,
|
|
15166
|
+
"_meta": {
|
|
15167
|
+
"ui": {
|
|
15168
|
+
"format": "money"
|
|
15169
|
+
}
|
|
15170
|
+
}
|
|
14614
15171
|
},
|
|
14615
15172
|
"tenantId": {
|
|
14616
15173
|
"type": "text",
|
|
@@ -14779,7 +15336,12 @@
|
|
|
14779
15336
|
"discountTotal": {
|
|
14780
15337
|
"type": "integer",
|
|
14781
15338
|
"required": true,
|
|
14782
|
-
"default": 0
|
|
15339
|
+
"default": 0,
|
|
15340
|
+
"_meta": {
|
|
15341
|
+
"ui": {
|
|
15342
|
+
"format": "money"
|
|
15343
|
+
}
|
|
15344
|
+
}
|
|
14783
15345
|
},
|
|
14784
15346
|
"sellerTaxRegistrationsJson": {
|
|
14785
15347
|
"type": "text",
|
|
@@ -14964,14 +15526,6 @@
|
|
|
14964
15526
|
"name": "capability",
|
|
14965
15527
|
"type": "DocumentMoneyWriteCapability",
|
|
14966
15528
|
"optional": false
|
|
14967
|
-
},
|
|
14968
|
-
{
|
|
14969
|
-
"name": "options",
|
|
14970
|
-
"type": "object",
|
|
14971
|
-
"optional": false,
|
|
14972
|
-
"memberTypes": [
|
|
14973
|
-
"boolean"
|
|
14974
|
-
]
|
|
14975
15529
|
}
|
|
14976
15530
|
],
|
|
14977
15531
|
"returnType": "Promise<this>",
|
|
@@ -15121,7 +15675,7 @@
|
|
|
15121
15675
|
"optional": false
|
|
15122
15676
|
}
|
|
15123
15677
|
],
|
|
15124
|
-
"returnType": "Promise<Journal
|
|
15678
|
+
"returnType": "Promise<Journal>",
|
|
15125
15679
|
"isStatic": false,
|
|
15126
15680
|
"isPublic": true
|
|
15127
15681
|
},
|
|
@@ -15654,18 +16208,13 @@
|
|
|
15654
16208
|
"description": "How many."
|
|
15655
16209
|
}
|
|
15656
16210
|
},
|
|
15657
|
-
"invoiceEditorStateJson": {
|
|
15658
|
-
"type": "text",
|
|
15659
|
-
"required": false,
|
|
15660
|
-
"default": ""
|
|
15661
|
-
},
|
|
15662
16211
|
"unitPrice": {
|
|
15663
16212
|
"type": "integer",
|
|
15664
16213
|
"required": false,
|
|
15665
16214
|
"default": 0,
|
|
15666
|
-
"description": "The price of one, before tax.",
|
|
16215
|
+
"description": "The price of one, before discount; includes tax when the document's prices include tax.",
|
|
15667
16216
|
"_meta": {
|
|
15668
|
-
"description": "The price of one, before tax.",
|
|
16217
|
+
"description": "The price of one, before discount; includes tax when the document's prices include tax.",
|
|
15669
16218
|
"ui": {
|
|
15670
16219
|
"format": "money"
|
|
15671
16220
|
}
|
|
@@ -15737,13 +16286,11 @@
|
|
|
15737
16286
|
"taxAmount": {
|
|
15738
16287
|
"type": "integer",
|
|
15739
16288
|
"required": true,
|
|
15740
|
-
"default": 0
|
|
15741
|
-
},
|
|
15742
|
-
"legacyAmount": {
|
|
15743
|
-
"type": "integer",
|
|
15744
|
-
"required": false,
|
|
16289
|
+
"default": 0,
|
|
15745
16290
|
"_meta": {
|
|
15746
|
-
"
|
|
16291
|
+
"ui": {
|
|
16292
|
+
"format": "money"
|
|
16293
|
+
}
|
|
15747
16294
|
}
|
|
15748
16295
|
},
|
|
15749
16296
|
"moneySnapshotId": {
|
|
@@ -15754,9 +16301,9 @@
|
|
|
15754
16301
|
"type": "integer",
|
|
15755
16302
|
"required": false,
|
|
15756
16303
|
"default": 0,
|
|
15757
|
-
"description": "The line
|
|
16304
|
+
"description": "The line amount: net of discount, and including tax only when the document's prices include tax.",
|
|
15758
16305
|
"_meta": {
|
|
15759
|
-
"description": "The line
|
|
16306
|
+
"description": "The line amount: net of discount, and including tax only when the document's prices include tax.",
|
|
15760
16307
|
"ui": {
|
|
15761
16308
|
"format": "money"
|
|
15762
16309
|
}
|
|
@@ -15814,60 +16361,11 @@
|
|
|
15814
16361
|
"isStatic": false,
|
|
15815
16362
|
"isPublic": true
|
|
15816
16363
|
},
|
|
15817
|
-
"
|
|
15818
|
-
"name": "
|
|
15819
|
-
"async":
|
|
15820
|
-
"parameters": [],
|
|
15821
|
-
"returnType": "number",
|
|
15822
|
-
"isStatic": false,
|
|
15823
|
-
"isPublic": true
|
|
15824
|
-
},
|
|
15825
|
-
"getSubtotal": {
|
|
15826
|
-
"name": "getSubtotal",
|
|
15827
|
-
"async": false,
|
|
15828
|
-
"parameters": [],
|
|
15829
|
-
"returnType": "number",
|
|
15830
|
-
"isStatic": false,
|
|
15831
|
-
"isPublic": true
|
|
15832
|
-
},
|
|
15833
|
-
"getTaxAmount": {
|
|
15834
|
-
"name": "getTaxAmount",
|
|
15835
|
-
"async": false,
|
|
16364
|
+
"initialize": {
|
|
16365
|
+
"name": "initialize",
|
|
16366
|
+
"async": true,
|
|
15836
16367
|
"parameters": [],
|
|
15837
|
-
"returnType": "
|
|
15838
|
-
"isStatic": false,
|
|
15839
|
-
"isPublic": true
|
|
15840
|
-
},
|
|
15841
|
-
"applyEditorDraft": {
|
|
15842
|
-
"name": "applyEditorDraft",
|
|
15843
|
-
"async": false,
|
|
15844
|
-
"parameters": [
|
|
15845
|
-
{
|
|
15846
|
-
"name": "draft",
|
|
15847
|
-
"type": "InvoiceLineDraft",
|
|
15848
|
-
"optional": false
|
|
15849
|
-
},
|
|
15850
|
-
{
|
|
15851
|
-
"name": "context",
|
|
15852
|
-
"type": "InvoiceCalculationContext",
|
|
15853
|
-
"optional": false
|
|
15854
|
-
}
|
|
15855
|
-
],
|
|
15856
|
-
"returnType": "void",
|
|
15857
|
-
"isStatic": false,
|
|
15858
|
-
"isPublic": true
|
|
15859
|
-
},
|
|
15860
|
-
"getEditorDraft": {
|
|
15861
|
-
"name": "getEditorDraft",
|
|
15862
|
-
"async": false,
|
|
15863
|
-
"parameters": [
|
|
15864
|
-
{
|
|
15865
|
-
"name": "authorizedContext",
|
|
15866
|
-
"type": "InvoiceCalculationContext",
|
|
15867
|
-
"optional": false
|
|
15868
|
-
}
|
|
15869
|
-
],
|
|
15870
|
-
"returnType": "InvoiceLineDraft | null",
|
|
16368
|
+
"returnType": "Promise<this>",
|
|
15871
16369
|
"isStatic": false,
|
|
15872
16370
|
"isPublic": true
|
|
15873
16371
|
},
|
|
@@ -15885,12 +16383,7 @@
|
|
|
15885
16383
|
"parameters": [
|
|
15886
16384
|
{
|
|
15887
16385
|
"name": "capability",
|
|
15888
|
-
"type": "DocumentMoneyWriteCapability",
|
|
15889
|
-
"optional": false
|
|
15890
|
-
},
|
|
15891
|
-
{
|
|
15892
|
-
"name": "legacy",
|
|
15893
|
-
"type": "boolean",
|
|
16386
|
+
"type": "DocumentMoneyWriteCapability",
|
|
15894
16387
|
"optional": false
|
|
15895
16388
|
}
|
|
15896
16389
|
],
|
|
@@ -15952,20 +16445,6 @@
|
|
|
15952
16445
|
"returnType": "boolean",
|
|
15953
16446
|
"isStatic": false,
|
|
15954
16447
|
"isPublic": true
|
|
15955
|
-
},
|
|
15956
|
-
"toAccountingLineItem": {
|
|
15957
|
-
"name": "toAccountingLineItem",
|
|
15958
|
-
"async": false,
|
|
15959
|
-
"parameters": [
|
|
15960
|
-
{
|
|
15961
|
-
"name": "currency",
|
|
15962
|
-
"type": "string",
|
|
15963
|
-
"optional": true
|
|
15964
|
-
}
|
|
15965
|
-
],
|
|
15966
|
-
"returnType": "AccountingLineItemInput",
|
|
15967
|
-
"isStatic": false,
|
|
15968
|
-
"isPublic": true
|
|
15969
16448
|
}
|
|
15970
16449
|
},
|
|
15971
16450
|
"decoratorConfig": {
|
|
@@ -16028,7 +16507,7 @@
|
|
|
16028
16507
|
],
|
|
16029
16508
|
"schema": {
|
|
16030
16509
|
"tableName": "invoice_line_items",
|
|
16031
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"
|
|
16510
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"invoice_line_items\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"invoice_id\" UUID,\n \"credited_line_id\" UUID,\n \"credit_calculation_basis_json\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"sku\" TEXT DEFAULT '',\n \"product_id\" UUID,\n \"quantity\" REAL DEFAULT 1,\n \"unit_price\" INTEGER DEFAULT 0,\n \"discount\" INTEGER DEFAULT 0,\n \"discount_type\" TEXT DEFAULT 'none',\n \"discount_rate\" REAL,\n \"tax_rate\" REAL DEFAULT 0,\n \"tax_mode\" TEXT DEFAULT 'inherit',\n \"tax_code_id\" UUID,\n \"tax_code_code\" TEXT,\n \"tax_code_name\" TEXT,\n \"tax_components_json\" TEXT,\n \"tax_amount\" INTEGER NOT NULL DEFAULT 0,\n \"money_snapshot_id\" TEXT,\n \"amount\" INTEGER DEFAULT 0,\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"revenue_account_id\" UUID,\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
16032
16511
|
"columns": {
|
|
16033
16512
|
"id": {
|
|
16034
16513
|
"type": "UUID",
|
|
@@ -16114,12 +16593,6 @@
|
|
|
16114
16593
|
"unique": false,
|
|
16115
16594
|
"default": 1
|
|
16116
16595
|
},
|
|
16117
|
-
"invoice_editor_state_json": {
|
|
16118
|
-
"type": "TEXT",
|
|
16119
|
-
"notNull": false,
|
|
16120
|
-
"unique": false,
|
|
16121
|
-
"default": ""
|
|
16122
|
-
},
|
|
16123
16596
|
"unit_price": {
|
|
16124
16597
|
"type": "INTEGER",
|
|
16125
16598
|
"notNull": false,
|
|
@@ -16188,11 +16661,6 @@
|
|
|
16188
16661
|
"unique": false,
|
|
16189
16662
|
"default": 0
|
|
16190
16663
|
},
|
|
16191
|
-
"legacy_amount": {
|
|
16192
|
-
"type": "INTEGER",
|
|
16193
|
-
"notNull": false,
|
|
16194
|
-
"unique": false
|
|
16195
|
-
},
|
|
16196
16664
|
"money_snapshot_id": {
|
|
16197
16665
|
"type": "TEXT",
|
|
16198
16666
|
"notNull": false,
|
|
@@ -16288,241 +16756,7 @@
|
|
|
16288
16756
|
]
|
|
16289
16757
|
}
|
|
16290
16758
|
],
|
|
16291
|
-
"version": "
|
|
16292
|
-
},
|
|
16293
|
-
"importPath": "@happyvertical/smrt-commerce"
|
|
16294
|
-
},
|
|
16295
|
-
"@happyvertical/smrt-commerce:MoneyMigrationDocument": {
|
|
16296
|
-
"name": "moneymigrationdocument",
|
|
16297
|
-
"className": "MoneyMigrationDocument",
|
|
16298
|
-
"qualifiedName": "@happyvertical/smrt-commerce:MoneyMigrationDocument",
|
|
16299
|
-
"collection": "moneymigrationdocuments",
|
|
16300
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/commerce/src/models/MoneyMigrationDocument.ts",
|
|
16301
|
-
"packageName": "@happyvertical/smrt-commerce",
|
|
16302
|
-
"fields": {
|
|
16303
|
-
"tenantId": {
|
|
16304
|
-
"type": "text",
|
|
16305
|
-
"required": true,
|
|
16306
|
-
"_meta": {
|
|
16307
|
-
"sqlType": "UUID",
|
|
16308
|
-
"__tenancy": {
|
|
16309
|
-
"isTenantIdField": true,
|
|
16310
|
-
"autoFilter": true,
|
|
16311
|
-
"required": true,
|
|
16312
|
-
"autoPopulate": true,
|
|
16313
|
-
"nullable": false,
|
|
16314
|
-
"mode": "required",
|
|
16315
|
-
"field": "tenantId",
|
|
16316
|
-
"allowSuperAdminBypass": false
|
|
16317
|
-
}
|
|
16318
|
-
}
|
|
16319
|
-
},
|
|
16320
|
-
"migrationId": {
|
|
16321
|
-
"type": "text",
|
|
16322
|
-
"required": false,
|
|
16323
|
-
"_meta": {
|
|
16324
|
-
"indexed": true
|
|
16325
|
-
}
|
|
16326
|
-
},
|
|
16327
|
-
"documentType": {
|
|
16328
|
-
"type": "text",
|
|
16329
|
-
"required": false,
|
|
16330
|
-
"default": "invoice",
|
|
16331
|
-
"_meta": {
|
|
16332
|
-
"indexed": true
|
|
16333
|
-
},
|
|
16334
|
-
"enum": [
|
|
16335
|
-
"invoice",
|
|
16336
|
-
"contract"
|
|
16337
|
-
]
|
|
16338
|
-
},
|
|
16339
|
-
"documentId": {
|
|
16340
|
-
"type": "text",
|
|
16341
|
-
"required": false,
|
|
16342
|
-
"_meta": {
|
|
16343
|
-
"indexed": true
|
|
16344
|
-
}
|
|
16345
|
-
},
|
|
16346
|
-
"state": {
|
|
16347
|
-
"type": "text",
|
|
16348
|
-
"required": false,
|
|
16349
|
-
"default": "prepared",
|
|
16350
|
-
"enum": [
|
|
16351
|
-
"prepared",
|
|
16352
|
-
"applied",
|
|
16353
|
-
"rolled_back"
|
|
16354
|
-
]
|
|
16355
|
-
},
|
|
16356
|
-
"preImageJson": {
|
|
16357
|
-
"type": "text",
|
|
16358
|
-
"required": false,
|
|
16359
|
-
"_meta": {
|
|
16360
|
-
"sensitive": true
|
|
16361
|
-
},
|
|
16362
|
-
"sensitive": true
|
|
16363
|
-
},
|
|
16364
|
-
"preChecksum": {
|
|
16365
|
-
"type": "text",
|
|
16366
|
-
"required": false
|
|
16367
|
-
},
|
|
16368
|
-
"postImageJson": {
|
|
16369
|
-
"type": "text",
|
|
16370
|
-
"required": false,
|
|
16371
|
-
"_meta": {
|
|
16372
|
-
"sensitive": true
|
|
16373
|
-
},
|
|
16374
|
-
"sensitive": true
|
|
16375
|
-
},
|
|
16376
|
-
"postChecksum": {
|
|
16377
|
-
"type": "text",
|
|
16378
|
-
"required": false
|
|
16379
|
-
}
|
|
16380
|
-
},
|
|
16381
|
-
"methods": {},
|
|
16382
|
-
"decoratorConfig": {
|
|
16383
|
-
"tableName": "commerce_money_migration_documents",
|
|
16384
|
-
"conflictColumns": [
|
|
16385
|
-
"tenant_id",
|
|
16386
|
-
"migration_id",
|
|
16387
|
-
"document_type",
|
|
16388
|
-
"document_id"
|
|
16389
|
-
],
|
|
16390
|
-
"sensitive": true,
|
|
16391
|
-
"api": false,
|
|
16392
|
-
"mcp": false,
|
|
16393
|
-
"cli": false,
|
|
16394
|
-
"tenantScoped": {
|
|
16395
|
-
"mode": "required"
|
|
16396
|
-
}
|
|
16397
|
-
},
|
|
16398
|
-
"extends": "SmrtObject",
|
|
16399
|
-
"exportName": "MoneyMigrationDocument",
|
|
16400
|
-
"collectionExportName": "MoneyMigrationDocumentCollection",
|
|
16401
|
-
"validationRules": [],
|
|
16402
|
-
"schema": {
|
|
16403
|
-
"tableName": "commerce_money_migration_documents",
|
|
16404
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"commerce_money_migration_documents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"migration_id\" TEXT,\n \"document_type\" TEXT DEFAULT 'invoice',\n \"document_id\" TEXT,\n \"state\" TEXT DEFAULT 'prepared',\n \"pre_image_json\" TEXT,\n \"pre_checksum\" TEXT,\n \"post_image_json\" TEXT,\n \"post_checksum\" TEXT\n);",
|
|
16405
|
-
"columns": {
|
|
16406
|
-
"id": {
|
|
16407
|
-
"type": "UUID",
|
|
16408
|
-
"primaryKey": true,
|
|
16409
|
-
"referenceKind": "id",
|
|
16410
|
-
"notNull": true
|
|
16411
|
-
},
|
|
16412
|
-
"slug": {
|
|
16413
|
-
"type": "TEXT",
|
|
16414
|
-
"notNull": true
|
|
16415
|
-
},
|
|
16416
|
-
"context": {
|
|
16417
|
-
"type": "TEXT",
|
|
16418
|
-
"notNull": true,
|
|
16419
|
-
"default": ""
|
|
16420
|
-
},
|
|
16421
|
-
"created_at": {
|
|
16422
|
-
"type": "TIMESTAMP",
|
|
16423
|
-
"notNull": true,
|
|
16424
|
-
"default": "current_timestamp"
|
|
16425
|
-
},
|
|
16426
|
-
"updated_at": {
|
|
16427
|
-
"type": "TIMESTAMP",
|
|
16428
|
-
"notNull": true,
|
|
16429
|
-
"default": "current_timestamp"
|
|
16430
|
-
},
|
|
16431
|
-
"tenant_id": {
|
|
16432
|
-
"type": "UUID",
|
|
16433
|
-
"referenceKind": "tenantId",
|
|
16434
|
-
"notNull": true,
|
|
16435
|
-
"unique": false
|
|
16436
|
-
},
|
|
16437
|
-
"migration_id": {
|
|
16438
|
-
"type": "TEXT",
|
|
16439
|
-
"notNull": false,
|
|
16440
|
-
"unique": false
|
|
16441
|
-
},
|
|
16442
|
-
"document_type": {
|
|
16443
|
-
"type": "TEXT",
|
|
16444
|
-
"notNull": false,
|
|
16445
|
-
"unique": false,
|
|
16446
|
-
"default": "invoice"
|
|
16447
|
-
},
|
|
16448
|
-
"document_id": {
|
|
16449
|
-
"type": "TEXT",
|
|
16450
|
-
"notNull": false,
|
|
16451
|
-
"unique": false
|
|
16452
|
-
},
|
|
16453
|
-
"state": {
|
|
16454
|
-
"type": "TEXT",
|
|
16455
|
-
"notNull": false,
|
|
16456
|
-
"unique": false,
|
|
16457
|
-
"default": "prepared"
|
|
16458
|
-
},
|
|
16459
|
-
"pre_image_json": {
|
|
16460
|
-
"type": "TEXT",
|
|
16461
|
-
"notNull": false,
|
|
16462
|
-
"unique": false
|
|
16463
|
-
},
|
|
16464
|
-
"pre_checksum": {
|
|
16465
|
-
"type": "TEXT",
|
|
16466
|
-
"notNull": false,
|
|
16467
|
-
"unique": false
|
|
16468
|
-
},
|
|
16469
|
-
"post_image_json": {
|
|
16470
|
-
"type": "TEXT",
|
|
16471
|
-
"notNull": false,
|
|
16472
|
-
"unique": false
|
|
16473
|
-
},
|
|
16474
|
-
"post_checksum": {
|
|
16475
|
-
"type": "TEXT",
|
|
16476
|
-
"notNull": false,
|
|
16477
|
-
"unique": false
|
|
16478
|
-
}
|
|
16479
|
-
},
|
|
16480
|
-
"indexes": [
|
|
16481
|
-
{
|
|
16482
|
-
"name": "commerce_money_migration_documents_tenant_id_migration_id_idx",
|
|
16483
|
-
"columns": [
|
|
16484
|
-
"tenant_id",
|
|
16485
|
-
"migration_id",
|
|
16486
|
-
"document_type",
|
|
16487
|
-
"document_id"
|
|
16488
|
-
],
|
|
16489
|
-
"unique": true,
|
|
16490
|
-
"nullsNotDistinct": true
|
|
16491
|
-
},
|
|
16492
|
-
{
|
|
16493
|
-
"name": "commerce_money_migration_documents_slug_context_idx",
|
|
16494
|
-
"columns": [
|
|
16495
|
-
"slug",
|
|
16496
|
-
"context"
|
|
16497
|
-
]
|
|
16498
|
-
},
|
|
16499
|
-
{
|
|
16500
|
-
"name": "commerce_money_migration_documents_migration_id_idx",
|
|
16501
|
-
"columns": [
|
|
16502
|
-
"migration_id"
|
|
16503
|
-
]
|
|
16504
|
-
},
|
|
16505
|
-
{
|
|
16506
|
-
"name": "commerce_money_migration_documents_document_type_idx",
|
|
16507
|
-
"columns": [
|
|
16508
|
-
"document_type"
|
|
16509
|
-
]
|
|
16510
|
-
},
|
|
16511
|
-
{
|
|
16512
|
-
"name": "commerce_money_migration_documents_document_id_idx",
|
|
16513
|
-
"columns": [
|
|
16514
|
-
"document_id"
|
|
16515
|
-
]
|
|
16516
|
-
},
|
|
16517
|
-
{
|
|
16518
|
-
"name": "commerce_money_migration_documents_tenant_id_created_at_idx",
|
|
16519
|
-
"columns": [
|
|
16520
|
-
"tenant_id",
|
|
16521
|
-
"created_at"
|
|
16522
|
-
]
|
|
16523
|
-
}
|
|
16524
|
-
],
|
|
16525
|
-
"version": "c84f4bd2"
|
|
16759
|
+
"version": "9b493ddb"
|
|
16526
16760
|
},
|
|
16527
16761
|
"importPath": "@happyvertical/smrt-commerce"
|
|
16528
16762
|
},
|
|
@@ -19070,20 +19304,6 @@
|
|
|
19070
19304
|
"taxRegistrationsJson": {
|
|
19071
19305
|
"type": "text",
|
|
19072
19306
|
"required": false
|
|
19073
|
-
},
|
|
19074
|
-
"moneyModel": {
|
|
19075
|
-
"type": "text",
|
|
19076
|
-
"required": false,
|
|
19077
|
-
"default": "legacy",
|
|
19078
|
-
"enum": [
|
|
19079
|
-
"legacy",
|
|
19080
|
-
"migrating",
|
|
19081
|
-
"v2"
|
|
19082
|
-
]
|
|
19083
|
-
},
|
|
19084
|
-
"moneyMigrationId": {
|
|
19085
|
-
"type": "text",
|
|
19086
|
-
"required": false
|
|
19087
19307
|
}
|
|
19088
19308
|
},
|
|
19089
19309
|
"methods": {
|
|
@@ -19094,34 +19314,6 @@
|
|
|
19094
19314
|
"returnType": "Promise<this>",
|
|
19095
19315
|
"isStatic": false,
|
|
19096
19316
|
"isPublic": true
|
|
19097
|
-
},
|
|
19098
|
-
"saveMoneyModel": {
|
|
19099
|
-
"name": "saveMoneyModel",
|
|
19100
|
-
"async": true,
|
|
19101
|
-
"parameters": [
|
|
19102
|
-
{
|
|
19103
|
-
"name": "capability",
|
|
19104
|
-
"type": "MoneyMigrationWriteCapability",
|
|
19105
|
-
"optional": false
|
|
19106
|
-
}
|
|
19107
|
-
],
|
|
19108
|
-
"returnType": "Promise<this>",
|
|
19109
|
-
"isStatic": false,
|
|
19110
|
-
"isPublic": true
|
|
19111
|
-
},
|
|
19112
|
-
"saveMoneyModelOnTransaction": {
|
|
19113
|
-
"name": "saveMoneyModelOnTransaction",
|
|
19114
|
-
"async": true,
|
|
19115
|
-
"parameters": [
|
|
19116
|
-
{
|
|
19117
|
-
"name": "capability",
|
|
19118
|
-
"type": "MoneyMigrationWriteCapability",
|
|
19119
|
-
"optional": false
|
|
19120
|
-
}
|
|
19121
|
-
],
|
|
19122
|
-
"returnType": "Promise<this>",
|
|
19123
|
-
"isStatic": false,
|
|
19124
|
-
"isPublic": true
|
|
19125
19317
|
}
|
|
19126
19318
|
},
|
|
19127
19319
|
"decoratorConfig": {
|
|
@@ -19160,7 +19352,7 @@
|
|
|
19160
19352
|
"validationRules": [],
|
|
19161
19353
|
"schema": {
|
|
19162
19354
|
"tableName": "tax_settings",
|
|
19163
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT
|
|
19355
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"tax_settings\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"default_line_amount_type\" TEXT DEFAULT 'exclusive',\n \"tax_rounding_scope\" TEXT DEFAULT 'line',\n \"tax_registrations_json\" TEXT\n);",
|
|
19164
19356
|
"columns": {
|
|
19165
19357
|
"id": {
|
|
19166
19358
|
"type": "UUID",
|
|
@@ -19233,17 +19425,6 @@
|
|
|
19233
19425
|
"type": "TEXT",
|
|
19234
19426
|
"notNull": false,
|
|
19235
19427
|
"unique": false
|
|
19236
|
-
},
|
|
19237
|
-
"money_model": {
|
|
19238
|
-
"type": "TEXT",
|
|
19239
|
-
"notNull": false,
|
|
19240
|
-
"unique": false,
|
|
19241
|
-
"default": "legacy"
|
|
19242
|
-
},
|
|
19243
|
-
"money_migration_id": {
|
|
19244
|
-
"type": "TEXT",
|
|
19245
|
-
"notNull": false,
|
|
19246
|
-
"unique": false
|
|
19247
19428
|
}
|
|
19248
19429
|
},
|
|
19249
19430
|
"indexes": [
|
|
@@ -19281,7 +19462,7 @@
|
|
|
19281
19462
|
]
|
|
19282
19463
|
}
|
|
19283
19464
|
],
|
|
19284
|
-
"version": "
|
|
19465
|
+
"version": "2af5863d"
|
|
19285
19466
|
},
|
|
19286
19467
|
"importPath": "@happyvertical/smrt-commerce"
|
|
19287
19468
|
},
|
|
@@ -22732,7 +22913,7 @@
|
|
|
22732
22913
|
"visibility": "hidden"
|
|
22733
22914
|
},
|
|
22734
22915
|
"taxRate": {
|
|
22735
|
-
"
|
|
22916
|
+
"visibility": "hidden"
|
|
22736
22917
|
}
|
|
22737
22918
|
}
|
|
22738
22919
|
},
|
|
@@ -22889,7 +23070,7 @@
|
|
|
22889
23070
|
"visibility": "hidden"
|
|
22890
23071
|
},
|
|
22891
23072
|
"taxRate": {
|
|
22892
|
-
"
|
|
23073
|
+
"visibility": "hidden"
|
|
22893
23074
|
}
|
|
22894
23075
|
}
|
|
22895
23076
|
}
|
|
@@ -23084,9 +23265,6 @@
|
|
|
23084
23265
|
},
|
|
23085
23266
|
"@happyvertical/smrt-commerce:InvoiceLineItem": {
|
|
23086
23267
|
"fields": {
|
|
23087
|
-
"invoiceEditorStateJson": {
|
|
23088
|
-
"visibility": "hidden"
|
|
23089
|
-
},
|
|
23090
23268
|
"sourceType": {
|
|
23091
23269
|
"visibility": "hidden"
|
|
23092
23270
|
},
|
|
@@ -23112,7 +23290,7 @@
|
|
|
23112
23290
|
"visibility": "hidden"
|
|
23113
23291
|
},
|
|
23114
23292
|
"taxRate": {
|
|
23115
|
-
"
|
|
23293
|
+
"visibility": "hidden"
|
|
23116
23294
|
}
|
|
23117
23295
|
}
|
|
23118
23296
|
},
|
|
@@ -23260,7 +23438,7 @@
|
|
|
23260
23438
|
"visibility": "hidden"
|
|
23261
23439
|
},
|
|
23262
23440
|
"taxRate": {
|
|
23263
|
-
"
|
|
23441
|
+
"visibility": "hidden"
|
|
23264
23442
|
}
|
|
23265
23443
|
}
|
|
23266
23444
|
}
|
|
@@ -23361,7 +23539,7 @@
|
|
|
23361
23539
|
"visibility": "hidden"
|
|
23362
23540
|
},
|
|
23363
23541
|
"taxRate": {
|
|
23364
|
-
"
|
|
23542
|
+
"visibility": "hidden"
|
|
23365
23543
|
}
|
|
23366
23544
|
}
|
|
23367
23545
|
}
|
|
@@ -23454,7 +23632,7 @@
|
|
|
23454
23632
|
"visibility": "hidden"
|
|
23455
23633
|
},
|
|
23456
23634
|
"taxRate": {
|
|
23457
|
-
"
|
|
23635
|
+
"visibility": "hidden"
|
|
23458
23636
|
}
|
|
23459
23637
|
}
|
|
23460
23638
|
}
|
|
@@ -23556,7 +23734,7 @@
|
|
|
23556
23734
|
"visibility": "hidden"
|
|
23557
23735
|
},
|
|
23558
23736
|
"taxRate": {
|
|
23559
|
-
"
|
|
23737
|
+
"visibility": "hidden"
|
|
23560
23738
|
}
|
|
23561
23739
|
}
|
|
23562
23740
|
}
|
|
@@ -23713,7 +23891,7 @@
|
|
|
23713
23891
|
"visibility": "hidden"
|
|
23714
23892
|
},
|
|
23715
23893
|
"taxRate": {
|
|
23716
|
-
"
|
|
23894
|
+
"visibility": "hidden"
|
|
23717
23895
|
}
|
|
23718
23896
|
}
|
|
23719
23897
|
}
|