diff --git a/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template copy.hbs b/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template copy.hbs
deleted file mode 100644
index a5f683cf..00000000
--- a/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template copy.hbs
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
- Factura #{{id}}
-
-
-
-
-
-
-
-
-
-
-
-
- Concepto
- Cantidad
- Precio unidad
- {{#if any_item_has_discount}}
- Dto (%)
- {{/if}}
- Importe total
-
-
-
- {{#each items}}
-
-
- {{description}}
- {{#if note}}{{note}}
{{/if}}
-
- {{quantity}}
- {{unit_price}}
- {{#if ../any_item_has_discount}}
- {{discount}}
- {{/if}}
- {{total_price}}
-
- {{/each}}
-
-
-
- * Precios en {{currency}}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{#if subtotal_price}}
-
- Importe neto
- {{subtotal_price}}
-
- {{/if}}
- {{#if discount_price}}
-
- % Descuento ({{discount.amount}})
- -{{discount_price}}
-
- {{/if}}
-
- Base imponible
- {{before_tax_price}}
-
-
- IVA {{tax}}
- {{tax_price}}
-
-
- Total factura
- {{total_price}}
-
-
-
-
-
-
-
-
- {{quote.default_legal_terms}}
-
-
-
-
-
- {{!-- Helpers opcionales esperados por la plantilla --}}
- {{!--
- any_item_has_discount: boolean precomputado en tu código
- payment_is_direct_debit: boolean si forma de pago es domiciliación
- direct_debit_text: texto para el bloque de domiciliación bancaria
- currency: ISO o símbolo (EUR, €, etc.)
- --}}
-
-
-
\ No newline at end of file
diff --git a/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template.hbs b/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template.hbs
index 1d992e01..b7dd4308 100644
--- a/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template.hbs
+++ b/modules/customer-invoices/src/api/application/use-cases/report/reporter/templates/customer-invoice/template.hbs
@@ -119,7 +119,6 @@
Factura nº: {{invoice_number}}
Fecha: {{invoice_date}}
-
Página: /
{{recipient.name}}
diff --git a/modules/customer-invoices/src/api/domain/aggregates/customer-invoice.ts b/modules/customer-invoices/src/api/domain/aggregates/customer-invoice.ts
index 006fc90f..79581b7b 100644
--- a/modules/customer-invoices/src/api/domain/aggregates/customer-invoice.ts
+++ b/modules/customer-invoices/src/api/domain/aggregates/customer-invoice.ts
@@ -38,7 +38,7 @@ export interface CustomerInvoiceProps {
languageCode: LanguageCode;
currencyCode: CurrencyCode;
- taxes: Maybe;
+ taxes: InvoiceTaxes;
items: CustomerInvoiceItems;
discountPercentage: Percentage;
@@ -71,10 +71,7 @@ export class CustomerInvoice
currencyCode: props.currencyCode,
});
- this._taxes = props.taxes.match(
- (taxes) => taxes,
- () => InvoiceTaxes.create({})
- );
+ this._taxes = props.taxes;
}
static create(props: CustomerInvoiceProps, id?: UniqueID): Result {
diff --git a/modules/customer-invoices/src/api/infrastructure/express/customer-invoices.routes.ts b/modules/customer-invoices/src/api/infrastructure/express/customer-invoices.routes.ts
index 242feab0..455965af 100644
--- a/modules/customer-invoices/src/api/infrastructure/express/customer-invoices.routes.ts
+++ b/modules/customer-invoices/src/api/infrastructure/express/customer-invoices.routes.ts
@@ -115,5 +115,5 @@ export const customerInvoicesRouter = (params: ModuleParams) => {
}
);
- app.use(`${baseRoutePath}/customer-invoices`, router);
+ app.use(`${baseRoutePath}/proforma-invoices`, router);
};
diff --git a/modules/customer-invoices/src/api/infrastructure/mappers/domain/customer-invoice.mapper.ts b/modules/customer-invoices/src/api/infrastructure/mappers/domain/customer-invoice.mapper.ts
index 5e7b619a..30f1a93f 100644
--- a/modules/customer-invoices/src/api/infrastructure/mappers/domain/customer-invoice.mapper.ts
+++ b/modules/customer-invoices/src/api/infrastructure/mappers/domain/customer-invoice.mapper.ts
@@ -11,7 +11,7 @@ import {
extractOrPushError,
maybeFromNullableVO,
} from "@repo/rdx-ddd";
-import { Maybe, Result } from "@repo/rdx-utils";
+import { Result } from "@repo/rdx-utils";
import {
CustomerInvoice,
CustomerInvoiceItems,
@@ -243,7 +243,7 @@ export class CustomerInvoiceDomainMapper
discountPercentage: attributes.discountPercentage!,
- taxes: Maybe.some(taxes),
+ taxes: taxes,
items,
};
diff --git a/packages/rdx-ui/src/components/layout/app-sidebar.tsx b/packages/rdx-ui/src/components/layout/app-sidebar.tsx
index e08125ae..ec5fb667 100644
--- a/packages/rdx-ui/src/components/layout/app-sidebar.tsx
+++ b/packages/rdx-ui/src/components/layout/app-sidebar.tsx
@@ -200,8 +200,8 @@ const data2 = {
],
},
{
- title: "Facturas de cliente",
- url: "/customer-invoices",
+ title: "Proformas de cliente",
+ url: "/customer-proforma",
icon: Bot,
items: [
{
@@ -219,8 +219,8 @@ const data2 = {
],
},
{
- title: "Documentation",
- url: "#",
+ title: "Facturas de cliente",
+ url: "/customer-invoices",
icon: BookOpen,
items: [
{