Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
52d78dba16
@ -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)))) {
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -244,8 +244,8 @@ $arrayfields = array(
|
||||
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500),
|
||||
'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))),
|
||||
'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))),
|
||||
'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
|
||||
'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
|
||||
'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||
);
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -208,8 +208,8 @@ $arrayfields = array(
|
||||
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
|
||||
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
|
||||
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
|
||||
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
|
||||
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
|
||||
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135),
|
||||
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140),
|
||||
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("expedition")), 'position'=>990),
|
||||
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995),
|
||||
'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
|
||||
|
||||
@ -89,6 +89,7 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
$search_project = GETPOST('search_project', 'alpha');
|
||||
$search_company = GETPOST('search_company', 'alpha');
|
||||
$search_company_alias = GETPOST('search_company_alias', 'alpha');
|
||||
$search_parent_name = trim(GETPOST('search_parent_name', 'alphanohtml'));
|
||||
$search_montant_ht = GETPOST('search_montant_ht', 'alpha');
|
||||
$search_montant_vat = GETPOST('search_montant_vat', 'alpha');
|
||||
$search_montant_localtax1 = GETPOST('search_montant_localtax1', 'alpha');
|
||||
@ -220,6 +221,7 @@ $arrayfields = array(
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51),
|
||||
's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60),
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>65),
|
||||
@ -251,8 +253,8 @@ $arrayfields = array(
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))),
|
||||
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
|
||||
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
|
||||
'f.fk_fac_rec_source'=>array('label'=>'GeneratedFromTemplate', 'checked'=>0, 'position'=>520, 'enabled'=>'1'),
|
||||
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||
);
|
||||
@ -317,6 +319,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
||||
$search_project = '';
|
||||
$search_company = '';
|
||||
$search_company_alias = '';
|
||||
$search_parent_name = '';
|
||||
$search_montant_ht = '';
|
||||
$search_montant_vat = '';
|
||||
$search_montant_localtax1 = '';
|
||||
@ -336,7 +339,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
||||
$search_town = '';
|
||||
$search_zip = "";
|
||||
$search_state = "";
|
||||
$search_type = '';
|
||||
$search_country = '';
|
||||
$search_type_thirdparty = '';
|
||||
$search_date_startday = '';
|
||||
@ -553,6 +555,8 @@ $bankaccountstatic = new Account($db);
|
||||
$facturestatic = new Facture($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$companystatic = new Societe($db);
|
||||
$companyparent = new Societe($db);
|
||||
$company_url_list = array();
|
||||
|
||||
$sql = 'SELECT';
|
||||
if ($sall || $search_product_category > 0 || $search_user > 0) {
|
||||
@ -567,6 +571,8 @@ $sql .= ' f.paye as paye, f.fk_statut, f.close_code,';
|
||||
$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,';
|
||||
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
||||
$sql .= " s.parent as fk_parent,";
|
||||
$sql .= " s2.nom as name2,";
|
||||
$sql .= ' typent.code as typent_code,';
|
||||
$sql .= ' state.code_departement as state_code, state.nom as state_name,';
|
||||
$sql .= ' country.code as country_code,';
|
||||
@ -592,6 +598,7 @@ $parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s2 ON s2.rowid = s.parent";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
@ -666,6 +673,9 @@ if ($search_company) {
|
||||
if ($search_company_alias) {
|
||||
$sql .= natural_search('s.name_alias', $search_company_alias);
|
||||
}
|
||||
if ($search_parent_name) {
|
||||
$sql .= natural_search('s2.nom', $search_parent_name);
|
||||
}
|
||||
if ($search_town) {
|
||||
$sql .= natural_search('s.town', $search_town);
|
||||
}
|
||||
@ -1040,10 +1050,13 @@ if ($resql) {
|
||||
$param .= '&search_type='.urlencode($search_type);
|
||||
}
|
||||
if ($search_company) {
|
||||
$param .= '&search_societe='.urlencode($search_company);
|
||||
$param .= '&search_company='.urlencode($search_company);
|
||||
}
|
||||
if ($search_company_alias) {
|
||||
$param .= '&search_societe_alias='.urlencode($search_company_alias);
|
||||
$param .= '&search_company_alias='.urlencode($search_company_alias);
|
||||
}
|
||||
if ($search_parent_name != '') {
|
||||
$param .= '&search_parent_name='.urlencode($search_parent_name);
|
||||
}
|
||||
if ($search_town) {
|
||||
$param .= '&search_town='.urlencode($search_town);
|
||||
@ -1054,6 +1067,9 @@ if ($resql) {
|
||||
if ($search_country) {
|
||||
$param .= "&search_country=".urlencode($search_country);
|
||||
}
|
||||
if ($search_type_thirdparty != '') {
|
||||
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
||||
}
|
||||
if ($search_sale > 0) {
|
||||
$param .= '&search_sale='.urlencode($search_sale);
|
||||
}
|
||||
@ -1369,6 +1385,12 @@ if ($resql) {
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company_alias" value="'.$search_company_alias.'"></td>';
|
||||
}
|
||||
// Parent company
|
||||
if (!empty($arrayfields['s2.nom']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat maxwidth100" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
||||
@ -1618,6 +1640,9 @@ if ($resql) {
|
||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['s2.nom']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER['PHP_SELF'], 's2.nom', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
@ -1747,6 +1772,7 @@ if ($resql) {
|
||||
|
||||
if ($num > 0) {
|
||||
$i = 0;
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
$totalarray['val'] = array();
|
||||
@ -2021,6 +2047,26 @@ if ($resql) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Parent company
|
||||
if (!empty($arrayfields['s2.nom']['checked'])) {
|
||||
print '<td class="tdoverflowmax200">';
|
||||
if ($obj->fk_parent > 0) {
|
||||
if (!isset($company_url_list[$obj->fk_parent])) {
|
||||
$companyparent = new Societe($db);
|
||||
$res = $companyparent->fetch($obj->fk_parent);
|
||||
if ($res > 0) {
|
||||
$company_url_list[$obj->fk_parent] = $companyparent->getNomUrl(1);
|
||||
}
|
||||
}
|
||||
if (isset($company_url_list[$obj->fk_parent])) {
|
||||
print $company_url_list[$obj->fk_parent];
|
||||
}
|
||||
}
|
||||
print "</td>";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">';
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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 .= ' ';
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -670,23 +670,25 @@ class FormTicket
|
||||
/**
|
||||
* Return html list of tickets type
|
||||
*
|
||||
* @param string $selected Id du type pre-selectionne
|
||||
* @param string $htmlname Nom de la zone select
|
||||
* @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
|
||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||
* @param int $empty 1=peut etre vide, 0 sinon
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @param string $morecss More CSS
|
||||
* @param string|array $selected Id du type pre-selectionne
|
||||
* @param string $htmlname Nom de la zone select
|
||||
* @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
|
||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||
* @param int $empty 1=peut etre vide, 0 sinon
|
||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @param string $morecss More CSS
|
||||
* @param int $multiselect Is multiselect ?
|
||||
* @return void
|
||||
*/
|
||||
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
|
||||
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $multiselect = 0)
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
$selected = is_array($selected) ? $selected : (!empty($selected) ? implode(',', $selected) : array());
|
||||
$ticketstat = new Ticket($this->db);
|
||||
|
||||
dol_syslog(get_class($this)."::select_types_tickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
|
||||
dol_syslog(get_class($this) . "::select_types_tickets " . implode(';', $selected) . ", " . $htmlname . ", " . $filtertype . ", " . $format . ", " . $multiselect, LOG_DEBUG);
|
||||
|
||||
$filterarray = array();
|
||||
|
||||
@ -696,7 +698,7 @@ class FormTicket
|
||||
|
||||
$ticketstat->loadCacheTypesTickets();
|
||||
|
||||
print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">';
|
||||
print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiselect?'[]':'').'"'.($multiselect?' multiple':'').'>';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -730,9 +732,9 @@ class FormTicket
|
||||
}
|
||||
|
||||
// If text is selected, we compare with code, otherwise with id
|
||||
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) {
|
||||
if (in_array($arraytypes['code'], $selected)) {
|
||||
print ' selected="selected"';
|
||||
} elseif ($selected == $id) {
|
||||
} elseif (in_array($id, $selected)) {
|
||||
print ' selected="selected"';
|
||||
} elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) {
|
||||
print ' selected="selected"';
|
||||
|
||||
@ -939,6 +939,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
$search_name = GETPOST("search_name", 'alpha');
|
||||
$search_address = GETPOST("search_address", 'alpha');
|
||||
$search_poste = GETPOST("search_poste", 'alpha');
|
||||
$search_note_private = GETPOST('search_note_private', 'alphanohtml');
|
||||
$search_roles = GETPOST("search_roles", 'array');
|
||||
|
||||
$socialnetworks = getArrayOfSocialNetworks();
|
||||
@ -988,6 +989,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
'name' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1),
|
||||
'poste' =>array('type'=>'varchar(128)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>2, 'index'=>1, 'position'=>20),
|
||||
'address' =>array('type'=>'varchar(128)', 'label'=>'Address', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>3, 'index'=>1, 'position'=>30),
|
||||
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'visible'=>3, 'position'=>35),
|
||||
'role' =>array('type'=>'checkbox', 'label'=>'Role', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>4, 'index'=>1, 'position'=>40),
|
||||
'statut' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>50, 'arrayofkeyval'=>array(0=>$contactstatic->LibStatut(0, 1), 1=>$contactstatic->LibStatut(1, 1))),
|
||||
);
|
||||
@ -998,6 +1000,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10),
|
||||
't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20),
|
||||
't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30),
|
||||
't.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position'=>35),
|
||||
'sc.role'=>array('label'=>"ContactByDefaultFor", 'checked'=>1, 'position'=>40),
|
||||
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'),
|
||||
);
|
||||
@ -1032,6 +1035,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
$search_roles = array();
|
||||
$search_address = '';
|
||||
$search_poste = '';
|
||||
$search_note_private = '';
|
||||
$search = array();
|
||||
$search_array_options = array();
|
||||
|
||||
@ -1088,6 +1092,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
if ($search_address != '') {
|
||||
$param .= '&search_address='.urlencode($search_address);
|
||||
}
|
||||
if ($search_note_private != '') {
|
||||
$param .= '&search_note_private='.urlencode($search_note_private);
|
||||
}
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
@ -1098,6 +1105,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
|
||||
$sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,";
|
||||
$sql .= " t.civility as civility_id, t.address, t.zip, t.town";
|
||||
$sql .= ", t.note_private";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql .= " WHERE t.fk_soc = ".((int) $object->id);
|
||||
@ -1116,6 +1124,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
if ($search_address) {
|
||||
$sql .= natural_search($searchAddressPhoneDBFields, $search_address);
|
||||
}
|
||||
if ($search_note_private) {
|
||||
$sql .= natural_search('t.note_private', $search_note_private);
|
||||
}
|
||||
if (count($search_roles) > 0) {
|
||||
$sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))";
|
||||
}
|
||||
@ -1297,6 +1308,15 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Note private
|
||||
if (!empty($arrayfields['t.note_private']['checked'])) {
|
||||
print '<td>';
|
||||
if ($obj->note_private) {
|
||||
print dol_string_nohtmltag($obj->note_private);
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Role
|
||||
if (!empty($arrayfields['sc.role']['checked'])) {
|
||||
print '<td>';
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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&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&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&action=create&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&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&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&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&action=create&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&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&leftmenu=propals&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&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&leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -126,8 +126,8 @@ $arrayfields = array(
|
||||
'f.description'=>array('label'=>'Description', 'checked'=>1),
|
||||
'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500),
|
||||
'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))),
|
||||
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))),
|
||||
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
|
||||
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
|
||||
'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000),
|
||||
'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
|
||||
'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
|
||||
|
||||
@ -196,8 +196,8 @@ $arrayfields = array(
|
||||
'country.code_iso'=>array('label'=>"Country", 'enabled'=>1, 'position'=>49),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'enabled'=>$checkedtypetiers, 'position'=>50),
|
||||
'u.login'=>array('label'=>"AuthorRequest", 'enabled'=>1, 'position'=>51),
|
||||
'cf.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>100),
|
||||
'cf.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>110),
|
||||
'cf.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>100),
|
||||
'cf.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>110),
|
||||
);
|
||||
foreach ($object->fields as $key => $val) {
|
||||
// If $val['visible']==0, then we never show the field
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -2469,7 +2469,7 @@ function printDropdownQuickadd()
|
||||
"title" => "NewPropal@propal",
|
||||
"name" => "Proposal@propal",
|
||||
"picto" => "object_propal",
|
||||
"activation" => isModEnabled("propal") && $user->hasRight("propale", "write"), // vs hooking
|
||||
"activation" => isModEnabled("propal") && $user->hasRight("propal", "write"), // vs hooking
|
||||
"position" => 30,
|
||||
),
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -825,3 +825,118 @@ div#moreinfo, div#infowarehouse {
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.div5 .price {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.div5 .imgadd {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.div4 {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
font-size: 6px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 2px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.div4 .wrapper.divempty, .div4 img, .div4 .wrapper:nth-last-child(1), .div4 .wrapper:nth-last-child(2), #prodiv22, #prodiv23, .catwatermark {
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.tab-category {
|
||||
float: left;
|
||||
position: relative;
|
||||
width: 25%;
|
||||
height: 33%;
|
||||
margin: 0;
|
||||
padding: 1px;
|
||||
border: 2px solid #EEE;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.div4 .wrapper, .tab-category {
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border: 1px solid #FFF!important;
|
||||
border-top: 3px solid #FFF!important;
|
||||
}
|
||||
|
||||
.div4 .tab-category.active {
|
||||
border-right: 1px solid #CCC !important;
|
||||
border-left: 1px solid #CCC !important;
|
||||
border-top: 3px solid var(--colorbackhmenu1) !important;
|
||||
}
|
||||
|
||||
.div5 {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
div.description {
|
||||
position: initial;
|
||||
width: auto;
|
||||
background-color: black;
|
||||
opacity: 1;
|
||||
text-align: center;
|
||||
padding-top: 0px;
|
||||
background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1));
|
||||
}
|
||||
|
||||
.div5 .description .description_content {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.div5 .wrapper2 {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.div5 .wrapper2.divempty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.wrapper2 {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.div5 .arrow {
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.div5 .arrow .centerinmiddle {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
|
||||
.div5 .price {
|
||||
font-size: 14px;
|
||||
margin-left: auto;
|
||||
margin-right: 30px;
|
||||
padding-right: 10px;
|
||||
font-weight: bold;
|
||||
color: #ff6d6d;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.div5 .imgadd {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
@ -1346,7 +1346,7 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
|
||||
<?php
|
||||
$count = 0;
|
||||
while ($count < $MAXPRODUCT) {
|
||||
print '<div class="wrapper2" id="prodiv'.$count.'" ';
|
||||
print '<div class="wrapper2 arrow" id="prodiv'.$count.'" ';
|
||||
?>
|
||||
<?php if ($count == ($MAXPRODUCT - 2)) {
|
||||
?> onclick="MoreProducts('less');" <?php
|
||||
@ -1375,6 +1375,9 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
|
||||
<div class="description" id="prodivdesc<?php echo $count; ?>">
|
||||
<div class="description_content" id="prodesc<?php echo $count; ?>"></div>
|
||||
</div>
|
||||
<div class="price" id="prodivprice<?php echo $count; ?>">
|
||||
</div>
|
||||
<span class="fa fa-plus"></span>
|
||||
<?php } ?>
|
||||
<div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div>
|
||||
</div>
|
||||
|
||||
@ -397,6 +397,12 @@ foreach ($search as $key => $val) {
|
||||
$sql .= natural_search($key, $search[$key], 2);
|
||||
}
|
||||
continue;
|
||||
} elseif ($key == 'type_code') {
|
||||
$newarrayoftypecodes = is_array($search[$key]) ? $search[$key] : (!empty($search[$key]) ? explode(',', $search[$key]) : array());
|
||||
if (count($newarrayoftypecodes)) {
|
||||
$sql .= natural_search($key, join(',', $newarrayoftypecodes), 3);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$mode_search = ((!empty($object->fields[$key]) && ($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))) ? 1 : 0);
|
||||
@ -814,7 +820,7 @@ foreach ($object->fields as $key => $val) {
|
||||
print '</td>';
|
||||
} elseif ($key == 'type_code') {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
$formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'));
|
||||
$formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'), 1);
|
||||
print '</td>';
|
||||
} elseif ($key == 'category_code') {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user