Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop
This commit is contained in:
commit
d33be2c83b
@ -206,7 +206,7 @@ if ($num2) {
|
|||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > AccountancyExport::$EXPORT_TYPE_NORMAL)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ if ($search_accountancy_code_end == - 1) {
|
|||||||
$search_accountancy_code_end = '';
|
$search_accountancy_code_end = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
|
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv.x") || GETPOST("button_export_csv")) {
|
||||||
$action = 'export_csv';
|
$action = 'export_csv';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
|
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == AccountancyExport::$EXPORT_TYPE_CEGID) $sep = ";"; // For CEGID, we force separator.
|
||||||
|
|
||||||
$journal = 'bookkepping';
|
$journal = 'bookkepping';
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
@ -122,11 +125,7 @@ if ($action == 'export_csv') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ($object->lines as $line) {
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
|
|
||||||
$sep = ";";
|
|
||||||
}
|
|
||||||
print length_accountg($line->numero_compte) . $sep;
|
print length_accountg($line->numero_compte) . $sep;
|
||||||
print $line->debit . $sep;
|
print $line->debit . $sep;
|
||||||
print $line->credit . $sep;
|
print $line->credit . $sep;
|
||||||
@ -157,7 +156,7 @@ else {
|
|||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|
||||||
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
|
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|||||||
@ -25,8 +25,7 @@
|
|||||||
* \brief List operation of book keeping
|
* \brief List operation of book keeping
|
||||||
*/
|
*/
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||||
// Class
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||||
@ -47,11 +46,11 @@ $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETP
|
|||||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
|
|
||||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt")) {
|
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||||
$action = 'delbookkeepingyear';
|
$action = 'delbookkeepingyear';
|
||||||
}
|
}
|
||||||
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
|
if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOST("button_export_file")) {
|
||||||
$action = 'export_csv';
|
$action = 'export_file';
|
||||||
}
|
}
|
||||||
|
|
||||||
$search_accountancy_code = GETPOST("search_accountancy_code");
|
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||||
@ -99,7 +98,7 @@ $formother = new FormOther($db);
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
|
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
|
||||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
}
|
}
|
||||||
@ -261,9 +260,8 @@ if ($action == 'delmouvconfirm') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'export_csv') {
|
// Export into a file with format defined into setup
|
||||||
|
if ($action == 'export_file') {
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
|
||||||
|
|
||||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
|
||||||
@ -356,9 +354,11 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
|
||||||
$button = '<a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
|
$listofformat=AccountancyExport::getType();
|
||||||
|
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
|
||||||
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
||||||
else $button.= $langs->trans("ExportList");
|
else $button.= $langs->trans("ExportList");
|
||||||
|
$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
|
||||||
$button.= '</a>';
|
$button.= '</a>';
|
||||||
|
|
||||||
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php"">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php"">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||||
|
|||||||
@ -539,7 +539,8 @@ class AccountancyCategory
|
|||||||
/**
|
/**
|
||||||
* get cpts of category
|
* get cpts of category
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @param int $cat_id Category id
|
||||||
|
* @return array Result in table
|
||||||
*/
|
*/
|
||||||
public function getCptsCat($cat_id) {
|
public function getCptsCat($cat_id) {
|
||||||
global $mysoc;
|
global $mysoc;
|
||||||
|
|||||||
@ -32,14 +32,15 @@
|
|||||||
*
|
*
|
||||||
* Manage the different format accountancy export
|
* Manage the different format accountancy export
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
|
||||||
|
|
||||||
class AccountancyExport
|
class AccountancyExport
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
||||||
* @var Type of export
|
|
||||||
*/
|
*/
|
||||||
public static $EXPORT_TYPE_NORMAL = 1;
|
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
|
||||||
public static $EXPORT_TYPE_CEGID = 2;
|
public static $EXPORT_TYPE_CEGID = 2;
|
||||||
public static $EXPORT_TYPE_COALA = 3;
|
public static $EXPORT_TYPE_COALA = 3;
|
||||||
public static $EXPORT_TYPE_BOB50 = 4;
|
public static $EXPORT_TYPE_BOB50 = 4;
|
||||||
@ -81,7 +82,7 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all export type are available
|
* Array wit all export type available (key + label)
|
||||||
*
|
*
|
||||||
* @return array of type
|
* @return array of type
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/customer/index.php
|
* \file htdocs/accountancy/customer/index.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Home customer ventilation
|
* \brief Home customer journalization page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
@ -58,7 +58,7 @@ if ($year == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate History
|
// Validate History
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ if ($action == 'validatehistory') {
|
|||||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
|
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
@ -173,7 +173,7 @@ print $langs->trans("DescVentilCustomer") . '<br>';
|
|||||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
//print '<div class="inline-block divButAction">';
|
//print '<div class="inline-block divButAction">';
|
||||||
// TODO Remove this. Should be done into the repair.php script
|
// TODO Remove this. Should be done always or into the repair.php script.
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||||
//print '</div>';
|
//print '</div>';
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
|||||||
}
|
}
|
||||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$row = $db->fetch_row($result);
|
$row = $db->fetch_row($result);
|
||||||
@ -233,7 +233,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
|||||||
}
|
}
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog('htdocs/accountancy/customer/index.php sql=' . $sql, LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
@ -289,7 +289,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
|||||||
$sql .= " AND aa.account_number IS NOT NULL";
|
$sql .= " AND aa.account_number IS NOT NULL";
|
||||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
@ -347,7 +347,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$i = 0;
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
while ($row = $db->fetch_row($resql)) {
|
while ($row = $db->fetch_row($resql)) {
|
||||||
@ -357,7 +356,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
}
|
}
|
||||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i ++;
|
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
} else {
|
} else {
|
||||||
@ -365,6 +363,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled)) {
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -390,7 +389,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|||||||
@ -69,7 +69,7 @@ if ($action == 'validatehistory') {
|
|||||||
|
|
||||||
// First clean corrupted data
|
// First clean corrupted data
|
||||||
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sqlclean .= " SET erd.fk_code_ventilation = 0";
|
$sqlclean .= " SET fk_code_ventilation = 0";
|
||||||
$sqlclean .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
$sqlclean .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
||||||
$sqlclean .= ' (SELECT accnt.rowid ';
|
$sqlclean .= ' (SELECT accnt.rowid ';
|
||||||
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||||
@ -93,6 +93,8 @@ if ($action == 'validatehistory') {
|
|||||||
$sql1 .= " AND erd.fk_code_ventilation = 0";
|
$sql1 .= " AND erd.fk_code_ventilation = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||||
|
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
@ -107,7 +109,7 @@ if ($action == 'validatehistory') {
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql1 .= " SET erd.fk_code_ventilation = 0";
|
$sql1 .= " SET fk_code_ventilation = 0";
|
||||||
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN ';
|
||||||
$sql1 .= ' (SELECT accnt.rowid ';
|
$sql1 .= ' (SELECT accnt.rowid ';
|
||||||
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||||
@ -129,8 +131,9 @@ if ($action == 'validatehistory') {
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
// Now clean
|
||||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql1.= " SET erd.fk_code_ventilation = 0";
|
$sql1.= " SET fk_code_ventilation = 0";
|
||||||
$sql1.= " WHERE erd.fk_expensereport IN ( SELECT er.rowid FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
$sql1.= " WHERE erd.fk_expensereport IN ( SELECT er.rowid FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
||||||
$sql1.= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
|
$sql1.= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
|
||||||
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
||||||
@ -166,25 +169,25 @@ print $langs->trans("DescVentilExpenseReportMore", $langs->transnoentitiesnoconv
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
//print '<div class="inline-block divButAction">';
|
//print '<div class="inline-block divButAction">';
|
||||||
// TODO Remove this. Should be done always.
|
// TODO Remove this. Should be done always or into the repair.php script.
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||||
//print '</div>';
|
//print '</div>';
|
||||||
|
|
||||||
|
|
||||||
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
|
||||||
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$y = $year_current;
|
$y = $year_current;
|
||||||
|
|
||||||
print '<br>';
|
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||||
|
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||||
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
|
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
@ -196,7 +199,7 @@ $sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'",
|
|||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
$sql .= " SUM(erd.total_ht) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
|
||||||
@ -237,7 +240,7 @@ print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '
|
|||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
|
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
@ -260,7 +263,7 @@ $sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We d
|
|||||||
$sql .= " AND aa.account_number IS NOT NULL";
|
$sql .= " AND aa.account_number IS NOT NULL";
|
||||||
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
@ -304,7 +307,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
$sql .= " SUM(erd.total_ht) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
|
||||||
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
@ -312,14 +315,12 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
$sql .= " AND er.fk_statut > 0 ";
|
$sql .= " AND er.fk_statut > 0 ";
|
||||||
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
|
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
while ( $row = $db->fetch_row($resql)) {
|
while ( $row = $db->fetch_row($resql)) {
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>' . $row[0] . '</td>';
|
print '<tr><td>' . $row[0] . '</td>';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||||
|
|||||||
@ -52,6 +52,7 @@ $date_startyear = GETPOST('date_startyear');
|
|||||||
$date_endmonth = GETPOST('date_endmonth');
|
$date_endmonth = GETPOST('date_endmonth');
|
||||||
$date_endday = GETPOST('date_endday');
|
$date_endday = GETPOST('date_endday');
|
||||||
$date_endyear = GETPOST('date_endyear');
|
$date_endyear = GETPOST('date_endyear');
|
||||||
|
$in_bookkeeping = GETPOST('in_bookkeeping');
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
@ -104,6 +105,8 @@ $sql .= " AND erd.fk_code_ventilation > 0";
|
|||||||
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
|
||||||
if ($date_start && $date_end)
|
if ($date_start && $date_end)
|
||||||
$sql .= " AND er.date_debut >= '" . $db->idate($date_start) . "' AND er.date_debut <= '" . $db->idate($date_end) . "'";
|
$sql .= " AND er.date_debut >= '" . $db->idate($date_start) . "' AND er.date_debut <= '" . $db->idate($date_end) . "'";
|
||||||
|
if ($in_bookkeeping == 'yes')
|
||||||
|
$sql .= " AND (er.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='expense_report') )";
|
||||||
$sql .= " ORDER BY er.date_debut";
|
$sql .= " ORDER BY er.date_debut";
|
||||||
|
|
||||||
dol_syslog('accountancy/journal/expensereportsjournal.php:: $sql=' . $sql);
|
dol_syslog('accountancy/journal/expensereportsjournal.php:: $sql=' . $sql);
|
||||||
@ -466,7 +469,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$builddate = time();
|
$builddate = time();
|
||||||
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
|
||||||
|
|
||||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectyesno('in_bookkeeping',$in_bookkeeping,0);
|
||||||
|
|
||||||
$varlink = 'id_journal=' . $id_journal;
|
$varlink = 'id_journal=' . $id_journal;
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
@ -80,16 +80,14 @@ $form = new Form($db);
|
|||||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||||
|
|
||||||
$nom = $langs->trans("ReportInOut");
|
$nom = $langs->trans("ReportInOut").', '.$langs->trans("ByAccounts");
|
||||||
$nomlink = '';
|
$nomlink = '';
|
||||||
$periodlink = '';
|
$periodlink = '';
|
||||||
$exportlink = '';
|
$exportlink = '';
|
||||||
$builddate = time();
|
$builddate = time();
|
||||||
$description = '';
|
$description = '';
|
||||||
$period = $langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0) . " " .$textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
|
$period = $langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0) . " " .$textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
|
||||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
|
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||||
'action' => ''
|
|
||||||
));
|
|
||||||
|
|
||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
|
|
||||||
|
|||||||
@ -21,12 +21,13 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/supplier/index.php
|
* \file htdocs/accountancy/supplier/index.php
|
||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Home supplier ventilation
|
* \brief Home supplier journalization page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||||
|
|
||||||
// Langs
|
// Langs
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
@ -55,7 +56,7 @@ if ($year == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate History
|
// Validate History
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -93,6 +94,8 @@ if ($action == 'validatehistory') {
|
|||||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||||
|
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
if (! $resql1) {
|
if (! $resql1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
@ -159,33 +162,28 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
|
|||||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, '', 'title_accountancy');
|
||||||
|
|
||||||
print $langs->trans("DescVentilSupplier") . '<br>';
|
print $langs->trans("DescVentilSupplier") . '<br>';
|
||||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
//print '<div class="inline-block divButAction">';
|
//print '<div class="inline-block divButAction">';
|
||||||
// TODO Remove this. Should be done always.
|
// TODO Remove this. Should be done always or into the repair.php script.
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||||
//print '</div>';
|
//print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
$y = $year_current;
|
||||||
|
|
||||||
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||||
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$y = $year_current;
|
|
||||||
|
|
||||||
$var = true;
|
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
|
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
@ -197,7 +195,7 @@ $sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'",
|
|||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
|
$sql .= " SUM(ffd.total_ht) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
||||||
@ -208,7 +206,7 @@ $sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We d
|
|||||||
$sql .= " AND aa.account_number IS NULL";
|
$sql .= " AND aa.account_number IS NULL";
|
||||||
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
@ -239,7 +237,7 @@ print '<br>';
|
|||||||
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
|
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
|
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
@ -251,7 +249,7 @@ $sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'",
|
|||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
|
$sql .= " SUM(ffd.total_ht) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
||||||
@ -262,7 +260,7 @@ $sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We d
|
|||||||
$sql .= " AND aa.account_number IS NOT NULL";
|
$sql .= " AND aa.account_number IS NOT NULL";
|
||||||
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
||||||
|
|
||||||
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
@ -306,7 +304,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
for($i = 1; $i <= 12; $i ++) {
|
for($i = 1; $i <= 12; $i ++) {
|
||||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||||
}
|
}
|
||||||
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
|
$sql .= " SUM(ffd.total_ht) as total";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||||
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||||
@ -314,7 +312,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
$sql .= " AND ff.fk_statut > 0 ";
|
$sql .= " AND ff.fk_statut > 0 ";
|
||||||
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
|
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
|
||||||
|
|
||||||
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
|
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|||||||
@ -313,6 +313,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
{
|
{
|
||||||
if (! empty($menu['langs'])) $langs->load($menu['langs']);
|
if (! empty($menu['langs'])) $langs->load($menu['langs']);
|
||||||
$titre = $langs->trans($menu['titre']);
|
$titre = $langs->trans($menu['titre']);
|
||||||
|
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
'rowid'=>$menu['rowid'],
|
'rowid'=>$menu['rowid'],
|
||||||
'module'=>$menu['module'],
|
'module'=>$menu['module'],
|
||||||
@ -329,8 +330,13 @@ if ($conf->use_javascript_ajax)
|
|||||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||||
' '.
|
' '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down","1downarrow").'</a>'.
|
||||||
'</td></tr></table>'
|
'</td></tr></table>',
|
||||||
|
'buttons'=>'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||||
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||||
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||||
|
' '.
|
||||||
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down","1downarrow").'</a>'
|
||||||
);
|
);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1739,7 +1739,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Proposal card
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -3277,13 +3277,14 @@ class Propal extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return clicable link of object (with eventually picto)
|
* Return clicable link of object (with eventually picto)
|
||||||
*
|
*
|
||||||
* @param int $withpicto Add picto into link
|
* @param int $withpicto Add picto into link
|
||||||
* @param string $option Where point the link ('expedition', 'document', ...)
|
* @param string $option Where point the link ('expedition', 'document', ...)
|
||||||
* @param string $get_params Parametres added to url
|
* @param string $get_params Parametres added to url
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string String with URL
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='', $get_params='', $notooltip=0)
|
function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
@ -3318,6 +3319,14 @@ class Propal extends CommonObject
|
|||||||
if ($option == 'document') {
|
if ($option == 'document') {
|
||||||
$url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params;
|
$url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($option != 'nolink')
|
||||||
|
{
|
||||||
|
// Add param to save lastsearch_values or not
|
||||||
|
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||||
|
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||||
|
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkclose='';
|
$linkclose='';
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
// Proposal card
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -103,7 +103,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
// Proposal card
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -66,7 +66,7 @@ $object->info($object->id);
|
|||||||
|
|
||||||
// Proposal card
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -80,9 +80,9 @@ $object_statut=GETPOST('propal_statut');
|
|||||||
$sall=GETPOST('sall', 'alphanohtml');
|
$sall=GETPOST('sall', 'alphanohtml');
|
||||||
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
||||||
|
|
||||||
$day=GETPOST("day","int");
|
$search_day=GETPOST("search_day","int");
|
||||||
$month=GETPOST("month","int");
|
$search_month=GETPOST("search_month","int");
|
||||||
$year=GETPOST("year","int");
|
$search_year=GETPOST("search_year","int");
|
||||||
|
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@ -197,9 +197,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
|||||||
$search_type='';
|
$search_type='';
|
||||||
$search_country='';
|
$search_country='';
|
||||||
$search_type_thirdparty='';
|
$search_type_thirdparty='';
|
||||||
$year='';
|
$search_year='';
|
||||||
$month='';
|
$search_month='';
|
||||||
$day='';
|
$search_day='';
|
||||||
$viewstatut='';
|
$viewstatut='';
|
||||||
$object_statut='';
|
$object_statut='';
|
||||||
$toselect='';
|
$toselect='';
|
||||||
@ -295,18 +295,18 @@ if ($viewstatut != '' && $viewstatut != '-1')
|
|||||||
{
|
{
|
||||||
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
||||||
}
|
}
|
||||||
if ($month > 0)
|
if ($search_month > 0)
|
||||||
{
|
{
|
||||||
if ($year > 0 && empty($day))
|
if ($search_year > 0 && empty($search_day))
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||||
else if ($year > 0 && ! empty($day))
|
else if ($search_year > 0 && ! empty($search_day))
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||||
else
|
else
|
||||||
$sql.= " AND date_format(p.datep, '%m') = '".$db->escape($month)."'";
|
$sql.= " AND date_format(p.datep, '%m') = '".$db->escape($search_month)."'";
|
||||||
}
|
}
|
||||||
else if ($year > 0)
|
else if ($search_year > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||||
}
|
}
|
||||||
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale);
|
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale);
|
||||||
if ($search_user > 0)
|
if ($search_user > 0)
|
||||||
@ -369,8 +369,8 @@ if ($resql)
|
|||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
if ($sall) $param.='&sall='.urlencode($sall);
|
if ($sall) $param.='&sall='.urlencode($sall);
|
||||||
if ($month) $param.='&month='.urlencode($month);
|
if ($search_month) $param.='&search_month='.urlencode($search_month);
|
||||||
if ($year) $param.='&year='.urlencode($year);
|
if ($search_year) $param.='&search_year='.urlencode($search_year);
|
||||||
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
|
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
|
||||||
if ($search_refcustomer) $param.='&search_refcustomer='.urlencode($search_refcustomer);
|
if ($search_refcustomer) $param.='&search_refcustomer='.urlencode($search_refcustomer);
|
||||||
if ($search_societe) $param.='&search_societe='.urlencode($search_societe);
|
if ($search_societe) $param.='&search_societe='.urlencode($search_societe);
|
||||||
@ -613,11 +613,10 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print '<td class="liste_titre" colspan="1" align="center">';
|
print '<td class="liste_titre" colspan="1" align="center">';
|
||||||
//print $langs->trans('Month').': ';
|
//print $langs->trans('Month').': ';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||||
//print ' '.$langs->trans('Year').': ';
|
//print ' '.$langs->trans('Year').': ';
|
||||||
$syear = $year;
|
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||||
$formother->select_year($syear,'year',1, 20, 5);
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Date end
|
// Date end
|
||||||
@ -755,7 +754,6 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
|
||||||
$objectstatic->id=$obj->rowid;
|
$objectstatic->id=$obj->rowid;
|
||||||
$objectstatic->ref=$obj->ref;
|
$objectstatic->ref=$obj->ref;
|
||||||
|
|
||||||
@ -768,7 +766,7 @@ if ($resql)
|
|||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
// Picto + Ref
|
// Picto + Ref
|
||||||
print '<td class="nobordernopadding nowrap">';
|
print '<td class="nobordernopadding nowrap">';
|
||||||
print $objectstatic->getNomUrl(1);
|
print $objectstatic->getNomUrl(1, '', '', 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Warning
|
// Warning
|
||||||
$warnornote='';
|
$warnornote='';
|
||||||
|
|||||||
@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Proposal card
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -1915,7 +1915,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -3369,14 +3369,15 @@ class Commande extends CommonOrder
|
|||||||
/**
|
/**
|
||||||
* Return clicable link of object (with eventually picto)
|
* Return clicable link of object (with eventually picto)
|
||||||
*
|
*
|
||||||
* @param int $withpicto Add picto into link
|
* @param int $withpicto Add picto into link
|
||||||
* @param int $option Where point the link (0=> main card, 1,2 => shipment)
|
* @param int $option Where point the link (0=> main card, 1,2 => shipment)
|
||||||
* @param int $max Max length to show
|
* @param int $max Max length to show
|
||||||
* @param int $short ???
|
* @param int $short ???
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string String with URL
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0,$notooltip=0)
|
function getNomUrl($withpicto=0, $option=0, $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
@ -3387,6 +3388,14 @@ class Commande extends CommonOrder
|
|||||||
if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
|
if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
|
||||||
else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id;
|
else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id;
|
||||||
|
|
||||||
|
if ($option !== 'nolink')
|
||||||
|
{
|
||||||
|
// Add param to save lastsearch_values or not
|
||||||
|
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
|
||||||
|
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
|
||||||
|
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
|
||||||
|
}
|
||||||
|
|
||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|
||||||
$picto = 'order';
|
$picto = 'order';
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -65,7 +65,7 @@ dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), -1, 'order');
|
|||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Ref customer
|
// Ref customer
|
||||||
|
|||||||
@ -51,12 +51,12 @@ $show_files=GETPOST('show_files','int');
|
|||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
|
||||||
$orderyear=GETPOST("orderyear","int");
|
$search_orderyear=GETPOST("search_orderyear","int");
|
||||||
$ordermonth=GETPOST("ordermonth","int");
|
$search_ordermonth=GETPOST("search_ordermonth","int");
|
||||||
$orderday=GETPOST("orderday","int");
|
$search_orderday=GETPOST("search_orderday","int");
|
||||||
$deliveryyear=GETPOST("deliveryyear","int");
|
$search_deliveryyear=GETPOST("search_deliveryyear","int");
|
||||||
$deliverymonth=GETPOST("deliverymonth","int");
|
$search_deliverymonth=GETPOST("search_deliverymonth","int");
|
||||||
$deliveryday=GETPOST("deliveryday","int");
|
$search_deliveryday=GETPOST("search_deliveryday","int");
|
||||||
$search_product_category=GETPOST('search_product_category','int');
|
$search_product_category=GETPOST('search_product_category','int');
|
||||||
$search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha');
|
$search_ref=GETPOST('search_ref','alpha')!=''?GETPOST('search_ref','alpha'):GETPOST('sref','alpha');
|
||||||
$search_ref_customer=GETPOST('search_ref_customer','alpha');
|
$search_ref_customer=GETPOST('search_ref_customer','alpha');
|
||||||
@ -180,12 +180,12 @@ if (empty($reshook))
|
|||||||
$search_total_ht='';
|
$search_total_ht='';
|
||||||
$search_total_vat='';
|
$search_total_vat='';
|
||||||
$search_total_ttc='';
|
$search_total_ttc='';
|
||||||
$orderyear='';
|
$search_orderyear='';
|
||||||
$ordermonth='';
|
$search_ordermonth='';
|
||||||
$orderday='';
|
$search_orderday='';
|
||||||
$deliveryday='';
|
$search_deliveryday='';
|
||||||
$deliverymonth='';
|
$search_deliverymonth='';
|
||||||
$deliveryyear='';
|
$search_deliveryyear='';
|
||||||
$viewstatut='';
|
$viewstatut='';
|
||||||
$billed='';
|
$billed='';
|
||||||
$toselect='';
|
$toselect='';
|
||||||
@ -499,31 +499,31 @@ if ($viewstatut <> '')
|
|||||||
$sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed
|
$sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ordermonth > 0)
|
if ($search_ordermonth > 0)
|
||||||
{
|
{
|
||||||
if ($orderyear > 0 && empty($orderday))
|
if ($search_orderyear > 0 && empty($search_orderday))
|
||||||
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,$ordermonth,false))."' AND '".$db->idate(dol_get_last_day($orderyear,$ordermonth,false))."'";
|
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($search_orderyear,$search_ordermonth,false))."' AND '".$db->idate(dol_get_last_day($search_orderyear,$search_ordermonth,false))."'";
|
||||||
else if ($orderyear > 0 && ! empty($orderday))
|
else if ($search_orderyear > 0 && ! empty($search_orderday))
|
||||||
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $ordermonth, $orderday, $orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $ordermonth, $orderday, $orderyear))."'";
|
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_ordermonth, $search_orderday, $search_orderyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_ordermonth, $search_orderday, $search_orderyear))."'";
|
||||||
else
|
else
|
||||||
$sql.= " AND date_format(c.date_commande, '%m') = '".$ordermonth."'";
|
$sql.= " AND date_format(c.date_commande, '%m') = '".$search_ordermonth."'";
|
||||||
}
|
}
|
||||||
else if ($orderyear > 0)
|
else if ($search_orderyear > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($orderyear,1,false))."' AND '".$db->idate(dol_get_last_day($orderyear,12,false))."'";
|
$sql.= " AND c.date_commande BETWEEN '".$db->idate(dol_get_first_day($search_orderyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_orderyear,12,false))."'";
|
||||||
}
|
}
|
||||||
if ($deliverymonth > 0)
|
if ($search_deliverymonth > 0)
|
||||||
{
|
{
|
||||||
if ($deliveryyear > 0 && empty($deliveryday))
|
if ($search_deliveryyear > 0 && empty($search_deliveryday))
|
||||||
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,$deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,$deliverymonth,false))."'";
|
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_deliveryyear,$search_deliverymonth,false))."' AND '".$db->idate(dol_get_last_day($search_deliveryyear,$search_deliverymonth,false))."'";
|
||||||
else if ($deliveryyear > 0 && ! empty($deliveryday))
|
else if ($search_deliveryyear > 0 && ! empty($search_deliveryday))
|
||||||
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $deliverymonth, $deliveryday, $deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $deliverymonth, $deliveryday, $deliveryyear))."'";
|
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_deliverymonth, $search_deliveryday, $search_deliveryyear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_deliverymonth, $search_deliveryday, $search_deliveryyear))."'";
|
||||||
else
|
else
|
||||||
$sql.= " AND date_format(c.date_livraison, '%m') = '".$deliverymonth."'";
|
$sql.= " AND date_format(c.date_livraison, '%m') = '".$search_deliverymonth."'";
|
||||||
}
|
}
|
||||||
else if ($deliveryyear > 0)
|
else if ($search_deliveryyear > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($deliveryyear,1,false))."' AND '".$db->idate(dol_get_last_day($deliveryyear,12,false))."'";
|
$sql.= " AND c.date_livraison BETWEEN '".$db->idate(dol_get_first_day($search_deliveryyear,1,false))."' AND '".$db->idate(dol_get_last_day($search_deliveryyear,12,false))."'";
|
||||||
}
|
}
|
||||||
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
||||||
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
||||||
@ -605,12 +605,12 @@ if ($resql)
|
|||||||
if ($sall) $param.='&sall='.$sall;
|
if ($sall) $param.='&sall='.$sall;
|
||||||
if ($socid > 0) $param.='&socid='.$socid;
|
if ($socid > 0) $param.='&socid='.$socid;
|
||||||
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
||||||
if ($orderday) $param.='&orderday='.$orderday;
|
if ($search_orderday) $param.='&search_orderday='.$search_orderday;
|
||||||
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
|
if ($search_ordermonth) $param.='&search_ordermonth='.$search_ordermonth;
|
||||||
if ($orderyear) $param.='&orderyear='.$orderyear;
|
if ($search_orderyear) $param.='&search_orderyear='.$search_orderyear;
|
||||||
if ($deliveryday) $param.='&deliveryday='.$deliveryday;
|
if ($search_deliveryday) $param.='&search_deliveryday='.$search_deliveryday;
|
||||||
if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth;
|
if ($search_deliverymonth) $param.='&search_deliverymonth='.$search_deliverymonth;
|
||||||
if ($deliveryyear) $param.='&deliveryyear='.$deliveryyear;
|
if ($search_deliveryyear) $param.='&search_deliveryyear='.$search_deliveryyear;
|
||||||
if ($search_ref) $param.='&search_ref='.$search_ref;
|
if ($search_ref) $param.='&search_ref='.$search_ref;
|
||||||
if ($search_company) $param.='&search_company='.$search_company;
|
if ($search_company) $param.='&search_company='.$search_company;
|
||||||
if ($search_ref_customer) $param.='&search_ref_customer='.$search_ref_customer;
|
if ($search_ref_customer) $param.='&search_ref_customer='.$search_ref_customer;
|
||||||
@ -894,17 +894,17 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['c.date_commande']['checked']))
|
if (! empty($arrayfields['c.date_commande']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="orderday" value="'.$orderday.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_orderday" value="'.$search_orderday.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="ordermonth" value="'.$ordermonth.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">';
|
||||||
$formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5);
|
$formother->select_year($search_orderyear?$search_orderyear:-1,'search_orderyear',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['c.date_delivery']['checked']))
|
if (! empty($arrayfields['c.date_delivery']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="deliveryday" value="'.$deliveryday.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="deliverymonth" value="'.$deliverymonth.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">';
|
||||||
$formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5);
|
$formother->select_year($search_deliveryyear?$search_deliveryyear:-1,'search_deliveryyear',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['c.total_ht']['checked']))
|
if (! empty($arrayfields['c.total_ht']['checked']))
|
||||||
@ -1075,7 +1075,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td class="nobordernopadding nowrap">';
|
print '<td class="nobordernopadding nowrap">';
|
||||||
print $generic_commande->getNomUrl(1,($viewstatut != 2?0:$obj->fk_statut));
|
print $generic_commande->getNomUrl(1, ($viewstatut != 2?0:$obj->fk_statut), 0, 0, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Show shippable Icon (create subloop, so may be slow)
|
// Show shippable Icon (create subloop, so may be slow)
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (! empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
|||||||
@ -91,7 +91,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$head=salaries_prepare_head($object);
|
$head=salaries_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), 0, 'payment');
|
dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment');
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
|
|||||||
@ -73,6 +73,12 @@ else
|
|||||||
$typeid=$_REQUEST['typeid'];
|
$typeid=$_REQUEST['typeid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_ref="";
|
$search_ref="";
|
||||||
@ -82,6 +88,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
|||||||
$typeid="";
|
$typeid="";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -160,14 +167,14 @@ if ($result)
|
|||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.$search_ref.'">';
|
print '<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Employee
|
// Employee
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_user" value="'.$search_user.'">';
|
print '<input class="flat" type="text" size="6" name="search_user" value="'.$db->escape($search_user).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Label
|
// Label
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="'.$search_label.'"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="'.$db->escape($search_label).'"></td>';
|
||||||
// Date
|
// Date
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Type
|
// Type
|
||||||
@ -182,7 +189,7 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
|
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
|
|||||||
@ -55,7 +55,7 @@ $object->info($id);
|
|||||||
|
|
||||||
$head = salaries_prepare_head($object);
|
$head = salaries_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("SalaryPayment"), 0, 'payment');
|
dol_fiche_head($head, 'info', $langs->trans("SalaryPayment"), -1, 'payment');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
@ -72,6 +72,8 @@ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0,
|
|||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($object);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|||||||
@ -360,7 +360,28 @@ print '<td colspan="7" align="right">';
|
|||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Array titles
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print $form->select_country($search_country, 'search_country');
|
||||||
|
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Array titles
|
||||||
print "<tr class='liste_titre'>";
|
print "<tr class='liste_titre'>";
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans("Company"),
|
$langs->trans("Company"),
|
||||||
@ -442,27 +463,6 @@ print_liste_field_titre(
|
|||||||
);
|
);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td class="liste_titre" align="left">';
|
|
||||||
print $form->select_country($search_country, 'search_country');
|
|
||||||
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
if (count($amount)) {
|
if (count($amount)) {
|
||||||
$arrayforsort=$name;
|
$arrayforsort=$name;
|
||||||
|
|||||||
@ -1782,7 +1782,7 @@ else
|
|||||||
{
|
{
|
||||||
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||||
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
||||||
$comment = GETPOST('comment');
|
$comment = GETPOST('comment','alpha');
|
||||||
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
|
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
|
||||||
print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
|
print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
|
||||||
}
|
}
|
||||||
@ -1794,8 +1794,16 @@ else
|
|||||||
{
|
{
|
||||||
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||||
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
|
||||||
$comment = GETPOST('comment');
|
$comment = GETPOST('comment','alpha');
|
||||||
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
|
|
||||||
|
if (empty($dateactend))
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEndReal")), null, 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne','int')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
|
||||||
|
}
|
||||||
print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
|
print '<table class="notopnoleftnoright" width="100%"><tr class="oddeven" height="6"><td></td></tr></table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1918,9 +1926,11 @@ else
|
|||||||
/**
|
/**
|
||||||
* Disable a contract line
|
* Disable a contract line
|
||||||
*/
|
*/
|
||||||
print '<form name="closeline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.$object->lines[$cursorline-1]->id.'&action=closeline" method="post">';
|
print '<!-- Form to disabled a line -->'."\n";
|
||||||
|
print '<form name="closeline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.$object->lines[$cursorline-1]->id.'" method="post">';
|
||||||
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="closeline">';
|
||||||
|
|
||||||
print '<table class="noborder tableforservicepart2 boxtablenobottom" width="100%">';
|
print '<table class="noborder tableforservicepart2 boxtablenobottom" width="100%">';
|
||||||
|
|
||||||
@ -1957,7 +1967,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr '.$bc[false].'>';
|
print '<tr '.$bc[false].'>';
|
||||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.GETPOST('comment').'"></td>';
|
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||||
print '<td class="nohover right">';
|
print '<td class="nohover right">';
|
||||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"> ';
|
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"> ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
|||||||
@ -3767,7 +3767,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
|
|||||||
{
|
{
|
||||||
if ($currency_code == 'auto') $currency_code=$conf->currency;
|
if ($currency_code == 'auto') $currency_code=$conf->currency;
|
||||||
|
|
||||||
$listofcurrenciesbefore=array('USD','GBP','AUD','MXN');
|
$listofcurrenciesbefore=array('USD','GBP','AUD','MXN','PEN');
|
||||||
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -110,7 +110,7 @@ function tree_showpad(&$fulltree,$key,$silent=0)
|
|||||||
* @param int $rang Level of element
|
* @param int $rang Level of element
|
||||||
* @param string $iddivjstree Id to use for parent ul element
|
* @param string $iddivjstree Id to use for parent ul element
|
||||||
* @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record
|
* @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record
|
||||||
* @param int $showfk Show fk links to parent into label
|
* @param int $showfk 1=show fk_links to parent into label (used by menu editor only)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0)
|
function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0)
|
||||||
@ -165,8 +165,20 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetal
|
|||||||
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
||||||
}
|
}
|
||||||
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
||||||
print $tab[$x]['entry'];
|
if ($showfk)
|
||||||
if ($showfk) print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
{
|
||||||
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
|
print '<strong> ';
|
||||||
|
print $tab[$x]['title'];
|
||||||
|
print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $tab[$x]['buttons'];
|
||||||
|
print '</td></tr></table>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $tab[$x]['entry'];
|
||||||
|
}
|
||||||
//print ' -> A '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
//print ' -> A '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
||||||
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
||||||
// And now we search all its sons of lower level
|
// And now we search all its sons of lower level
|
||||||
@ -188,8 +200,21 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetal
|
|||||||
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
||||||
}
|
}
|
||||||
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
||||||
print $tab[$x]['entry'];
|
if ($showfk)
|
||||||
if ($showfk) print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
{
|
||||||
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
|
print '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">';
|
||||||
|
print $tab[$x]['title'];
|
||||||
|
print '</a></strong>';
|
||||||
|
print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print $tab[$x]['buttons'];
|
||||||
|
print '</td></tr></table>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $tab[$x]['entry'];
|
||||||
|
}
|
||||||
//print ' -> B '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
//print ' -> B '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
||||||
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
||||||
// And now we search all its sons of lower level
|
// And now we search all its sons of lower level
|
||||||
|
|||||||
@ -220,7 +220,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2458__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2451__+MAX_llx_menu__, '/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 50, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2458__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2451__+MAX_llx_menu__, '/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 50, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2459__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_vat', 2451__+MAX_llx_menu__, '/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuVatAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 60, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2459__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_vat', 2451__+MAX_llx_menu__, '/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuVatAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 60, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2460__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_tax', 2451__+MAX_llx_menu__, '/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuTaxAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 70, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2460__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_tax', 2451__+MAX_llx_menu__, '/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuTaxAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 70, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2461__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_expensereport', 2451__+MAX_llx_menu__, '/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuExpenseReportAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 80, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2461__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_expensereport', 2451__+MAX_llx_menu__, '/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuExpenseReportAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 80, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2462__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_product', 2451__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuProductsAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 90, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2462__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_product', 2451__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuProductsAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 90, __ENTITY__);
|
||||||
-- Accounting period
|
-- Accounting period
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin" && $conf->global->MAIN_FEATURES_LEVEL > 0', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 2451__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'FiscalPeriod', 1, 'admin', '', '', 2, 80, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin" && $conf->global->MAIN_FEATURES_LEVEL > 0', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 2451__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'FiscalPeriod', 1, 'admin', '', '', 2, 80, __ENTITY__);
|
||||||
@ -235,30 +235,32 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__);
|
||||||
-- Journals
|
-- Journals
|
||||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '', 'Journalization', 1, 'main', '$user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3', 'BankJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6', 'ExpenseReportJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 2, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2709__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2', 'PurchasesJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 3, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1', 'SellsJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 4, __ENTITY__);
|
||||||
-- General Ledger
|
-- General Ledger
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
|
||||||
-- Balance
|
-- Balance
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
|
||||||
-- Reports
|
-- Reports
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'report', 2400__+MAX_llx_menu__, '/accountancy/report/result.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'report', 2400__+MAX_llx_menu__, '/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/accountancy/report/result.php?leftmenu=ca', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ByExpenseIncome', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', '', 2441__+MAX_llx_menu__, '/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy', 'ByAccounts', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', '', 2441__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2444__+MAX_llx_menu__, '/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2444__+MAX_llx_menu__, '/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', '', 2444__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
|
||||||
-- Rapports compta simple
|
-- Rapports compta simple
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2711__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2702__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2712__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2713__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2714__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2715__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2716__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
|
|
||||||
-- Check deposit
|
-- Check deposit
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
|
||||||
|
|||||||
@ -1007,11 +1007,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$nature='';
|
$nature='';
|
||||||
|
|
||||||
// Must match array $sourceList defined into journals_list.php
|
// Must match array $sourceList defined into journals_list.php
|
||||||
if ($objp->nature == 2) $nature="sells";
|
if ($objp->nature == 2 && ! empty($conf->facture->enabled)) $nature="sells";
|
||||||
if ($objp->nature == 3) $nature="purchases";
|
if ($objp->nature == 3 && ! empty($conf->fournisseur->enabled)) $nature="purchases";
|
||||||
if ($objp->nature == 4) $nature="bank";
|
if ($objp->nature == 4 && ! empty($conf->banque->enabled)) $nature="bank";
|
||||||
if ($objp->nature == 5) $nature="expensereports";
|
if ($objp->nature == 5 && ! empty($conf->expensereport->enabled)) $nature="expensereports";
|
||||||
if ($objp->nature == 1) $nature="various";
|
if ($objp->nature == 1) $nature="various";
|
||||||
if ($objp->nature == 9) $nature="hasnew";
|
if ($objp->nature == 9) $nature="hasnew";
|
||||||
|
|
||||||
@ -1023,7 +1024,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
|
|
||||||
if ($nature)
|
if ($nature)
|
||||||
{
|
{
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid,dol_trunc($objp->label,25),2,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, dol_trunc($objp->label,25), 2, $user->rights->accounting->comptarapport->lire);
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -1079,8 +1080,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
|
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy_report",$langs->trans("Reportings"),1,$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy_report",$langs->trans("Reportings"),1,$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
||||||
|
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/accountancy/report/result.php?leftmenu=accountancy_report",$langs->trans("ReportInOut"),2,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report",$langs->trans("ReportInOut"),2,$user->rights->accounting->comptarapport->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report",$langs->trans("ByExpenseIncome"),3,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/accountancy/report/result.php?leftmenu=accountancy_report",$langs->trans("ByAccounts"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report",$langs->trans("ReportTurnover"),2,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report",$langs->trans("ReportTurnover"),2,$user->rights->accounting->comptarapport->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
|
|||||||
@ -109,6 +109,11 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||||||
if (empty($conf->global->SYSLOG_FILE)) $tmp=DOL_DATA_ROOT.'/dolibarr.log';
|
if (empty($conf->global->SYSLOG_FILE)) $tmp=DOL_DATA_ROOT.'/dolibarr.log';
|
||||||
else $tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE);
|
else $tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE);
|
||||||
|
|
||||||
|
if (! empty($conf->global->SYSLOG_FILE_ONEPERSESSION))
|
||||||
|
{
|
||||||
|
$suffixinfilename = '_'.session_name();
|
||||||
|
}
|
||||||
|
|
||||||
return $suffixinfilename?preg_replace('/\.log$/i', $suffixinfilename.'.log', $tmp):$tmp;
|
return $suffixinfilename?preg_replace('/\.log$/i', $suffixinfilename.'.log', $tmp):$tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,9 @@ ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_spy tinyint NOT NULL DEFAULT
|
|||||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN sujet TEXT;
|
ALTER TABLE llx_opensurvey_sondage ADD COLUMN sujet TEXT;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_socpeople MODIFY COLUMN zip varchar(25);
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_extrafields ADD COLUMN fieldcomputed text;
|
ALTER TABLE llx_extrafields ADD COLUMN fieldcomputed text;
|
||||||
ALTER TABLE llx_extrafields ADD COLUMN fielddefault varchar(255);
|
ALTER TABLE llx_extrafields ADD COLUMN fielddefault varchar(255);
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to accoun
|
|||||||
OtherInfo=Other information
|
OtherInfo=Other information
|
||||||
DeleteCptCategory=Remove accounting account from group
|
DeleteCptCategory=Remove accounting account from group
|
||||||
ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group ?
|
ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group ?
|
||||||
|
AlreadyInGeneralLedger=Already journalized in ledgers
|
||||||
|
|
||||||
AccountancyArea=Accountancy area
|
AccountancyArea=Accountancy area
|
||||||
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step:
|
AccountancyAreaDescIntro=Usage of the accountancy module is done in several step:
|
||||||
@ -142,6 +143,7 @@ NumPiece=Piece number
|
|||||||
TransactionNumShort=Num. transaction
|
TransactionNumShort=Num. transaction
|
||||||
AccountingCategory=Accounting account groups
|
AccountingCategory=Accounting account groups
|
||||||
GroupByAccountAccounting=Group by accounting account
|
GroupByAccountAccounting=Group by accounting account
|
||||||
|
ByAccounts=By accounts
|
||||||
NotMatch=Not Set
|
NotMatch=Not Set
|
||||||
DeleteMvt=Delete Ledger lines
|
DeleteMvt=Delete Ledger lines
|
||||||
DelYear=Year to delete
|
DelYear=Year to delete
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
|
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -335,7 +336,7 @@ if ($action == 'create')
|
|||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
// Accountancy_account_capital
|
// Accountancy_account_capital
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("LoanAccountancyCapitalCode").'</td>';
|
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("LoanAccountancyCapitalCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($object->accountancy_account_capital, 'accountancy_account_capital', 1, '', 0, 1);
|
print $formaccounting->select_account($object->accountancy_account_capital, 'accountancy_account_capital', 1, '', 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -415,7 +416,7 @@ if ($id > 0)
|
|||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("Loan"), 0, 'bill');
|
dol_fiche_head($head, 'card', $langs->trans("Loan"), -1, 'bill');
|
||||||
|
|
||||||
print '<script type="text/javascript">' . "\n";
|
print '<script type="text/javascript">' . "\n";
|
||||||
print ' function popEcheancier() {' . "\n";
|
print ' function popEcheancier() {' . "\n";
|
||||||
@ -712,9 +713,9 @@ if ($id > 0)
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'edit') print "</form>\n";
|
print '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buttons actions
|
* Buttons actions
|
||||||
|
|||||||
@ -199,12 +199,17 @@ $sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
|
|||||||
if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]);
|
if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]);
|
||||||
session_name($sessionname);
|
session_name($sessionname);
|
||||||
session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie
|
session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie
|
||||||
session_start();
|
// This create lock released until session_write_close() or end of page.
|
||||||
if (ini_get('register_globals')) // Deprecated in 5.3 and removed in 5.4. To solve bug in using $_SESSION
|
// We need this lock as long as we read/write $_SESSION ['vars']. We can close released when finished.
|
||||||
|
if (! defined('NOSESSION'))
|
||||||
{
|
{
|
||||||
foreach ($_SESSION as $key=>$value)
|
session_start();
|
||||||
|
if (ini_get('register_globals')) // Deprecated in 5.3 and removed in 5.4. To solve bug in using $_SESSION
|
||||||
{
|
{
|
||||||
if (isset($GLOBALS[$key])) unset($GLOBALS[$key]);
|
foreach ($_SESSION as $key=>$value)
|
||||||
|
{
|
||||||
|
if (isset($GLOBALS[$key])) unset($GLOBALS[$key]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -142,33 +142,34 @@ if (! defined('NOREQUIREUSER'))
|
|||||||
* Load object $conf
|
* Load object $conf
|
||||||
* After this, all parameters conf->global->CONSTANTS are loaded
|
* After this, all parameters conf->global->CONSTANTS are loaded
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// By default conf->entity is 1, but we change this if we ask another value.
|
||||||
|
if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an opened session
|
||||||
|
{
|
||||||
|
$conf->entity = $_SESSION["dol_entity"];
|
||||||
|
}
|
||||||
|
else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script
|
||||||
|
{
|
||||||
|
$conf->entity = $_ENV["dol_entity"];
|
||||||
|
}
|
||||||
|
else if (isset($_POST["loginfunction"]) && GETPOST("entity")) // Just after a login page
|
||||||
|
{
|
||||||
|
$conf->entity = GETPOST("entity",'int');
|
||||||
|
}
|
||||||
|
else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module
|
||||||
|
{
|
||||||
|
$conf->entity = DOLENTITY;
|
||||||
|
}
|
||||||
|
else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module (TODO: We should remove this. entity to use should never be stored into client side)
|
||||||
|
{
|
||||||
|
$conf->entity = $_COOKIE['DOLENTITY'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sanitize entity
|
||||||
|
if (! is_numeric($conf->entity)) $conf->entity=1;
|
||||||
|
|
||||||
if (! defined('NOREQUIREDB'))
|
if (! defined('NOREQUIREDB'))
|
||||||
{
|
{
|
||||||
// By default conf->entity is 1, but we change this if we ask another value.
|
|
||||||
if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an opened session
|
|
||||||
{
|
|
||||||
$conf->entity = $_SESSION["dol_entity"];
|
|
||||||
}
|
|
||||||
else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script
|
|
||||||
{
|
|
||||||
$conf->entity = $_ENV["dol_entity"];
|
|
||||||
}
|
|
||||||
else if (isset($_POST["loginfunction"]) && GETPOST("entity")) // Just after a login page
|
|
||||||
{
|
|
||||||
$conf->entity = GETPOST("entity",'int');
|
|
||||||
}
|
|
||||||
else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module
|
|
||||||
{
|
|
||||||
$conf->entity = DOLENTITY;
|
|
||||||
}
|
|
||||||
else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module (TODO: We should remove this. entity to use should never be stored into client side)
|
|
||||||
{
|
|
||||||
$conf->entity = $_COOKIE['DOLENTITY'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sanitize entity
|
|
||||||
if (! is_numeric($conf->entity)) $conf->entity=1;
|
|
||||||
|
|
||||||
//print "Will work with data into entity instance number '".$conf->entity."'";
|
//print "Will work with data into entity instance number '".$conf->entity."'";
|
||||||
|
|
||||||
// Here we read database (llx_const table) and define $conf->global->XXX var.
|
// Here we read database (llx_const table) and define $conf->global->XXX var.
|
||||||
|
|||||||
36
htdocs/public/test/test_sessionlock.php
Normal file
36
htdocs/public/test/test_sessionlock.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||||
|
if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
|
||||||
|
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library
|
||||||
|
if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||||
|
// If you don't need session management (can't be logged if no session used). You must also set
|
||||||
|
// NOCSRFCHECK, NOTOKENRENEWAL, NOLOGIN,
|
||||||
|
// Disable module with GETPOST('disablemodules') won't work. Variable 'dol_...' will not be set.
|
||||||
|
// $_SESSION are then simple vars if sessions are not active.
|
||||||
|
if (! defined("NOSESSION")) define("NOSESSION",'1');
|
||||||
|
|
||||||
|
define('REQUIRE_JQUERY_MULTISELECT','select2');
|
||||||
|
|
||||||
|
print PHP_SESSION_DISABLED;
|
||||||
|
print PHP_SESSION_NONE;
|
||||||
|
print PHP_SESSION_ACTIVE;
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print session_status();
|
||||||
|
require '../../main.inc.php';
|
||||||
|
print session_status();
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
//print 'a'.$_SESSION['disablemodules'].'b';
|
||||||
|
|
||||||
|
print 'This page is visible. It means you are not locked.';
|
||||||
|
|
||||||
|
//session_write_close();
|
||||||
@ -120,7 +120,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -2000,7 +2000,7 @@ else
|
|||||||
|
|
||||||
dol_htmloutput_errors($error,$errors);
|
dol_htmloutput_errors($error,$errors);
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,7 @@ if (! empty($socid))
|
|||||||
|
|
||||||
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,7 @@ if (empty($socid))
|
|||||||
$head = societe_prepare_head($object);
|
$head = societe_prepare_head($object);
|
||||||
dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ if ($object->id)
|
|||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($result > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ if ($socid)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'project', $langs->trans("ThirdParty"), -1, 'company');
|
dol_fiche_head($head, 'project', $langs->trans("ThirdParty"), -1, 'company');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -352,7 +352,7 @@ if ($socid && $action != 'edit' && $action != "create")
|
|||||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -150,7 +150,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
|
||||||
|
|
||||||
|
|||||||
@ -267,7 +267,9 @@ input.select2-input {
|
|||||||
border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */
|
border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */
|
||||||
}
|
}
|
||||||
|
|
||||||
.liste_titre input[name=monthvalid], .liste_titre input[name=search_smonth], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month], .liste_titre input[name=month_lim] {
|
.liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
|
||||||
|
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month],
|
||||||
|
.liste_titre input[name=month_lim] {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
input[type=submit] {
|
input[type=submit] {
|
||||||
|
|||||||
@ -282,7 +282,9 @@ textarea.cke_source:focus
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.liste_titre input[name=monthvalid], .liste_titre input[name=search_smonth], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre input[name=month_lim] {
|
.liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth],
|
||||||
|
.liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month],
|
||||||
|
.liste_titre input[name=month_lim] {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user