fix(contentinvoice): Fixed currency display issues in invoice content rendering.

This commit is contained in:
2024-11-27 19:15:29 +01:00
parent 60e6d935d6
commit a5ff39d306
6 changed files with 77 additions and 18 deletions

View File

@@ -121,17 +121,20 @@ export class DeDocument extends DeesElement {
}
public latestRenderedLetterData: plugins.tsclass.business.ILetter = null;
public async renderDocument() {
const domtools = await this.domtoolsPromise;
const documentContainer = this.shadowRoot.querySelector('.documentContainer');
let pages: DePage[] = [];
let pageCounter = 0;
let complete = false;
const content: DeContentInvoice = document.createElement(
'dedocument-contentinvoice'
) as DeContentInvoice;
// lets append the content
const content: DeContentInvoice = new DeContentInvoice();
content.letterData = this.letterData;
document.body.appendChild(content);
await domtools.convenience.smartdelay.delayFor(0);
let overallContentOffset: number = 0;
let currentContentOffset: number;
@@ -179,7 +182,7 @@ export class DeDocument extends DeesElement {
this.latestRenderedLetterData = this.letterData;
}
async updated(changedProperties: Map<string | number | symbol, unknown>): void {
async updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void> {
super.updated(changedProperties);
const domtools = await this.domtoolsPromise;
const renderedDocIsUpToDate = domtools.convenience.smartjson.deepEqualObjects(this.letterData, this.latestRenderedLetterData);