Skip to content

Commit

Permalink
Import fixes + unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsugo authored and wrdhub committed Dec 11, 2024
1 parent a311b7a commit 967c4df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/common/api/worker/facades/lazy/CustomerFacade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
createMembershipRemoveData,
createPaymentDataServicePutData,
CustomDomainReturn,
Customer,
CustomerInfoTypeRef,
CustomerServerProperties,
CustomerServerPropertiesTypeRef,
Expand Down Expand Up @@ -468,9 +467,11 @@ export class CustomerFacade {
}
}

async generateXRechnungInvoice(invoiceNumber: string, customer: Customer, accountingInfo: AccountingInfo): Promise<DataFile> {
async generateXRechnungInvoice(invoiceNumber: string): Promise<DataFile> {
const customer = await this.entityClient.load(CustomerTypeRef, assertNotNull(this.userFacade.getUser()?.customer))
const customerInfo = await this.entityClient.load(CustomerInfoTypeRef, customer.customerInfo)
const invoiceData = await this.serviceExecutor.get(InvoiceDataService, createInvoiceDataGetIn({ invoiceNumber }))
const { XRechnungInvoiceGenerator } = await import("../../invoicegen/XRechnungInvoiceGenerator.js")
const xRechnungGenerator = new XRechnungInvoiceGenerator(invoiceData, invoiceNumber, this.getCustomerId(), customerInfo.registrationMailAddress)
const xRechnungFile = xRechnungGenerator.generate()
return {
Expand Down
4 changes: 1 addition & 3 deletions src/common/subscription/PaymentViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ export class PaymentViewer implements UpdatableSettingsViewer {
private async doXrechnungInvoiceDownload(posting: CustomerAccountPosting) {
return showProgressDialog(
"pleaseWait_msg",
locator.customerFacade
.generateXRechnungInvoice(neverNull(posting.invoiceNumber), neverNull(this.customer), neverNull(this.accountingInfo))
.then((xInvoice) => locator.fileController.saveDataFile(xInvoice)),
locator.customerFacade.generateXRechnungInvoice(neverNull(posting.invoiceNumber)).then((xInvoice) => locator.fileController.saveDataFile(xInvoice)),
)
}

Expand Down

0 comments on commit 967c4df

Please sign in to comment.