• Resolved AvanorHealthcare

    (@avanorhealthcare)


    Hi

    I’ve having an issue with currency on the Invoice PDF.

    Our default Woocommerce currency is Pound Sterling (£). We import orders in Woocommerce from ebay (using WP-Lister Pro for eBay), some of which are in Euro (€).

    Here is an order in WooCommerce in Euros:
    https://ibb.co/k4Y2wU

    However, the invoice PDF displays the delivery, grand total (ex VAT), VAT and Grand Total (inc VAT) values in Pound Sterling. The item details display in Euro:
    https://ibb.co/b8pLi9

    Is there a way of it displaying the correct currency?

    Here’s the invoice.php code:

    <table class=”order-details”>
    <thead>
    <tr>
    <th class=”quantity”><?php _e(‘Quantity’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    <th class=”product”><?php _e(‘Product’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    <th class=”price”><?php _e(‘Unit Price’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    <th class=”price”><?php _e(‘VAT Rate’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    <th class=”price”><?php _e(‘VAT’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    <th class=”price”><?php _e(‘Subtotal’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th>
    </tr>
    </thead>
    <tbody>
    <?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
    <tr class=”<?php echo apply_filters( ‘wpo_wcpdf_item_row_class’, $item_id, $this->type, $this->order, $item_id ); ?>”>
    <td class=”quantity”><?php echo $item[‘quantity’]; ?></td>
    <td class=”product”>
    <?php $description_label = __( ‘Description’, ‘woocommerce-pdf-invoices-packing-slips’ ); // registering alternate label translation ?>
    <span class=”item-name”><?php echo $item[‘name’]; ?></span>
    <?php do_action( ‘wpo_wcpdf_before_item_meta’, $this->type, $item, $this->order ); ?>
    <span class=”item-meta”><?php echo $item[‘meta’]; ?></span>
    <dl class=”meta”>
    <?php $description_label = __( ‘SKU’, ‘woocommerce-pdf-invoices-packing-slips’ ); // registering alternate label translation ?>
    <?php if( !empty( $item[‘sku’] ) ) : ?><dt class=”sku”><?php _e( ‘SKU:’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></dt><dd class=”sku”><?php echo $item[‘sku’]; ?></dd><?php endif; ?>
    </dl>
    <?php do_action( ‘wpo_wcpdf_after_item_meta’, $this->type, $item, $this->order ); ?>
    </td>
    <td class=”price”><?php echo $item[‘ex_single_price’]; ?></td>
    <td class=”price”><?php echo $item[‘tax_rates’]; ?></td>
    <td class=”price”><?php echo $item[‘line_subtotal_tax’]; ?></td>
    <td class=”price”><?php echo $item[‘order_price’]; ?></td>
    </tr>
    <?php endforeach; endif; ?>
    </tbody>
    <tfoot>
    <?php foreach( $this->get_woocommerce_totals() as $key => $total ) : ?>
    <tr class=”<?php echo $key; ?>”>
    <th class=”space” colspan=”2″></th>
    <th class=”description” colspan=”3″><?php echo $total[‘label’]; ?></th>
    <td class=”price”><span class=”totals-price”><?php echo $total[‘value’]; ?></span></td>
    </tr>
    <?php endforeach; ?>
    </tfoot>
    </table>

Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    instead of this:

    
    wc_price( $price )
    

    try this:

    
    wc_price( $price, array( 'currency' => $order->get_currency() ) )
    

    All our plugins are yearly subscriptions. If you don’t renew you will not receive updates for the customizer and templates, so if things change in WooCommerce/WordPress/PDF Invoices, it may ultimately stop working if you do not update.
    If you have any further questions about the paid extensions, please send us an email at [email protected], www.remarpro.com’s forum rules don’t allow us to use these forums for this.

    Thread Starter AvanorHealthcare

    (@avanorhealthcare)

    Thanks – it worked ??

    I didn’t think of www.remarpro.com’s forum rules. I’ll email if I have any queries regarding the paid extension.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Problem with Currency’ is closed to new replies.