@dangl/angular-ava 1.3.0-beta0045 → 1.3.0-beta0057
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/fesm2022/dangl-angular-ava.mjs +91 -32
- package/fesm2022/dangl-angular-ava.mjs.map +1 -1
- package/lib/invoice/components/invoice-line-item-additional-info/invoice-line-item-additional-info.component.d.ts +11 -0
- package/lib/invoice/components/invoice-line-items-table/invoice-line-items-table.component.d.ts +18 -0
- package/lib/invoice/model/invoice-words.model.d.ts +4 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import localeEn from '@angular/common/locales/en';
|
|
|
4
4
|
import localeDeExtra from '@angular/common/locales/extra/de';
|
|
5
5
|
import localeEnExtra from '@angular/common/locales/extra/en';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { input, inject, Directive, HostListener, signal, Injectable, EnvironmentInjector, Pipe, viewChild, Component, ChangeDetectionStrategy, ChangeDetectorRef, output, linkedSignal, runInInjectionContext, ViewEncapsulation, Self, DestroyRef, ViewChild, effect } from '@angular/core';
|
|
7
|
+
import { input, inject, Directive, HostListener, signal, Injectable, EnvironmentInjector, Pipe, viewChild, Component, ChangeDetectionStrategy, ChangeDetectorRef, output, linkedSignal, runInInjectionContext, ViewEncapsulation, Self, DestroyRef, ViewChild, Input, effect } from '@angular/core';
|
|
8
8
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
9
9
|
import * as i11 from '@angular/forms';
|
|
10
10
|
import { FormsModule } from '@angular/forms';
|
|
@@ -27,6 +27,11 @@ import * as i2$1 from '@angular/material/divider';
|
|
|
27
27
|
import { MatDividerModule } from '@angular/material/divider';
|
|
28
28
|
import * as i2 from '@angular/material/expansion';
|
|
29
29
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
30
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
31
|
+
import { CurrencyPlusPipe as CurrencyPlusPipe$1 } from 'projects/angular-ava/src/lib/invoice/pipes/currency-plus.pipe';
|
|
32
|
+
import { NumberPlusPipe } from 'projects/angular-ava/src/lib/invoice/pipes/number-plus.pipe';
|
|
33
|
+
import { PercentPlusPipe as PercentPlusPipe$1 } from 'projects/angular-ava/src/lib/invoice/pipes/percent-plus.pipe';
|
|
34
|
+
import { ConfigurationInvoiceService as ConfigurationInvoiceService$1 } from 'projects/angular-ava/src/lib/invoice/services/configuration-invoice.service';
|
|
30
35
|
|
|
31
36
|
//----------------------
|
|
32
37
|
// <auto-generated>
|
|
@@ -243,12 +248,12 @@ var ModeViewType;
|
|
|
243
248
|
|
|
244
249
|
// This file is automatically generated as part of the build process
|
|
245
250
|
const version = {
|
|
246
|
-
version: "1.3.0-
|
|
247
|
-
commitInfo: "Branch.develop.Sha.
|
|
251
|
+
version: "1.3.0-beta0057",
|
|
252
|
+
commitInfo: "Branch.develop.Sha.340cdc341bafeeeb44ccce8fcc5d480607fef832",
|
|
248
253
|
commitDate: "2025-02-12",
|
|
249
|
-
commitHash: "
|
|
250
|
-
informationalVersion: "1.3.0-beta.
|
|
251
|
-
buildDateUtc: new Date(Date.UTC(2025, 1, 12, 19,
|
|
254
|
+
commitHash: "340cdc341bafeeeb44ccce8fcc5d480607fef832",
|
|
255
|
+
informationalVersion: "1.3.0-beta.57+Branch.develop.Sha.340cdc341bafeeeb44ccce8fcc5d480607fef832",
|
|
256
|
+
buildDateUtc: new Date(Date.UTC(2025, 1, 12, 19, 28, 32))
|
|
252
257
|
};
|
|
253
258
|
|
|
254
259
|
class TreeHoverTooltipService {
|
|
@@ -429,7 +434,11 @@ const DEFAULT_TEXT_WORD_INVOICE = {
|
|
|
429
434
|
invoiceChargesTableHeaderSum: 'Sum',
|
|
430
435
|
invoiceChargesTableHeaderVatRate: 'VAT',
|
|
431
436
|
invoiceChargesTableHeaderCharge: 'Charge',
|
|
432
|
-
invoiceChargesTableHeaderBase: 'Base'
|
|
437
|
+
invoiceChargesTableHeaderBase: 'Base',
|
|
438
|
+
lineItemDiscount: 'Discount',
|
|
439
|
+
lineItemCharges: 'Charges',
|
|
440
|
+
lineItemAllowances: 'Allowances',
|
|
441
|
+
lineItemReason: 'Reason'
|
|
433
442
|
};
|
|
434
443
|
const germanTextsInvoice = {
|
|
435
444
|
invoiceTitle: 'Rechnung',
|
|
@@ -498,7 +507,11 @@ const germanTextsInvoice = {
|
|
|
498
507
|
invoiceChargesTableHeaderSum: 'Summe',
|
|
499
508
|
invoiceChargesTableHeaderVatRate: 'Steuersatz',
|
|
500
509
|
invoiceChargesTableHeaderCharge: 'Zuschlag',
|
|
501
|
-
invoiceChargesTableHeaderBase: 'Basis'
|
|
510
|
+
invoiceChargesTableHeaderBase: 'Basis',
|
|
511
|
+
lineItemDiscount: 'Rabatt',
|
|
512
|
+
lineItemCharges: 'Zuschlag',
|
|
513
|
+
lineItemAllowances: 'Nachlass',
|
|
514
|
+
lineItemReason: 'Grund'
|
|
502
515
|
};
|
|
503
516
|
|
|
504
517
|
const DEFAULT_DIGITS_INFO = '1.3-3';
|
|
@@ -2111,26 +2124,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
2111
2124
|
}]
|
|
2112
2125
|
}] });
|
|
2113
2126
|
|
|
2114
|
-
class NumberPlusPipe {
|
|
2115
|
-
constructor() {
|
|
2116
|
-
this.currencyPipe = inject(DecimalPipe);
|
|
2117
|
-
this.configurationInvoiceService = inject(ConfigurationInvoiceService);
|
|
2118
|
-
}
|
|
2119
|
-
transform(value) {
|
|
2120
|
-
return typeof value === 'number'
|
|
2121
|
-
? this.currencyPipe.transform(value, this.configurationInvoiceService.quantityDecimalPlaces, this.configurationInvoiceService.locale)
|
|
2122
|
-
: '';
|
|
2123
|
-
}
|
|
2124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: NumberPlusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2125
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.1", ngImport: i0, type: NumberPlusPipe, isStandalone: true, name: "numberPlus" }); }
|
|
2126
|
-
}
|
|
2127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: NumberPlusPipe, decorators: [{
|
|
2128
|
-
type: Pipe,
|
|
2129
|
-
args: [{
|
|
2130
|
-
name: 'numberPlus'
|
|
2131
|
-
}]
|
|
2132
|
-
}] });
|
|
2133
|
-
|
|
2134
2127
|
class PercentPlusPipe {
|
|
2135
2128
|
constructor() {
|
|
2136
2129
|
this.percentPipe = inject(PercentPipe);
|
|
@@ -2296,6 +2289,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
2296
2289
|
args: ['documentsPanel']
|
|
2297
2290
|
}] } });
|
|
2298
2291
|
|
|
2292
|
+
class InvoiceLineItemAdditionalInfoComponent {
|
|
2293
|
+
constructor() {
|
|
2294
|
+
this.configurationInvoiceService = inject(ConfigurationInvoiceService);
|
|
2295
|
+
this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
|
|
2296
|
+
}
|
|
2297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceLineItemAdditionalInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2298
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceLineItemAdditionalInfoComponent, isStandalone: true, selector: "ava-invoice-line-item-additional-info", inputs: { lineItem: "lineItem" }, ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n @if (lineItem) {\n @if (lineItem.allowances && lineItem.allowances.length) {\n <div>\n <h2>{{ textWords.lineItemAllowances }}</h2>\n <div class=\"allowances\">\n <p>\n <strong>{{ textWords.lineItemReason }}:</strong> {{ lineItem.allowances[0].reason }}\n </p>\n <p>\n <strong>{{ textWords.tableHeadNetAmount }}:</strong> {{ lineItem.allowances[0].netAmount }}\n </p>\n </div>\n </div>\n }\n @if (lineItem.charges && lineItem.charges.length) {\n <div>\n <h2>{{ textWords.lineItemCharges }}</h2>\n <div class=\"charges\">\n <p>\n <strong>{{ textWords.lineItemReason }}:</strong> {{ lineItem.charges[0].reason }}\n </p>\n <p>\n <strong>{{ textWords.tableHeadNetAmount }}:</strong> {{ lineItem.charges[0].netAmount }}\n </p>\n </div>\n </div>\n }\n }\n}\n", styles: [".allowances,.charges{display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2299
|
+
}
|
|
2300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceLineItemAdditionalInfoComponent, decorators: [{
|
|
2301
|
+
type: Component,
|
|
2302
|
+
args: [{ selector: 'ava-invoice-line-item-additional-info', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (textWords$ | async; as textWords) {\n @if (lineItem) {\n @if (lineItem.allowances && lineItem.allowances.length) {\n <div>\n <h2>{{ textWords.lineItemAllowances }}</h2>\n <div class=\"allowances\">\n <p>\n <strong>{{ textWords.lineItemReason }}:</strong> {{ lineItem.allowances[0].reason }}\n </p>\n <p>\n <strong>{{ textWords.tableHeadNetAmount }}:</strong> {{ lineItem.allowances[0].netAmount }}\n </p>\n </div>\n </div>\n }\n @if (lineItem.charges && lineItem.charges.length) {\n <div>\n <h2>{{ textWords.lineItemCharges }}</h2>\n <div class=\"charges\">\n <p>\n <strong>{{ textWords.lineItemReason }}:</strong> {{ lineItem.charges[0].reason }}\n </p>\n <p>\n <strong>{{ textWords.tableHeadNetAmount }}:</strong> {{ lineItem.charges[0].netAmount }}\n </p>\n </div>\n </div>\n }\n }\n}\n", styles: [".allowances,.charges{display:flex;justify-content:space-between}\n"] }]
|
|
2303
|
+
}], propDecorators: { lineItem: [{
|
|
2304
|
+
type: Input
|
|
2305
|
+
}] } });
|
|
2306
|
+
|
|
2307
|
+
class InvoiceLineItemsTableComponent {
|
|
2308
|
+
constructor() {
|
|
2309
|
+
this.lineItems = input([]);
|
|
2310
|
+
this.configurationInvoiceService = inject(ConfigurationInvoiceService$1);
|
|
2311
|
+
this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
|
|
2312
|
+
this.pdfViewEnabled$ = this.configurationInvoiceService.getPdfViewEnabledFromConfig();
|
|
2313
|
+
this.colorSettings$ = this.configurationInvoiceService.getColorSettingsFromConfig();
|
|
2314
|
+
this.displayedColumns = ['number', 'description', 'quantity', 'unit', 'netPrice', 'vat', 'discount', 'netAmount'];
|
|
2315
|
+
this.expandedElements = new Set();
|
|
2316
|
+
}
|
|
2317
|
+
toggleRow(row) {
|
|
2318
|
+
if (this.expandedElements.has(row)) {
|
|
2319
|
+
this.expandedElements.delete(row);
|
|
2320
|
+
}
|
|
2321
|
+
else {
|
|
2322
|
+
this.expandedElements.add(row);
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
isRowExpanded(row) {
|
|
2326
|
+
return this.expandedElements.has(row);
|
|
2327
|
+
}
|
|
2328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceLineItemsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceLineItemsTableComponent, isStandalone: true, selector: "ava-invoice-line-items-table", inputs: { lineItems: { classPropertyName: "lineItems", publicName: "lineItems", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n <table\n mat-table\n [dataSource]=\"lineItems()\"\n multiTemplateDataRows\n class=\"mat-elevation-z8 invoice-table\"\n >\n <ng-container matColumnDef=\"number\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n #\n </th>\n <td\n mat-cell\n *matCellDef=\"let element; let i = dataIndex\"\n >\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadDescription }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.itemInformation?.description }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadQuantity }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.quantity | numberPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unit\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadUnit }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.unitCode }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"netPrice\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetPrice }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n {{ element.priceDetails?.netPrice | currencyPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"discount\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.lineItemDiscount }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n @if (element.priceDetails?.absoluteDiscountPerItem) {\n {{ element.priceDetails?.absoluteDiscountPerItem | percentPlus: '1.0-2' }}\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"netAmount\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetAmount }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n {{ element.netAmount | currencyPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"vat\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n @if (element && element.vatInformation && element.vatInformation.length > 0) {\n {{ element.vatInformation[0].vatRate | percentPlus: '1.0-2' }}\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expandedDetail\">\n <td\n mat-cell\n *matCellDef=\"let element\"\n [attr.colspan]=\"displayedColumns.length\"\n >\n <div [@detailExpand]=\"isRowExpanded(element) ? 'expanded' : 'collapsed'\">\n <ava-invoice-line-item-additional-info [lineItem]=\"element\"></ava-invoice-line-item-additional-info>\n </div>\n </td>\n </ng-container>\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns\"\n ></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"toggleRow(row)\"\n [ngClass]=\"{ 'expanded-row': isRowExpanded(row) && colorSettings === true }\"\n [ngStyle]=\"{\n backgroundColor:\n colorSettings === true\n ? null\n : isRowExpanded(row)\n ? 'color-mix(in srgb,' + colorSettings?.backgroundColor + ', white 70%)'\n : null,\n }\"\n ></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"detail-row\"\n ></tr>\n </table>\n }\n}\n", styles: [".invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{text-align:left}.invoice-table th{background-color:var(--color-primary);font-weight:700;color:#fff}.currency-table-cell{text-align:right!important}.invoice-table tr.detail-row{height:0}tr{cursor:pointer}tr.expanded-row td{background-color:color-mix(in srgb,var(--color-primary),white 70%)}\n"], dependencies: [{ kind: "pipe", type: PercentPlusPipe$1, name: "percentPlus" }, { kind: "pipe", type: CurrencyPlusPipe$1, name: "currencyPlus" }, { kind: "pipe", type: NumberPlusPipe, name: "numberPlus" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: InvoiceLineItemAdditionalInfoComponent, selector: "ava-invoice-line-item-additional-info", inputs: ["lineItem"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], animations: [
|
|
2330
|
+
trigger('detailExpand', [
|
|
2331
|
+
state('collapsed,void', style({ height: '0px', minHeight: '0' })),
|
|
2332
|
+
state('expanded', style({ height: '*' })),
|
|
2333
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
|
|
2334
|
+
])
|
|
2335
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2336
|
+
}
|
|
2337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceLineItemsTableComponent, decorators: [{
|
|
2338
|
+
type: Component,
|
|
2339
|
+
args: [{ selector: 'ava-invoice-line-items-table', animations: [
|
|
2340
|
+
trigger('detailExpand', [
|
|
2341
|
+
state('collapsed,void', style({ height: '0px', minHeight: '0' })),
|
|
2342
|
+
state('expanded', style({ height: '*' })),
|
|
2343
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
|
|
2344
|
+
])
|
|
2345
|
+
], imports: [
|
|
2346
|
+
PercentPlusPipe$1,
|
|
2347
|
+
CurrencyPlusPipe$1,
|
|
2348
|
+
NumberPlusPipe,
|
|
2349
|
+
AsyncPipe,
|
|
2350
|
+
MatTableModule,
|
|
2351
|
+
MatButtonModule,
|
|
2352
|
+
NgClass,
|
|
2353
|
+
InvoiceLineItemAdditionalInfoComponent,
|
|
2354
|
+
NgStyle
|
|
2355
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n <table\n mat-table\n [dataSource]=\"lineItems()\"\n multiTemplateDataRows\n class=\"mat-elevation-z8 invoice-table\"\n >\n <ng-container matColumnDef=\"number\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n #\n </th>\n <td\n mat-cell\n *matCellDef=\"let element; let i = dataIndex\"\n >\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"description\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadDescription }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.itemInformation?.description }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"quantity\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadQuantity }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.quantity | numberPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unit\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadUnit }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n >\n {{ element.unitCode }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"netPrice\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetPrice }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n {{ element.priceDetails?.netPrice | currencyPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"discount\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.lineItemDiscount }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n @if (element.priceDetails?.absoluteDiscountPerItem) {\n {{ element.priceDetails?.absoluteDiscountPerItem | percentPlus: '1.0-2' }}\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"netAmount\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetAmount }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n {{ element.netAmount | currencyPlus }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"vat\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"currency-table-cell\"\n >\n @if (element && element.vatInformation && element.vatInformation.length > 0) {\n {{ element.vatInformation[0].vatRate | percentPlus: '1.0-2' }}\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expandedDetail\">\n <td\n mat-cell\n *matCellDef=\"let element\"\n [attr.colspan]=\"displayedColumns.length\"\n >\n <div [@detailExpand]=\"isRowExpanded(element) ? 'expanded' : 'collapsed'\">\n <ava-invoice-line-item-additional-info [lineItem]=\"element\"></ava-invoice-line-item-additional-info>\n </div>\n </td>\n </ng-container>\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns\"\n ></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"toggleRow(row)\"\n [ngClass]=\"{ 'expanded-row': isRowExpanded(row) && colorSettings === true }\"\n [ngStyle]=\"{\n backgroundColor:\n colorSettings === true\n ? null\n : isRowExpanded(row)\n ? 'color-mix(in srgb,' + colorSettings?.backgroundColor + ', white 70%)'\n : null,\n }\"\n ></tr>\n\n <tr\n mat-row\n *matRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"detail-row\"\n ></tr>\n </table>\n }\n}\n", styles: [".invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{text-align:left}.invoice-table th{background-color:var(--color-primary);font-weight:700;color:#fff}.currency-table-cell{text-align:right!important}.invoice-table tr.detail-row{height:0}tr{cursor:pointer}tr.expanded-row td{background-color:color-mix(in srgb,var(--color-primary),white 70%)}\n"] }]
|
|
2356
|
+
}] });
|
|
2357
|
+
|
|
2299
2358
|
registerLocaleData(localeDe, 'de-DE', localeDeExtra);
|
|
2300
2359
|
registerLocaleData(localeEn, 'en-US', localeEnExtra);
|
|
2301
2360
|
class InvoiceDisplayComponent {
|
|
@@ -2405,21 +2464,21 @@ class InvoiceDisplayComponent {
|
|
|
2405
2464
|
this.configurationInvoiceService.setInvoiceConfig(this.linkedConfig());
|
|
2406
2465
|
}
|
|
2407
2466
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, deps: [{ token: ConfigurationInvoiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2408
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceDisplayComponent, isStandalone: true, selector: "ava-invoice-display", inputs: { invoice: { classPropertyName: "invoice", publicName: "invoice", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, providers: [ConfigurationInvoiceService, CurrencyPipe, DecimalPipe, PercentPipe], ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n @if (invoice() !== null) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceBuyerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.buyer?.name }}</strong>\n </p>\n <p>{{ invoice()?.buyer?.address }}</p>\n <p>{{ invoice()?.buyer?.city }}, {{ invoice()?.buyer?.zipCode }}</p>\n <p>{{ invoice()?.buyer?.countryCode }}</p>\n @if (invoice()?.buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n @if (invoice()?.invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice()?.invoiceNumber }}</span>\n </p>\n }\n @if (invoice()?.invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice()?.invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice()?.paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice()?.currencyCode }}</span>\n </p>\n }\n @if (invoice()?.paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice()?.paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceSellerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.seller?.name }}</strong>\n </p>\n <p>{{ invoice()?.seller?.address }}</p>\n <p>{{ invoice()?.seller?.city }}, {{ invoice()?.seller?.zipCode }}</p>\n <p>{{ invoice()?.seller?.countryCode }}</p>\n @if (invoice()?.seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.referencesTopic }}\n </h2>\n }\n @if (invoice()?.references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.buyerReference }}</span>\n </p>\n }\n @if (invoice()?.references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.projectReference }}</span>\n </p>\n }\n @if (invoice()?.references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.contractReference }}</span>\n </p>\n }\n @if (invoice()?.references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ invoice()?.references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice()?.references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice()?.deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice()?.deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice()?.deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n #\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadDescription }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadQuantity }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadUnit }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetPrice }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetAmount }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice()?.lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td class=\"currency-table-cell\">{{ item.quantity | numberPlus }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currencyPlus }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currencyPlus }}</td>\n @if (item.vatInformation && item.vatInformation.length > 0) {\n <td class=\"currency-table-cell\">{{ item.vatInformation[0].vatRate | percentPlus: '1.0-2' }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"taxes-and-allowances\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.taxesHeading }}\n </h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalNet }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalVatAmount }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice()?.vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percentPlus: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currencyPlus }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currencyPlus }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n @if (invoice()?.allowances && (invoice()?.allowances?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceAllowancesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderAllowance }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (allowance of invoice()?.allowances; track allowance) {\n <tr>\n <td colspan=\"4\">\n @if (allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reason }} / {{ allowance.reasonCode }}</span>\n }\n @if (allowance.reason && !allowance.reasonCode) {\n <span>{{ allowance.reason }}</span>\n }\n\n @if (!allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowancePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowanceBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (invoice()?.charges && (invoice()?.charges?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceChargesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderCharge }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (charge of invoice()?.charges; track charge) {\n <tr>\n <td colspan=\"4\">\n @if (charge.reason && charge.reasonCode) {\n <span>{{ charge.reason }} / {{ charge.reasonCode }}</span>\n }\n @if (charge.reason && !charge.reasonCode) {\n <span>{{ charge.reason }}</span>\n }\n\n @if (!charge.reason && charge.reasonCode) {\n <span>{{ charge.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargeBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n </section>\n\n <section class=\"payment-instructions\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.instructionsTopic }}\n </h2>\n @if (invoice()?.paymentInstructions?.description) {\n <p>{{ invoice()?.paymentInstructions?.description }}</p>\n }\n @for (means of invoice()?.paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <br />\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <br />\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <br />\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n\n <section class=\"invoice-totals\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.totalsTopic }}\n </h2>\n\n @if (invoice()?.totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalNet | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalAllowances | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalCharges | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalAfterDeductions | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalVatAmount | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalGross | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.alreadyPaidTotal | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalToBePaid) {\n <p\n class=\"total\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <br />\n <strong> {{ invoice()?.totals?.totalToBePaid | currencyPlus }}</strong>\n </p>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice()?.invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice()?.documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice()?.documents || []\"></ava-invoice-documents>\n </section>\n }\n </div>\n } @else if (invoice() === null && (pdfViewEnabled$ | async)) {\n <div class=\"error-container\">\n <div class=\"error-message\">\n <mat-icon>error_outline</mat-icon>\n <h2>Oops! Something went wrong.</h2>\n <p>We couldn't retrieve the invoice data. Please try again later.</p>\n </div>\n </div>\n } @else {\n <div></div>\n }\n }\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions,.invoice-totals{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes-and-allowances,.invoice-delivery,.invoice-details{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:6px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}.center{text-align:center!important}.error-container{display:flex;justify-content:center;align-items:center;height:100vh}.error-message{text-align:center;background-color:#fff3f3;border:1px solid #d32f2f;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;color:#d32f2f;max-width:400px;width:100%}.error-message h2{font-size:1.5em;margin:0 0 10px;font-weight:700}.error-message p{font-size:1em;margin-top:0;color:#555}\n"], dependencies: [{ kind: "pipe", type: PercentPlusPipe, name: "percentPlus" }, { kind: "pipe", type: NumberPlusPipe, name: "numberPlus" }, { kind: "pipe", type: CurrencyPlusPipe, name: "currencyPlus" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: InvoiceDocumentsComponent, selector: "ava-invoice-documents", inputs: ["documents"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: InvoiceDisplayComponent, isStandalone: true, selector: "ava-invoice-display", inputs: { invoice: { classPropertyName: "invoice", publicName: "invoice", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, providers: [ConfigurationInvoiceService, CurrencyPipe, DecimalPipe, PercentPipe], ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n @if (invoice() !== null) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceBuyerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.buyer?.name }}</strong>\n </p>\n <p>{{ invoice()?.buyer?.address }}</p>\n <p>{{ invoice()?.buyer?.city }}, {{ invoice()?.buyer?.zipCode }}</p>\n <p>{{ invoice()?.buyer?.countryCode }}</p>\n @if (invoice()?.buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n @if (invoice()?.invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice()?.invoiceNumber }}</span>\n </p>\n }\n @if (invoice()?.invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice()?.invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice()?.paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice()?.currencyCode }}</span>\n </p>\n }\n @if (invoice()?.paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice()?.paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceSellerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.seller?.name }}</strong>\n </p>\n <p>{{ invoice()?.seller?.address }}</p>\n <p>{{ invoice()?.seller?.city }}, {{ invoice()?.seller?.zipCode }}</p>\n <p>{{ invoice()?.seller?.countryCode }}</p>\n @if (invoice()?.seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.referencesTopic }}\n </h2>\n }\n @if (invoice()?.references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.buyerReference }}</span>\n </p>\n }\n @if (invoice()?.references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.projectReference }}</span>\n </p>\n }\n @if (invoice()?.references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.contractReference }}</span>\n </p>\n }\n @if (invoice()?.references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ invoice()?.references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice()?.references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice()?.deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice()?.deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice()?.deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n <ava-invoice-line-items-table [lineItems]=\"invoice()?.lineItems || []\"></ava-invoice-line-items-table>\n\n <div class=\"addition-info\">\n <section class=\"taxes-and-allowances\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.taxesHeading }}\n </h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalNet }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalVatAmount }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice()?.vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percentPlus: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currencyPlus }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currencyPlus }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n @if (invoice()?.allowances && (invoice()?.allowances?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceAllowancesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderAllowance }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (allowance of invoice()?.allowances; track allowance) {\n <tr>\n <td colspan=\"4\">\n @if (allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reason }} / {{ allowance.reasonCode }}</span>\n }\n @if (allowance.reason && !allowance.reasonCode) {\n <span>{{ allowance.reason }}</span>\n }\n\n @if (!allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowancePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowanceBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (invoice()?.charges && (invoice()?.charges?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceChargesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderCharge }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (charge of invoice()?.charges; track charge) {\n <tr>\n <td colspan=\"4\">\n @if (charge.reason && charge.reasonCode) {\n <span>{{ charge.reason }} / {{ charge.reasonCode }}</span>\n }\n @if (charge.reason && !charge.reasonCode) {\n <span>{{ charge.reason }}</span>\n }\n\n @if (!charge.reason && charge.reasonCode) {\n <span>{{ charge.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargeBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n </section>\n\n <section class=\"payment-instructions\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.instructionsTopic }}\n </h2>\n @if (invoice()?.paymentInstructions?.description) {\n <p>{{ invoice()?.paymentInstructions?.description }}</p>\n }\n @for (means of invoice()?.paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <br />\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <br />\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <br />\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n\n <section class=\"invoice-totals\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.totalsTopic }}\n </h2>\n\n @if (invoice()?.totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalNet | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalAllowances | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalCharges | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalAfterDeductions | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalVatAmount | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalGross | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.alreadyPaidTotal | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalToBePaid) {\n <p\n class=\"total\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <br />\n <strong> {{ invoice()?.totals?.totalToBePaid | currencyPlus }}</strong>\n </p>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice()?.invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice()?.documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice()?.documents || []\"></ava-invoice-documents>\n </section>\n }\n </div>\n } @else if (invoice() === null && (pdfViewEnabled$ | async)) {\n <div class=\"error-container\">\n <div class=\"error-message\">\n <mat-icon>error_outline</mat-icon>\n <h2>Oops! Something went wrong.</h2>\n <p>We couldn't retrieve the invoice data. Please try again later.</p>\n </div>\n </div>\n } @else {\n <div></div>\n }\n }\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions,.invoice-totals{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes-and-allowances,.invoice-delivery,.invoice-details{margin:20px 0}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:6px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}.center{text-align:center!important}.error-container{display:flex;justify-content:center;align-items:center;height:100vh}.error-message{text-align:center;background-color:#fff3f3;border:1px solid #d32f2f;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;color:#d32f2f;max-width:400px;width:100%}.error-message h2{font-size:1.5em;margin:0 0 10px;font-weight:700}.error-message p{font-size:1em;margin-top:0;color:#555}\n"], dependencies: [{ kind: "pipe", type: PercentPlusPipe, name: "percentPlus" }, { kind: "pipe", type: CurrencyPlusPipe, name: "currencyPlus" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: InvoiceDocumentsComponent, selector: "ava-invoice-documents", inputs: ["documents"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: InvoiceLineItemsTableComponent, selector: "ava-invoice-line-items-table", inputs: ["lineItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2409
2468
|
}
|
|
2410
2469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, decorators: [{
|
|
2411
2470
|
type: Component,
|
|
2412
2471
|
args: [{ selector: 'ava-invoice-display', imports: [
|
|
2413
2472
|
PercentPlusPipe,
|
|
2414
|
-
NumberPlusPipe,
|
|
2415
2473
|
CurrencyPlusPipe,
|
|
2416
2474
|
DatePipe,
|
|
2417
2475
|
AsyncPipe,
|
|
2418
2476
|
MatDividerModule,
|
|
2419
2477
|
InvoiceDocumentsComponent,
|
|
2420
2478
|
MatIconModule,
|
|
2421
|
-
NgStyle
|
|
2422
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfigurationInvoiceService, CurrencyPipe, DecimalPipe, PercentPipe], template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n @if (invoice() !== null) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceBuyerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.buyer?.name }}</strong>\n </p>\n <p>{{ invoice()?.buyer?.address }}</p>\n <p>{{ invoice()?.buyer?.city }}, {{ invoice()?.buyer?.zipCode }}</p>\n <p>{{ invoice()?.buyer?.countryCode }}</p>\n @if (invoice()?.buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n @if (invoice()?.invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice()?.invoiceNumber }}</span>\n </p>\n }\n @if (invoice()?.invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice()?.invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice()?.paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice()?.currencyCode }}</span>\n </p>\n }\n @if (invoice()?.paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice()?.paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceSellerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.seller?.name }}</strong>\n </p>\n <p>{{ invoice()?.seller?.address }}</p>\n <p>{{ invoice()?.seller?.city }}, {{ invoice()?.seller?.zipCode }}</p>\n <p>{{ invoice()?.seller?.countryCode }}</p>\n @if (invoice()?.seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.referencesTopic }}\n </h2>\n }\n @if (invoice()?.references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.buyerReference }}</span>\n </p>\n }\n @if (invoice()?.references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.projectReference }}</span>\n </p>\n }\n @if (invoice()?.references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.contractReference }}</span>\n </p>\n }\n @if (invoice()?.references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ invoice()?.references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice()?.references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice()?.deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice()?.deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice()?.deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n\n <table class=\"invoice-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n #\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadDescription }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadQuantity }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadUnit }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetPrice }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.tableHeadNetAmount }}\n </th>\n <th\n class=\"center\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (item of invoice()?.lineItems; track item; let i = $index) {\n <tr>\n <td>{{ i + 1 }}</td>\n <td>{{ item.itemInformation?.description }}</td>\n <td class=\"currency-table-cell\">{{ item.quantity | numberPlus }}</td>\n <td>{{ item.unitCode }}</td>\n <td class=\"currency-table-cell\">{{ item.priceDetails?.netPrice | currencyPlus }}</td>\n <td class=\"currency-table-cell\">{{ item.netAmount | currencyPlus }}</td>\n @if (item.vatInformation && item.vatInformation.length > 0) {\n <td class=\"currency-table-cell\">{{ item.vatInformation[0].vatRate | percentPlus: '1.0-2' }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n <div class=\"addition-info\">\n <section class=\"taxes-and-allowances\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.taxesHeading }}\n </h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalNet }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalVatAmount }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice()?.vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percentPlus: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currencyPlus }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currencyPlus }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n @if (invoice()?.allowances && (invoice()?.allowances?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceAllowancesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderAllowance }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (allowance of invoice()?.allowances; track allowance) {\n <tr>\n <td colspan=\"4\">\n @if (allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reason }} / {{ allowance.reasonCode }}</span>\n }\n @if (allowance.reason && !allowance.reasonCode) {\n <span>{{ allowance.reason }}</span>\n }\n\n @if (!allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowancePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowanceBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (invoice()?.charges && (invoice()?.charges?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceChargesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderCharge }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (charge of invoice()?.charges; track charge) {\n <tr>\n <td colspan=\"4\">\n @if (charge.reason && charge.reasonCode) {\n <span>{{ charge.reason }} / {{ charge.reasonCode }}</span>\n }\n @if (charge.reason && !charge.reasonCode) {\n <span>{{ charge.reason }}</span>\n }\n\n @if (!charge.reason && charge.reasonCode) {\n <span>{{ charge.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargeBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n </section>\n\n <section class=\"payment-instructions\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.instructionsTopic }}\n </h2>\n @if (invoice()?.paymentInstructions?.description) {\n <p>{{ invoice()?.paymentInstructions?.description }}</p>\n }\n @for (means of invoice()?.paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <br />\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <br />\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <br />\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n\n <section class=\"invoice-totals\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.totalsTopic }}\n </h2>\n\n @if (invoice()?.totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalNet | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalAllowances | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalCharges | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalAfterDeductions | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalVatAmount | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalGross | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.alreadyPaidTotal | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalToBePaid) {\n <p\n class=\"total\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <br />\n <strong> {{ invoice()?.totals?.totalToBePaid | currencyPlus }}</strong>\n </p>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice()?.invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice()?.documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice()?.documents || []\"></ava-invoice-documents>\n </section>\n }\n </div>\n } @else if (invoice() === null && (pdfViewEnabled$ | async)) {\n <div class=\"error-container\">\n <div class=\"error-message\">\n <mat-icon>error_outline</mat-icon>\n <h2>Oops! Something went wrong.</h2>\n <p>We couldn't retrieve the invoice data. Please try again later.</p>\n </div>\n </div>\n } @else {\n <div></div>\n }\n }\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions,.invoice-totals{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes-and-allowances,.invoice-delivery,.invoice-details{margin:20px 0}.invoice-table{width:100%;border-collapse:collapse;margin:20px 0}.invoice-table th,.invoice-table td{border:1px solid #000;padding:8px;text-align:left}.invoice-table th{background-color:var(--color-primary)}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:6px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}.center{text-align:center!important}.error-container{display:flex;justify-content:center;align-items:center;height:100vh}.error-message{text-align:center;background-color:#fff3f3;border:1px solid #d32f2f;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;color:#d32f2f;max-width:400px;width:100%}.error-message h2{font-size:1.5em;margin:0 0 10px;font-weight:700}.error-message p{font-size:1em;margin-top:0;color:#555}\n"] }]
|
|
2479
|
+
NgStyle,
|
|
2480
|
+
InvoiceLineItemsTableComponent
|
|
2481
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfigurationInvoiceService, CurrencyPipe, DecimalPipe, PercentPipe], template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n @if (invoice() !== null) {\n <div class=\"invoice-container\">\n <!-- Seller and Buyer Information -->\n <h1 class=\"invoice-title\">{{ textWords.invoiceTitle }}</h1>\n\n <header class=\"invoice-header\">\n <div class=\"buyer-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceBuyerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.buyer?.name }}</strong>\n </p>\n <p>{{ invoice()?.buyer?.address }}</p>\n <p>{{ invoice()?.buyer?.city }}, {{ invoice()?.buyer?.zipCode }}</p>\n <p>{{ invoice()?.buyer?.countryCode }}</p>\n @if (invoice()?.buyer?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.buyer?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.buyer?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.buyer?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n <div class=\"invoice-details\">\n @if (invoice()?.invoiceNumber) {\n <p>\n <strong>{{ textWords.detailsInvoiceNumber }}: </strong>\n <span>{{ invoice()?.invoiceNumber }}</span>\n </p>\n }\n @if (invoice()?.invoiceDate) {\n <p>\n <strong>{{ textWords.detailsInvoiceDate }}: </strong>\n <span>{{ invoice()?.invoiceDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.paymentDueDate) {\n <p>\n <strong>{{ textWords.detailsPaymentDueDate }}: </strong>\n <span>{{ invoice()?.paymentDueDate | date: 'dd.MM.yyyy' }}</span>\n </p>\n }\n @if (invoice()?.currencyCode) {\n <p>\n <strong>{{ textWords.detailsCurrencyCode }}: </strong>\n <span>{{ invoice()?.currencyCode }}</span>\n </p>\n }\n @if (invoice()?.paymentTerms) {\n <p>\n <strong>{{ textWords.detailsPaymentTerms }}: </strong>\n <span>{{ invoice()?.paymentTerms }}</span>\n </p>\n }\n </div>\n <div class=\"seller-info\">\n <h2\n class=\"header-title\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceSellerTitle }}\n </h2>\n <p>\n <strong>{{ invoice()?.seller?.name }}</strong>\n </p>\n <p>{{ invoice()?.seller?.address }}</p>\n <p>{{ invoice()?.seller?.city }}, {{ invoice()?.seller?.zipCode }}</p>\n <p>{{ invoice()?.seller?.countryCode }}</p>\n @if (invoice()?.seller?.vatId) {\n <p>\n <strong>{{ textWords.vatId }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.vatId }}</span>\n </p>\n }\n <mat-divider></mat-divider>\n @if (invoice()?.seller?.contactPersonName) {\n <p>\n <strong>{{ textWords.contactPersonName }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonName }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonPhone) {\n <p>\n <strong>{{ textWords.contactPersonPhone }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonPhone }}</span>\n </p>\n }\n @if (invoice()?.seller?.contactPersonEmail) {\n <p>\n <strong>{{ textWords.contactPersonEmail }}: </strong>\n <br />\n <span>{{ invoice()?.seller?.contactPersonEmail }}</span>\n </p>\n }\n </div>\n </header>\n <mat-divider></mat-divider>\n <div class=\"invoice-info\">\n <section class=\"invoice-references\">\n @if (textWords.referencesTopic) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.referencesTopic }}\n </h2>\n }\n @if (invoice()?.references?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.buyerReference }}</span>\n </p>\n }\n @if (invoice()?.references?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.projectReference }}</span>\n </p>\n }\n @if (invoice()?.references?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.contractReference }}</span>\n </p>\n }\n @if (invoice()?.references?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.purchaseOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.salesOrderReference }}</span>\n </p>\n }\n @if (invoice()?.references?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.receivingAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ invoice()?.references?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (invoice()?.references?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ invoice()?.references?.tenderOrLotReference }}</span>\n </p>\n }\n @if (invoice()?.references?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.references?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </section>\n @if (invoice()?.deliveryInformation) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (invoice()?.deliveryInformation?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToName }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ invoice()?.deliveryInformation?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (invoice()?.deliveryInformation?.deliveryAddress?.address) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.address }}</p>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.city) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.city }},</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.zipCode) {\n <span>{{ invoice()?.deliveryInformation?.deliveryAddress?.zipCode }}</span>\n }\n @if (invoice()?.deliveryInformation?.deliveryAddress?.countryCode) {\n <p>{{ invoice()?.deliveryInformation?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n <ava-invoice-line-items-table [lineItems]=\"invoice()?.lineItems || []\"></ava-invoice-line-items-table>\n\n <div class=\"addition-info\">\n <section class=\"taxes-and-allowances\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.taxesHeading }}\n </h2>\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.vat }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalNet }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.totalsTotalVatAmount }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (tax of invoice()?.vatBreakdown; track tax.taxRate) {\n <tr>\n <td class=\"currency-table-cell\">\n @if (tax.taxRate) {\n <span>{{ tax.taxRate | percentPlus: '1.0-2' }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.netTaxableAmount) {\n <span>{{ tax.netTaxableAmount | currencyPlus }}</span>\n }\n </td>\n <td class=\"currency-table-cell\">\n @if (tax.vatAmount) {\n <span>{{ tax.vatAmount | currencyPlus }}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n\n @if (invoice()?.allowances && (invoice()?.allowances?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceAllowancesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderAllowance }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceAllowancesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (allowance of invoice()?.allowances; track allowance) {\n <tr>\n <td colspan=\"4\">\n @if (allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reason }} / {{ allowance.reasonCode }}</span>\n }\n @if (allowance.reason && !allowance.reasonCode) {\n <span>{{ allowance.reason }}</span>\n }\n\n @if (!allowance.reason && allowance.reasonCode) {\n <span>{{ allowance.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowancePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ allowance.relativeAllowanceBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (invoice()?.charges && (invoice()?.charges?.length || 0) > 0) {\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.invoiceChargesHeader }}\n </h2>\n\n <table class=\"tax-report-table\">\n <thead>\n <tr>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderSum }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderVatRate }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderCharge }}\n </th>\n <th\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n {{ textWords.invoiceChargesTableHeaderBase }}\n </th>\n </tr>\n </thead>\n <tbody>\n @for (charge of invoice()?.charges; track charge) {\n <tr>\n <td colspan=\"4\">\n @if (charge.reason && charge.reasonCode) {\n <span>{{ charge.reason }} / {{ charge.reasonCode }}</span>\n }\n @if (charge.reason && !charge.reasonCode) {\n <span>{{ charge.reason }}</span>\n }\n\n @if (!charge.reason && charge.reasonCode) {\n <span>{{ charge.reasonCode }}</span>\n }\n </td>\n </tr>\n <tr>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.netAmount | currencyPlus }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.vatRate | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargePercentage | percentPlus: '1.0-2' }}\n </span>\n </td>\n <td class=\"currency-table-cell\">\n <span>\n {{ charge.relativeChargeBaseAmount | currencyPlus }}\n </span>\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n </section>\n\n <section class=\"payment-instructions\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.instructionsTopic }}\n </h2>\n @if (invoice()?.paymentInstructions?.description) {\n <p>{{ invoice()?.paymentInstructions?.description }}</p>\n }\n @for (means of invoice()?.paymentInstructions?.paymentMeans; track means) {\n <div>\n @if (means.accountIdentifier) {\n <p>\n <strong>{{ textWords.instructionsAccountIdentifier }}: </strong>\n <br />\n <span>{{ means.accountIdentifier }}</span>\n </p>\n }\n @if (means.accountName) {\n <p>\n <strong>{{ textWords.instructionsAccountName }}: </strong>\n <br />\n <span>{{ means.accountName }}</span>\n </p>\n }\n @if (means.serviceProviderIdentifier) {\n <p>\n <strong>{{ textWords.instructionsServiceProviderIdentifier }}: </strong>\n <br />\n <span>{{ means.serviceProviderIdentifier }}</span>\n </p>\n }\n </div>\n }\n </section>\n\n <section class=\"invoice-totals\">\n <h2\n class=\"info-title\"\n [ngStyle]=\"{\n borderBottomColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n }\"\n >\n {{ textWords.totalsTopic }}\n </h2>\n\n @if (invoice()?.totals?.totalNet) {\n <p>\n <strong>{{ textWords.totalsTotalNet }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalNet | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAllowances) {\n <p>\n <strong>{{ textWords.totalsTotalAllowances }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalAllowances | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalCharges) {\n <p>\n <strong>{{ textWords.totalsTotalCharges }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalCharges | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalAfterDeductions) {\n <p>\n <strong>{{ textWords.totalsTotalAfterDeductions }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalAfterDeductions | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalVatAmount) {\n <p>\n <strong>{{ textWords.totalsTotalVatAmount }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.totalVatAmount | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalGross) {\n <p>\n <strong>{{ textWords.totalsTotalGross }}: </strong>\n <br />\n <span> {{ invoice()?.totals?.totalGross | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.alreadyPaidTotal) {\n <p>\n <strong>{{ textWords.totalsAlreadyPaidTotal }}: </strong>\n <br />\n <span>{{ invoice()?.totals?.alreadyPaidTotal | currencyPlus }}</span>\n </p>\n }\n @if (invoice()?.totals?.totalToBePaid) {\n <p\n class=\"total\"\n [ngStyle]=\"{\n backgroundColor: colorSettings === true ? null : colorSettings?.backgroundColor,\n color: colorSettings === true ? null : colorSettings?.textColor,\n }\"\n >\n <strong>{{ textWords.totalsTotalToBePaid }}: </strong>\n <br />\n <strong> {{ invoice()?.totals?.totalToBePaid | currencyPlus }}</strong>\n </p>\n }\n </section>\n </div>\n\n <section class=\"invoice-notes\">\n <h2>{{ textWords.notesTopic }}</h2>\n @for (note of invoice()?.invoiceNotes; track note) {\n <div>\n @if (note?.shortText) {\n <p>\n <strong>{{ note?.shortText }}</strong>\n </p>\n }\n @if (note?.longText) {\n <p>{{ note?.longText }}</p>\n }\n </div>\n }\n </section>\n @if (invoice()?.documents?.length) {\n <section class=\"invoice-attachments\">\n <ava-invoice-documents [documents]=\"invoice()?.documents || []\"></ava-invoice-documents>\n </section>\n }\n </div>\n } @else if (invoice() === null && (pdfViewEnabled$ | async)) {\n <div class=\"error-container\">\n <div class=\"error-message\">\n <mat-icon>error_outline</mat-icon>\n <h2>Oops! Something went wrong.</h2>\n <p>We couldn't retrieve the invoice data. Please try again later.</p>\n </div>\n </div>\n } @else {\n <div></div>\n }\n }\n}\n", styles: [".invoice-container{width:100%;max-width:800px;margin:auto;font-family:Arial,sans-serif;line-height:1.5}.invoice-header{display:flex;justify-content:space-between;margin-bottom:20px}.invoice-header .header{height:32px}.invoice-header .header-title{background:var(--color-primary);color:#fff;text-align:center}.seller-info,.buyer-info,.invoice-details{width:30%}.seller-info,.invoice-delivery,.payment-instructions,.invoice-totals{text-align:right}.currency-table-cell{text-align:right!important}.invoice-title{font-size:48px;margin:20px 0}.invoice-references,.invoice-totals,.payment-instructions,.invoice-notes,.taxes-and-allowances,.invoice-delivery,.invoice-details{margin:20px 0}.invoice-totals p,.payment-instructions p,.invoice-notes p{margin:5px 0}h2{font-size:18px;margin-bottom:10px}.addition-info{display:flex;justify-content:space-between;gap:10px}.total{background-color:var(--color-primary);color:#fff;padding:5px;border-radius:5px}th{color:#fff;text-wrap:nowrap}.invoice-attachments{padding-bottom:15px}.invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.tax-report-table{width:100%;border-collapse:collapse;margin-top:10px}.tax-report-table th,.tax-report-table td{padding:6px;text-align:center;border:1px solid #ddd}.tax-report-table th{background-color:var(--color-primary);color:#fff;font-weight:700;border:1px solid #000}.tax-report-table td{font-size:14px;color:#333;border:1px solid #000}.center{text-align:center!important}.error-container{display:flex;justify-content:center;align-items:center;height:100vh}.error-message{text-align:center;background-color:#fff3f3;border:1px solid #d32f2f;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;color:#d32f2f;max-width:400px;width:100%}.error-message h2{font-size:1.5em;margin:0 0 10px;font-weight:700}.error-message p{font-size:1em;margin-top:0;color:#555}\n"] }]
|
|
2423
2482
|
}], ctorParameters: () => [{ type: ConfigurationInvoiceService }] });
|
|
2424
2483
|
|
|
2425
2484
|
/*
|