if (!$pastDeadline) { ?> <div class="row"> <div class="large-6 columns"> <?php echo $form->dropDownList($data, 'quantity', Inventory::$quantityOptions, array('name' => 'extras[' . $data->id . ']')); ?> </div> <div class="large-6 columns"> <?php echo CHtml::submitButton('Update', array('class' => 'button tiny')); ?> </div> </div> <?php } else { ?> <span class="quantity"><strong>Qty:</strong> <?php echo $data->quantity; ?> </span> <?php } ?> <span class="price"><strong>Price:</strong> <?php echo CHtml::encode(SnapFormat::currency($data->total)); ?> </span> </div> </div> </div>
<?php /* @var $this UserLocationController */ /* @var $model UserLocation */ ?> <h1>Orders</h1> <?php if (Yii::app()->request->getParam('fromToday', 1) == 0) { ?> <?php echo CHtml::link('View From Today', array('user/orders', 'id' => $User->id, 'fromToday' => 1), array('class' => 'button small')); } else { ?> <?php echo CHtml::link('View All', array('user/orders', 'id' => $User->id, 'fromToday' => 0), array('class' => 'button small')); } ?> <p>Your current balance is <?php echo SnapFormat::currency($User->balance); ?> </p> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $ordersDP, 'itemView' => '_order_view')); ?>
public function getTotalLabel($ddId) { $before = $this->getTotal($ddId, 'before'); $after = $this->getTotal($ddId, 'after'); $output = ''; if (!$this->currentOrderRemoved()) { $output .= '<span class="current-price">' . SnapFormat::currency($after) . '</span>'; } if ($before !== 0 && $after !== $before) { $output = ' <s class="text-danger">' . SnapFormat::currency($before) . '</s>' . $output; } return $output; }
<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>
} ?> <?php foreach ($BoxoCart->getDeliveryDates(true) as $DD) { if ($BoxoCart->getTotalForDate($DD) == 0) { continue; } ?> <option value="<?php echo $BoxoCart->getTotalForDate($DD); ?> "><?php echo SnapFormat::date($DD->date, 'full'); ?> (<?php echo SnapFormat::currency($BoxoCart->getTotalForDate($DD)); ?> )</option> <?php } ?> </select> </div> </div> <div class="form-group"> <?php echo CHtml::link('Confirm Purchase', array('shop/confirmOrder'), array('class' => 'btn btn-primary pull-right', 'id' => 'btn-confirm-purchase', 'style' => 'display:none')); ?> <input type="submit" value="Confirm Purchase" class="btn btn-primary pull-right" id="btn-purchase-paypal" style="display:none" /> </div>
?> <td class="value <?php echo $retail > $DateBox->box_price ? 'red' : ''; ?> "><?php echo SnapFormat::currency($retail); ?> </td> <?php } ?> <?php } ?> <td class="value"><strong><?php echo SnapFormat::currency(BoxItem::dateRetail($SelectedDeliveryDate->id)); ?> </strong></td> <td></td> </tr> </tfoot> </table> <?php $this->endWidget(); ?> </div> <div id="customers" class="tab-pane"> <?php $this->beginWidget('bootstrap.widgets.BsPanel'); ?>
} else { ?> <?php echo CHtml::image($this->createUrl('boxSize/image')); ?> <?php } ?> </div> </div> <div class="large-8 columns"> <h3><?php echo CHtml::encode($Box->BoxSize->box_size_name); ?> Box <br /><span class="each"><?php echo SnapFormat::currency($Box->box_price); ?> ea.<span></h3> <?php if (!$pastDeadline) { ?> <div class="row"> <div class="large-6 columns"> <?php echo CHtml::dropDownList('boxes[' . $Box->box_id . ']', $quantity, UserBox::$quantityOptions); ?> </div> <div class="large-6 columns"> <?php echo CHtml::submitButton('Update', array('class' => 'button tiny')); ?>
</tr> </thead> <tbody> <tr> <td class='boxes'><?php echo SnapFormat::currency($Customer->totalBoxesByDeliveryDate($DeliveryDate->id)); ?> </td> <td class='extras'>?</td> <td class='delivery'><?php echo SnapFormat::currency($Customer->totalDeliveryByDeliveryDate($DeliveryDate->id)); ?> </td> <td class='total'> <strong><?php echo SnapFormat::currency($Customer->totalByDeliveryDate($DeliveryDate->id)); ?> </strong> <?php if (Yii::app()->user->shadow_id) { ?> <?php echo CHtml::link('update', array('deliveryDate/updateUserBoxes', 'date_id' => $DeliveryDate->id, 'cust_id' => $Customer->user_id), array('class' => 'button small')); ?> <?php } ?> </td> </tr> </tbody> </table>
</div> </div> </div> <hr /> <?php echo $form->dateFieldControlGroup($model, 'delivery_date'); ?> <?php echo $form->textFieldControlGroup($model, 'other_costs'); ?> <div class="form-group"> <div class="col-md-10 col-md-offset-2"> <?php echo SnapFormat::currency($model->total); ?> </div> </div> <?php echo $form->textAreaControlGroup($model, 'order_notes'); ?> </div> <?php echo $this->renderPartial('//layouts/_form_sidebar'); ?> <?php $this->endWidget();
$before = $BoxoCart->getBoxBefore($ddId, $data); ?> <div class="row text-danger before"> <div class="col-xs-1 quantity"> <?php echo $before->quantity; ?> </div> <div class="col-xs-5"> <h3><?php echo CHtml::encode($Box->BoxSize->box_size_label); ?> </h3> <span class="price item-price"> <?php echo SnapFormat::currency($Box->box_price); ?> ea. </span> </div> <div class="col-xs-4 price-col pull-right"> <span class="price sub-total"><?php echo CHtml::encode(SnapFormat::currency($before->total_price)); ?> </span> </div> </div> <?php } ?> </div>
public function actionConfirmOrder() { $BoxoCart = new BoxoCart(); $minDays = SnapUtil::config('boxomatic/minimumAdvancePayment'); $nextTotal = $BoxoCart->getNextTotal($minDays); if ($nextTotal !== 0) { Yii::app()->user->setFlash('danger', 'You must add at least <strong>' . SnapFormat::currency($nextTotal) . '</strong> to your account to do this.'); } else { $BoxoCart = new BoxoCart(); $BoxoCart->confirmOrder(); Yii::app()->user->setFlash('success', 'Your order has been updated.'); } $this->redirect(array('/shop/checkout')); }
?> </td> <td><?php echo SnapFormat::currency($bal); ?> </td> </tr> <?php } ?> <?php } ?> </tbody> <tfoot> <tr> <td></td> <td></td> <td><?php echo SnapFormat::currency($total); ?> </td> </tr> </tfoot> </table> <?php $this->endWidget(); ?> </div> </div>
public function getTotal_box_price() { $price = $this->Box->box_price * $this->quantity; return SnapFormat::currency($price); }
public function getLocation_and_delivery() { return $this->location_name . ' (' . SnapFormat::currency($this->location_delivery_value) . ')'; }
/** * */ public function actionRefund($custBox) { $CustBox = UserBox::model()->findByPk($custBox); if ($CustBox) { $Payment = new UserPayment(); $Payment->payment_value = 1 * ($CustBox->Box->box_price + $CustBox->delivery_cost); //make price a negative value for payment table $Payment->payment_type = 'CREDIT'; $Payment->payment_date = new CDbExpression('NOW()'); $Payment->user_id = $CustBox->user_id; $Payment->staff_id = Yii::app()->user->id; $note = 'REFUND FOR: 1 x ' . $CustBox->Box->BoxSize->box_size_name . ' Box @ ' . SnapFormat::currency($CustBox->Box->box_price); $tmpDel = (double) $CustBox->delivery_cost; if (!empty($tmpDel)) { $note .= ' + ' . SnapFormat::currency($tmpDel) . ' delivery'; } $Payment->payment_note = $note; $Payment->save(); $CustBox->delete(); Yii::app()->user->setFlash('success', "Customer box has been excluded for delivery and refunded."); } else { Yii::app()->user->setFlash('success', "Could not find the given Customer Box"); } $this->redirect(array('userBoxes', 'date' => $CustBox->Box->delivery_date_id)); }
<div class="col-sm-2"> <?php echo SnapFormat::datetime($data->payment_date, 'short'); ?> </div> <div class="col-sm-6"> <?php echo CHtml::encode($data->payment_note); ?> </div> <div class="col-sm-1"> <?php echo CHtml::encode($data->payment_type); ?> </div> <div class="col-sm-1 text-right"> <?php echo $data->payment_value > 0 ? SnapFormat::currency($data->payment_value) : ''; ?> </div> <div class="col-sm-1 text-right"> <?php echo $data->payment_value < 0 ? SnapFormat::currency(abs($data->payment_value)) : ''; ?> </div> <div class="col-sm-1 text-right"> <?php echo SnapFormat::currency($data->balance_at_date); ?> </div> </div>
</div> <?php if (!empty($data->description)) { ?> <span class="description"><?php echo $data->description; ?> </span> <?php } ?> <span class="price"> <?php echo CHtml::encode(SnapFormat::currency($data->item_sales_price)); ?> (<?php echo $data->unit_label; ?> ) </span> <?php echo $data->getQuantityInput($form, null, 1); ?> <?php echo CHtml::submitButton('Add to cart', array('class' => 'btn btn-default btn-xs', 'name' => 'add_to_cart')); ?> <?php $this->endWidget();
public function formatCurrency($value) { return SnapFormat::currency($value); }
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"> <div class="col-md-6"> <p>Delivery to: <strong><?php echo $Location->location_name; ?>
<?php echo $this->renderPartial('../orderItem/_view_cart', array('data' => $SP, 'form' => $form)); ?> <?php } ?> </div> <div class="inner"> <div class="row"> <div class="col-xs-8"> <strong>Total:</strong> </div> <div class="price-col col-xs-4"> <strong><?php echo SnapFormat::currency($BoxoCart->total); ?> </strong> </div> </div> </div> <?php echo CHtml::submitButton('Update Cart', array('class' => 'btn btn-sm btn-default pull-left', 'name' => 'update_cart')); ?> <?php echo !$cartEmpty ? CHtml::submitButton('Checkout', array('class' => 'btn btn-sm btn-success pull-right', 'name' => 'checkout')) : ''; ?> <?php } else {
<p>Your pickup/delivery location is <?php echo $UserBox->delivery_location; ?> .</p> <p>Your <?php echo Yii::app()->name; ?> account has been debited <?php echo SnapFormat::currency($UserBox->Box->box_price + $UserBox->delivery_cost); ?> </p> <p>Your current balance is <?php echo SnapFormat::currency($Customer->balance - $UserBox->Box->box_price + $UserBox->delivery_cost); ?> </p> <h3>Managing your <?php echo Yii::app()->name; ?> account</h3> <p>You can check your account status, add credit and view previous orders at: <a href="<?php echo $this->createAbsoluteUrl('/'); ?> "><?php echo $this->createAbsoluteUrl('/'); ?>
public function getFull_name_and_balance() { return $this->id . ': ' . $this->full_name . ' (' . SnapFormat::currency($this->balance) . ')'; }