Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/adherents/card.php htdocs/comm/propal/list.php htdocs/commande/list.php htdocs/compta/facture/list.php htdocs/contrat/card.php htdocs/expensereport/card.php htdocs/fichinter/list.php htdocs/fourn/commande/card.php htdocs/fourn/commande/list.php htdocs/fourn/facture/card.php htdocs/fourn/paiement/card.php htdocs/livraison/card.php htdocs/modulebuilder/template/myobject_list.php htdocs/societe/rib.php htdocs/supplier_proposal/list.php htdocs/user/card.php
This commit is contained in:
commit
7f85d73001
@ -1778,8 +1778,8 @@ else
|
||||
//$filedir = $conf->adherent->dir_output . '/' . get_exdir($object->id, 2, 0, 0, $object, 'member') . dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->adherent->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'member');
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $object->id;
|
||||
$genallowed = $user->rights->adherent->creer;
|
||||
$delallowed = $user->rights->adherent->supprimer;
|
||||
$genallowed = $user->rights->adherent->lire;
|
||||
$delallowed = $user->rights->adherent->creer;
|
||||
|
||||
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $object->default_lang, '', $object);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@ -390,8 +390,8 @@ if ($rowid && $action != 'edit')
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
|
||||
$genallowed = $user->rights->facture->creer;
|
||||
$delallowed = $user->rights->facture->supprimer;
|
||||
$genallowed = $user->rights->facture->lire;
|
||||
$delallowed = $user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@ -577,7 +577,7 @@ if ($action == 'mupdate')
|
||||
|
||||
// Actions to delete doc
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$permissioncreate = ($user->rights->agenda->allactions->delete || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete));
|
||||
$permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read));
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
|
||||
@ -1478,8 +1478,8 @@ if ($id > 0)
|
||||
$filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
|
||||
$genallowed=$user->rights->agenda->myactions->create;
|
||||
$delallowed=$user->rights->agenda->myactions->delete;
|
||||
$genallowed=$user->rights->agenda->myactions->read;
|
||||
$delallowed=$user->rights->agenda->myactions->create;
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="name";
|
||||
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart='contract';
|
||||
$modulepart='actions';
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -2351,8 +2351,8 @@ if ($action == 'create')
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->propal->creer;
|
||||
$delallowed = $user->rights->propal->supprimer;
|
||||
$genallowed = $user->rights->propal->lire;
|
||||
$delallowed = $user->rights->propal->creer;
|
||||
|
||||
$var = true;
|
||||
|
||||
|
||||
@ -947,7 +947,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->propal->lire;
|
||||
$delallowed=$user->rights->propal->lire;
|
||||
$delallowed=$user->rights->propal->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
||||
}
|
||||
|
||||
@ -2573,8 +2573,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$relativepath = $comref . '/' . $comref . '.pdf';
|
||||
$filedir = $conf->commande->dir_output . '/' . $comref;
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->commande->creer;
|
||||
$delallowed = $user->rights->commande->supprimer;
|
||||
$genallowed = $user->rights->commande->lire;
|
||||
$delallowed = $user->rights->commande->creer;
|
||||
print $formfile->showdocuments('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
|
||||
|
||||
|
||||
@ -1397,7 +1397,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->commande->lire;
|
||||
$delallowed=$user->rights->commande->supprimer;
|
||||
$delallowed=$user->rights->commande->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -4364,8 +4364,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
|
||||
$genallowed = $user->rights->facture->creer;
|
||||
$delallowed = $user->rights->facture->supprimer;
|
||||
$genallowed = $user->rights->facture->lire;
|
||||
$delallowed = $user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@ -1247,7 +1247,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -2124,8 +2124,8 @@ else
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->contrat->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->contrat->creer;
|
||||
$delallowed = $user->rights->contrat->supprimer;
|
||||
$genallowed = $user->rights->contrat->lire;
|
||||
$delallowed = $user->rights->contrat->creer;
|
||||
|
||||
$var = true;
|
||||
|
||||
|
||||
@ -761,8 +761,8 @@ if (! empty($id) && $action != 'edit')
|
||||
$filename = dol_sanitizeFileName($object->id);
|
||||
$filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id);
|
||||
$urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id;
|
||||
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->creer);
|
||||
$delallowed = $user->rights->don->supprimer;
|
||||
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->lire);
|
||||
$delallowed = $user->rights->don->creer;
|
||||
|
||||
print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
|
||||
|
||||
|
||||
@ -2122,7 +2122,7 @@ else if ($id || $ref)
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
|
||||
$genallowed=$user->rights->expedition->lire;
|
||||
$delallowed=$user->rights->expedition->supprimer;
|
||||
$delallowed=$user->rights->expedition->creer;
|
||||
|
||||
print $formfile->showdocuments('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
|
||||
|
||||
|
||||
@ -2396,8 +2396,8 @@ if ($action != 'presend')
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = 1;
|
||||
$delallowed = 1;
|
||||
$genallowed = $user->rights->expensereport->export;
|
||||
$delallowed = $user->rights->expensereport->export;
|
||||
$var = true;
|
||||
print $formfile->showdocuments('expensereport',$filename,$filedir,$urlsource,$genallowed,$delallowed);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@ -752,7 +752,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->expensereport->lire;
|
||||
$delallowed=$user->rights->expensereport->lire;
|
||||
$delallowed=$user->rights->expensereport->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -1719,8 +1719,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
$filename=dol_sanitizeFileName($object->ref);
|
||||
$filedir=$conf->ficheinter->dir_output . "/".$filename;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed=$user->rights->ficheinter->creer;
|
||||
$delallowed=$user->rights->ficheinter->supprimer;
|
||||
$genallowed=$user->rights->ficheinter->lire;
|
||||
$delallowed=$user->rights->ficheinter->creer;
|
||||
print $formfile->showdocuments('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
|
||||
|
||||
// Show links to link elements
|
||||
|
||||
@ -633,7 +633,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->ficheinter->lire;
|
||||
$delallowed=$user->rights->ficheinter->supprimer;
|
||||
$delallowed=$user->rights->ficheinter->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -2386,6 +2386,7 @@ elseif (! empty($object->id))
|
||||
// Set status to ordered (action=commande)
|
||||
print '<!-- form to record supplier order -->'."\n";
|
||||
print '<form name="commande" id="makeorder" action="card.php?id='.$object->id.'&action=commande" method="post">';
|
||||
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="commande">';
|
||||
print load_fiche_titre($langs->trans("ToOrder"),'','');
|
||||
@ -2407,6 +2408,7 @@ elseif (! empty($object->id))
|
||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
print "<br>";
|
||||
}
|
||||
@ -2423,8 +2425,8 @@ elseif (! empty($object->id))
|
||||
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
|
||||
$filedir = $conf->fournisseur->dir_output . '/commande/' . $comfournref;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed=$user->rights->fournisseur->commande->creer;
|
||||
$delallowed=$user->rights->fournisseur->commande->supprimer;
|
||||
$genallowed=$user->rights->fournisseur->commande->lire;
|
||||
$delallowed=$user->rights->fournisseur->commande->creer;
|
||||
|
||||
print $formfile->showdocuments('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,0,0,'','','',$object->thirdparty->default_lang);
|
||||
$somethingshown=$formfile->numoffiles;
|
||||
|
||||
@ -1233,7 +1233,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->fournisseur->commande->lire;
|
||||
$delallowed=$user->rights->fournisseur->commande->lire;
|
||||
$delallowed=$user->rights->fournisseur->commande->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -1439,11 +1439,11 @@ if ($action == 'create')
|
||||
$dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp);
|
||||
$datetmp=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']);
|
||||
$datedue=($datetmp==''?-1:$datetmp);
|
||||
|
||||
|
||||
// Replicate extrafields
|
||||
$objectsrc->fetch_optionals($originid);
|
||||
$object->array_options = $objectsrc->array_options;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2810,8 +2810,8 @@ else
|
||||
$subdir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref;
|
||||
$filedir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id;
|
||||
$genallowed=$user->rights->fournisseur->facture->creer;
|
||||
$delallowed=$user->rights->fournisseur->facture->supprimer;
|
||||
$genallowed=$user->rights->fournisseur->facture->lire;
|
||||
$delallowed=$user->rights->fournisseur->facture->creer;
|
||||
$modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)?'':$conf->global->INVOICE_SUPPLIER_ADDON_PDF));
|
||||
|
||||
print $formfile->showdocuments('facture_fournisseur',$subdir,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang);
|
||||
|
||||
@ -1166,7 +1166,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -374,8 +374,8 @@ if ($result > 0)
|
||||
$ref=dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$object->id;
|
||||
$genallowed=$user->rights->fournisseur->facture->creer;
|
||||
$delallowed=$user->rights->fournisseur->facture->supprimer;
|
||||
$genallowed=$user->rights->fournisseur->facture->lire;
|
||||
$delallowed=$user->rights->fournisseur->facture->creer;
|
||||
$modelpdf=(! empty($object->modelpdf)?$object->modelpdf:(empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)?'':$conf->global->SUPPLIER_PAYMENT_ADDON_PDF));
|
||||
|
||||
print $formfile->showdocuments('supplier_payment',$ref,$filedir,$urlsource,$genallowed,$delallowed,$modelpdf,1,0,0,40,0,'','','',$societe->default_lang);
|
||||
|
||||
@ -741,8 +741,8 @@ else
|
||||
$filedir = $conf->expedition->dir_output . "/receipt/" . $objectref;
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
|
||||
$genallowed=$user->rights->expedition->livraison->creer;
|
||||
$delallowed=$user->rights->expedition->livraison->supprimer;
|
||||
$genallowed=$user->rights->expedition->livraison->lire;
|
||||
$delallowed=$user->rights->expedition->livraison->creer;
|
||||
|
||||
print $formfile->showdocuments('livraison',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
|
||||
|
||||
|
||||
@ -585,8 +585,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$relativepath = $comref . '/' . $comref . '.pdf';
|
||||
$filedir = $conf->mymodule->dir_output . '/' . $comref;
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->mymodule->creer;
|
||||
$delallowed = $user->rights->mymodule->supprimer;
|
||||
$genallowed = $user->rights->mymodule->read; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $user->rights->mymodule->create; // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('mymodule', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
|
||||
|
||||
|
||||
@ -648,7 +648,7 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->mymodule->read;
|
||||
$delallowed=$user->rights->mymodule->read;
|
||||
$delallowed=$user->rights->mymodule->create;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -2030,8 +2030,8 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
|
||||
$relativepath = $comref . '/' . $objectref . '.pdf';
|
||||
$filedir = $conf->produit->dir_output . '/' . $objectref;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed=$user->rights->produit->creer;
|
||||
$delallowed=$user->rights->produit->supprimer;
|
||||
$genallowed=$user->rights->produit->lire;
|
||||
$delallowed=$user->rights->produit->creer;
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@ -442,8 +442,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$relativepath = $comref . '/' . $comref . '.pdf';
|
||||
$filedir = $conf->product->dir_output . '/inventory/' . $comref;
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->inventory->creer;
|
||||
$delallowed = $user->rights->inventory->supprimer;
|
||||
$genallowed = $user->rights->inventory->read;
|
||||
$delallowed = $user->rights->inventory->create;
|
||||
print $formfile->showdocuments('inventory', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
|
||||
|
||||
|
||||
@ -595,7 +595,7 @@ if ($nbtotalofrecords === '' || $nbtotalofrecords)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->inventory->read;
|
||||
$delallowed=$user->rights->inventory->read;
|
||||
$delallowed=$user->rights->inventory->create;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_inventory','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -604,7 +604,7 @@ if ($resql)
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ else
|
||||
/**
|
||||
* Add a gant chart line
|
||||
*
|
||||
* @param string $tarr tarr
|
||||
* @param array $tarr Array of all tasks
|
||||
* @param array $task Array with properties of one task
|
||||
* @param Project $project_dependencies Project object
|
||||
* @param int $level Level
|
||||
@ -208,7 +208,7 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
$s = "\n// Add taks id=".$task["task_id"]." level = ".$level."\n";
|
||||
// $s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js($name)."','".$start_date."', '".$end_date."', '".$task['task_color']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]>0?1:0).", '".$parent."', 1, '".($depend?$depend:"")."', '".$note."'));";
|
||||
// For JSGanttImproved
|
||||
$s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js(trim($name))."','".$start_date."', '".$end_date."', '".$task['task_css']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]).", '".$parent."', 1, '".($depend?$depend:$parent."SS")."', '".($percent >= 0 ? $percent.'%' : '0%')."','".dol_escape_js($task['note'])."'));";
|
||||
$s.= "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js(trim($name))."','".$start_date."', '".$end_date."', '".$task['task_css']."', '".$link."', ".$task['task_milestone'].", '".dol_escape_js($resources)."', ".($percent >= 0 ? $percent : 0).", ".($task["task_is_group"]).", '".$parent."', 1, '".($depend?$depend:$parent."SS")."', '".($percent >= 0 ? $percent.'%' : '0%')."','".dol_escape_js($task['note'])."'));";
|
||||
echo $s;
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
/**
|
||||
* Find child Gantt line
|
||||
*
|
||||
* @param string $tarr tarr
|
||||
* @param array $tarr tarr
|
||||
* @param int $parent Parent
|
||||
* @param Project $project_dependencies Project object
|
||||
* @param int $level Level
|
||||
|
||||
@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
$id=GETPOST('id','int');
|
||||
@ -65,6 +67,7 @@ $form=new Form($db);
|
||||
$formother=new FormOther($db);
|
||||
$userstatic=new User($db);
|
||||
$companystatic=new Societe($db);
|
||||
$contactstatic=new Contact($db);
|
||||
$task = new Task($db);
|
||||
|
||||
$arrayofcss=array('/includes/jsgantt/jsgantt.css');
|
||||
@ -239,6 +242,7 @@ if (count($tasksarray)>0)
|
||||
foreach($tasksarray as $key => $val)
|
||||
{
|
||||
$task->fetch($val->id);
|
||||
|
||||
$tasks[$taskcursor]['task_id']=$val->id;
|
||||
$tasks[$taskcursor]['task_parent']=$val->fk_parent;
|
||||
$tasks[$taskcursor]['task_is_group'] = 0;
|
||||
@ -261,7 +265,7 @@ if (count($tasksarray)>0)
|
||||
$tasks[$taskcursor]['task_end_date']=$val->date_end;
|
||||
$tasks[$taskcursor]['task_color']='b4d1ea';
|
||||
$idofusers=$task->getListContactId('internal');
|
||||
$idofthirdparty=$task->getListContactId('external');
|
||||
$idofcontacts=$task->getListContactId('external');
|
||||
$s='';
|
||||
if (count($idofusers)>0)
|
||||
{
|
||||
@ -275,18 +279,26 @@ if (count($tasksarray)>0)
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
//if (count($idofusers)>0 && (count($idofthirdparty)>0)) $s.=' - ';
|
||||
if (count($idofthirdparty)>0)
|
||||
//if (count($idofusers)>0 && (count($idofcontacts)>0)) $s.=' - ';
|
||||
if (count($idofcontacts)>0)
|
||||
{
|
||||
if ($s) $s.=' - ';
|
||||
$s.=$langs->trans("Externals").': ';
|
||||
$i=0;
|
||||
foreach($idofthirdparty as $valid)
|
||||
$contactidfound=array();
|
||||
foreach($idofcontacts as $valid)
|
||||
{
|
||||
$companystatic->fetch($valid);
|
||||
if ($i) $s.=',';
|
||||
$s.=$companystatic->name;
|
||||
$i++;
|
||||
if (empty($contactidfound[$valid]))
|
||||
{
|
||||
$res = $contactstatic->fetch($valid);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($i) $s.=', ';
|
||||
$s.=$contactstatic->getFullName($langs);
|
||||
$contactidfound[$valid]=1;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//if ($s) $tasks[$taskcursor]['task_resources']='<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("List").'</a>';
|
||||
|
||||
@ -257,8 +257,8 @@ for ($i=1; $i<=4; $i++) {
|
||||
*/
|
||||
$filedir=$conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
|
||||
$genallowed=$user->rights->societe->creer;
|
||||
$delallowed=$user->rights->societe->supprimer;
|
||||
$genallowed=$user->rights->societe->lire;
|
||||
$delallowed=$user->rights->societe->creer;
|
||||
|
||||
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
|
||||
?>
|
||||
|
||||
@ -201,8 +201,8 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||
*/
|
||||
$filedir=$conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid;
|
||||
$genallowed=$user->rights->societe->creer;
|
||||
$delallowed=$user->rights->societe->supprimer;
|
||||
$genallowed=$user->rights->societe->lire;
|
||||
$delallowed=$user->rights->societe->creer;
|
||||
|
||||
print $formfile->showdocuments('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang);
|
||||
?>
|
||||
|
||||
@ -2516,8 +2516,8 @@ else
|
||||
*/
|
||||
$filedir=$conf->societe->multidir_output[$object->entity].'/'.$object->id;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
|
||||
$genallowed=$user->rights->societe->creer;
|
||||
$delallowed=$user->rights->societe->supprimer;
|
||||
$genallowed=$user->rights->societe->lire;
|
||||
$delallowed=$user->rights->societe->creer;
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@ -683,8 +683,8 @@ if ($socid && $action != 'edit' && $action != "create")
|
||||
*/
|
||||
$filedir=$conf->societe->multidir_output[$object->entity].'/'.$object->id;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
|
||||
$genallowed=$user->rights->societe->creer;
|
||||
$delallowed=$user->rights->societe->supprimer;
|
||||
$genallowed=$user->rights->societe->lire;
|
||||
$delallowed=$user->rights->societe->creer;
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@ -1763,8 +1763,8 @@ if ($action == 'create')
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->supplier_proposal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->supplier_proposal->creer;
|
||||
$delallowed = $user->rights->supplier_proposal->supprimer;
|
||||
$genallowed = $user->rights->supplier_proposal->lire;
|
||||
$delallowed = $user->rights->supplier_proposal->creer;
|
||||
|
||||
print $formfile->showdocuments('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
|
||||
|
||||
@ -939,7 +939,7 @@ if ($resql)
|
||||
$filedir=$diroutputmassaction;
|
||||
|
||||
$genallowed=$user->rights->supplier_proposal->lire;
|
||||
$delallowed=$user->rights->supplier_proposal->lire;
|
||||
$delallowed=$user->rights->supplier_proposal->creer;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
||||
}
|
||||
|
||||
@ -3534,6 +3534,12 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
|
||||
/* Gantt
|
||||
/* ============================================================================== */
|
||||
|
||||
div.gTaskInfo {
|
||||
background: #f0f0f0 !important;
|
||||
}
|
||||
.gtaskblue {
|
||||
background: rgb(108,152,185) !important;
|
||||
}
|
||||
td.gtaskname {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@ -2560,8 +2560,8 @@ else
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->user->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->user->user->creer;
|
||||
$delallowed = $user->rights->user->user->supprimer;
|
||||
$genallowed = $user->rights->user->user->lire;
|
||||
$delallowed = $user->rights->user->user->creer;
|
||||
|
||||
print $formfile->showdocuments('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user