} } } $product = NULL; $vatprice = ""; $price = ""; if (isset($_GET['id'])) { $product = \Pasteque\ProductsService::get($_GET['id']); $taxCat = \Pasteque\TaxesService::get($product->taxCatId); $tax = $taxCat->getCurrentTax(); $vatprice = $product->priceSell * (1 + $tax->rate); $price = sprintf("%.2f", $product->priceSell); } $taxes = \Pasteque\TaxesService::getAll(); $categories = \Pasteque\CategoriesService::getAll(); $providers = \Pasteque\ProvidersService::getAll(); $level = NULL; if ($stocks === TRUE && $product != NULL) { $level = \Pasteque\StocksService::getLevel($product->id); } ?> <h1><?php \pi18n("Edit a product", PLUGIN_NAME); ?> </h1> <?php \Pasteque\tpl_msg_box($message, $error); ?> <form class="edit" action="<?php