Fix action in journal
This commit is contained in:
parent
2c795da664
commit
f978b0795a
@ -75,7 +75,7 @@ $date_endyear = GETPOST('date_endyear');
|
|||||||
$in_bookkeeping = GETPOST('in_bookkeeping');
|
$in_bookkeeping = GETPOST('in_bookkeeping');
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0 && empty($id_journal))
|
if ($user->societe_id > 0 && empty($id_journal))
|
||||||
@ -612,7 +612,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'exportcsv') {
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
@ -760,7 +760,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
console.log("Set value into form and submit");
|
console.log("Set value into form and submit");
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $langs->load("main");
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
$id_journal = GETPOST('id_journal', 'int');
|
$id_journal = GETPOST('id_journal', 'int');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
$date_startmonth = GETPOST('date_startmonth');
|
$date_startmonth = GETPOST('date_startmonth');
|
||||||
$date_startday = GETPOST('date_startday');
|
$date_startday = GETPOST('date_startday');
|
||||||
@ -391,7 +391,7 @@ $companystatic = new Fournisseur($db);
|
|||||||
$invoicestatic = new FactureFournisseur($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'exportcsv') {
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $langs->load("main");
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
$id_journal = GETPOST('id_journal', 'int');
|
$id_journal = GETPOST('id_journal', 'int');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
$date_startmonth = GETPOST('date_startmonth');
|
$date_startmonth = GETPOST('date_startmonth');
|
||||||
$date_startday = GETPOST('date_startday');
|
$date_startday = GETPOST('date_startday');
|
||||||
@ -404,7 +404,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'exportcsv') {
|
||||||
|
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||||
@ -529,7 +529,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
|
||||||
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
|
||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user