feat(invoice): informal German tone + show payment method and status
- i18n.de: switch Sie/Ihren to du/dein for salutation, thank-you line, customer-VAT label and payment-terms paragraph. Closing line was already informal. - i18n: add paymentMethodLabel/paymentStatusLabel + per-status labels (paid/unpaid/partial/refunded) for both DE and EN, plus derivePaymentStatus helper that condenses Shopify's displayFinancialStatus (PAID, PARTIALLY_PAID, REFUNDED, …) into a 4-value enum. - loadOrderForInvoice: query Order.paymentGatewayNames and propagate it on the raw view-model. - composeInvoice + types: expose paymentStatus + paymentGatewayNames on InvoiceViewModel (filtered/trimmed). loadDraftOrderForOffer keeps paymentGatewayNames empty (drafts have no gateway yet). - InvoiceDocument: render two new meta rows on real invoices — 'Zahlart / Payment method' (joined, prettified gateway names) and 'Zahlstatus / Payment status' (translated label). Storno + offer kinds intentionally omit them. - scripts/render-sample.ts: extend smoke checks to assert the informal DE wording, the new payment-method/status rows and the paymentStatus/paymentGatewayNames composer outputs.
This commit is contained in:
@@ -12,6 +12,7 @@ export interface RawOrderForInvoice {
|
||||
processedAt: string | null;
|
||||
currencyCode: string;
|
||||
displayFinancialStatus: string | null;
|
||||
paymentGatewayNames: string[];
|
||||
customer: {
|
||||
firstName: string | null;
|
||||
lastName: string | null;
|
||||
@@ -77,6 +78,7 @@ const QUERY = `#graphql
|
||||
processedAt
|
||||
currencyCode
|
||||
displayFinancialStatus
|
||||
paymentGatewayNames
|
||||
taxesIncluded
|
||||
customer {
|
||||
firstName
|
||||
@@ -161,6 +163,7 @@ interface RawAdminResponse {
|
||||
processedAt: string | null;
|
||||
currencyCode: string;
|
||||
displayFinancialStatus: string | null;
|
||||
paymentGatewayNames: string[] | null;
|
||||
taxesIncluded: boolean;
|
||||
customer: {
|
||||
firstName: string | null;
|
||||
@@ -213,6 +216,7 @@ export async function loadOrderForInvoice(
|
||||
processedAt: order.processedAt,
|
||||
currencyCode: order.currencyCode,
|
||||
displayFinancialStatus: order.displayFinancialStatus,
|
||||
paymentGatewayNames: order.paymentGatewayNames ?? [],
|
||||
taxesIncluded: order.taxesIncluded,
|
||||
customer: order.customer,
|
||||
billingAddress: order.billingAddress,
|
||||
|
||||
Reference in New Issue
Block a user