change fax for 3rd party restaurants #2962
This commit is contained in:
parent
f39e154781
commit
814cad7ced
@ -178,30 +178,40 @@ if( $version == 'customer' ){
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? if ( $order->pay_type == 'card' && $order->tip ) : ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align:right">Tip <?php if( $order->tip_type != Crunchbutton_Order::TIP_NUMBER ) { echo $order->tip . '%'; } ?></td>
|
||||
<td>$<?=$order->tip()?></td>
|
||||
<?php if( $isDriverCockpit ) { ?>
|
||||
<td style="font-size:12px;color:#666;">
|
||||
$<?php echo number_format( 0, 2 ); ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? endif ; ?>
|
||||
<? if ( $order->restaurant()->delivery_fee ) : ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align:right">Delivery Fee</td>
|
||||
<td>$<?=$order->deliveryFee()?></td>
|
||||
<?php if( $isDriverCockpit ) { ?>
|
||||
<td style="font-size:12px;color:#666;">
|
||||
—
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? endif ; ?>
|
||||
<?php
|
||||
// change fax for 3rd party restaurants #2962
|
||||
$showTipAndDeliveryFee = !( $viewer == 'restaurant' && $order->restaurant()->delivery_service );
|
||||
|
||||
if( $showTipAndDeliveryFee ){
|
||||
if ( $order->pay_type == 'card' && $order->tip ) : ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align:right">Tip <?php if( $order->tip_type != Crunchbutton_Order::TIP_NUMBER ) { echo $order->tip . '%'; } ?></td>
|
||||
<td>$<?=$order->tip()?></td>
|
||||
<?php if( $isDriverCockpit ) { ?>
|
||||
<td style="font-size:12px;color:#666;">
|
||||
$<?php echo number_format( 0, 2 ); ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? endif ;
|
||||
}
|
||||
|
||||
if( $showTipAndDeliveryFee ){
|
||||
if ( $order->restaurant()->delivery_fee ) : ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align:right">Delivery Fee</td>
|
||||
<td>$<?=$order->deliveryFee()?></td>
|
||||
<?php if( $isDriverCockpit ) { ?>
|
||||
<td style="font-size:12px;color:#666;">
|
||||
—
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? endif ;
|
||||
}
|
||||
?>
|
||||
|
||||
<? if ( $order->restaurant()->fee_customer ) : ?>
|
||||
<tr>
|
||||
|
||||
@ -128,7 +128,25 @@ if( $this->cockpit_url ){
|
||||
<div class="xhatch separator-small"></div>
|
||||
|
||||
<?php
|
||||
echo $this->render('order/details',['set' => ['order' => $order, 'user' => $user, 'isDriverCockpit' => $isDriverCockpit, 'version' => $version ]]);
|
||||
$icon = '';
|
||||
if( $isDriverCockpit ){
|
||||
if( $version == 'restaurant' ){
|
||||
$icon = 'restaurant';
|
||||
} else if( $version == 'customer' ){
|
||||
$icon = 'customer';
|
||||
} else {
|
||||
$icon = 'driver';
|
||||
}
|
||||
} else {
|
||||
if( $user ){
|
||||
$icon = 'customer';
|
||||
} else {
|
||||
$icon = 'restaurant';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php echo $this->render('order/details',['set' => ['order' => $order, 'user' => $user, 'isDriverCockpit' => $isDriverCockpit, 'version' => $version, 'viewer' => $icon ]]);
|
||||
|
||||
;?>
|
||||
<br /><br />
|
||||
@ -152,24 +170,6 @@ if( $this->cockpit_url ) { ?>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$icon = '';
|
||||
if( $isDriverCockpit ){
|
||||
if( $version == 'restaurant' ){
|
||||
$icon = 'restaurant';
|
||||
} else if( $version == 'customer' ){
|
||||
$icon = 'customer';
|
||||
} else {
|
||||
$icon = 'driver';
|
||||
}
|
||||
} else {
|
||||
if( $user ){
|
||||
$icon = 'customer';
|
||||
} else {
|
||||
$icon = 'restaurant';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="xhatch separator-big" style="text-align:right!important;">
|
||||
<?php if( $icon != '' ) { ?>
|
||||
<img style="margin:4px 4px 0 0" src="<?=$this->helper('ImageBase64')->output(c::config()->dirs->www.'/assets/images/mprinter/ico-'. $icon . '.png')?>">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user