Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop
This commit is contained in:
commit
dfed5bf2c7
@ -98,7 +98,7 @@ if (! empty($search_accountancy_code_end)) {
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
@ -137,7 +137,7 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
|
||||
else {
|
||||
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||
$title_page = $langs->trans("AccountBalance") . (($search_date_start || $search_date_end) ? ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end) : '');
|
||||
|
||||
llxHeader('', $title_page);
|
||||
|
||||
@ -160,7 +160,7 @@ else {
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy', 0, $button);
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
|
||||
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
@ -167,7 +167,7 @@ print '<br>';
|
||||
|
||||
//print '<div class="inline-block divButAction">';
|
||||
// TODO Remove this. Should be done always.
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) 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>';
|
||||
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup')
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), -1, 'account');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
|
||||
@ -71,7 +72,7 @@ if ($action == 'updateMask')
|
||||
|
||||
if ($action == 'setmod')
|
||||
{
|
||||
dolibarr_set_const($db, "CHEQUERECEIPTS_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "CHEQUERECEIPTS_ADDON",$value, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
||||
@ -105,7 +106,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
dol_fiche_head($head, 'checkreceipts', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
dol_fiche_head($head, 'checkreceipts', $langs->trans("BankSetupModule"), -1, 'account');
|
||||
|
||||
/*
|
||||
* Numbering module
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
*/
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
$langs->load("admin");
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
|
||||
$langs->load("admin");
|
||||
|
||||
@ -4186,7 +4186,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if (! $objectidnext && count($object->lines) > 0)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="facture/fiche-rec.php?facid=' . $object->id . '&action=create">' . $langs->trans("ChangeIntoRepeatableInvoice") . '</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/fiche-rec.php.php?facid=' . $object->id . '&action=create">' . $langs->trans("ChangeIntoRepeatableInvoice") . '</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +156,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
|
||||
// Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
|
||||
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||
$themepath=dol_buildpath($conf->css,1);
|
||||
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
|
||||
{
|
||||
|
||||
@ -326,7 +326,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
|
||||
$formother = new FormOther($db);
|
||||
|
||||
//$dirthemes=array(empty($conf->global->MAIN_FORCETHEMEDIR)?'/theme':$conf->global->MAIN_FORCETHEMEDIR.'/theme');
|
||||
$dirthemes=array('/theme');
|
||||
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
|
||||
{
|
||||
|
||||
@ -802,7 +802,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||
$newmenu->add("/compta/facture/card.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer);
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire, '', $mainmenu, 'customers_bills_list');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu))
|
||||
{
|
||||
@ -830,7 +830,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
||||
$newmenu->add("/fourn/facture/card.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer);
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"),1,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"),1,$user->rights->fournisseur->facture->lire, 'suppliers_bills_list');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) {
|
||||
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"),2,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_draft');
|
||||
|
||||
@ -156,10 +156,10 @@ if (empty($reshook))
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
// Because createFromClone modifies the object, we must clone it so that we can restore it later
|
||||
// Because createFromClone modifies the object, we must clone it so that we can restore it later if it fails
|
||||
$orig = clone $object;
|
||||
|
||||
$result=$object->createFromClone($socid);
|
||||
$result=$object->createFromClone(GETPOST('fk_user_author','int'));
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
||||
@ -1448,8 +1448,11 @@ else
|
||||
print '<td>'.$langs->trans("User").'</td>';
|
||||
print '<td>';
|
||||
$userfee=new User($db);
|
||||
$userfee->fetch($object->fk_user_author);
|
||||
print $userfee->getNomUrl(-1);
|
||||
if ($object->fk_user_author > 0)
|
||||
{
|
||||
$userfee->fetch($object->fk_user_author);
|
||||
print $userfee->getNomUrl(-1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref
|
||||
@ -1536,12 +1539,11 @@ else
|
||||
// Clone confirmation
|
||||
if ($action == 'clone') {
|
||||
// Create an array for form
|
||||
$criteriaforfilter='hierarchyme';
|
||||
if (! empty($user->rights->expensereport->readall)) $criteriaforfilter='';
|
||||
$formquestion = array(
|
||||
// 'text' => $langs->trans("ConfirmClone"),
|
||||
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' =>
|
||||
// 1),
|
||||
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value'
|
||||
// => 1),
|
||||
'text' => '',
|
||||
array('type' => 'other','name' => 'fk_user_author','label' => $langs->trans("SelectTargetUser"),'value' => $form->select_dolusers((GETPOST('fk_user_author', 'int')> 0 ? GETPOST('fk_user_author', 'int') : $user->id), 'fk_user_author', 0, null, 0, $criteriaforfilter))
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneExpenseReport'), $langs->trans('ConfirmCloneExpenseReport', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
@ -1658,7 +1660,7 @@ else
|
||||
$userauthor=new User($db);
|
||||
$result=$userauthor->fetch($object->fk_user_author);
|
||||
if ($result < 0) dol_print_error('',$userauthor->error);
|
||||
print $userauthor->getNomUrl(-1);
|
||||
elseif ($result > 0) print $userauthor->getNomUrl(-1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1694,8 +1696,8 @@ else
|
||||
if ($object->fk_user_validator > 0)
|
||||
{
|
||||
$userfee=new User($db);
|
||||
$userfee->fetch($object->fk_user_validator);
|
||||
print $userfee->getNomUrl(-1);
|
||||
$result = $userfee->fetch($object->fk_user_validator);
|
||||
if ($result > 0) print $userfee->getNomUrl(-1);
|
||||
if (empty($userfee->email) || ! isValidEmail($userfee->email))
|
||||
{
|
||||
$langs->load("errors");
|
||||
@ -1712,8 +1714,8 @@ else
|
||||
if ($object->fk_user_cancel > 0)
|
||||
{
|
||||
$userfee=new User($db);
|
||||
$userfee->fetch($object->fk_user_cancel);
|
||||
print $userfee->getNomUrl(-1);
|
||||
$result = $userfee->fetch($object->fk_user_cancel);
|
||||
if ($result > 0) print $userfee->getNomUrl(-1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1734,8 +1736,8 @@ else
|
||||
if ($object->fk_user_approve > 0)
|
||||
{
|
||||
$userapp=new User($db);
|
||||
$userapp->fetch($object->fk_user_approve);
|
||||
print $userapp->getNomUrl(-1);
|
||||
$result = $userapp->fetch($object->fk_user_approve);
|
||||
if ($result > 0) print $userapp->getNomUrl(-1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1751,8 +1753,8 @@ else
|
||||
print '<td>'.$langs->trans("REFUSEUR").'</td>';
|
||||
print '<td>';
|
||||
$userfee=new User($db);
|
||||
$userfee->fetch($object->fk_user_refuse);
|
||||
print $userfee->getNomUrl(-1);
|
||||
$result = $userfee->fetch($object->fk_user_refuse);
|
||||
if ($result > 0) print $userfee->getNomUrl(-1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr>';
|
||||
|
||||
@ -256,17 +256,19 @@ class ExpenseReport extends CommonObject
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
*
|
||||
* @param int $socid Id of thirdparty
|
||||
* @return int New id of clone
|
||||
* @param int $fk_user_author Id of new user
|
||||
* @return int New id of clone
|
||||
*/
|
||||
function createFromClone($socid=0)
|
||||
function createFromClone($fk_user_author)
|
||||
{
|
||||
global $user,$hookmanager;
|
||||
|
||||
$error=0;
|
||||
|
||||
if (empty($fk_user_author)) $fk_user_author = $user->id;
|
||||
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
@ -282,7 +284,7 @@ class ExpenseReport extends CommonObject
|
||||
$this->fk_statut=0;
|
||||
|
||||
// Clear fields
|
||||
$this->fk_user_author = $user->id; // Note fk_user_author is not the 'author' but the guy the expense report is for.
|
||||
$this->fk_user_author = $fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for.
|
||||
$this->fk_user_valid = '';
|
||||
$this->date_create = '';
|
||||
$this->date_creation = '';
|
||||
|
||||
@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
$langs->load("trips");
|
||||
|
||||
$chid=GETPOST("id",'int');
|
||||
$ref=GETPOST('ref','alpha');
|
||||
@ -285,16 +286,11 @@ if ($action == 'create' || empty($action))
|
||||
{
|
||||
$objp = $expensereport;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td align="right">'.price($objp->total_ttc)."</td>";
|
||||
|
||||
print '<td align="right">'.price($sumpaid)."</td>";
|
||||
|
||||
print '<td align="right">'.price($objp->total_ttc - $sumpaid)."</td>";
|
||||
|
||||
print '<td align="center">';
|
||||
if ($sumpaid < $objp->total_ttc)
|
||||
{
|
||||
@ -308,6 +304,7 @@ if ($action == 'create' || empty($action))
|
||||
print "</td>";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$total+=$objp->total;
|
||||
$total_ttc+=$objp->total_ttc;
|
||||
$totalrecu+=$objp->am;
|
||||
@ -316,7 +313,7 @@ if ($action == 'create' || empty($action))
|
||||
if ($i > 1)
|
||||
{
|
||||
// Print total
|
||||
print "<tr ".$bc[!$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2" align="left">'.$langs->trans("Total").':</td>';
|
||||
print "<td align=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||
print "<td align=\"right\"><b>".price($totalrecu)."</b></td>";
|
||||
|
||||
@ -104,6 +104,7 @@ ALTER TABLE llx_c_email_templates ADD COLUMN content_lines text;
|
||||
ALTER TABLE llx_loan ADD COLUMN fk_projet integer DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_holiday ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
|
||||
|
||||
ALTER TABLE llx_projet_task_time ADD COLUMN datec date;
|
||||
ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp;
|
||||
|
||||
@ -30,6 +30,7 @@ create table llx_projet
|
||||
title varchar(255) NOT NULL,
|
||||
description text,
|
||||
fk_user_creat integer NOT NULL, -- createur du projet
|
||||
fk_user_modif integer,
|
||||
public integer, -- project is public or not
|
||||
fk_statut integer DEFAULT 0 NOT NULL, -- open or close
|
||||
fk_opp_status integer DEFAULT NULL, -- if project is used to manage opportunities
|
||||
|
||||
@ -468,11 +468,11 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
|
||||
$db->close();
|
||||
|
||||
|
||||
// Actions for all version (not in database)
|
||||
// Actions for all versions (not in database)
|
||||
migrate_delete_old_files($db, $langs, $conf);
|
||||
|
||||
migrate_delete_old_dir($db, $langs, $conf);
|
||||
|
||||
|
||||
dol_mkdir(DOL_DATA_ROOT.'/bank');
|
||||
migrate_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits');
|
||||
}
|
||||
@ -3941,7 +3941,11 @@ function migrate_delete_old_files($db,$langs,$conf)
|
||||
DOL_DOCUMENT_ROOT.'/core/modules/mailings/poire.modules.php',
|
||||
DOL_DOCUMENT_ROOT.'/core/modules/mailings/kiwi.modules.php',
|
||||
DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_crabe.modules.php',
|
||||
DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_oursin.modules.php'
|
||||
DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_oursin.modules.php',
|
||||
|
||||
DOL_DOCUMENT_ROOT.'/compta/facture/class/api_invoice.class.php',
|
||||
DOL_DOCUMENT_ROOT.'/commande/class/api_commande.class.php',
|
||||
DOL_DOCUMENT_ROOT.'/user/class/api_user.class.php'
|
||||
);
|
||||
|
||||
foreach ($filetodeletearray as $filetodelete)
|
||||
|
||||
@ -715,6 +715,7 @@ from=from
|
||||
toward=toward
|
||||
Access=Access
|
||||
SelectAction=Select action
|
||||
SelectTargetUser=Select target user/employee
|
||||
HelpCopyToClipboard=Use Ctrl+C to copy to clipboard
|
||||
SaveUploadedFileWithMask=Save file on server with name "<strong>%s</strong>" (otherwise "%s")
|
||||
OriginFileName=Original filename
|
||||
|
||||
@ -88,5 +88,5 @@ NoTripsToExportCSV=No expense report to export for this period.
|
||||
ExpenseReportPayment=Expense report payment
|
||||
ExpenseReportsToApprove=Expense reports to approve
|
||||
ExpenseReportsToPay=Expense reports to pay
|
||||
CloneExpenseReport=Clone expese report
|
||||
CloneExpenseReport=Clone expense report
|
||||
ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ?
|
||||
@ -1005,8 +1005,18 @@ function top_httphead($contenttype='text/html')
|
||||
|
||||
if ($contenttype == 'text/html' ) header("Content-Type: text/html; charset=".$conf->file->character_set_client);
|
||||
else header("Content-Type: ".$contenttype);
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
// Security options
|
||||
header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on)
|
||||
header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks)
|
||||
if (! empty($conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY))
|
||||
{
|
||||
// For example, to restrict script, object, frames or img to some domains
|
||||
// script-src https://api.google.com https://anotherhost.com; object-src https://youtube.com; child-src https://youtube.com; img-src: https://static.example.com
|
||||
// For example, to restrict everything to one domain, except object, ...
|
||||
// default-src https://cdn.example.net; object-src 'none'
|
||||
header("Content-Security-Policy: ".$conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY);
|
||||
}
|
||||
|
||||
|
||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||
/*if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) {
|
||||
@ -1121,7 +1131,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
|
||||
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||
// Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||
$themepath=dol_buildpath($conf->css,1);
|
||||
$themesubdir='';
|
||||
if (! empty($conf->modules_parts['theme'])) // This slow down
|
||||
|
||||
@ -173,7 +173,6 @@ else
|
||||
|
||||
// Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
|
||||
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||
$themepath=dol_buildpath($conf->css,1);
|
||||
if (! empty($conf->modules_parts['theme'])) // This slow down
|
||||
{
|
||||
|
||||
@ -157,6 +157,7 @@ class CodingPhpTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$ok=true;
|
||||
$matches=array();
|
||||
// Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request.
|
||||
preg_match_all('/=\s*\'"\s*\.\s*\$this->(....)/', $filecontent, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $key => $val)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user