fix(invoice): detect pickup via DeliveryMethodType and show 'Abholort: <location>' meta row
- Use Order.fulfillmentOrders.deliveryMethod.methodType === 'PICK_UP' as the primary signal (Shopify Local Pickup app exposes this reliably; the shippingLine title is just the location name with no 'pickup' keyword). Keep the legacy shippingLine string heuristic as a fallback for custom shipping rates merchants name 'Abholung'/'Pickup'. - Surface assignedLocation.name as pickupLocationName on the view model. - Replace the 'Versandart: <location name>' row with 'Abholort: <location>' (DE) / 'Pick-up location: <location>' (EN); falls back to plain 'Abholung'/'Pick-up' when the location name is unavailable.
This commit is contained in:
@@ -329,7 +329,14 @@ export function InvoiceDocument({ invoice }: DocProps) {
|
||||
<Text style={styles.metaValue}>{invoice.discountCodes.join(", ")}</Text>
|
||||
</View>
|
||||
) : null}
|
||||
{invoice.kind === "invoice" && invoice.shippingMethod ? (
|
||||
{invoice.kind === "invoice" && invoice.isPickup ? (
|
||||
<View style={styles.metaRow}>
|
||||
<Text style={styles.metaLabel}>{t.pickupLocationLabel}</Text>
|
||||
<Text style={styles.metaValue}>
|
||||
{invoice.pickupLocationName ?? t.pickupLabel}
|
||||
</Text>
|
||||
</View>
|
||||
) : invoice.kind === "invoice" && invoice.shippingMethod ? (
|
||||
<View style={styles.metaRow}>
|
||||
<Text style={styles.metaLabel}>{t.shippingMethodLabel}</Text>
|
||||
<Text style={styles.metaValue}>{invoice.shippingMethod}</Text>
|
||||
|
||||
Reference in New Issue
Block a user