first commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<?php echo input_hidden_tag('tax[edit_is_default]', $tax->getIsDefault()) ?>
|
||||
<?php echo st_admin_checkbox_tag('tax[edit_is_default]', 1, $tax->getIsDefault(), array('disabled' => $tax->getIsDefault())) ?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php if (!empty($requiredRates)): ?>
|
||||
<?php echo st_admin_table_start() ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 200px"><?php echo __("Kraj dostawy wg konfiguracji") ?></th>
|
||||
<th><?php echo __("Stawka VAT") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($countries as $countryCode => $country):
|
||||
if (!isset($requiredRates[$countryCode])) continue;
|
||||
$rates = $requiredRates[$countryCode];
|
||||
$value = isset($values[$countryCode]) && $values[$countryCode] !== "" ? $values[$countryCode] : null;
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align: right"><b><?php echo $country ?></b></td>
|
||||
<td><?php echo select_tag('tax[rates_by_country]['.$countryCode.']', options_for_select($rates, $value, array('include_custom' => '---')), array(
|
||||
'class' => null !== $value ? 'not-required' : '',
|
||||
'style' => 'width: 200px',
|
||||
)) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
<?php echo st_admin_table_end() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php echo st_admin_table_start(array(
|
||||
array('label' => __("Kraj"), 'options' => array('style' => 'width: 200px')),
|
||||
array('label' => __("Stawka VAT")),
|
||||
), array('style' => 'margin-top: 10px')) ?>
|
||||
<tbody>
|
||||
<?php foreach ($countries as $countryCode => $country): if (!isset($moreRates[$countryCode])) continue; $rates = $moreRates[$countryCode] ?>
|
||||
<tr>
|
||||
<td style="text-align: right"><?php echo $country ?></td>
|
||||
<td><?php echo select_tag('tax[rates_by_country]['.$countryCode.']', options_for_select($rates, isset($values[$countryCode]) ? $values[$countryCode] : null, array('include_custom' => '---')), array('style' => 'width: 200px', 'class' => 'not-required')) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
<?php echo st_admin_table_end() ?>
|
||||
13
plugins/stTaxPlugin/modules/stTaxBackend/templates/_vat.php
Normal file
13
plugins/stTaxPlugin/modules/stTaxBackend/templates/_vat.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
echo object_input_tag($tax, $method, array(
|
||||
'size' => 7,
|
||||
'control_name' => $name,
|
||||
'disabled' => $tax->getIsSystemDefault(),
|
||||
));
|
||||
|
||||
if ($tax->getIsSystemDefault())
|
||||
{
|
||||
echo input_hidden_tag($name, $tax->$method());
|
||||
}
|
||||
?> %
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?php echo $tax->getVat() ?> %
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
<?php
|
||||
echo object_input_tag($tax, $method, array(
|
||||
'size' => 14,
|
||||
'control_name' => $name,
|
||||
'disabled' => $tax->getIsSystemDefault(),
|
||||
));
|
||||
|
||||
if ($tax->getIsSystemDefault())
|
||||
{
|
||||
echo input_hidden_tag($name, $tax->$method());
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php use_helper('stAdminGenerator') ?>
|
||||
|
||||
<?php st_include_partial('stTaxBackend/header', array('related_object' => $tax, 'title' => __('Edycja stawki VAT'), 'route' => 'stTaxBackend/edit?id='.$tax->getId())) ?>
|
||||
|
||||
<div id="sf_admin_content">
|
||||
<div class="form-errors">
|
||||
<h2><?php echo __('Wykryto zmiane stawki VAT z %from%% na %to%%. Wybierz metodę przeliczenia obecnych cen w sklepie', array('%from%' => $tax->getVat(), '%to%' => $sf_request->getParameter('tax[vat]'))) ?></h2>
|
||||
</div>
|
||||
<form class="admin_form" id="admin_edit_form" action="<?php echo st_url_for('stTaxBackend/edit?id='.$tax->getId()) ?>" method="post">
|
||||
<fieldset>
|
||||
<div class="content">
|
||||
<?php
|
||||
foreach ($sf_request->getParameter('tax') as $name1 => $value1)
|
||||
{
|
||||
if (is_array($value1))
|
||||
{
|
||||
foreach ($value1 as $name2 => $value2)
|
||||
{
|
||||
echo input_hidden_tag('tax['.$name1.']['.$name2.']', $value2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo input_hidden_tag('tax['.$name1.']', $value1);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php echo st_admin_get_form_field('update_price', __('Przelicz').':', array('brutto' => __('netto na brutto'), 'netto' => __('brutto na netto')), 'select_tag', array(
|
||||
'help' => __('<b>netto na brutto</b> - ceny brutto ulegną zmianie<br/><b>brutto na netto</b> - ceny netto ulegną zmianie')
|
||||
.'<br /><b>'.__('przeliczeniu ulegną').':</b><ul style="list-style: circle inside"><li>'.__('ceny produktów').'</li><li>'.__('koszty dostaw').'</li></ul>')); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo st_get_admin_actions_head(); ?>
|
||||
<?php echo st_get_admin_action('reset', __('Anuluj', null, 'stAdminGeneratorPlugin'), 'stTaxBackend/edit?id='.$tax->getId()); ?>
|
||||
<?php echo st_get_admin_action('save', __('Zapisz', null, 'stAdminGeneratorPlugin')); ?>
|
||||
<?php echo st_get_admin_actions_foot(); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php st_include_partial('stTaxBackend/footer', array('related_object' => $tax)) ?>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php use_helper('stProgressBar', 'stAdminGenerator', 'stUrl'); ?>
|
||||
|
||||
<?php echo st_get_admin_head('stTaxPlugin', null, __('Zarządzaj stawkami VAT'), array('stMailPlugin')) ?>
|
||||
|
||||
<div id="sf_admin_content">
|
||||
<h2 id="st_admin_title"><?php echo __('Przeliczanie cen dla stawki VAT %tax%%', array('%tax%' => $tax->getVat())) ?></h2>
|
||||
<p><?php echo __('Aktualizacja cen została zakończona pomyślnie.<br/>%return_link%', array('%return_link%' => st_link_to(__('Powróć do edycji'),'stTaxBackend/edit?id='.$this->tax['id']))); ?></p>
|
||||
</div>
|
||||
<br class="st_clear_all" />
|
||||
<?php echo st_get_admin_foot() ?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php use_helper('stProgressBar', 'stAdminGenerator'); ?>
|
||||
|
||||
<?php st_include_partial('stTaxBackend/header', array('related_object' => $tax, 'title' => $title, 'route' => 'stTaxBackend/edit?id='.$tax->getId())) ?>
|
||||
|
||||
<style type="text/css">
|
||||
#tax_progress_bar {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#tax_progress_bar .stPrograssBar-main-div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="sf_admin_content">
|
||||
<div class="fieldset" id="tax_progress_bar">
|
||||
<?php if (isset($params['type'])): ?>
|
||||
<?php echo progress_bar('stTax', 'stTaxProgressBar', 'updateProductPrice', $steps); ?>
|
||||
<?php else: ?>
|
||||
<p><?php echo __('Aktualizacja cen została zakończona pomyślnie.<br/>%return_link%', array('%return_link%' => st_link_to(__('Powróć do edycji'),'stTaxBackend/edit?id='.$tax->getId()))); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php st_include_partial('stTaxBackend/footer', array('related_object' => $tax)) ?>
|
||||
Reference in New Issue
Block a user