@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * Checks if the current user cna view an invoice receipt. |
| 68 | 68 | */ |
| 69 | 69 | function wpinv_can_view_receipt( $invoice ) { |
| 70 | - return (bool) apply_filters( 'wpinv_can_view_receipt', wpinv_user_can_view_invoice( $invoice ), $invoice ); |
|
| 70 | + return (bool) apply_filters( 'wpinv_can_view_receipt', wpinv_user_can_view_invoice( $invoice ), $invoice ); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @param string $post_type The post type to check for. |
| 97 | 97 | */ |
| 98 | 98 | function getpaid_is_invoice_post_type( $post_type ) { |
| 99 | - return is_scalar( $post_type ) && ! empty( $post_type ) && strpos( $post_type, 'wpi_' ) === 0 && array_key_exists( $post_type, getpaid_get_invoice_post_types() ); |
|
| 99 | + return is_scalar( $post_type ) && ! empty( $post_type ) && strpos( $post_type, 'wpi_' ) === 0 && array_key_exists( $post_type, getpaid_get_invoice_post_types() ); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -556,37 +556,37 @@ discard block |
||
| 556 | 556 | $label = empty( $label ) ? __( 'Invoice', 'invoicing' ) : sanitize_text_field( $label ); |
| 557 | 557 | $columns = array( |
| 558 | 558 | |
| 559 | - 'invoice-number' => array( |
|
| 560 | - 'title' => $label, |
|
| 561 | - 'class' => 'text-left', |
|
| 562 | - ), |
|
| 559 | + 'invoice-number' => array( |
|
| 560 | + 'title' => $label, |
|
| 561 | + 'class' => 'text-left', |
|
| 562 | + ), |
|
| 563 | 563 | |
| 564 | - 'created-date' => array( |
|
| 565 | - 'title' => __( 'Created Date', 'invoicing' ), |
|
| 566 | - 'class' => 'text-left', |
|
| 567 | - ), |
|
| 564 | + 'created-date' => array( |
|
| 565 | + 'title' => __( 'Created Date', 'invoicing' ), |
|
| 566 | + 'class' => 'text-left', |
|
| 567 | + ), |
|
| 568 | 568 | |
| 569 | - 'payment-date' => array( |
|
| 570 | - 'title' => __( 'Payment Date', 'invoicing' ), |
|
| 571 | - 'class' => 'text-left', |
|
| 572 | - ), |
|
| 569 | + 'payment-date' => array( |
|
| 570 | + 'title' => __( 'Payment Date', 'invoicing' ), |
|
| 571 | + 'class' => 'text-left', |
|
| 572 | + ), |
|
| 573 | 573 | |
| 574 | - 'invoice-status' => array( |
|
| 575 | - 'title' => __( 'Status', 'invoicing' ), |
|
| 576 | - 'class' => 'text-center', |
|
| 577 | - ), |
|
| 574 | + 'invoice-status' => array( |
|
| 575 | + 'title' => __( 'Status', 'invoicing' ), |
|
| 576 | + 'class' => 'text-center', |
|
| 577 | + ), |
|
| 578 | 578 | |
| 579 | - 'invoice-total' => array( |
|
| 580 | - 'title' => __( 'Total', 'invoicing' ), |
|
| 581 | - 'class' => 'text-right', |
|
| 582 | - ), |
|
| 579 | + 'invoice-total' => array( |
|
| 580 | + 'title' => __( 'Total', 'invoicing' ), |
|
| 581 | + 'class' => 'text-right', |
|
| 582 | + ), |
|
| 583 | 583 | |
| 584 | - 'invoice-actions' => array( |
|
| 585 | - 'title' => ' ', |
|
| 586 | - 'class' => 'text-center', |
|
| 587 | - ), |
|
| 584 | + 'invoice-actions' => array( |
|
| 585 | + 'title' => ' ', |
|
| 586 | + 'class' => 'text-center', |
|
| 587 | + ), |
|
| 588 | 588 | |
| 589 | - ); |
|
| 589 | + ); |
|
| 590 | 590 | |
| 591 | 591 | return apply_filters( 'wpinv_user_invoices_columns', $columns, $post_type ); |
| 592 | 592 | } |
@@ -1297,22 +1297,22 @@ discard block |
||
| 1297 | 1297 | */ |
| 1298 | 1298 | function getpaid_get_invoice_status_classes() { |
| 1299 | 1299 | |
| 1300 | - return apply_filters( |
|
| 1301 | - 'getpaid_get_invoice_status_classes', |
|
| 1302 | - array( |
|
| 1300 | + return apply_filters( |
|
| 1301 | + 'getpaid_get_invoice_status_classes', |
|
| 1302 | + array( |
|
| 1303 | 1303 | 'wpi-quote-declined' => 'bg-danger', |
| 1304 | 1304 | 'wpi-failed' => 'bg-danger', |
| 1305 | - 'wpi-processing' => 'bg-info', |
|
| 1306 | - 'wpi-onhold' => 'bg-warning text-dark', |
|
| 1307 | - 'wpi-quote-accepted' => 'bg-success', |
|
| 1308 | - 'publish' => 'bg-success', |
|
| 1309 | - 'wpi-renewal' => 'bg-primary', |
|
| 1305 | + 'wpi-processing' => 'bg-info', |
|
| 1306 | + 'wpi-onhold' => 'bg-warning text-dark', |
|
| 1307 | + 'wpi-quote-accepted' => 'bg-success', |
|
| 1308 | + 'publish' => 'bg-success', |
|
| 1309 | + 'wpi-renewal' => 'bg-primary', |
|
| 1310 | 1310 | 'wpi-cancelled' => 'bg-secondary', |
| 1311 | 1311 | 'wpi-pending' => 'bg-dark text-white', |
| 1312 | 1312 | 'wpi-quote-pending' => 'bg-dark text-white', |
| 1313 | 1313 | 'wpi-refunded' => 'bg-secondary', |
| 1314 | - ) |
|
| 1315 | - ); |
|
| 1314 | + ) |
|
| 1315 | + ); |
|
| 1316 | 1316 | |
| 1317 | 1317 | } |
| 1318 | 1318 | |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | function getpaid_get_invoice_tax_rate( $invoice, $item ) { |
| 1327 | 1327 | |
| 1328 | 1328 | $rates = getpaid_get_item_tax_rates( $item, $invoice->get_country(), $invoice->get_state() ); |
| 1329 | - $rates = getpaid_filter_item_tax_rates( $item, $rates ); |
|
| 1329 | + $rates = getpaid_filter_item_tax_rates( $item, $rates ); |
|
| 1330 | 1330 | $rates = wp_list_pluck( $rates, 'rate' ); |
| 1331 | 1331 | |
| 1332 | 1332 | return array_sum( $rates ); |