Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
This commit is contained in:
commit
d2173c1fa4
@ -909,7 +909,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
|
||||
@ -3744,7 +3744,9 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
if ($action != 'classify') {
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&facid=' . $object->id . '">';
|
||||
print img_edit($langs->trans('SetProject'), 1);
|
||||
if ($user->rights->facture->creer) {
|
||||
print img_edit($langs->trans('SetProject'), 1);
|
||||
}
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
|
||||
@ -899,7 +899,7 @@ if ($action == 'create')
|
||||
// Bank account
|
||||
if ($object->fk_account > 0)
|
||||
{
|
||||
print "<tr><td>".$langs->trans('BankAccount')."</td><td>";
|
||||
print "<tr><td>".$langs->trans('RIB')."</td><td>";
|
||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
|
||||
print "</td></tr>";
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Project');
|
||||
print '</td>';
|
||||
if ($action != 'classify') {
|
||||
if ($action != 'classify' && $user->rights->facture->creer) {
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&facid=' . $object->id . '">';
|
||||
print img_edit($langs->trans('SetProject'), 1);
|
||||
print '</a></td>';
|
||||
@ -1129,9 +1129,11 @@ else
|
||||
}
|
||||
|
||||
// Bank Account
|
||||
$langs->load('banks');
|
||||
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('BankAccount');
|
||||
print $langs->trans('RIB');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||
|
||||
@ -129,7 +129,7 @@ $fieldstosearchall = array(
|
||||
$arrayfields=array(
|
||||
'p.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
||||
'p.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
|
||||
'p.poste'=>array('label'=>$langs->trans("Post"), 'checked'=>1),
|
||||
'p.poste'=>array('label'=>$langs->trans("PostOrFunction"), 'checked'=>1),
|
||||
'p.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
|
||||
'p.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
|
||||
'p.phone'=>array('label'=>$langs->trans("PhonePro"), 'checked'=>1),
|
||||
@ -761,8 +761,10 @@ if ($result)
|
||||
}
|
||||
// Action column - Links Add action and Export vcard
|
||||
print '<td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&contactid='.$obj->cidp.'&socid='.$obj->socid.'">'.img_object($langs->trans("AddAction"),"action").'</a>';
|
||||
print ' ';
|
||||
if ($user->rights->agenda->myactions->create) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&contactid='.$obj->cidp.'&socid='.$obj->socid.'">'.img_object($langs->trans("AddAction"),"action").'</a>';
|
||||
print ' ';
|
||||
}
|
||||
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$obj->cidp.'">';
|
||||
print img_picto($langs->trans("VCard"),'vcard.png').' ';
|
||||
print '</a></td>';
|
||||
|
||||
@ -3073,8 +3073,16 @@ abstract class CommonObject
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$res = $this->db->fetch_object($resql);
|
||||
return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
|
||||
$num = $this->db->num_rows($resql);
|
||||
if ($num > 0)
|
||||
{
|
||||
$res = $this->db->fetch_object($resql);
|
||||
return 'Incoterm : '.$res->code.' - '.$this->location_incoterms;
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -3150,11 +3150,14 @@ class Form
|
||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
} else {
|
||||
|
||||
$langs->load('banks');
|
||||
|
||||
if ($selected) {
|
||||
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
|
||||
$bankstatic=new Account($this->db);
|
||||
$bankstatic->fetch($selected);
|
||||
print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
|
||||
print $this->textwithpicto($bankstatic->getNomUrl(1),$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
|
||||
@ -1373,7 +1373,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if ($result > 0)
|
||||
{
|
||||
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
|
||||
$ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
|
||||
$fourn_ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice
|
||||
}
|
||||
if ($result == 0) // If result == 0, we failed to found the supplier reference price
|
||||
{
|
||||
@ -1457,7 +1457,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql.= ", '".$localtax1_type."',";
|
||||
$sql.= " '".$localtax2_type."'";
|
||||
|
||||
$sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$this->db->escape($ref)."',";
|
||||
$sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$this->db->escape($fourn_ref)."',";
|
||||
$sql.= "'".price2num($total_ht)."',";
|
||||
$sql.= "'".price2num($total_tva)."',";
|
||||
$sql.= "'".price2num($total_localtax1)."',";
|
||||
|
||||
@ -870,7 +870,7 @@ if (empty($reshook))
|
||||
$action = '';
|
||||
}
|
||||
|
||||
elseif ($action == 'classin')
|
||||
elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setProject($projectid);
|
||||
@ -1844,7 +1844,9 @@ else
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentConditions');
|
||||
print '<td>';
|
||||
if ($action != 'editconditions') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) {
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editconditions')
|
||||
@ -1864,7 +1866,9 @@ else
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||
if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) {
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editmode')
|
||||
@ -1994,7 +1998,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Project');
|
||||
print '</td>';
|
||||
if ($action != 'classify')
|
||||
if ($action != 'classify' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$object->id.'">';
|
||||
print img_edit($langs->trans('SetProject'),1);
|
||||
@ -2135,13 +2139,17 @@ else
|
||||
// Reopen a standard paid invoice
|
||||
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
|
||||
{
|
||||
if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice
|
||||
if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<span class="butActionRefused" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span>';
|
||||
if ($user->rights->fournisseur->facture->creer) {
|
||||
print '<span class="butActionRefused" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span>';
|
||||
} elseif (!$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) {
|
||||
print '<span class="butActionRefused">'.$langs->trans('ReOpen').'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ $langs->load("customers");
|
||||
$langs->load("suppliers");
|
||||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
$langs->load('commercial');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid','int');
|
||||
@ -160,7 +161,7 @@ $arrayfields=array(
|
||||
's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4),
|
||||
's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5),
|
||||
's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6),
|
||||
'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1),
|
||||
'customerorsupplier'=>array('label'=>$langs->trans('Nature'), 'checked'=>1),
|
||||
's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel),
|
||||
's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm),
|
||||
's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
@ -592,7 +593,7 @@ if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titr
|
||||
if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer
|
||||
if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre($arrayfields['customerorsupplier']['label']); // type of customer
|
||||
if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
|
||||
// Extra fields
|
||||
|
||||
@ -1907,7 +1907,7 @@ if ($action == 'create')
|
||||
$formmail->withtocc = $liste;
|
||||
$formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false);
|
||||
|
||||
$formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__');
|
||||
$formmail->withtopic = $outputlangs->trans('SendAskRef', '__SUPPLIERPROPREF__');
|
||||
|
||||
$formmail->withfile = 2;
|
||||
$formmail->withbody = 1;
|
||||
|
||||
@ -153,7 +153,11 @@ $head=user_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -133,7 +133,11 @@ if ($id && $action != 'edit')
|
||||
$title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'bank', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -1183,7 +1183,11 @@ else
|
||||
else
|
||||
{
|
||||
$title = $langs->trans("User");
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$head = user_prepare_head($object);
|
||||
|
||||
@ -98,7 +98,11 @@ if ($id > 0)
|
||||
|
||||
dol_fiche_head($head, 'clicktodial', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -129,7 +129,11 @@ if ($object->id)
|
||||
|
||||
dol_fiche_head($head, 'document', $langs->trans("User"),0,'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -67,7 +67,11 @@ $title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'info', $title, 0, 'user');
|
||||
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -96,7 +96,11 @@ $head = user_prepare_head($object);
|
||||
$title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'ldap', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -89,7 +89,11 @@ if ($id)
|
||||
$title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'note', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -161,8 +161,12 @@ if ($action == 'edit')
|
||||
if ($action == 'edit')
|
||||
{
|
||||
dol_fiche_head($head, 'guisetup', $title, 0, 'user');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
@ -257,7 +257,11 @@ else
|
||||
* Ecran ajout/suppression permission
|
||||
*/
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '';
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin) {
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
}
|
||||
|
||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user