Passed
Push — master ( f411ba...4d2fb8 )
by Brian
05:15
created
templates/invoice/details-top.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the invoice title, type etc.
4 4
  *
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-?>
10
+    defined( 'ABSPATH' ) || exit;
13 11
 
12
+    ?>
13
+    
14 14
         <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?>
15 15
 
16 16
         <div class="getpaid-invoice-details-top mb-5">
@@ -26,5 +26,5 @@  discard block
 block discarded – undo
26 26
         </div>
27 27
 
28 28
         <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?>
29
-
30
-<?php
29
+    
30
+    <?php
Please login to merge, or discard this patch.
templates/invoice/billing-address.php 1 patch
Switch Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the billing address.
4 4
  *
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-$invoice     = new WPInv_Invoice( $invoice );
13
-$address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() );
14
-$phone       = $invoice->get_phone();
15
-$email       = $invoice->get_email();
16
-$vat_number  = $invoice->get_vat_number();
17
-$company_id  = $invoice->get_company_id();
18
-?>
12
+    $invoice     = new WPInv_Invoice( $invoice );
13
+    $address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() );
14
+    $phone       = $invoice->get_phone();
15
+    $email       = $invoice->get_email();
16
+    $vat_number  = $invoice->get_vat_number();
17
+    $company_id  = $invoice->get_company_id();
18
+    ?>
19 19
     <div class="getpaid-billing-address form-group mb-3 text-break">
20 20
 
21 21
         <div class="row">
@@ -29,39 +29,39 @@  discard block
 block discarded – undo
29 29
             <div class="invoice-billing-address-value col-10">
30 30
 
31 31
                 <?php do_action( 'getpaid_billing_address_top' ); ?>
32
-
32
+    
33 33
                 <?php if ( ! empty( $address_row ) ) : ?>
34
-                    <div class="billing-address">
34
+                        <div class="billing-address">
35 35
                         <?php echo wp_kses_post( $address_row ); ?>
36
-                    </div>
36
+                        </div>
37 37
                 <?php endif; ?>
38
-
38
+    
39 39
 
40 40
                 <?php if ( ! empty( $phone ) ) : ?>
41
-                    <div class="billing-phone">
41
+                        <div class="billing-phone">
42 42
                         <?php echo wp_sprintf( esc_html__( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
43
-                    </div>
43
+                        </div>
44 44
                 <?php endif; ?>
45
-
45
+    
46 46
 
47 47
                 <?php if ( ! empty( $email ) ) : ?>
48
-                    <div class="billing-email">
48
+                        <div class="billing-email">
49 49
                         <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email ) ); ?>
50
-                    </div>
50
+                        </div>
51 51
                 <?php endif; ?>
52
-
52
+    
53 53
                 <?php if ( ! empty( $vat_number ) ) : ?>
54
-                    <div class="vat-number">
54
+                        <div class="vat-number">
55 55
                         <?php echo wp_sprintf( esc_html__( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?>
56
-                    </div>
56
+                        </div>
57 57
                 <?php endif; ?>
58
-
58
+    
59 59
                 <?php if ( ! empty( $company_id ) ) : ?>
60
-                    <div class="company-id">
60
+                        <div class="company-id">
61 61
                         <?php echo wp_sprintf( esc_html__( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?>
62
-                    </div>
62
+                        </div>
63 63
                 <?php endif; ?>
64
-
64
+    
65 65
                 <?php do_action( 'getpaid_billing_address_bottom' ); ?>
66 66
 
67 67
             </div>
Please login to merge, or discard this patch.
templates/invoice/header-right-actions.php 1 patch
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays right side of the invoice header.
4 4
  *
@@ -8,56 +8,56 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-?>
13
+    ?>
14 14
 
15 15
     <div class="getpaid-header-right-actions">
16 16
 
17 17
         <?php
18 18
 
19
-            $actions   = array();
19
+                $actions   = array();
20 20
 
21
-            echo sprintf(
22
-                '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
23
-                sprintf(
24
-                    esc_html__( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
26
-                )
27
-            );
28
-
29
-            if ( is_user_logged_in() ) {
30
-
31
-                $actions[] = sprintf(
32
-                    '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-history">%s</a>',
33
-                    esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
21
+                echo sprintf(
22
+                    '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
34 23
                     sprintf(
35
-                        __( '%s History', 'invoicing' ),
24
+                        esc_html__( 'Print %s', 'invoicing' ),
36 25
                         esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37 26
                     )
38 27
                 );
39 28
 
40
-            }
29
+                if ( is_user_logged_in() ) {
41 30
 
42
-            if ( wpinv_current_user_can_manage_invoicing() ) {
31
+                    $actions[] = sprintf(
32
+                        '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-history">%s</a>',
33
+                        esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
34
+                        sprintf(
35
+                            __( '%s History', 'invoicing' ),
36
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
37
+                        )
38
+                    );
43 39
 
44
-                $actions[] = sprintf(
45
-                    '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-edit">%s</a>',
46
-                    esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
-                    sprintf(
48
-                        __( 'Edit %s', 'invoicing' ),
49
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
-                    )
51
-                );
40
+                }
41
+
42
+                if ( wpinv_current_user_can_manage_invoicing() ) {
52 43
 
53
-            }
44
+                    $actions[] = sprintf(
45
+                        '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-edit">%s</a>',
46
+                        esc_url( get_edit_post_link( $invoice->get_id() ) ),
47
+                        sprintf(
48
+                            __( 'Edit %s', 'invoicing' ),
49
+                            esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
50
+                        )
51
+                    );
54 52
 
55
-            $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
-            echo wp_kses_post( implode( '', $actions ) );
53
+                }
57 54
 
58
-        ?>
55
+                $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
+                echo wp_kses_post( implode( '', $actions ) );
59 57
 
58
+            ?>
59
+    
60 60
         <?php do_action( 'wpinv_invoice_display_right_actions', $invoice ); ?>
61
-    </div>
61
+        </div>
62 62
 
63
-<?php
63
+    <?php
Please login to merge, or discard this patch.
templates/invoice/invoice.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays an invoice.
4 4
  *
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-?>
12
+    ?>
13 13
 
14 14
 <div class="bsui">
15 15
 
@@ -17,28 +17,28 @@  discard block
 block discarded – undo
17 17
 
18 18
         <?php
19 19
 
20
-            // Fires when printing the header.
21
-            do_action( 'getpaid_invoice_header', $invoice );
20
+                // Fires when printing the header.
21
+                do_action( 'getpaid_invoice_header', $invoice );
22 22
 
23
-            // Print the opening wrapper.
24
-            echo '<div class="container bg-white border mt-4 mb-4 p-4 position-relative flex-grow-1">';
23
+                // Print the opening wrapper.
24
+                echo '<div class="container bg-white border mt-4 mb-4 p-4 position-relative flex-grow-1">';
25 25
 
26
-            // Print notifications.
27
-            wpinv_print_errors();
26
+                // Print notifications.
27
+                wpinv_print_errors();
28 28
 
29
-            // Fires when printing the invoice details.
30
-            do_action( 'getpaid_invoice_details', $invoice );
29
+                // Fires when printing the invoice details.
30
+                do_action( 'getpaid_invoice_details', $invoice );
31 31
 
32
-            // Fires when printing the invoice line items.
33
-            do_action( 'getpaid_invoice_line_items', $invoice );
32
+                // Fires when printing the invoice line items.
33
+                do_action( 'getpaid_invoice_line_items', $invoice );
34 34
 
35
-            // Print the closing wrapper.
36
-            echo '</div>';
35
+                // Print the closing wrapper.
36
+                echo '</div>';
37 37
 
38
-            // Fires when printing the invoice footer.
39
-            do_action( 'getpaid_invoice_footer', $invoice );
38
+                // Fires when printing the invoice footer.
39
+                do_action( 'getpaid_invoice_footer', $invoice );
40 40
 
41
-        ?>
41
+            ?>
42 42
 
43 43
     </div>
44 44
 </div>
Please login to merge, or discard this patch.
templates/invoice/footer.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the invoice footer.
4 4
  *
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-?>
12
+    ?>
13 13
 
14 14
     <div class="border-top pt-4 bg-white">
15 15
         <div class="container pr-0 pl-0">
16 16
 
17 17
             <?php if ( $term_text = wpinv_get_terms_text() ) : ?>
18
-                <div class="terms-text">
18
+                    <div class="terms-text">
19 19
                     <?php echo wp_kses_post( wpautop( $term_text ) ); ?>
20
-                </div>
20
+                    </div>
21 21
             <?php endif; ?>
22 22
 
23 23
             <div class="footer-text d-print-none">
Please login to merge, or discard this patch.
templates/invoice/invoice-meta.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays the invoice meta data.
4 4
  *
@@ -7,23 +7,23 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-$class = ! is_singular( 'page' ) ? 'px-1' : '';
13
-?>
10
+    defined( 'ABSPATH' ) || exit;
14 11
 
12
+    $class = ! is_singular( 'page' ) ? 'px-1' : '';
13
+    ?>
14
+    
15 15
         <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?>
16
-        <div class="getpaid-invoice-meta-data">
16
+            <div class="getpaid-invoice-meta-data">
17 17
 
18 18
             <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?>
19 19
             <table class="table table-bordered">
20 20
                 <tbody>
21 21
 
22 22
                     <?php do_action( 'getpaid_before_invoice_meta_rows', $invoice ); ?>
23
-                    <?php foreach ( $meta as $key => $data ) : ?>
24
-
23
+                        <?php foreach ( $meta as $key => $data ) : ?>
24
+    
25 25
                         <?php if ( ! empty( $data['value'] ) ) : ?>
26
-
26
+    
27 27
                             <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?>
28 28
 
29 29
                             <tr class="getpaid-invoice-meta-<?php echo esc_attr( $key ); ?>">
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
                             </tr>
40 40
 
41 41
                             <?php do_action( "getpaid_after_invoice_meta_$key", $invoice, $data ); ?>
42
-
42
+    
43 43
                         <?php endif; ?>
44
-
44
+    
45 45
                     <?php endforeach; ?>
46
-                    <?php do_action( 'getpaid_after_invoice_meta_rows', $invoice ); ?>
46
+                        <?php do_action( 'getpaid_after_invoice_meta_rows', $invoice ); ?>
47 47
 
48 48
                 </tbody>
49 49
             </table>
@@ -52,5 +52,5 @@  discard block
 block discarded – undo
52 52
 
53 53
         </div>
54 54
         <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?>
55
-
56
-<?php
55
+    
56
+    <?php
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 1 patch
Switch Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays a single fee item in an invoice.
4 4
  *
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @var array $fee
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+    defined( 'ABSPATH' ) || exit;
13 13
 
14
-do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
14
+    do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
15 15
 
16
-?>
16
+    ?>
17 17
 
18 18
 <div class='getpaid-invoice-item item-fee border-bottom'>
19 19
 
@@ -25,60 +25,60 @@  discard block
 block discarded – undo
25 25
 
26 26
                 <?php
27 27
 
28
-                    // Fires before printing a fee item column.
29
-                    do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
28
+                        // Fires before printing a fee item column.
29
+                        do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
30 30
 
31
-                    // Item name.
32
-                    if ( 'name' == $column ) {
31
+                        // Item name.
32
+                        if ( 'name' == $column ) {
33 33
 
34
-					// Display the name.
35
-					echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
34
+					    // Display the name.
35
+					    echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
36 36
 
37
-					// And an optional description.
38
-					$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
-					echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
37
+					    // And an optional description.
38
+					    $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
+					    echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
40 40
 
41
-                    }
41
+                        }
42 42
 
43
-                    // Item price.
44
-                    if ( 'price' == $column ) {
43
+                        // Item price.
44
+                        if ( 'price' == $column ) {
45 45
 
46
-					// Display the item price (or recurring price if this is a renewal invoice)
47
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
49
-                        } else {
50
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
51
-                        }
46
+					    // Display the item price (or recurring price if this is a renewal invoice)
47
+					    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
+						    wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
49
+                            } else {
50
+                                wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
51
+                            }
52 52
 }
53 53
 
54
-                    // Item quantity.
55
-                    if ( 'quantity' == $column ) {
56
-					echo '&mdash;';
57
-                    }
54
+                        // Item quantity.
55
+                        if ( 'quantity' == $column ) {
56
+					    echo '&mdash;';
57
+                        }
58 58
 
59
-                    // Item tax.
60
-                    if ( 'tax_rate' == $column ) {
61
-					echo '&mdash;';
62
-                    }
59
+                        // Item tax.
60
+                        if ( 'tax_rate' == $column ) {
61
+					    echo '&mdash;';
62
+                        }
63 63
 
64
-                    // Item sub total.
65
-                    if ( 'subtotal' == $column ) {
64
+                        // Item sub total.
65
+                        if ( 'subtotal' == $column ) {
66 66
 
67
-					// Display the item price (or recurring price if this is a renewal invoice)
68
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
70
-                        } else {
71
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
72
-                        }
67
+					    // Display the item price (or recurring price if this is a renewal invoice)
68
+					    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
+						    wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
70
+                            } else {
71
+                                wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
72
+                            }
73 73
 }
74 74
 
75
-                    // Fires when printing a fee item column.
76
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
75
+                        // Fires when printing a fee item column.
76
+                        do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
77 77
 
78
-                    // Fires after printing a fee item column.
79
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
78
+                        // Fires after printing a fee item column.
79
+                        do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
80 80
 
81
-                ?>
81
+                    ?>
82 82
 
83 83
             </div>
84 84
     
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 1 patch
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 
3 3
 /**
4 4
  * Displays invoice cart totals
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
  * @var WPInv_Invoice $invoice
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+    defined( 'ABSPATH' ) || exit;
13 13
 
14
-// Totals rows.
15
-$totals = getpaid_invoice_totals_rows( $invoice );
14
+    // Totals rows.
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">
@@ -35,50 +35,50 @@  discard block
 block discarded – undo
35 35
 
36 36
                             <?php
37 37
 
38
-                                // Total tax.
39
-                                if ( 'tax' === $key ) {
40
-                                    wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
38
+                                    // Total tax.
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
-                                        $taxes = $invoice->get_total_tax();
45
-                                        if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
-                                            echo ' <em class="text-muted small">';
47
-                                            _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
-                                            echo '</em>';
44
+                                            $taxes = $invoice->get_total_tax();
45
+                                            if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
+                                                echo ' <em class="text-muted small">';
47
+                                                _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
+                                                echo '</em>';
49
+                                            }
49 50
                                         }
50 51
                                     }
51
-                                }
52 52
 
53
-                                // Total Fee.
54
-                                if ( 'fee' === $key ) {
55
-								wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
56
-                                }
53
+                                    // Total Fee.
54
+                                    if ( 'fee' === $key ) {
55
+								    wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
56
+                                    }
57 57
 
58
-                                // Total discount.
59
-                                if ( 'discount' === $key ) {
60
-								wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
61
-                                }
58
+                                    // Total discount.
59
+                                    if ( 'discount' === $key ) {
60
+								    wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
61
+                                    }
62 62
 
63
-                                // Shipping.
64
-                                if ( 'shipping' === $key ) {
65
-								wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
66
-                                }
63
+                                    // Shipping.
64
+                                    if ( 'shipping' === $key ) {
65
+								    wpinv_the_price( $invoice->get_shipping(), $invoice->get_currency() );
66
+                                    }
67 67
 
68
-                                // Sub total.
69
-                                if ( 'subtotal' === $key ) {
70
-								wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
71
-                                }
68
+                                    // Sub total.
69
+                                    if ( 'subtotal' === $key ) {
70
+								    wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
71
+                                    }
72 72
 
73
-                                // Total.
74
-                                if ( 'total' === $key ) {
75
-								wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
76
-                                }
73
+                                    // Total.
74
+                                    if ( 'total' === $key ) {
75
+								    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
76
+                                    }
77 77
 
78
-                                // Fires when printing a cart total.
79
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
78
+                                    // Fires when printing a cart total.
79
+                                    do_action( "getpaid_invoice_cart_totals_$key", $invoice );
80 80
 
81
-                            ?>
81
+                                ?>
82 82
 
83 83
                         </div>
84 84
                     </div>
Please login to merge, or discard this patch.
templates/invoice/line-items.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays a line items in an invoice.
4 4
  *
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-?>
14
-
15
-<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
13
+    ?>
14
+    
15
+    <?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
16 16
 
17 17
     <h2 class="mt-5 mb-1 h4"><?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ) ); ?></h2>
18 18
     <div class="getpaid-invoice-items mb-4 border">
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
         <div class="getpaid-invoice-items-header <?php echo esc_attr( $invoice->get_template() ); ?>">
22 22
             <div class="form-row row">
23 23
                 <?php foreach ( $columns as $key => $label ) : ?>
24
-                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-line-item-col-<?php echo esc_attr( $key ); ?>">
24
+                        <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-line-item-col-<?php echo esc_attr( $key ); ?>">
25 25
                         <?php echo esc_html( $label ); ?>
26
-                    </div>
26
+                        </div>
27 27
                 <?php endforeach; ?>
28 28
             </div>
29 29
         </div>
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
 
32 32
         <?php
33 33
 
34
-            // Display the item totals.
35
-            foreach ( $invoice->get_items() as $item ) {
36
-			wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
37
-            }
34
+                // Display the item totals.
35
+                foreach ( $invoice->get_items() as $item ) {
36
+			    wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
37
+                }
38 38
 
39
-            // Display the fee totals.
40
-            foreach ( $invoice->get_fees() as $fee ) {
41
-			wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
42
-            }
39
+                // Display the fee totals.
40
+                foreach ( $invoice->get_fees() as $fee ) {
41
+			    wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
42
+                }
43 43
 
44
-            // Display the cart totals.
45
-            wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
44
+                // Display the cart totals.
45
+                wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
46 46
 
47
-        ?>
47
+            ?>
48 48
 
49 49
     </div>
50 50
 
Please login to merge, or discard this patch.