FIX use propal instead propale

This commit is contained in:
Regis Houssin 2022-10-16 16:44:34 +02:00
parent 5bbbaab423
commit 514cc76fe2
25 changed files with 42 additions and 42 deletions

View File

@ -204,7 +204,7 @@ class CActionComm
if ($obj->module == 'order' && isModEnabled('commande') && empty($user->rights->commande->lire)) {
$qualified = 1;
}
if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propale->lire)) {
if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propal->lire)) {
$qualified = 1;
}
if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (isModEnabled('supplier_invoice') && !empty($user->rights->supplier_invoice->lire)))) {

View File

@ -74,7 +74,7 @@ restrictedArea($user, 'propal', $object->id);
* Add a new contact
*/
if ($action == 'addcontact' && $user->rights->propale->creer) {
if ($action == 'addcontact' && $user->rights->propal->creer) {
if ($object->id > 0) {
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
@ -92,12 +92,12 @@ if ($action == 'addcontact' && $user->rights->propale->creer) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
} elseif ($action == 'swapstatut' && $user->rights->propale->creer) {
} elseif ($action == 'swapstatut' && $user->rights->propal->creer) {
// Toggle the status of a contact
if ($object->id > 0) {
$result = $object->swapContactStatus(GETPOST('ligne', 'int'));
}
} elseif ($action == 'deletecontact' && $user->rights->propale->creer) {
} elseif ($action == 'deletecontact' && $user->rights->propal->creer) {
// Deletes a contact
$result = $object->delete_contact($lineid);

View File

@ -81,7 +81,7 @@ if (!$sortfield) {
$object = new Propal($db);
$object->fetch($id, $ref);
$permissiontoadd = $user->rights->propale->creer;
$permissiontoadd = $user->rights->propal->creer;
// Security check
if (!empty($user->socid)) {

View File

@ -227,7 +227,7 @@ if ($resql) {
/*
* Open (validated) proposals
*/
if (isModEnabled("propal") && $user->rights->propale->lire) {
if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta";
$sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";

View File

@ -64,7 +64,7 @@ restrictedArea($user, 'propal', $object->id, 'propal');
* Actions
*/
$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php
$permissionnote = $user->rights->propal->creer; // Used by the include of actions_setnotes.inc.php
$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View File

@ -60,7 +60,7 @@ $endyear = $year;
// Load translation files required by the page
$langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal'));
if ($mode == 'customer' && !$user->rights->propale->lire) {
if ($mode == 'customer' && !$user->rights->propal->lire) {
accessforbidden();
}
if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) {

View File

@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '<td class="linkedcol-ref" >'.$objectlink->ref_client.'</td>';
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="linkedcol-amount right">';
if ($user->rights->propale->lire) {
if ($user->rights->propal->lire) {
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
}

View File

@ -119,7 +119,7 @@ if ($resql) {
/*
* Liste des propal brouillons
*/
if (isModEnabled("propal") && $user->rights->propale->lire) {
if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname";
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
@ -177,7 +177,7 @@ if (isModEnabled('agenda')) {
/*
* Dernieres propales ouvertes
*/
if (isModEnabled("propal") && $user->rights->propale->lire) {
if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,";
$sql .= " p.rowid as propalid, p.total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";

View File

@ -102,7 +102,7 @@ class box_activity extends ModeleBoxes
// list the summary of the propals
if (isModEnabled("propal") && $user->rights->propale->lire) {
if (isModEnabled("propal") && $user->rights->propal->lire) {
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$propalstatic = new Propal($this->db);

View File

@ -62,7 +62,7 @@ class box_graph_product_distribution extends ModeleBoxes
$this->hidden = !(
(isModEnabled('facture') && !empty($user->rights->facture->lire))
|| (isModEnabled('commande') && !empty($user->rights->commande->lire))
|| (isModEnabled('propal') && !empty($user->rights->propale->lire))
|| (isModEnabled('propal') && !empty($user->rights->propal->lire))
);
}
@ -110,7 +110,7 @@ class box_graph_product_distribution extends ModeleBoxes
if (!isModEnabled('facture') || empty($user->rights->facture->lire)) {
$showinvoicenb = 0;
}
if (isModEnabled('propal') || empty($user->rights->propale->lire)) {
if (isModEnabled('propal') || empty($user->rights->propal->lire)) {
$showpropalnb = 0;
}
if (!isModEnabled('commande') || empty($user->rights->commande->lire)) {
@ -152,7 +152,7 @@ class box_graph_product_distribution extends ModeleBoxes
$WIDTH = ($nbofgraph >= 2 || !empty($conf->dol_optimize_smallscreen)) ? '300' : '320';
$HEIGHT = '150'; // Height require to have 5+1 entries into legend visible.
if (isModEnabled("propal") && !empty($user->rights->propale->lire)) {
if (isModEnabled("propal") && !empty($user->rights->propal->lire)) {
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($showpropalnb) {
$langs->load("propal");
@ -365,7 +365,7 @@ class box_graph_product_distribution extends ModeleBoxes
$stringtoshow .= '<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow .= '<input type="hidden" name="page_y" value="">';
$stringtoshow .= '<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,showinvoicenb,showpropalnb,showordernb">';
if (isModEnabled("propal") || !empty($user->rights->propale->lire)) {
if (isModEnabled("propal") || !empty($user->rights->propal->lire)) {
$stringtoshow .= '<input type="checkbox" name="'.$param_showpropalnb.'"'.($showpropalnb ? ' checked' : '').'> '.$langs->trans("ForProposals");
$stringtoshow .= '&nbsp;';
}

View File

@ -56,7 +56,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$this->db = $db;
$this->hidden = empty($user->rights->propale->lire);
$this->hidden = empty($user->rights->propal->lire);
}
/**
@ -105,7 +105,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
}
if ($user->rights->propale->lire) {
if ($user->rights->propal->lire) {
$param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';

View File

@ -83,7 +83,7 @@ class box_propales extends ModeleBoxes
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."Propals", $max));
if ($user->rights->propale->lire) {
if ($user->rights->propal->lire) {
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.logo, s.email, s.entity";

View File

@ -2539,7 +2539,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$original_file = $conf->facture->multidir_output[$entity].'/'.$original_file;
} elseif ($modulepart == 'apercupropal' && !empty($conf->propal->multidir_output[$entity])) {
// Wrapping pour les apercu propal
if ($fuser->rights->propale->{$lire}) {
if ($fuser->rights->propal->{$lire}) {
$accessallowed = 1;
}
$original_file = $conf->propal->multidir_output[$entity].'/'.$original_file;
@ -2611,7 +2611,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$original_file = $conf->expensereport->dir_output.'/'.$original_file;
} elseif ($modulepart == 'propalstats' && !empty($conf->propal->multidir_temp[$entity])) {
// Wrapping pour les images des stats propales
if ($fuser->rights->propale->{$lire}) {
if ($fuser->rights->propal->{$lire}) {
$accessallowed = 1;
}
$original_file = $conf->propal->multidir_temp[$entity].'/'.$original_file;
@ -2832,7 +2832,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
} elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) {
// Wrapping pour les propales
if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i', $original_file)) {
if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file)) {
$accessallowed = 1;
}
$original_file = $conf->propal->multidir_output[$entity].'/'.$original_file;

View File

@ -411,7 +411,7 @@ function show_stats_for_company($product, $socid)
print '</tr>';
// Customer proposals
if (isModEnabled("propal") && $user->rights->propale->lire) {
if (isModEnabled("propal") && $user->rights->propal->lire) {
$nblines++;
$ret = $product->load_stats_propale($socid);
if ($ret < 0) {

View File

@ -157,15 +157,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->reception->enabled && $leftmenu=="receptions"', __HANDLER__, 'left', 1353__+MAX_llx_menu__, 'commercial', '', 1350__+MAX_llx_menu__, '/reception/stats/index.php?mainmenu=commercial&amp;leftmenu=receptions', 'Statistics', 1, 'receptions', '$user->rights->reception->lire', '', 2, 2, __ENTITY__);
-- Commercial - Proposals
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&amp;action=create&amp;leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propale->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals', 'List', 1, 'propal', '$user->rights->propale->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propale->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propale->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propale->lire', '', 2, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&amp;action=create&amp;leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propal->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals', 'List', 1, 'propal', '$user->rights->propal->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propal->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propal->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propal->lire', '', 2, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
-- Commercial - Customer's orders
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?mainmenu=commercial&amp;leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);

View File

@ -943,7 +943,7 @@ class doc_generic_project_odt extends ModelePDFProjects
'title' => "ListProposalsAssociatedProject",
'class' => 'Propal',
'table' => 'propal',
'test' => $conf->propal->enabled && $user->rights->propale->lire
'test' => $conf->propal->enabled && $user->rights->propal->lire
),
'order' => array(
'title' => "ListOrdersAssociatedProject",

View File

@ -374,7 +374,7 @@ class pdf_beluga extends ModelePDFProjects
'class'=>'Propal',
'table'=>'propal',
'datefieldname'=>'datep',
'test'=>$conf->propal->enabled && $user->rights->propale->lire,
'test'=>$conf->propal->enabled && $user->rights->propal->lire,
'lang'=>'propal'),
'order'=>array(
'name'=>"CustomersOrders",

View File

@ -41,7 +41,7 @@ $module = $object->element;
// Special cases
if ($module == 'propal') {
$permission = $user->rights->propale->creer;
$permission = $user->rights->propal->creer;
} elseif ($module == 'fichinter') {
$permission = $user->rights->ficheinter->creer;
} elseif ($module == 'order_supplier') {

View File

@ -60,7 +60,7 @@ if (!empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES)) {
// Special cases
if ($module == 'propal') {
$permission = $user->rights->propale->creer;
$permission = $user->rights->propal->creer;
} elseif ($module == 'supplier_proposal') {
$permission = $user->rights->supplier_proposal->creer;
} elseif ($module == 'fichinter') {

View File

@ -43,7 +43,7 @@ $value_private .= "\n";
/*
// Special cases
if ($module == 'propal') {
$permission = $user->rights->propale->creer;
$permission = $user->rights->propal->creer;
} elseif ($module == 'supplier_proposal') {
$permission = $user->rights->supplier_proposal->creer;
} elseif ($module == 'fichinter') {

View File

@ -2831,7 +2831,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action ==
//print '<div class="fichecenter"><div class="fichehalfleft">';
// Propals
if (isModEnabled("propal") && $user->rights->propale->creer) {
if (isModEnabled("propal") && $user->rights->propal->creer) {
$propal = new Propal($db);
$langs->load("propal");

View File

@ -440,7 +440,7 @@ if ($result || !($id > 0)) {
continue;
}
if ($graphfiles == 'propal' && !$user->rights->propale->lire) {
if ($graphfiles == 'propal' && !$user->rights->propal->lire) {
continue;
}
if ($graphfiles == 'order' && !$user->rights->commande->lire) {

View File

@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_end();
if ($user->rights->propale->lire) {
if ($user->rights->propal->lire) {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
$sql .= " p.ref_client,";
$sql .= "p.datep, p.fk_statut as statut, d.rowid, d.qty";

View File

@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_end();
if ($user->rights->propale->lire) {
if ($user->rights->propal->lire) {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
//$sql .= " p.ref_supplier,";
$sql .= "p.date_valid, p.fk_statut as statut, d.rowid, d.qty";

View File

@ -388,7 +388,7 @@ $listofreferent = array(
'lang'=>'propal',
'buttonnew'=>'AddProp',
'testnew'=>$user->rights->propal->creer,
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
'test'=>$conf->propal->enabled && $user->rights->propal->lire),
'order'=>array(
'name'=>"CustomersOrders",
'title'=>"ListOrdersAssociatedProject",