<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/**
 * @var yii\web\View $this
 * @var PortalPeople\shippingcosts\models\Shippingcosts $model
 */

$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Shipping Costs', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="shippingcosts-view">
<div class="card">
                <div class="card-header">
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-md-8 col-12">
                            <p>
                            Postcodes: <br />
                                <?= $model->postcodes ?>
                            </p>
                            Notes:
                            <?= $model->notes ?>

                        </div>
                    
                        <div class="col-md-4 col-12">
                            <div class="row">
                                <div class="col-12">
                                    Status: <?= $model->status ?>
                                </div>
                                <div class="col-12">
                                    Types: 
                                    <?= $model->type ?>
                                </div>
                                <div class="col-12">
                                    Haulier: <?= $model->haulier->name; ?>
                                </div>
                                <div class="col-12">
                                    No of Prices <?= $model->no_of_prices; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    Pricing
                </div>
                <div class="card-body">
                    <div class="row d-flex">
                        <?php foreach ($model->prices as $key => $object) { ?>
                            <div class="col">
                                <div class="col-12">
                                    Descrtiption
                                <?= $object->label; ?>
                            </div>
                                <div class="col-12">
                                    Size % of Pallet:
                                <?= $object->qty; ?>
                            </div>
                                <div class="col-12">
                                    Price
                            
                                <?= Yii::$app->formatter->asCurrency($object->price, 'gbp'); ?>
                            </div>
                                
                            </div>
                        <?php } ?>   
                    </div>
                </div>
            </div>



</div>
