Add LineItem CSV import and fix Unit API

This commit is contained in:
2025-12-08 13:20:52 +01:00
parent ee6525b549
commit 7ddf1337c1
12 changed files with 437 additions and 59 deletions
@@ -1,10 +1,10 @@
<script setup lang="ts">
import { computed } from 'vue'
import { type Invoice } from '@/types'
import { Invoice } from '@/types'
import { toLocalDate, toCurrency, toFixedRounded } from '@/lib/utils'
import { StatusBadge, statusBadgeLabels, statusTextStyle, castToStatusVariant } from '@/components/ui/status-badge'
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '@/components/ui/table'
import { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '@/components/ui/table'
const props = defineProps<{
@@ -176,8 +176,9 @@ const calcTaxes = (amount: number) => {
<TableCell class="py-4 text-right tabular-nums">{{ toCurrency(totalPaid) }}</TableCell>
<TableCell class=" text-right tabular-nums hidden lg:table-cell">{{ toCurrency(totalTaxPaid) }}
</TableCell>
<TableCell class="lg:pr-4 text-right tabular-nums hidden lg:table-cell font-bold">{{ toCurrency(totalGrossPaid)
}}</TableCell>
<TableCell class="lg:pr-4 text-right tabular-nums hidden lg:table-cell font-bold">{{
toCurrency(totalGrossPaid)
}}</TableCell>
</TableRow>
<TableRow v-if="totalDue > 0" class="border-none text-destructive hover:bg-transparent">
@@ -188,7 +189,8 @@ const calcTaxes = (amount: number) => {
<TableCell class="py-4 text-right tabular-nums">{{ toCurrency(totalDue) }}</TableCell>
<TableCell class="text-right tabular-nums hidden lg:table-cell">{{ toCurrency(totalTaxDue) }}
</TableCell>
<TableCell class="lg:pr-4 text-right tabular-nums hidden lg:table-cell font-bold">{{ toCurrency(totalGrossDue)
<TableCell class="lg:pr-4 text-right tabular-nums hidden lg:table-cell font-bold">{{
toCurrency(totalGrossDue)
}}</TableCell>
</TableRow>
@@ -213,9 +215,8 @@ const calcTaxes = (amount: number) => {
font-size: 0.833rem;
}
.document-table th {
.document-table th {}
}
.document-table td {
padding-top: 1.125em !important;
padding-bottom: 1.125em !important;