</strong></h4> <div class="dropDownPanel" id="calendarDropdown"> <div class="delivery-date-picker"></div> <div class="item-list"> <h5>Your upcoming orders</h5> <?php foreach ($DeliveryDates as $DD) { $total = $Customer->totalByDeliveryDate($DD->id); if ($total == 0) { continue; } ?> <div class="item"> <p><?php echo CHtml::link(SnapFormat::date($DD->date), array('extras/order', 'date' => $DD->id)); ?> <span class="right"><?php echo SnapFormat::currency($total); ?> </span></p> </div> <?php } ?> <p><strong><?php echo CHtml::link('View All', array('customer/orders'), array('class' => 'button small right')); ?> </strong></p> </div>
<?php $this->breadcrumbs = array('Box-O-Matic' => array('/snapcms/boxomatic/index'), 'Boxes' => array('boxes/index'), 'Box Packing'); $this->menu = array(array('icon' => 'glyphicon glyphicon-thumbs-up', 'label' => 'Update Boxes', 'url' => '#', 'linkOptions' => array('id' => 'update-boxes')), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Packing list spreadsheet', 'url' => array('deliveryDate/generatePackingList', 'date' => $SelectedDeliveryDate->id)), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Customer list', 'url' => array('deliveryDate/generateCustomerList', 'date' => $SelectedDeliveryDate->id)), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Customer list PDF', 'url' => array('deliveryDate/generateCustomerListPdf', 'date' => $SelectedDeliveryDate->id)), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Order list', 'url' => array('deliveryDate/generateOrderList', 'date' => $SelectedDeliveryDate->id))); $dateLabel = $SelectedDeliveryDate ? 'for ' . SnapFormat::date($SelectedDeliveryDate->date) : 'None Selected'; //Custom header below //$this->page_heading = 'Box Packing'; //$this->page_heading_subtext = $dateLabel; $baseUrl = $this->createFrontendUrl('/') . '/themes/boxomatic/admin'; $cs = Yii::app()->clientScript; $cs->registerCssFile($baseUrl . '/css/ui-lightness/jquery-ui.css'); $cs->registerCssFile($baseUrl . '/css/chosen.css'); $cs->registerCoreScript('jquery.ui'); $cs->registerScriptFile($baseUrl . '/js/ui.touch-punch.min.js', CClientScript::POS_END); $cs->registerScriptFile($baseUrl . '/js/ui.datepicker.min.js', CClientScript::POS_END); $cs->registerScriptFile($baseUrl . '/js/chosen.jquery.min.js', CClientScript::POS_END); $cs->registerScriptFile($baseUrl . '/js/boxitem/_form.js', CClientScript::POS_END); Yii::app()->clientScript->registerScript('initPageSize', <<<EOD \t\$('.change-pageSize').on('change', function() { \t\t\$.fn.yiiGridView.update('supplier-item-grid',{ data:{ pageSize: \$(this).val() }}) \t}); EOD , CClientScript::POS_READY); ?> <div id="calendar-dropdown" class="page-header dropdown"> <h1>Box Packing <small class="dropdown-toggle" data-toggle="dropdown" data-target="#calendar-dropdown"><?php echo $dateLabel; ?> <b class="caret"></b></small></h1> <div class="dropdown-menu" aria-labelledby="dLabel" role="menu">
<div id="checkout-cart" class="items list-view panel-group"> <?php /* @todo: get Order objects instead $BoxoCart->getOrders() */ foreach ($Orders as $Order) { $DD = $Order->DeliveryDate; $Location = $Order->Location; ?> <div class="panel panel-default"> <a class="panel-heading" data-toggle="collapse" data-parent="#checkout-cart" href="#collapse-<?php echo $DD->id; ?> "> <h3> <?php echo SnapFormat::date($DD->date, 'full'); ?> <span class="pull-right"> <?php echo SnapFormat::currency($Order->total); ?> <span class="glyphicon"></span> </span> </h3> </a> <div id="collapse-<?php echo $DD->id; ?> " class="panel-collapse collapse"> <div class="panel-body"> <div class="row">
public function getOrderDate($days) { //$minDays = SnapUtil::config('boxomatic/minimumAdvancePayment'); $days -= 7; // minus 1 week $NextDate = $this->getNextDeliveryDate($days); return $NextDate ? SnapFormat::date($NextDate->date, 'full') : 'Error!'; }
<div class="view col-sm-4"> <div class="inner"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'extras-form-' . $data->id, 'enableAjaxValidation' => false)); ?> <h3><?php echo CHtml::encode($data->name); ?> </h3> <span class="available-until"> Available until: <?php echo SnapFormat::date($data->customer_available_to); ?> </span> <div class="image"> <?php echo SnapHtml::activeImage($data, 'image', array('w' => 190, 'h' => 100, 'zc' => 1), $data->name, true); ?> </div> <?php if (!empty($data->description)) { ?> <span class="description"><?php echo $data->description; ?> </span> <?php }
/** * Formats the value as a date. * @param mixed $value the value to be formatted * @return string the formatted result * @see dateFormat */ public function formatDate($value) { return SnapFormat::date($this->normalizeDateValue($value)); }
echo CHtml::encode($product->name); ?> </h3> <span class="price item-price"> <?php echo SnapFormat::currency($product->item_sales_price); ?> (<?php echo $product->unit_label; ?> ) </span> </div> <div class="col-xs-4 price-col pull-right"> <span class="price sub-total"><?php echo CHtml::encode(SnapFormat::currency($data->total)); ?> </span> </div> </div> <div class="row"> <div class="col-md-9 col-md-offset-3"> <span class="available-until"> Available until: <?php echo SnapFormat::date($product->customer_available_to); ?> </span> </div> </div> </div>
public function getDelivery_date_formatted() { return SnapFormat::date($this->delivery_date); }
<?php $dds = $Location->getDeliveryDays(); ?> <div class="alert alert-info"> This order is for delivery on <strong><?php echo SnapFormat::date($DeliveryDate->date, 'full'); ?> </strong> at <strong><?php echo $Location->location_name; ?> </strong> </div> <?php /* if(count($dds) > 1): ?> <div class="alert alert-warning"> This location has a delivery run <strong><?php echo count($dds) ?></strong> times a week on <?php $lastDay = array_pop($dds); ?> <?php echo implode(', ', $dds); ?> and <?php echo $lastDay ?> </div> <?php endif; */
<div class="panel"> <h3><?php echo CHtml::link(SnapFormat::date($data->DeliveryDate->date), array('/shop/default/index', 'date' => $data->delivery_date_id)); ?> </h3> <ul class="no-bullet"> <li> Order Total: <?php echo SnapFormat::currency($data->User->totalByDeliveryDate($data->delivery_date_id)); ?> </li> <li> <?php echo $data->getAttributeLabel('status'); ?> : <?php echo CHtml::encode($data->status_text); ?> </li> </ul> </div>