示例#1
0
                $taxCat = \Pasteque\TaxesService::get($product->taxCatId);
                $tax = $taxCat->getCurrentTax();
                $price = $value / (1 + $tax->rate);
                $area->addPrice($productId, $price);
            }
        }
        if ($srv->create($area)) {
            $message = \i18n("Changes saved");
        } else {
            $error = \i18n("Unable to save changes");
        }
    }
}
$area = null;
if (isset($_GET['id'])) {
    $area = $srv->get($_GET['id']);
}
$categories = \Pasteque\CategoriesService::getAll();
$products = \Pasteque\ProductsService::getAll(true);
?>
<h1><?php 
\pi18n("Tariff area", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<form class="edit" action="<?php 
echo \Pasteque\get_current_url();