diff --git a/client/src/app/quotes/components/QuotePricesResume.tsx b/client/src/app/quotes/components/QuotePricesResume.tsx new file mode 100644 index 0000000..10f3942 --- /dev/null +++ b/client/src/app/quotes/components/QuotePricesResume.tsx @@ -0,0 +1,167 @@ +import { DollarSign } from "lucide-react"; + +import { Card, CardContent, CardDescription, CardHeader, CardTitle, Separator } from "@/ui"; +import { useFormContext } from "react-hook-form"; + +export const QuotePricesResume = () => { + const { getValues } = useFormContext(); + //const { formatNumber } = useLocalization({ locale: "es-ES" }); + + const subtotal_price = getValues("subtotal_price"); + const discount = getValues("discount"); + + return ( + + + + + Importe neto + + {subtotal_price.amount / 100} + € + + + + + + + Descuento + + {discount.amount / 100} + % + + + + Imp. descuento + + {subtotal_price.amount / 100} + € + + + + + + + IVA + + {discount.amount / 100} + % + + + + Importe IVA + + {subtotal_price.amount / 100} + € + + + {" "} + + + + Importe total + + {subtotal_price.amount / 100} + € + + + + + + ); + + return ( + + + + + Descuento + + 62 + % + + + + Importe dto. + + 3.346 + € + + + + + + + + Importe neto + + {subtotal_price.amount} + + {subtotal_price.currency_code} + + + + + + + + + + Descuento + + + 73 + % + + + + + Descuento + + 73 + € + + + + + + + Base imponible + + 14 + € + + + + + IVA + + 14 + € + + + + + Importe total + + 14 + € + + + + + ); + + return ( + + + Total Revenue + + + + $45,231.89 + +20.1% from last month + + + ); +}; diff --git a/client/src/app/quotes/components/index.ts b/client/src/app/quotes/components/index.ts index ccded8d..8af5494 100644 --- a/client/src/app/quotes/components/index.ts +++ b/client/src/app/quotes/components/index.ts @@ -1 +1,2 @@ +export * from "./QuotePricesResume"; export * from "./QuotesDataTable"; diff --git a/client/src/app/quotes/edit.tsx b/client/src/app/quotes/edit.tsx index 491d758..1cbba9c 100644 --- a/client/src/app/quotes/edit.tsx +++ b/client/src/app/quotes/edit.tsx @@ -14,6 +14,7 @@ import { useEffect, useMemo, useState } from "react"; import { SubmitHandler, useForm } from "react-hook-form"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; +import { QuotePricesResume } from "./components"; import { QuoteDetailsCardEditor, QuoteGeneralCardEditor } from "./components/editors"; import { useQuotes } from "./hooks"; @@ -251,6 +252,7 @@ export const QuoteEdit = () => { {t("quotes.create.tabs.items")} {/* {t("quotes.create.tabs.history")}*/} +
+20.1% from last month