<?php
/**
* Product: Katyshop
* @version 0.3.2.1
* @author Catalin Hulea - hide@address.com
* @copyright Copyright (C) 2007 Catalin Hulea
* @license GNU General Public License version 3
* You can find a copy of GNU GPL v3 at this path: /docs/LICENSE
* @link https://sourceforge.net/projects/katyshop
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once(dirname(__FILE__) . "/init.php");
?>
<html>
<head>
<title><?php echo APP_NAME; ?></title>
<?php require_once(WEB_DIR . "/includes/html_head.php"); ?>
</head>
<body>
<div id="container">
<?php require_once(WEB_DIR . "/includes/header.php"); ?>
<div id="middle">
<div id="left_vertical_line">
<?php require_once(WEB_DIR . "/includes/left.php"); ?>
<div id="content">
<h1>Procesare comanda</h1>
<?php require_once(WEB_DIR . "/includes/print_messages.php"); ?>
<dl>
<dt class="title"><b>Cos de cumparaturi</b></dt>
<dd>
<?php
$basket = Application::getShoppingCart();
if($basket->getProductsCount() == 0)
{
?>
Cosul este gol
<?php
}
else
{
$basket->computeValue();
$vat = Application::getConfigValue("default_vat");
$df = new DateFormat();
$cfgDf = Application::getConfigValue("date_format");
?>
<form action="formparser/order.php?action=update_basket" method="post" id="frm_update_basket">
Procent TVA: <?php echo Escape::html($vat); ?> % <br>
Data: <?php echo Escape::html($df->displayDate($cfgDf["date"], $cfgDf["separator_date"])); ?> <br>
Titlu: <input type="text" name="title" value="<?php echo Escape::htmlValue($basket->title); ?>">
<table style="text-align: right; " cellpadding="2" cellspacing="0" class="cuborder">
<tr align="center">
<th> </th>
<th>Nr.</th>
<th>Produs</th>
<th>U. M. </th>
<th>Cantitate</th>
<th><nobr>Pret unitar<nobr><br><nobr>(fara TVA)</nobr><br><nobr>- <?php echo Escape::html(Application::getConfigValue("default_currency")); ?> -</nobr></th>
<th><nobr>Valoare<nobr><br><nobr>(fara TVA)</nobr><br><nobr>- <?php echo Escape::html(Application::getConfigValue("default_currency")); ?> -</nobr></th>
<th>Valoare<br>TVA<br><nobr>- <?php echo Escape::html(Application::getConfigValue("default_currency")); ?> -</nobr></th>
<th><nobr>Valoare<nobr><br><nobr>(fara TVA)</nobr><br><nobr>- <?php echo Escape::html(Application::getConfigValue("default_currency")); ?> -</nobr></th>
</tr>
<tr align="center">
<th> </th>
<th> </th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5 (3x4)</th>
<th>6</th>
<th>7</th>
</tr>
<?php
for($i = 0; $i < $basket->getProductsCount(); $i++)
{
$op = $basket->getOrderProduct($i + 1);
?>
<tr>
<td><a href="javascript:removeProduct('<?php echo Escape::js($op->line_number); ?>'); " title="remove product"><img src="img/icons/delete.png" alt="sterge produs"></a></td>
<td>
<input type="hidden" name="line_number[]" value="<?php echo Escape::htmlValue($op->line_number); ?>">
<?php echo Escape::html($op->line_number); ?>
</td>
<td align="center">
<input type="hidden" name="id_product[]" value="<?php echo Escape::htmlValue($op->id_product); ?>">
<a href="product.php?id_product=<?php echo Escape::htmlValue($op->id_product); ?>"><?php echo Escape::html($op->product_name); ?></a>
</td>
<td><?php echo Escape::html($op->measuring_unit); ?> </td>
<td><input type="text" name="quantity[]" value="<?php echo Escape::htmlValue(displayPrice($op->quantity)); ?>" style="width: 50px; text-align: right; " onfocus="this.select(); "></td>
<td><?php echo Escape::html(displayPrice($op->price)); ?></td>
<td><?php echo Escape::html(displayPrice($op->value_without_vat)); ?></td>
<td><?php echo Escape::html(displayPrice($op->value_vat)); ?></td>
<td style="font-weight: bold; "><?php echo Escape::html(displayPrice($op->value_total)); ?></td>
</tr>
<?php
}
?>
<tr align="center" style="font-weight: bold; ">
<td colspan="5" align="right"><input type="submit" value="Actualizati" class="button" style="font-weight: normal; "></td>
<th>TOTAL: </th>
<td><?php echo Escape::html(displayPrice($basket->value_without_vat)); ?></td>
<td><?php echo Escape::html(displayPrice($basket->value_vat)); ?></td>
<td> </td>
</tr>
<tr align="center" style="font-weight: bold; color: red; ">
<td colspan="6" align="right" style="font-size: larger; ">
<nobr>Total de plata:</nobr><br>
<nobr>(col. 5 + col. 6)</nobr><br>
</td>
<td colspan="3" style="font-size: larger; ">
<nobr><?php echo Escape::html(displayPrice($basket->value_total)); ?> <?php echo Escape::html(Application::getConfigValue("default_currency")); ?></nobr>
</td>
</tr>
<tr>
<td colspan="9" align="right">
<input type="hidden" name="next_step" value="0">
<input type="button" value="Trimiteti comanda" onclick="sendOrder(); " class="button" style="font-weight: bold; ">
</td>
</tr>
</table>
</form>
<?php
}
?>
</dd>
</dl>
</div>
<?php require_once(WEB_DIR . "/includes/right.php"); ?>
<?php require_once(WEB_DIR . "/includes/footer.php"); ?>
</div>
</div>
</div>
</body>
</html>