<div id="wpcfe-packages-repeater" style="display:none !important;">
    <section data-repeater-list="wpc-multiple-package">
        <div data-repeater-item>
        <?php
		if(!empty($packages) && is_array($packages)) {
            foreach($packages as $package) {
                foreach ( wpcargo_package_fields() as $key => $field_value): 
                    $value = array_key_exists( $key, $package ) ? $package[$key] : '' ;
                    if( in_array( $key, wpcargo_package_dim_meta() ) && !wpcargo_package_settings()->dim_unit_enable ){
                        continue;
                    }
                    ?><input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>"> <?php
                endforeach;
            }
        }
        ?>
        </div>
    </section>
</div>
<div id="wpcsr-rate-information" class="col-md-12 mb-4">
    <section class="card">
        <div class="card-body" style="background-color: rgba(0,0,0,.03); border-bottom: 1px solid rgba(0,0,0,.125);">
            <?php echo wpcsr_rate_information_label(); ?>
        </div>
        <div class="card-body">
            <div class="row">
                <?php require_once( wpcsr_include_template('rate-details.tpl') ); ?>
            </div>
            <!-- Parcel Information -->
            <div id="wpcsr-rate-packages" class="table-responsive mt-4">
                <h4 class="header-title"><?php echo wpcsr_packages_label(); ?></h4>
                <table id="wpcsr-packages-table" class="table table-hover table-sm table-bordered">
					<thead>
						<tr class="text-center">
							<?php foreach ( wpcargo_package_fields() as $key => $value): ?>
								<?php 
									if( in_array( $key, wpcargo_package_dim_meta() ) && !wpcargo_package_settings()->dim_unit_enable ){
										continue;
									}
								?>
								<th><strong><?php echo $value['label']; ?></strong></th>
							<?php endforeach; ?>
						</tr>
					</thead>
					<tbody >
					<?php
					if(!empty($packages) && is_array($packages)) {
						foreach($packages as $package) { ?>
							<tr>
								<?php foreach ( wpcargo_package_fields() as $key => $field_value): 
									$value = array_key_exists( $key, $package ) ? $package[$key] : '' ;
									if( in_array( $key, wpcargo_package_dim_meta() ) && !wpcargo_package_settings()->dim_unit_enable ){
										continue;
									}
									?>
									<td><?php echo $value; ?></td>
								<?php endforeach; ?>
							</tr>
							<?php
						}
					}
					?>
					</tbody>
				</table>
            </div>
        </div>
    </section>
</div>