@dangl/angular-ava 1.3.1-beta0014 → 1.3.1-beta0019

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.
@@ -248,12 +248,12 @@ var ModeViewType;
248
248
 
249
249
  // This file is automatically generated as part of the build process
250
250
  const version = {
251
- version: "1.3.1-beta0014",
252
- commitInfo: "Branch.develop.Sha.2223b26049890a2c01b00bfe5b25889b2077e51f",
251
+ version: "1.3.1-beta0019",
252
+ commitInfo: "Branch.develop.Sha.ef1ed524b215fc2cd0f34a093c31dc306eecf13b",
253
253
  commitDate: "2025-03-02",
254
- commitHash: "2223b26049890a2c01b00bfe5b25889b2077e51f",
255
- informationalVersion: "1.3.1-beta.14+Branch.develop.Sha.2223b26049890a2c01b00bfe5b25889b2077e51f",
256
- buildDateUtc: new Date(Date.UTC(2025, 2, 2, 18, 33, 25))
254
+ commitHash: "ef1ed524b215fc2cd0f34a093c31dc306eecf13b",
255
+ informationalVersion: "1.3.1-beta.19+Branch.develop.Sha.ef1ed524b215fc2cd0f34a093c31dc306eecf13b",
256
+ buildDateUtc: new Date(Date.UTC(2025, 2, 2, 19, 13, 52))
257
257
  };
258
258
 
259
259
  class TreeHoverTooltipService {
@@ -1686,7 +1686,6 @@ class AvaTreeComponent {
1686
1686
  return s;
1687
1687
  }
1688
1688
  });
1689
- this.isListenKeyboard = false;
1690
1689
  this.isEmiteSelectedElements = false;
1691
1690
  this.selectingElementsTreeData = [];
1692
1691
  this.flatElements = null;
@@ -1789,20 +1788,11 @@ class AvaTreeComponent {
1789
1788
  this.$destroy.next(true);
1790
1789
  this.$destroy.complete();
1791
1790
  }
1792
- mouseOver() {
1793
- if (!this.isListenKeyboard) {
1794
- this.isListenKeyboard = true;
1795
- this.avaTreeFilterInput()?.nativeElement.focus();
1796
- }
1797
- }
1798
- mouseOut() {
1799
- this.isListenKeyboard = false;
1800
- }
1801
1791
  handleGlobalKeyboardEvent(event) {
1802
1792
  //TODO remove zone js. from the project
1803
1793
  this.ngZone.run(() => {
1804
1794
  const keyEvent = event;
1805
- if (!this.mouseAwareKeyboardControl || this.isListenKeyboard) {
1795
+ if (!this.mouseAwareKeyboardControl || this.avaMainWrapper().nativeElement.matches(':hover')) {
1806
1796
  const element = this.preselectedElement || this.selectedElement;
1807
1797
  const { operation, nextElement } = this.keyboardOperationService.handleKeyboardEvent(keyEvent, element) || { nextElement: null };
1808
1798
  switch (operation) {
@@ -1914,27 +1904,16 @@ class AvaTreeComponent {
1914
1904
  this.cdr.markForCheck();
1915
1905
  }
1916
1906
  initializeEventListeners() {
1917
- //TODO check why during mouse event trigger change detection, it probably because of hide method in hover effect directive
1918
- this.ngZone.runOutsideAngular(() => {
1919
- fromEvent(this.avaMainWrapper().nativeElement, 'mouseleave')
1920
- .pipe(takeUntil(this.$destroy))
1921
- .subscribe(() => {
1922
- this.mouseOut();
1923
- });
1924
- fromEvent(this.avaMainWrapper().nativeElement, 'mouseenter')
1925
- .pipe(takeUntil(this.$destroy))
1926
- .subscribe(() => {
1927
- this.mouseOver();
1907
+ if (!this.isSelectionMode) {
1908
+ fromEvent(document, 'keydown')
1909
+ .pipe(takeUntil(this.$destroy), filter(() => !this.mouseAwareKeyboardControl || this.avaMainWrapper().nativeElement.matches(':hover')))
1910
+ .subscribe((event) => {
1911
+ if (this.avaMainWrapper().nativeElement.matches(':hover')) {
1912
+ this.avaTreeFilterInput()?.nativeElement.focus();
1913
+ }
1914
+ this.handleGlobalKeyboardEvent(event);
1928
1915
  });
1929
- if (!this.isSelectionMode) {
1930
- fromEvent(document, 'keydown')
1931
- .pipe(takeUntil(this.$destroy), filter(() => !this.mouseAwareKeyboardControl || this.isListenKeyboard))
1932
- .subscribe((event) => {
1933
- this.handleGlobalKeyboardEvent(event);
1934
- this.cdr.detectChanges();
1935
- });
1936
- }
1937
- });
1916
+ }
1938
1917
  }
1939
1918
  selectElementById(id) {
1940
1919
  this.flatElementsService.getOneElementById(id).subscribe((e) => {
@@ -2318,6 +2297,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
2318
2297
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\n <table\n mat-table\n [dataSource]=\"flatLineItems\"\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 [class.children]=\"element.indentLevel\"\n >\n {{ element.identifier || element.objectIdentifier || i + 1 }}\n @if (element.indentLevel) {\n <div\n class=\"children-mark\"\n [style.width.px]=\"element.indentLevel * 8\"\n ></div>\n }\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)=\"(row.allowances || row.charges) && 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}.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%)}.children{position:relative}.children-mark{height:100%;background-color:#add8e6;position:absolute;left:0;top:0;z-index:200;opacity:.5}\n"] }]
2319
2298
  }] });
2320
2299
 
2300
+ class ReferenceAndDeliveryInformationComponent {
2301
+ constructor() {
2302
+ this.deliveryInformation = input(null);
2303
+ this.references = input(null);
2304
+ this.configurationInvoiceService = inject(ConfigurationInvoiceService);
2305
+ this.textWords$ = this.configurationInvoiceService.getTextWordsFromConfig();
2306
+ this.colorSettings$ = this.configurationInvoiceService.getColorSettingsFromConfig();
2307
+ }
2308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ReferenceAndDeliveryInformationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2309
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: ReferenceAndDeliveryInformationComponent, isStandalone: true, selector: "ava-reference-and-delivery-information", inputs: { deliveryInformation: { classPropertyName: "deliveryInformation", publicName: "deliveryInformation", isSignal: true, isRequired: false, transformFunction: null }, references: { classPropertyName: "references", publicName: "references", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\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 <div class=\"invoice-references-details\">\n @if (references()?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ references()?.buyerReference }}</span>\n </p>\n }\n @if (references()?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ references()?.projectReference }}</span>\n </p>\n }\n @if (references()?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ references()?.contractReference }}</span>\n </p>\n }\n @if (references()?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ references()?.purchaseOrderReference }}</span>\n </p>\n }\n @if (references()?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ references()?.salesOrderReference }}</span>\n </p>\n }\n @if (references()?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ references()?.receivingAdviceReference }}</span>\n </p>\n }\n @if (references()?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ references()?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (references()?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ references()?.tenderOrLotReference }}</span>\n </p>\n }\n @if (references()?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ references()?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </div>\n </section>\n @if (deliveryInformation()) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (deliveryInformation()?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliverToName }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (deliveryInformation()?.deliveryAddress?.address) {\n <p>{{ deliveryInformation()?.deliveryAddress?.address }}</p>\n }\n @if (deliveryInformation()?.deliveryAddress?.city) {\n <span>{{ deliveryInformation()?.deliveryAddress?.city }},</span>\n }\n @if (deliveryInformation()?.deliveryAddress?.zipCode) {\n <span>{{ deliveryInformation()?.deliveryAddress?.zipCode }}</span>\n }\n @if (deliveryInformation()?.deliveryAddress?.countryCode) {\n <p>{{ deliveryInformation()?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n }\n}\n", styles: [".invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.invoice-info{display:grid;grid-template-columns:2fr 1fr;gap:20px}.invoice-references-details{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.invoice-references-details p{margin:0;break-inside:avoid-column}.invoice-delivery{text-align:right}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
2310
+ }
2311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ReferenceAndDeliveryInformationComponent, decorators: [{
2312
+ type: Component,
2313
+ args: [{ selector: 'ava-reference-and-delivery-information', imports: [AsyncPipe, DatePipe, NgStyle], template: "@if (textWords$ | async; as textWords) {\n @if ((colorSettings$ | async) || true; as colorSettings) {\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 <div class=\"invoice-references-details\">\n @if (references()?.buyerReference) {\n <p>\n <strong>{{ textWords.referencesBuyerReference }}: </strong>\n <br />\n <span>{{ references()?.buyerReference }}</span>\n </p>\n }\n @if (references()?.projectReference) {\n <p>\n <strong>{{ textWords.referencesProjectReference }}: </strong>\n <br />\n <span>{{ references()?.projectReference }}</span>\n </p>\n }\n @if (references()?.contractReference) {\n <p>\n <strong>{{ textWords.referencesContractReference }}: </strong>\n <br />\n <span>{{ references()?.contractReference }}</span>\n </p>\n }\n @if (references()?.purchaseOrderReference) {\n <p>\n <strong>{{ textWords.referencesPurchaseOrderReference }}: </strong>\n <br />\n <span>{{ references()?.purchaseOrderReference }}</span>\n </p>\n }\n @if (references()?.salesOrderReference) {\n <p>\n <strong>{{ textWords.referencesSalesOrderReference }}: </strong>\n <br />\n <span>{{ references()?.salesOrderReference }}</span>\n </p>\n }\n @if (references()?.receivingAdviceReference) {\n <p>\n <strong>{{ textWords.referencesReceivingAdviceReference }}: </strong>\n <br />\n <span>{{ references()?.receivingAdviceReference }}</span>\n </p>\n }\n @if (references()?.dispatchAdviceReference) {\n <p>\n <strong>{{ textWords.referencesDispatchAdviceReference }}: </strong>\n <br />\n <span> {{ references()?.dispatchAdviceReference }}</span>\n </p>\n }\n @if (references()?.tenderOrLotReference) {\n <p>\n <strong>{{ textWords.referencesTenderOrLotReference }}: </strong>\n <br />\n <span>{{ references()?.tenderOrLotReference }}</span>\n </p>\n }\n @if (references()?.invoicedObjectIdentifier) {\n <p>\n <strong>{{ textWords.referencesInvoicedObjectIdentifier }}: </strong>\n <br />\n <span>{{ references()?.invoicedObjectIdentifier }}</span>\n </p>\n }\n </div>\n </section>\n @if (deliveryInformation()) {\n <section class=\"invoice-delivery\">\n <h2 class=\"info-title\">{{ textWords.deliveryInformationTitle }}</h2>\n\n @if (deliveryInformation()?.deliverToName) {\n <p>\n <strong>{{ textWords.deliverToName }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliverToName }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliverToLocationIdentifier) {\n <p>\n <strong>{{ textWords.deliverToLocationIdentifier }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliverToLocationIdentifier }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliveryDate) {\n <p>\n <strong>{{ textWords.deliveryDate }}: </strong>\n <br />\n <span>{{ deliveryInformation()?.deliveryDate | date: 'shortDate' }}</span>\n </p>\n }\n @if (deliveryInformation()?.deliveryAddress) {\n <p>\n <strong>{{ textWords.deliveryAddress }}: </strong>\n <span>\n @if (deliveryInformation()?.deliveryAddress?.address) {\n <p>{{ deliveryInformation()?.deliveryAddress?.address }}</p>\n }\n @if (deliveryInformation()?.deliveryAddress?.city) {\n <span>{{ deliveryInformation()?.deliveryAddress?.city }},</span>\n }\n @if (deliveryInformation()?.deliveryAddress?.zipCode) {\n <span>{{ deliveryInformation()?.deliveryAddress?.zipCode }}</span>\n }\n @if (deliveryInformation()?.deliveryAddress?.countryCode) {\n <p>{{ deliveryInformation()?.deliveryAddress?.countryCode }}</p>\n }\n </span>\n </p>\n }\n </section>\n }\n </div>\n }\n}\n", styles: [".invoice-info{display:flex;justify-content:space-between;margin-bottom:20px}.info-title{border-bottom:2px solid var(--color-primary);text-align:center}.invoice-info{display:grid;grid-template-columns:2fr 1fr;gap:20px}.invoice-references-details{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.invoice-references-details p{margin:0;break-inside:avoid-column}.invoice-delivery{text-align:right}\n"] }]
2314
+ }] });
2315
+
2321
2316
  registerLocaleData(localeDe, 'de-DE', localeDeExtra);
2322
2317
  registerLocaleData(localeEn, 'en-US', localeEnExtra);
2323
2318
  class InvoiceDisplayComponent {
@@ -2427,7 +2422,7 @@ class InvoiceDisplayComponent {
2427
2422
  this.configurationInvoiceService.setInvoiceConfig(this.linkedConfig());
2428
2423
  }
2429
2424
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, deps: [{ token: ConfigurationInvoiceService }], target: i0.ɵɵFactoryTarget.Component }); }
2430
- 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 }); }
2425
+ 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\n <ava-reference-and-delivery-information\n [deliveryInformation]=\"invoice()?.deliveryInformation || null\"\n [references]=\"invoice()?.references || null\"\n ></ava-reference-and-delivery-information>\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,.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}.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"] }, { kind: "component", type: ReferenceAndDeliveryInformationComponent, selector: "ava-reference-and-delivery-information", inputs: ["deliveryInformation", "references"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2431
2426
  }
2432
2427
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: InvoiceDisplayComponent, decorators: [{
2433
2428
  type: Component,
@@ -2440,8 +2435,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
2440
2435
  InvoiceDocumentsComponent,
2441
2436
  MatIconModule,
2442
2437
  NgStyle,
2443
- InvoiceLineItemsTableComponent
2444
- ], 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"] }]
2438
+ InvoiceLineItemsTableComponent,
2439
+ ReferenceAndDeliveryInformationComponent
2440
+ ], 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\n <ava-reference-and-delivery-information\n [deliveryInformation]=\"invoice()?.deliveryInformation || null\"\n [references]=\"invoice()?.references || null\"\n ></ava-reference-and-delivery-information>\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,.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}.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"] }]
2445
2441
  }], ctorParameters: () => [{ type: ConfigurationInvoiceService }] });
2446
2442
 
2447
2443
  /*