Code Duplication    Length = 11-11 lines in 2 locations

includes/admin/wpinv-admin-functions.php 2 locations

@@ 301-311 (lines=11) @@
298
299
    // Checks if the current post type is 'item'
300
    if ( $typenow == 'wpi_item') {
301
        if ( $wpinv_euvat->allow_vat_rules() ) {
302
            echo wpinv_html_select( array(
303
                    'options'          => array_merge( array( '' => __( 'All VAT rules', 'invoicing' ) ), $wpinv_euvat->get_rules() ),
304
                    'name'             => 'vat_rule',
305
                    'id'               => 'vat_rule',
306
                    'selected'         => ( isset( $_GET['vat_rule'] ) ? $_GET['vat_rule'] : '' ),
307
                    'show_option_all'  => false,
308
                    'show_option_none' => false,
309
                    'class'            => 'gdmbx2-text-medium',
310
                ) );
311
        }
312
        
313
        if ( $wpinv_euvat->allow_vat_classes() ) {
314
            echo wpinv_html_select( array(
@@ 313-323 (lines=11) @@
310
                ) );
311
        }
312
        
313
        if ( $wpinv_euvat->allow_vat_classes() ) {
314
            echo wpinv_html_select( array(
315
                    'options'          => array_merge( array( '' => __( 'All VAT classes', 'invoicing' ) ), $wpinv_euvat->get_all_classes() ),
316
                    'name'             => 'vat_class',
317
                    'id'               => 'vat_class',
318
                    'selected'         => ( isset( $_GET['vat_class'] ) ? $_GET['vat_class'] : '' ),
319
                    'show_option_all'  => false,
320
                    'show_option_none' => false,
321
                    'class'            => 'gdmbx2-text-medium',
322
                ) );
323
        }
324
            
325
        echo wpinv_html_select( array(
326
                'options'          => array_merge( array( '' => __( 'All item types', 'invoicing' ) ), wpinv_get_item_types() ),