// Update Accounting form
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10226 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -24,18 +24,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.datepicker').datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{if $existingExport}
|
||||
<div class="hint" style="display:block;">
|
||||
{l s='The last export has been for this section:'}
|
||||
@@ -51,10 +39,10 @@
|
||||
|
||||
<label for="beginDate">{l s='Begin to:'}</label>
|
||||
<div class="margin-form">
|
||||
<input class="datepicker" id="beginDate" type="text" value="" name="beginDate" />
|
||||
<input class="datepicker" id="beginDate_{$type}" type="text" name="beginDate" value="{$begin_date}" />
|
||||
</div>
|
||||
|
||||
<label for="endDate">{l s='End to:'}</label>
|
||||
<div class="margin-form">
|
||||
<input class="datepicker" id="endDate" type="text" value="" name="endDate" />
|
||||
<input class="datepicker" id="endDate_{$type}" type="text" name="endDate" value="{$end_date}" />
|
||||
</div>
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
<div class="formAccountingExport" id="block_global_export">
|
||||
<fieldset>
|
||||
<legend>{$title}</legend>
|
||||
<form action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
<form id="reconfiliation_form" action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
{include file="$pathAccountExportTpl/common_form.tpl"}
|
||||
<label for="clientPrefix">{l s='Journal:'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="journal" />
|
||||
<input type="text" name="journal" value="{$journal}"/>
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input id="submitGlobalExport" type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input type="hidden" name="exportType" value="global_export"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -40,6 +40,23 @@
|
||||
});
|
||||
});
|
||||
$('#' + '{$defaultType}').fadeIn('fast');
|
||||
|
||||
$('.datepicker').each(function() {
|
||||
console.log($(this));
|
||||
$(this).datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
|
||||
$('.formAccountingExport form input[type="submit"]').each(function()
|
||||
{
|
||||
$(this).click(function() {
|
||||
dateRegex = /^[2-9]\d{2}-\d{3}-\d{4}$/
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
<div class="formAccountingExport" id="block_reconciliation_export">
|
||||
<fieldset>
|
||||
<legend>{$title}</legend>
|
||||
<form action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
<form id="reconfiliation_form" action="{$smarty.server.REQUEST_URI}" method="POST">
|
||||
{include file="$pathAccountExportTpl/common_form.tpl"}
|
||||
|
||||
<div class="margin-form">
|
||||
<input type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input id="submitReconciliationExport" type="submit" class="button" name="submitAccountingExportType" />
|
||||
<input type="hidden" name="exportType" value="reconciliation_export"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
<legend>{l s='Account number'}</legend>
|
||||
<div class="hint" style="display:block">
|
||||
{l s='Configure the account number by zone for:'} <b>{$shop['name']}</b>.
|
||||
{l s='If a zone field is empty it will use the default number set.'}
|
||||
</div>
|
||||
<br />
|
||||
<form id="{$table}_form" method="POST" action="{$smarty.server.REQUEST_URI}">
|
||||
<label>{l s='Default number for this shop'}</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="default_account_number" value="{$shop['default_account_number']}" />
|
||||
<p>{l s='If a zone field is empty it will use this default number.'}</p>
|
||||
</div>
|
||||
{foreach from=$shop['zones'] key=id_zone item=currentZone}
|
||||
<label>{$currentZone['name']}</label>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<fieldset>
|
||||
<legend>{l s='Account number'}</legend>
|
||||
<div class="hint" style="display:block">
|
||||
{l s='Configure the account number of the product for each zone, if a field is empty, it will use the default one of the shop set in the Accounting Management tab :'}
|
||||
{l s='Configure the account number of the product for each zone, if a field is empty, it will use the default one of the shop set in the Accounting Management tab'}
|
||||
</div>
|
||||
<br />
|
||||
{foreach from=$productAccountNumberList['zones'] key=id_zone item=currentZone}
|
||||
@@ -43,6 +43,9 @@
|
||||
<input type="submit" class="button" name="submitAccountingDetails" />
|
||||
</div>
|
||||
</form>
|
||||
<div style="text-align:left; font-size:11px;">
|
||||
<i>{l s='Theses fields are used for the accounting export'}</i>
|
||||
</div>
|
||||
<div class="separation"></div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
@@ -154,6 +154,9 @@ class AdminAccountingExportControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'clientPrefix' => Configuration::get('ACCOUNTING_CLIENT_PREFIX_EXPORT'),
|
||||
'journal' => Configuration::get('ACCOUNTING_JOURNAL_EXPORT'),
|
||||
'begin_date' => Tools::getValue('beginDate'),
|
||||
'end_date' => Tools::getValue('endDate'),
|
||||
'pathAccountExportTpl' => $this->pathAccountExportTpl,
|
||||
'urlDownload' => Tools::getShopDomain().'/download/'
|
||||
));
|
||||
@@ -201,6 +204,7 @@ class AdminAccountingExportControllerCore extends AdminController
|
||||
break;
|
||||
case 'global_export':
|
||||
$this->runGlobalExport();
|
||||
Configuration::updateValue('ACCOUNTING_JOURNAL_EXPORT', Tools::getValue('journal'));
|
||||
break;
|
||||
default:
|
||||
// If not defined, set export type to default
|
||||
|
||||
Reference in New Issue
Block a user