Making WordPress.org

Ticket #4423: 4423.diff

File 4423.diff, 1.2 KB (added by dd32, 4 years ago)
  • public_html/wp-content/plugins/camptix-invoices/includes/views/invoice-template.php

    diff --git a/public_html/wp-content/plugins/camptix-invoices/includes/views/invoice-template.php b/public_html/wp-content/plugins/camptix-invoices/includes/views/invoice-template.php
    index e978ccc7..cee91b6b 100644
    a b  
    183183                                                </td>
    184184                                        </tr>
    185185                                <?php endforeach ?>
    186                         <tr>
    187                                 <td class="text-right"><?php esc_html_e('VAT', 'wordcamporg'); ?></td>
    188                                 <td></td>
    189                                 <td></td>
    190                                 <td class="text-right">
    191                                         <?php echo esc_html( CampTix_Addon_Invoices::format_currency( 0, $camptix_opts['currency'] ) ); ?>
    192                                 </td>
    193                         </tr>
     186
     187                        <?php if ( ! empty( $invoice_metas['vat-number'] ) || ! empty( $camptix_opts['invoice-vat-number'] ) ) : ?>
     188                                <tr>
     189                                        <td class="text-right"><?php esc_html_e('VAT', 'wordcamporg'); ?></td>
     190                                        <td></td>
     191                                        <td></td>
     192                                        <td class="text-right">
     193                                                <?php echo esc_html( CampTix_Addon_Invoices::format_currency( 0, $camptix_opts['currency'] ) ); ?>
     194                                        </td>
     195                                </tr>
     196                        <?php endif; // VAT field ?>
     197
    194198                        <tr>
    195199                                <td class="text-right"><?php esc_html_e( 'TOTAL', 'wordcamporg' ); ?></td>
    196200                                <td></td>