first commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<br/>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="440">
|
||||
<tr>
|
||||
<td width="10px"></td>
|
||||
|
||||
<td>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="1" width="270px">
|
||||
|
||||
<tr>
|
||||
<td height="14" style="text-align:center;" bgcolor="#ccc"><b><?php echo __('Dane dostawy:') ?></b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
|
||||
<?php echo $orderUserDataDelivery->getCompany(); ?> <?php echo $orderUserDataDelivery->getName(); ?> <?php echo $orderUserDataDelivery->getSurname(); ?><br />
|
||||
<?php echo $orderUserDataDelivery->getStreet(); ?> <?php echo $orderUserDataDelivery->getHouse(); ?> <?php echo $orderUserDataDelivery->getFlat() ? "/" : null ?> <?php echo $orderUserDataDelivery->getFlat() ?><br />
|
||||
<?php echo $orderUserDataDelivery->getCode(); ?> <?php echo $orderUserDataDelivery->getTown(); ?> <?php echo $orderUserDataDelivery->getCountry(); ?><br />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
@@ -0,0 +1,40 @@
|
||||
<font>
|
||||
<table cellspacing="0" cellpadding="0" width="502">
|
||||
<tr>
|
||||
<td align="left" width="200"><font size="14"><b><?php echo __('Zamówienie nr:') ?> <?php echo $order->getNumber(); ?></b></font><br/><font size="10"><?php echo $order->getCreatedAt(); ?><br/><?php echo $_SERVER['HTTP_HOST']; ?></font><br/> </td>
|
||||
<td align="right" width="302"><font size="8">
|
||||
<?php echo $config->get('company'); ?><br/>
|
||||
<?php if ($config->get('nip')!=""): ?>
|
||||
<?php echo __('NIP') ?>: <?php echo $config->get('nip'); ?><br/>
|
||||
<?php endif ?>
|
||||
<?php echo $config->get('street'); ?><?php echo $config->get('house') ? " ".$config->get('house') : "" ?><?php echo $config->get('flat') ? " / ".$config->get('flat') : "" ?><br/>
|
||||
<?php echo $config->get('code'); ?> <?php echo $config->get('town'); ?><br/>
|
||||
<?php if ($config->get('phone')!=""): ?>
|
||||
<?php echo __('Telefon') ?>: <?php echo $config->get('phone'); ?><br/>
|
||||
<?php endif ?>
|
||||
<?php if ($config->get('fax')!=""): ?>
|
||||
<?php echo __('Fax') ?>: <?php echo $config->get('fax'); ?><br/>
|
||||
<?php endif ?>
|
||||
<?php if ($config->get('bank')!=""): ?>
|
||||
<?php echo __('Konto') ?>: <?php echo $config->get('bank'); ?><br/>
|
||||
<?php endif ?>
|
||||
<?php echo $config->get('email'); ?><br/>
|
||||
</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" width="502">
|
||||
<tr>
|
||||
<td><?php echo __('Email klienta:') ?> <b><?php echo $order->getOptClientEmail(); ?></b></td>
|
||||
</tr>
|
||||
<?php if($order->getSfGuardUser()->getWholesale()): ?>
|
||||
<tr>
|
||||
<td><?php echo __('Grupa hurtowa:') ?> <b><?php echo strtoupper($order->getSfGuardUser()->getWholesale()); ?></b></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (stConfig::getInstance('stOrder')->get('show_not_professional_purchase') && !empty($order->getOrderUserDataBilling()->getCompany())): ?>
|
||||
<tr>
|
||||
<td><?php echo __("Zakup o charakterze zawodowym", null, 'stUserData') ?>: <b><?php echo $order->getOrderUserDataBilling()->getNotProfessionalPurchaseLabel() ?></b></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</table>
|
||||
</font>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php use_helper('stCurrency', 'stOrder', 'stDelivery');?>
|
||||
<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 __('Dane dostawy') ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0" width="502">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="260" bgcolor="#eee" align="left"><?php echo __('Rodzaj dostawy') ?></th>
|
||||
<th width="130" bgcolor="#eee" align="left"><?php if($order->getOrderDelivery()->getNumber()!=""): ?><?php echo __('Numer przesyłki:') ?><?php endif; ?></th>
|
||||
<th width="112" bgcolor="#eee" align="right"><?php echo __('Koszt przesyłki') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="260" align="left">
|
||||
<?php echo strip_tags($order->getOrderDelivery()->getNameTranslated($sf_user->getCulture(), true)); ?>
|
||||
</td>
|
||||
<td width="130" align="left"><?php if($order->getOrderDelivery()->getNumber()!=""): ?><?php echo $order->getOrderDelivery()->getNumber(); ?><?php endif; ?></td>
|
||||
<td width="112" align="right"><?php echo st_order_delivery_cost($order, true) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php if($order->getDescription()!=""): ?>
|
||||
<table border="1" cellspacing="0" cellpadding="4" width="502">
|
||||
<tr>
|
||||
<td bgcolor="#ccc"><font size="8"><b><?php echo __('Uwagi klienta') ?></b></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font size="8"><?php echo $order->getDescription(); ?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
use_helper('Helper', 'stOrder', 'stCurrency');
|
||||
/**
|
||||
* @var Order $order
|
||||
*/
|
||||
?>
|
||||
|
||||
<table cellspacing="0" cellpadding="4" width="502">
|
||||
<?php if ($order->getDiscountCouponCode()) : ?>
|
||||
<tr>
|
||||
<td align="right"><?php echo __('Kod rabatowy') ?>: <?php echo $order->getDiscountCouponCode()->getCode() ?> (<?php echo $order->getDiscountCouponCode()->getDiscount() ?>%)</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ($order->getDiscount()) : ?>
|
||||
<tr>
|
||||
<td align="right"><?php echo __('Łączna wartość') ?>: <?php echo st_order_price_format($order->getTotalAmountWithDelivery(true, true, false), $order->getOrderCurrency()) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><?php echo __('Udzielony rabat') ?> (<?php echo $order->getDiscount()->getName() ?>): -<?php echo st_order_price_format($order->getTotalProductDiscountAmount(true, true), $order->getOrderCurrency()) ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($order->getPaidAmount() > 0): ?>
|
||||
<tr>
|
||||
<td align="right"><?php echo __('Zapłacono') ?>: <?php echo st_order_price_format($order->getPaidAmount(), $order->getOrderCurrency()) ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<td align="right"><?php echo __('Razem do zapłaty') ?>: <font size="16"><b><?php echo st_order_price_format($order->getUnpaidAmount(), $order->getOrderCurrency()) ?><?php if ($total_points_value > 0): ?><br /><?php echo $total_points_value . " " . $config_points->get('points_shortcut', null, true); ?><?php endif ?></b></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
107
apps/frontend/modules/stOrderPrintPdf/templates/_order_items.php
Normal file
107
apps/frontend/modules/stOrderPrintPdf/templates/_order_items.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php use_helper('stCurrency');?>
|
||||
<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 __('Dane płatności') ?></b>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table border="0" cellspacing="0" cellpadding="4" width="502">
|
||||
<thead>
|
||||
<tr>
|
||||
<th bgcolor="#eee" width="120"><?php echo __('Data dokonania płatności') ?></th>
|
||||
<th bgcolor="#eee" width="242"><?php echo __('Typ płatności') ?></th>
|
||||
<th bgcolor="#eee" width="60"><?php echo __('Status') ?></th>
|
||||
<th bgcolor="#eee" width="80" align="right"><?php echo __('Kwota') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($order->getOrderPayments() as $payment): ?>
|
||||
<tr>
|
||||
<td width="120"><?php echo $payment->getPayedAt() ?></td>
|
||||
<td width="242"><?php echo $payment->getPaymentType() ?></td>
|
||||
<td width="60">
|
||||
<?php if ($payment->getStatus()): ?>
|
||||
<?php echo __('Rozliczona') ?>
|
||||
<?php else: ?>
|
||||
<?php echo __('Nierozliczona') ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td width="80" align="right"><?php echo st_order_price_format($payment->getAmount(), $order->getOrderCurrency());?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
$culture = sfContext::getInstance()->getUser()->getCulture();
|
||||
$first = true;
|
||||
|
||||
if (!function_exists('addNewLine'))
|
||||
{
|
||||
function addNewLine(&$first)
|
||||
{
|
||||
if (!$first)
|
||||
{
|
||||
echo "<br />";
|
||||
}
|
||||
|
||||
$first = false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<font>
|
||||
<table cellpadding="8" cellspacing="0" border="1" width="100%">
|
||||
<tr>
|
||||
<td style="background-color: #ccc;"><?php echo $user_data instanceof OrderUserDataBilling ? __('Dane billingowe') : __('Dane dostawy') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="<?php echo $height ?>">
|
||||
<?php if ($user_data->getCompany()): ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getCompany(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($user_data->getVatNumber()): ?>
|
||||
<?php addNewLine($first) ?><?php echo __('NIP') ?>: <?php echo $user_data->getVatNumber(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($user_data->getFullName()): ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getFullName(); ?>
|
||||
<?php endif; ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getAddress(); ?>
|
||||
<?php if ($user_data->getAddressMore()): ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getAddressMore(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($user_data->getRegion()): ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getRegion(); ?>
|
||||
<?php endif; ?>
|
||||
<?php addNewLine($first) ?><?php echo $user_data->getCode(); ?> <?php echo $user_data->getTown(); ?> <?php echo sfI18n::getCountry($user_data->getCountry()->getIsoA2(), $culture); ?>
|
||||
<?php if ($user_data instanceof OrderUserDataBilling && $user_data->getPesel()): ?>
|
||||
<?php addNewLine($first) ?><?php echo __('PESEL') ?>: <?php echo $user_data->getPesel(); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($user_data->getPhone()): ?>
|
||||
<?php addNewLine($first) ?><?php echo __('tel') ?>: <?php echo $user_data->getPhone(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</font>
|
||||
Reference in New Issue
Block a user