@@ -52,27 +52,27 @@ |
||
52 | 52 | |
53 | 53 | // Total Fee. |
54 | 54 | if ( 'fee' === $key ) { |
55 | - wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
55 | + wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Total discount. |
59 | 59 | if ( 'discount' === $key ) { |
60 | - wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
60 | + wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Shipping. |
64 | 64 | if ( 'shipping' === $key ) { |
65 | - wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() ); |
|
65 | + wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() ); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // Sub total. |
69 | 69 | if ( 'subtotal' === $key ) { |
70 | - wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
70 | + wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // Total. |
74 | 74 | if ( 'total' === $key ) { |
75 | - wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
75 | + wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | // Fires when printing a cart total. |
@@ -9,26 +9,26 @@ discard block |
||
9 | 9 | * @var WPInv_Invoice $invoice |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) || exit; |
|
12 | +defined('ABSPATH') || exit; |
|
13 | 13 | |
14 | 14 | // Totals rows. |
15 | -$totals = getpaid_invoice_totals_rows( $invoice ); |
|
15 | +$totals = getpaid_invoice_totals_rows($invoice); |
|
16 | 16 | |
17 | -do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals ); |
|
17 | +do_action('getpaid_before_invoice_line_totals', $invoice, $totals); |
|
18 | 18 | |
19 | 19 | ?> |
20 | 20 | <div class='getpaid-invoice-line-totals'> |
21 | 21 | <div class="row"> |
22 | 22 | <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0"> |
23 | 23 | |
24 | - <?php foreach ( $totals as $key => $label ) : ?> |
|
24 | + <?php foreach ($totals as $key => $label) : ?> |
|
25 | 25 | |
26 | - <div class="getpaid-invoice-line-totals-col <?php echo esc_attr( $key ); ?>"> |
|
26 | + <div class="getpaid-invoice-line-totals-col <?php echo esc_attr($key); ?>"> |
|
27 | 27 | |
28 | 28 | <div class="form-row row"> |
29 | 29 | |
30 | 30 | <div class="col-8 getpaid-invoice-line-totals-label"> |
31 | - <?php echo esc_html( $label ); ?> |
|
31 | + <?php echo esc_html($label); ?> |
|
32 | 32 | </div> |
33 | 33 | |
34 | 34 | <div class="col-4 getpaid-invoice-line-totals-value pl-0"> |
@@ -36,47 +36,47 @@ discard block |
||
36 | 36 | <?php |
37 | 37 | |
38 | 38 | // Total tax. |
39 | - if ( 'tax' === $key ) { |
|
40 | - wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() ); |
|
39 | + if ('tax' === $key) { |
|
40 | + wpinv_the_price($invoice->get_total_tax(), $invoice->get_currency()); |
|
41 | 41 | |
42 | - if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) { |
|
42 | + if (wpinv_use_taxes() && !$invoice->get_disable_taxes()) { |
|
43 | 43 | |
44 | 44 | $taxes = $invoice->get_total_tax(); |
45 | - if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) { |
|
45 | + if (empty($taxes) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction($invoice->get_country())) { |
|
46 | 46 | echo ' <em class="text-muted small">'; |
47 | - _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' ); |
|
47 | + _x('(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing'); |
|
48 | 48 | echo '</em>'; |
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | 53 | // Total Fee. |
54 | - if ( 'fee' === $key ) { |
|
55 | - wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() ); |
|
54 | + if ('fee' === $key) { |
|
55 | + wpinv_the_price($invoice->get_total_fees(), $invoice->get_currency()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Total discount. |
59 | - if ( 'discount' === $key ) { |
|
60 | - wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() ); |
|
59 | + if ('discount' === $key) { |
|
60 | + wpinv_the_price($invoice->get_total_discount(), $invoice->get_currency()); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Shipping. |
64 | - if ( 'shipping' === $key ) { |
|
65 | - wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() ); |
|
64 | + if ('shipping' === $key) { |
|
65 | + wpinv_the_price($invoice->get_shipping(), $invoice->get_currency()); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // Sub total. |
69 | - if ( 'subtotal' === $key ) { |
|
70 | - wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() ); |
|
69 | + if ('subtotal' === $key) { |
|
70 | + wpinv_the_price($invoice->get_subtotal(), $invoice->get_currency()); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // Total. |
74 | - if ( 'total' === $key ) { |
|
75 | - wpinv_the_price( $invoice->get_total(), $invoice->get_currency() ); |
|
74 | + if ('total' === $key) { |
|
75 | + wpinv_the_price($invoice->get_total(), $invoice->get_currency()); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | // Fires when printing a cart total. |
79 | - do_action( "getpaid_invoice_cart_totals_$key", $invoice ); |
|
79 | + do_action("getpaid_invoice_cart_totals_$key", $invoice); |
|
80 | 80 | |
81 | 81 | ?> |
82 | 82 | |
@@ -90,4 +90,4 @@ discard block |
||
90 | 90 | </div> |
91 | 91 | </div> <!-- end .getpaid-invoice-line-totals --> |
92 | 92 | |
93 | -<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?> |
|
93 | +<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?> |