Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-10-12 19:40:13 +02:00
commit e00cf0d37c
7 changed files with 19 additions and 19 deletions

View File

@ -203,7 +203,7 @@ class Conf
{ {
$modulename = strtolower($reg[1]); $modulename = strtolower($reg[1]);
$partname = strtolower($reg[2]); $partname = strtolower($reg[2]);
if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); }
$arrValue = json_decode($value, true); $arrValue = json_decode($value, true);
if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue; if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue;
elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/';

View File

@ -245,7 +245,7 @@ if (empty($reshook))
{ {
$action = 'create'; $action = 'create';
} }
// Le reste propre a cette action s'affiche en bas de page. // All the next of this action is displayed at the page's bottom.
} }
@ -292,7 +292,7 @@ if (empty($reshook))
$thirdparty = new Societe($db); $thirdparty = new Societe($db);
if ($socid > 0) $thirdparty->fetch($socid); if ($socid > 0) $thirdparty->fetch($socid);
// Creation de la ligne paiement // Creation of payment line
$paiement = new PaiementFourn($db); $paiement = new PaiementFourn($db);
$paiement->datepaye = $datepaye; $paiement->datepaye = $datepaye;
$paiement->amounts = $amounts; // Array of amounts $paiement->amounts = $amounts; // Array of amounts
@ -521,7 +521,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$sql .= " WHERE f.entity = ".$conf->entity; $sql .= " WHERE f.entity = ".$conf->entity;
$sql .= ' AND f.fk_soc = '.$object->socid; $sql .= ' AND f.fk_soc = '.$object->socid;
$sql .= ' AND f.paye = 0'; $sql .= ' AND f.paye = 0';
$sql .= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee $sql .= ' AND f.fk_statut = 1'; // Status=0 => unvalidated, Status=2 => canceled
if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE)
{ {
$sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation $sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation
@ -756,7 +756,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
} }
// Bouton Enregistrer // Save Button
if ($action != 'add_paiement') if ($action != 'add_paiement')
{ {
print '<br><div class="center"><input type="checkbox" checked name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically"); print '<br><div class="center"><input type="checkbox" checked name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically");

View File

@ -128,7 +128,7 @@ if ($action == 'setdatep' && !empty($_POST['datepday']))
// Build document // Build document
$upload_dir = $conf->fournisseur->payment->dir_output; $upload_dir = $conf->fournisseur->payment->dir_output;
// TODO: get the appropriate permisson // TODO: get the appropriate permission
$permissiontoadd = true; $permissiontoadd = true;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
@ -151,7 +151,7 @@ dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment'
if ($result > 0) if ($result > 0)
{ {
/* /*
* Confirmation de la suppression du paiement * Confirmation of payment's delete
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
@ -159,7 +159,7 @@ if ($result > 0)
} }
/* /*
* Confirmation de la validation du paiement * Confirmation of payment's validation
*/ */
if ($action == 'valide') if ($action == 'valide')
{ {
@ -181,7 +181,7 @@ if ($result > 0)
print $form->showrefnav($object,'id','',1,'rowid','ref'); print $form->showrefnav($object,'id','',1,'rowid','ref');
print '</td></tr>';*/ print '</td></tr>';*/
// Date payment // Date of payment
print '<tr><td class="titlefield" colspan="2">'.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; print '<tr><td class="titlefield" colspan="2">'.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
print '</td></tr>'; print '</td></tr>';
@ -251,7 +251,7 @@ if ($result > 0)
print '<br>'; print '<br>';
/** /**
* List of vendor invoices * List of seller's invoices
*/ */
$sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,'; $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,';
$sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' pf.amount, s.nom as name, s.rowid as socid';
@ -332,7 +332,7 @@ if ($result > 0)
/* /*
* Boutons Actions * Actions Buttons
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';

View File

@ -1183,7 +1183,7 @@ if ($action == 'create' && $user->rights->projet->creer)
} }
/* /*
* Boutons actions * Actions Buttons
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();

View File

@ -84,7 +84,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
} }
} }
// bascule du statut d'un contact // Change contact's status
if ($action == 'swapstatut' && $user->rights->projet->creer) if ($action == 'swapstatut' && $user->rights->projet->creer)
{ {
if ($object->fetch($id)) if ($object->fetch($id))
@ -95,7 +95,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
} }
} }
// Efface un contact // Delete a contact
if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer)
{ {
$object->fetch($id); $object->fetch($id);
@ -128,7 +128,7 @@ $userstatic = new User($db);
/* *************************************************************************** */ /* *************************************************************************** */
/* */ /* */
/* Mode vue et edition */ /* Edition and view mode */
/* */ /* */
/* *************************************************************************** */ /* *************************************************************************** */

View File

@ -262,14 +262,14 @@ if (count($tasksarray) > 0)
$tasks = array(); $tasks = array();
$task_dependencies = array(); $task_dependencies = array();
$taskcursor = 0; $taskcursor = 0;
foreach ($tasksarray as $key => $val) // Task array are sorted by "project, position, dateo" foreach ($tasksarray as $key => $val) // Task array are sorted by "project, position, date"
{ {
$task->fetch($val->id, ''); $task->fetch($val->id, '');
$idparent = ($val->fk_parent ? $val->fk_parent : '-'.$val->fk_project); // If start with -, id is a project id $idparent = ($val->fk_parent ? $val->fk_parent : '-'.$val->fk_project); // If start with -, id is a project id
$tasks[$taskcursor]['task_id'] = $val->id; $tasks[$taskcursor]['task_id'] = $val->id;
$tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (requird by ganttchart) $tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (required by ganttchart)
$tasks[$taskcursor]['task_project_id'] = $val->fk_project; $tasks[$taskcursor]['task_project_id'] = $val->fk_project;
$tasks[$taskcursor]['task_parent'] = $idparent; $tasks[$taskcursor]['task_parent'] = $idparent;

View File

@ -284,7 +284,7 @@ $formproject = new FormProjets($db);
$title = $langs->trans("Projects"); $title = $langs->trans("Projects");
// Get list of project id allowed to user (in a string list separated by coma) // Get list of project id allowed to user (in a string list separated by comma)
$projectsListId = ''; $projectsListId = '';
if (!$user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid); if (!$user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid);
@ -386,7 +386,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{ {
$result = $db->query($sql); $result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result); $nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller than paging size (filtering), goto and load page 0
{ {
$page = 0; $page = 0;
$offset = 0; $offset = 0;