@nuxt-customer-portal/invoices 0.6.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @nuxt-customer-portal/invoices
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @nuxt-customer-portal/clients@0.7.0
8
+ - @nuxt-customer-portal/core@0.7.0
9
+ - @nuxt-customer-portal/organizations@0.7.0
10
+ - @nuxt-customer-portal/ui@0.7.0
11
+
12
+ ## 0.6.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 41e297d: Add reusable Harvest export and one-time migration commands with read-only previews, explicit member/client mappings, invoice and payment reconciliation, atomic imports, and duplicate protection.
17
+
18
+ Preserve distinct disabled historical users, credit and written-off invoices, original invoice lifecycle events and source metadata. Track externally billed time independently of invoice links to prevent edits and rebilling. Disambiguate duplicate project names and consolidate duplicate contact email records with explicit provenance. Apply the Timesheets and Invoices history migrations before importing.
19
+ - @nuxt-customer-portal/clients@0.6.1
20
+ - @nuxt-customer-portal/core@0.6.1
21
+ - @nuxt-customer-portal/organizations@0.6.1
22
+ - @nuxt-customer-portal/ui@0.6.1
23
+
3
24
  ## 0.6.0
4
25
 
5
26
  ### Patch Changes
@@ -220,6 +220,7 @@
220
220
  "invoiceHistoryTitle": "Invoice history",
221
221
  "invoiceNotFound": "This invoice could not be found",
222
222
  "invoiceHistory": {
223
+ "harvest_imported": "Imported from Harvest",
223
224
  "created": "Invoice created",
224
225
  "edited": "Invoice updated",
225
226
  "issued": "Invoice issued",
@@ -220,6 +220,7 @@
220
220
  "invoiceHistoryTitle": "Factuurgeschiedenis",
221
221
  "invoiceNotFound": "Deze factuur kon niet worden gevonden",
222
222
  "invoiceHistory": {
223
+ "harvest_imported": "Geïmporteerd uit Harvest",
223
224
  "created": "Factuur aangemaakt",
224
225
  "edited": "Factuur bijgewerkt",
225
226
  "issued": "Factuur uitgegeven",
@@ -0,0 +1 @@
1
+ ALTER TABLE invoices.invoice ADD COLUMN import_metadata jsonb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/invoices",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -44,10 +44,10 @@
44
44
  "pg": "^8.22.0",
45
45
  "resend": "^6.18.1",
46
46
  "zod": "^4.4.3",
47
- "@nuxt-customer-portal/organizations": "^0.6.0",
48
- "@nuxt-customer-portal/clients": "^0.6.0",
49
- "@nuxt-customer-portal/ui": "^0.6.0",
50
- "@nuxt-customer-portal/core": "^0.6.0"
47
+ "@nuxt-customer-portal/core": "^0.7.0",
48
+ "@nuxt-customer-portal/organizations": "^0.7.0",
49
+ "@nuxt-customer-portal/clients": "^0.7.0",
50
+ "@nuxt-customer-portal/ui": "^0.7.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "nuxt": "^4.5.1",
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'invoices',
3
- version: '0.6.0',
3
+ version: '0.7.0',
4
4
  source: '@nuxt-customer-portal/invoices',
5
5
  clientModuleId: 'invoices',
6
6
  dependsOn: ['core', 'ui', 'organizations', 'clients'],
@@ -113,6 +113,7 @@ export const invoice = invoicesSchema.table(
113
113
  documentType: text('document_type').default('invoice').notNull(),
114
114
  originalInvoiceId: text('original_invoice_id'),
115
115
  externalReference: text('external_reference'),
116
+ importMetadata: jsonb('import_metadata').$type<Record<string, unknown>>(),
116
117
  automated: boolean('automated').default(false).notNull(),
117
118
  status: invoiceStatus('status').default('DRAFT').notNull(),
118
119
  currency: text('currency').notNull(),
@@ -525,12 +525,13 @@ export const listInvoices = async (organizationId: string, invoiceId?: string):
525
525
  .orderBy(desc(invoiceEmailDelivery.sentAt))
526
526
  ])
527
527
  return rows.map((row) => {
528
+ const { importMetadata: _importMetadata, ...visibleRow } = row
528
529
  const selectedLines = lines.filter((item) => item.invoiceId === row.id)
529
530
  const selectedPayments = payments.filter((item) => item.invoiceId === row.id)
530
531
  const amounts = totals(selectedLines, selectedPayments)
531
532
  const sent = reminders.filter((item) => item.invoiceId === row.id)
532
533
  return {
533
- ...row,
534
+ ...visibleRow,
534
535
  createdAt: row.createdAt.toISOString(),
535
536
  updatedAt: row.updatedAt.toISOString(),
536
537
  issuedAt: row.issuedAt?.toISOString() ?? null,