Fix refresh of list when change were done
This commit is contained in:
parent
1735a649e9
commit
248717ccac
@ -57,13 +57,13 @@ $langs->loadLangs(array("companies","other","compta","banks",'bills','donations'
|
|||||||
// Multi journal
|
// Multi journal
|
||||||
$id_journal = GETPOST('id_journal', 'int');
|
$id_journal = GETPOST('id_journal', 'int');
|
||||||
|
|
||||||
$date_startmonth = GETPOST('date_startmonth');
|
$date_startmonth = GETPOST('date_startmonth','int');
|
||||||
$date_startday = GETPOST('date_startday');
|
$date_startday = GETPOST('date_startday','int');
|
||||||
$date_startyear = GETPOST('date_startyear');
|
$date_startyear = GETPOST('date_startyear','int');
|
||||||
$date_endmonth = GETPOST('date_endmonth');
|
$date_endmonth = GETPOST('date_endmonth','int');
|
||||||
$date_endday = GETPOST('date_endday');
|
$date_endday = GETPOST('date_endday','int');
|
||||||
$date_endyear = GETPOST('date_endyear');
|
$date_endyear = GETPOST('date_endyear','int');
|
||||||
$in_bookkeeping = GETPOST('in_bookkeeping');
|
$in_bookkeeping = GETPOST('in_bookkeeping','aZ09');
|
||||||
if ($in_bookkeeping == '') $in_bookkeeping = 'notyet';
|
if ($in_bookkeeping == '') $in_bookkeeping = 'notyet';
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
@ -645,6 +645,22 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = '';
|
$action = '';
|
||||||
|
|
||||||
|
// Must reload data, so we make a redirect
|
||||||
|
if (count($tabpay) != $error)
|
||||||
|
{
|
||||||
|
$param='';
|
||||||
|
$param='id_journal='.$id_journal;
|
||||||
|
$param.='&date_startday='.$date_startday;
|
||||||
|
$param.='&date_startmonth='.$date_startmonth;
|
||||||
|
$param.='&date_startyear='.$date_startyear;
|
||||||
|
$param.='&date_endday='.$date_endday;
|
||||||
|
$param.='&date_endmonth='.$date_endmonth;
|
||||||
|
$param.='&date_endyear='.$date_endyear;
|
||||||
|
$param.='&in_bookeeping='.$in_bookeeping;
|
||||||
|
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
|
|||||||
@ -121,7 +121,7 @@ if ($result) {
|
|||||||
$tabuser = array ();
|
$tabuser = array ();
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
$account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT)) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined';
|
$account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT)) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined';
|
||||||
$account_vat = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : 'NotDefined';
|
$account_vat = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : 'NotDefined';
|
||||||
@ -138,7 +138,7 @@ if ($result) {
|
|||||||
$compta_tva = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $account_vat);
|
$compta_tva = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $account_vat);
|
||||||
$compta_localtax1 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
$compta_localtax1 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
||||||
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
||||||
|
|
||||||
// Define array to display all VAT rates that use this accounting account $compta_tva
|
// Define array to display all VAT rates that use this accounting account $compta_tva
|
||||||
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
||||||
{
|
{
|
||||||
@ -149,14 +149,14 @@ if ($result) {
|
|||||||
$taber[$obj->rowid]["ref"] = $obj->ref;
|
$taber[$obj->rowid]["ref"] = $obj->ref;
|
||||||
$taber[$obj->rowid]["comments"] = $obj->comments;
|
$taber[$obj->rowid]["comments"] = $obj->comments;
|
||||||
$taber[$obj->rowid]["fk_expensereportdet"] = $obj->erdid;
|
$taber[$obj->rowid]["fk_expensereportdet"] = $obj->erdid;
|
||||||
|
|
||||||
// Avoid warnings
|
// Avoid warnings
|
||||||
if (! isset($tabttc[$obj->rowid][$compta_user])) $tabttc[$obj->rowid][$compta_user] = 0;
|
if (! isset($tabttc[$obj->rowid][$compta_user])) $tabttc[$obj->rowid][$compta_user] = 0;
|
||||||
if (! isset($tabht[$obj->rowid][$compta_fees])) $tabht[$obj->rowid][$compta_fees] = 0;
|
if (! isset($tabht[$obj->rowid][$compta_fees])) $tabht[$obj->rowid][$compta_fees] = 0;
|
||||||
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
|
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
|
||||||
if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
|
if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
|
||||||
if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2] = 0;
|
if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2] = 0;
|
||||||
|
|
||||||
$tabttc[$obj->rowid][$compta_user] += $obj->total_ttc;
|
$tabttc[$obj->rowid][$compta_user] += $obj->total_ttc;
|
||||||
$tabht[$obj->rowid][$compta_fees] += $obj->total_ht;
|
$tabht[$obj->rowid][$compta_fees] += $obj->total_ht;
|
||||||
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
||||||
@ -356,6 +356,22 @@ if ($action == 'writebookkeeping') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
|
// Must reload data, so we make a redirect
|
||||||
|
if (count($tabpay) != $error)
|
||||||
|
{
|
||||||
|
$param='';
|
||||||
|
$param='id_journal='.$id_journal;
|
||||||
|
$param.='&date_startday='.$date_startday;
|
||||||
|
$param.='&date_startmonth='.$date_startmonth;
|
||||||
|
$param.='&date_startyear='.$date_startyear;
|
||||||
|
$param.='&date_endday='.$date_endday;
|
||||||
|
$param.='&date_endmonth='.$date_endmonth;
|
||||||
|
$param.='&date_endyear='.$date_endyear;
|
||||||
|
$param.='&in_bookeeping='.$in_bookeeping;
|
||||||
|
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -387,7 +387,24 @@ if ($action == 'writebookkeeping') {
|
|||||||
{
|
{
|
||||||
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
|
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
|
||||||
}
|
}
|
||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
|
// Must reload data, so we make a redirect
|
||||||
|
if (count($tabpay) != $error)
|
||||||
|
{
|
||||||
|
$param='';
|
||||||
|
$param='id_journal='.$id_journal;
|
||||||
|
$param.='&date_startday='.$date_startday;
|
||||||
|
$param.='&date_startmonth='.$date_startmonth;
|
||||||
|
$param.='&date_startyear='.$date_startyear;
|
||||||
|
$param.='&date_endday='.$date_endday;
|
||||||
|
$param.='&date_endmonth='.$date_endmonth;
|
||||||
|
$param.='&date_endyear='.$date_endyear;
|
||||||
|
$param.='&in_bookeeping='.$in_bookeeping;
|
||||||
|
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -408,6 +408,22 @@ if ($action == 'writebookkeeping') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
|
// Must reload data, so we make a redirect
|
||||||
|
if (count($tabpay) != $error)
|
||||||
|
{
|
||||||
|
$param='';
|
||||||
|
$param='id_journal='.$id_journal;
|
||||||
|
$param.='&date_startday='.$date_startday;
|
||||||
|
$param.='&date_startmonth='.$date_startmonth;
|
||||||
|
$param.='&date_startyear='.$date_startyear;
|
||||||
|
$param.='&date_endday='.$date_endday;
|
||||||
|
$param.='&date_endmonth='.$date_endmonth;
|
||||||
|
$param.='&date_endyear='.$date_endyear;
|
||||||
|
$param.='&in_bookeeping='.$in_bookeeping;
|
||||||
|
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user