Merge branch '8.0' of https://github.com/dolibarr/dolibarr into 9.0
Conflicts: htdocs/core/class/notify.class.php
This commit is contained in:
commit
1d564c2a39
@ -1320,7 +1320,7 @@ if (empty($reshook))
|
||||
if (empty($amount)) continue;
|
||||
|
||||
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
|
||||
$descline = $langs->trans('Deposit');
|
||||
$descline = '(DEPOSIT)';
|
||||
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
|
||||
if ($typeamount=='amount') {
|
||||
$descline.= ' ('. price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
|
||||
|
||||
@ -40,6 +40,7 @@ $year=GETPOST("year","int");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
if($conf->global->SOCIETE_FISCAL_MONTH_START > date('m')) $year_current--;
|
||||
$year_start = $year_current;
|
||||
} else {
|
||||
$year_current = $year;
|
||||
|
||||
@ -358,6 +358,7 @@ class Notify
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE n.fk_contact = c.rowid AND a.rowid = n.fk_action";
|
||||
$sql.= " AND n.fk_soc = s.rowid";
|
||||
$sql.= " AND c.statut = 1";
|
||||
if (is_numeric($notifcode)) $sql.= " AND n.fk_action = ".$notifcode; // Old usage
|
||||
else $sql.= " AND a.code = '".$notifcode."'"; // New usage
|
||||
$sql .= " AND s.rowid = ".$object->socid;
|
||||
@ -372,6 +373,7 @@ class Notify
|
||||
$sql.= " ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."notify_def as n";
|
||||
$sql.= " WHERE n.fk_user = c.rowid AND a.rowid = n.fk_action";
|
||||
$sql.= " AND c.statut = 1";
|
||||
if (is_numeric($notifcode)) $sql.= " AND n.fk_action = ".$notifcode; // Old usage
|
||||
else $sql.= " AND a.code = '".$this->db->escape($notifcode)."'"; // New usage
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ function societe_prepare_head(Societe $object)
|
||||
|
||||
if (empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES))
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->societe->contact->lire)
|
||||
{
|
||||
//$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
|
||||
$nbContact = 0; // TODO
|
||||
|
||||
@ -1256,6 +1256,9 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
|
||||
}
|
||||
}
|
||||
elseif ($object->type == Facture::TYPE_DEPOSIT && $object->element == 'facture') {
|
||||
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
|
||||
}
|
||||
|
||||
// Description short of product line
|
||||
$libelleproduitservice=$label;
|
||||
@ -1282,9 +1285,10 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
$sourceref=!empty($discount->discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$sourceref);
|
||||
// Add date of deposit
|
||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice.= ' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||
|
||||
}
|
||||
if ($desc == '(EXCESS RECEIVED)' && $object->lines[$i]->fk_remise_except)
|
||||
elseif ($desc == '(EXCESS RECEIVED)' && $object->lines[$i]->fk_remise_except)
|
||||
{
|
||||
$discount=new DiscountAbsolute($db);
|
||||
$discount->fetch($object->lines[$i]->fk_remise_except);
|
||||
|
||||
@ -196,9 +196,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
||||
if (! empty($conf->salaries->enabled)) $menuqualified++;
|
||||
if (! empty($conf->supplier_invoice->enabled)) $menuqualified++;
|
||||
if (! empty($conf->loan->enabled)) $menuqualified++;
|
||||
if (! empty($conf->margins->enabled)) $menuqualified++;
|
||||
$tmpentry=array(
|
||||
'enabled'=>$menuqualified,
|
||||
'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read)),
|
||||
'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read) || ! empty($user->rights->margins->liretous)),
|
||||
'module'=>'facture|supplier_invoice|don|tax|salaries|loan');
|
||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
if ($showmode)
|
||||
|
||||
@ -137,6 +137,8 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
if (! empty($line->label)) {
|
||||
$text.= ' <strong>'.$line->label.'</strong>';
|
||||
echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
|
||||
} elseif (strpos($line->description, '(DEPOSIT)') === 0) {
|
||||
echo $text.' '.str_replace('(DEPOSIT)', $langs->trans("Deposit"), $line->description);;
|
||||
} else {
|
||||
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||
echo $text.' '.dol_htmlentitiesbr($line->description);
|
||||
|
||||
@ -42,7 +42,7 @@ $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : ''));
|
||||
$fieldtype = (! empty($ref) ? 'ref' : 'rowid');
|
||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
||||
$result=restrictedArea($user,'margins');
|
||||
if(empty($user->rights->margins->liretous)) accessforbidden();
|
||||
|
||||
$mesg = '';
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ $fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : ''));
|
||||
$fieldtype = (! empty($ref) ? 'ref' : 'rowid');
|
||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
||||
if(empty($user->rights->margins->liretous)) accessforbidden();
|
||||
|
||||
$object = new Product($db);
|
||||
|
||||
|
||||
@ -88,6 +88,7 @@ if (! empty($canvas))
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', $objcanvas);
|
||||
if(empty($user->rights->societe->contact->lire)) accessforbidden();
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user