Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 351-361 (lines=11) @@
348
349
    // Checks if the current post type is 'item'
350
    if ( $typenow == 'wpi_item') {
351
        if ( $wpinv_euvat->allow_vat_rules() ) {
352
            echo wpinv_html_select( array(
353
                    'options'          => array_merge( array( '' => __( 'All VAT rules', 'invoicing' ) ), $wpinv_euvat->get_rules() ),
354
                    'name'             => 'vat_rule',
355
                    'id'               => 'vat_rule',
356
                    'selected'         => ( isset( $_GET['vat_rule'] ) ? $_GET['vat_rule'] : '' ),
357
                    'show_option_all'  => false,
358
                    'show_option_none' => false,
359
                    'class'            => 'gdmbx2-text-medium',
360
                ) );
361
        }
362
        
363
        if ( $wpinv_euvat->allow_vat_classes() ) {
364
            echo wpinv_html_select( array(
@@ 363-373 (lines=11) @@
360
                ) );
361
        }
362
        
363
        if ( $wpinv_euvat->allow_vat_classes() ) {
364
            echo wpinv_html_select( array(
365
                    'options'          => array_merge( array( '' => __( 'All VAT classes', 'invoicing' ) ), $wpinv_euvat->get_all_classes() ),
366
                    'name'             => 'vat_class',
367
                    'id'               => 'vat_class',
368
                    'selected'         => ( isset( $_GET['vat_class'] ) ? $_GET['vat_class'] : '' ),
369
                    'show_option_all'  => false,
370
                    'show_option_none' => false,
371
                    'class'            => 'gdmbx2-text-medium',
372
                ) );
373
        }
374
            
375
        echo wpinv_html_select( array(
376
                'options'          => array_merge( array( '' => __( 'All item types', 'invoicing' ) ), wpinv_get_item_types() ),