107 lines
6.1 KiB
PHP
107 lines
6.1 KiB
PHP
<?php
|
|
use_helper('stCurrency', 'stOrder', 'stPrice', 'stJQueryTools', 'stProductImage', 'stDiscount');
|
|
sfLoader::loadHelpers('stProduct');
|
|
/**
|
|
* @var Order $order
|
|
*/
|
|
?>
|
|
<font size="8">
|
|
<table border="1" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td>
|
|
<table border="0" cellspacing="0" cellpadding="4" width="502">
|
|
<tr>
|
|
<td bgcolor="#ccc">
|
|
<b><?php echo __('Produkty'); ?></b>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table border="0" cellpadding="4" cellspacing="0" width="502">
|
|
<tr>
|
|
<td width="65" bgcolor="#eee" align="left">
|
|
<?php echo __('Kod') ?>
|
|
</td>
|
|
<td width="<?php if ($order_for_points == 1) : echo "90";
|
|
else : echo "150";
|
|
endif; ?>" bgcolor="#eee" align="left">
|
|
<?php echo __('Nazwa') ?>
|
|
</td>
|
|
<td width="66" bgcolor="#eee" align="right">
|
|
<?php echo __('Netto') ?>
|
|
</td>
|
|
<td width="30" bgcolor="#eee" align="right">
|
|
<?php echo __('Vat') ?>
|
|
</td>
|
|
<td width="66" bgcolor="#eee" align="right">
|
|
<?php echo __('Brutto') ?>
|
|
</td>
|
|
<?php if ($order_for_points == 1) : ?>
|
|
<td width="70" bgcolor="#eee" align="right">
|
|
<?php echo $config_points->get('points_shortcut', null, true) ?>
|
|
</td>
|
|
<?php endif; ?>
|
|
<td width="45" bgcolor="#eee" align="right">
|
|
<?php echo __('Ilość') ?>
|
|
</td>
|
|
<td width="80" bgcolor="#eee" align="right">
|
|
<?php echo __('Suma') ?>
|
|
</td>
|
|
</tr>
|
|
<?php $totalPriceBrutto = 0; ?>
|
|
<?php $total_points_value = 0; ?>
|
|
<?php foreach ($order->getOrderProducts() as $index => $product) : ?>
|
|
|
|
<?php if ($product->getProductForPoints() == 1) : $total_points_value += $product->getPointsValue() * $product->getQuantity();
|
|
endif; ?>
|
|
|
|
<?php $brutto = ($product->getPrice(true)); ?>
|
|
<tr>
|
|
<td width="65" style="text-align:left;">
|
|
<?php echo $product->getCode(); ?>
|
|
</td>
|
|
<td width="<?php if ($order_for_points == 1) : echo "90";
|
|
else : echo "150";
|
|
endif; ?>" style="text-align:left;">
|
|
<?php echo strip_tags($product->getName()); ?><?php if ($product->getOptions()) : ?><?php st_order_display_product_options($product) ?><?php endif; ?>
|
|
</td>
|
|
<td width="66" style="text-align:right;">
|
|
<?php if ($product->getProductForPoints() == 1) : echo "-";
|
|
else : echo st_order_product_price($product);
|
|
endif; ?>
|
|
</td>
|
|
<td width="30" style="text-align:right;">
|
|
<?php if ($product->getProductForPoints() == 1) : echo "-";
|
|
else : echo $product->getVat() . "%";
|
|
endif; ?>
|
|
</td>
|
|
<td width="66" style="text-align:right;">
|
|
<span><?php if ($product->getProductForPoints() == 1) : echo "-";
|
|
else : echo st_order_product_price($product, true);
|
|
endif; ?></span>
|
|
</td>
|
|
<?php if ($order_for_points == 1) : ?><td width="70" style="text-align:right;">
|
|
<span><?php if ($product->getProductForPoints() == 1) : echo $product->getPointsValue();
|
|
else : echo "-";
|
|
endif; ?></span>
|
|
</td><?php endif; ?>
|
|
<td width="45" style="text-align:right;">
|
|
<?php echo $product->getQuantity(); ?> <?php echo st_product_uom($product->getProduct()) ?>
|
|
</td>
|
|
<td width="80" style="text-align:right;">
|
|
<?php if ($product->getProductForPoints() == 1) : echo $product->getPointsValue() * $product->getQuantity();
|
|
echo " " . $config_points->get('points_shortcut', null, true);
|
|
else : echo st_order_product_total_amount($product, true);
|
|
endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr>
|
|
<td colspan="5" width="502" bgcolor="#eee" align="right" style="margin-right: 25px;">
|
|
<?php echo __('Łączna wartość'); ?>: <b><?php echo st_order_product_total_amount($order, true, false) ?> <?php if ($total_points_value > 0) : ?><br /> <?php echo $total_points_value . " " . $config_points->get('points_shortcut', null, true); ?> <?php endif; ?></b>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</font>
|