Start to remove too low level permission. Philisophy of dolibarr is
having a minum of permission. Starting to include one permission for each field we manage should not be into core. Also activation of "skype" field in a future should probably be rewritten to support as several communication id (chat, skype, hanghout) with only one feature.
This commit is contained in:
commit
fbeb61861a
@ -141,6 +141,10 @@ parameter. All methods addline in this case were modified to remove this paramet
|
|||||||
|
|
||||||
5) Property ->tel on objects is now ->phone
|
5) Property ->tel on objects is now ->phone
|
||||||
|
|
||||||
|
6) Trigger LINEPROPAL_MODIFY is renamed into LINEPROPAL_UPDATE and
|
||||||
|
Trigger CONTRACT_LINE_DELETE rnamed into LINECONTRACT_DELETE to match naming rules.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
||||||
Fix: field's problem into company's page (RIB)
|
Fix: field's problem into company's page (RIB)
|
||||||
|
|||||||
@ -285,7 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||||
$object->email = trim($_POST["email"]);
|
$object->email = trim($_POST["email"]);
|
||||||
$object->skype = trim($_POST["skype"]);
|
$object->skype = trim($_POST["skype"]);
|
||||||
$object->birth = $birthdate;
|
$object->birth = $birthdate;
|
||||||
|
|
||||||
$object->typeid = $_POST["typeid"];
|
$object->typeid = $_POST["typeid"];
|
||||||
@ -428,7 +428,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
|||||||
$phone=$_POST["phone"];
|
$phone=$_POST["phone"];
|
||||||
$phone_perso=$_POST["phone_perso"];
|
$phone_perso=$_POST["phone_perso"];
|
||||||
$phone_mobile=$_POST["phone_mobile"];
|
$phone_mobile=$_POST["phone_mobile"];
|
||||||
$skype=$_POST["member_skype"];
|
$skype=$_POST["member_skype"];
|
||||||
$email=$_POST["member_email"];
|
$email=$_POST["member_email"];
|
||||||
$login=$_POST["member_login"];
|
$login=$_POST["member_login"];
|
||||||
$pass=$_POST["password"];
|
$pass=$_POST["password"];
|
||||||
@ -453,7 +453,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
|||||||
$object->phone = $phone;
|
$object->phone = $phone;
|
||||||
$object->phone_perso = $phone_perso;
|
$object->phone_perso = $phone_perso;
|
||||||
$object->phone_mobile= $phone_mobile;
|
$object->phone_mobile= $phone_mobile;
|
||||||
$object->skype = $skype;
|
$object->skype = $skype;
|
||||||
$object->email = $email;
|
$object->email = $email;
|
||||||
$object->login = $login;
|
$object->login = $login;
|
||||||
$object->pass = $pass;
|
$object->pass = $pass;
|
||||||
@ -861,11 +861,11 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
@ -1103,11 +1103,11 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
@ -1328,7 +1328,7 @@ else
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirm add in spip
|
* Confirm add in spip
|
||||||
*/
|
*/
|
||||||
if ($action == 'add_spip')
|
if ($action == 'add_spip')
|
||||||
{
|
{
|
||||||
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||||
@ -1336,7 +1336,7 @@ else
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirm removed from spip
|
* Confirm removed from spip
|
||||||
*/
|
*/
|
||||||
if ($action == 'del_spip')
|
if ($action == 'del_spip')
|
||||||
{
|
{
|
||||||
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||||
@ -1345,6 +1345,7 @@ else
|
|||||||
$rowspan=17;
|
$rowspan=17;
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
||||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||||
|
if (! empty($conf->skype->enabled)) $rowspan++;
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -1427,11 +1428,11 @@ else
|
|||||||
// Tel mobile
|
// Tel mobile
|
||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|||||||
@ -267,11 +267,11 @@ if ($id > 0)
|
|||||||
// Fax
|
// Fax
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assujeti a TVA ou pas
|
// Assujeti a TVA ou pas
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
|
|||||||
@ -60,6 +60,8 @@ if ($search_status=='') $search_status=1; // always display activ customer first
|
|||||||
$search_sale = GETPOST("search_sale");
|
$search_sale = GETPOST("search_sale");
|
||||||
$search_categ = GETPOST("search_categ",'int');
|
$search_categ = GETPOST("search_categ",'int');
|
||||||
$catid = GETPOST("catid",'int');
|
$catid = GETPOST("catid",'int');
|
||||||
|
// If the internal user must only see his customers, force searching by him
|
||||||
|
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('customerlist'));
|
$hookmanager->initHooks(array('customerlist'));
|
||||||
@ -104,17 +106,15 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
|||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
$sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
||||||
$sql.= " s.datec, s.datea, s.canvas";
|
$sql.= " s.datec, s.datea, s.canvas";
|
||||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
||||||
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||||
// We'll need this table joined to the select in order to filter by sale
|
|
||||||
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
|
||||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||||
$sql.= " AND s.client IN (1, 3)";
|
$sql.= " AND s.client IN (1, 3)";
|
||||||
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
||||||
if (!$user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
||||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||||
@ -149,8 +149,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
dol_syslog('comm:list.php: sql='.$sql,LOG_DEBUG);
|
dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1980,8 +1980,8 @@ else
|
|||||||
|
|
||||||
// Amount HT
|
// Amount HT
|
||||||
print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>';
|
print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>';
|
||||||
print '<td align="right" class="nowrap"><b>'.price($object->total_ht).'</b></td>';
|
print '<td align="right" class="nowrap"><b>'.price($object->total_ht,'',$langs,0,-1,-1,$conf->currency).'</b></td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td>';
|
print '<td></td>';
|
||||||
|
|
||||||
// Margin Infos
|
// Margin Infos
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled)) {
|
||||||
@ -1993,28 +1993,28 @@ else
|
|||||||
|
|
||||||
// Amount VAT
|
// Amount VAT
|
||||||
print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>';
|
print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($object->total_tva).'</td>';
|
print '<td align="right" class="nowrap">'.price($object->total_tva,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print '<td></td></tr>';
|
||||||
|
|
||||||
// Amount Local Taxes
|
// Amount Local Taxes
|
||||||
if ($mysoc->localtax1_assuj=="1") //Localtax1
|
if ($mysoc->localtax1_assuj=="1") //Localtax1
|
||||||
{
|
{
|
||||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
|
print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($object->total_localtax1).'</td>';
|
print '<td align="right" class="nowrap">'.price($object->total_localtax1,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print '<td></td></tr>';
|
||||||
}
|
}
|
||||||
if ($mysoc->localtax2_assuj=="1") //Localtax2
|
if ($mysoc->localtax2_assuj=="1") //Localtax2
|
||||||
{
|
{
|
||||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
|
print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($object->total_localtax2).'</td>';
|
print '<td align="right" class="nowrap">'.price($object->total_localtax2,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print '<td></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Amount TTC
|
// Amount TTC
|
||||||
print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>';
|
print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($object->total_ttc).'</td>';
|
print '<td align="right" class="nowrap">'.price($object->total_ttc,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print '<td></td></tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr><td height="10">'.$langs->trans('Status').'</td><td align="left" colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
print '<tr><td height="10">'.$langs->trans('Status').'</td><td align="left" colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|||||||
@ -144,7 +144,7 @@ else dol_print_error($db);
|
|||||||
// Load sale and categ filters
|
// Load sale and categ filters
|
||||||
$search_sale = GETPOST('search_sale');
|
$search_sale = GETPOST('search_sale');
|
||||||
$search_categ = GETPOST('search_categ');
|
$search_categ = GETPOST('search_categ');
|
||||||
// If the user must only see his prospect, force searching by him
|
// If the internal user must only see his prospect, force searching by him
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
||||||
|
|
||||||
// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state)
|
// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state)
|
||||||
@ -180,18 +180,17 @@ $form=new Form($db);
|
|||||||
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status, s.code_client, s.client,";
|
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status, s.code_client, s.client,";
|
||||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
||||||
$sql.= " d.nom as departement";
|
$sql.= " d.nom as departement";
|
||||||
// Updated by Matelli
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||||
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)";
|
||||||
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
||||||
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||||
$sql.= " AND s.client IN (2, 3)";
|
$sql.= " AND s.client IN (2, 3)";
|
||||||
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
||||||
if ($user->societe_id) $sql.= " AND s.rowid = " .$user->societe_id;
|
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
|
||||||
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
if ($socid) $sql.= " AND s.rowid = " .$socid;
|
||||||
if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm;
|
if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm;
|
||||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||||
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||||
@ -224,7 +223,6 @@ if ($socname) {
|
|||||||
$sortfield = "s.nom";
|
$sortfield = "s.nom";
|
||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = 0;
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
@ -232,9 +230,9 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
|
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG);
|
dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -2908,19 +2908,21 @@ class Facture extends CommonInvoice
|
|||||||
$sql .= ' (fk_facture, amount, date_demande, fk_user_demande, code_banque, code_guichet, number, cle_rib)';
|
$sql .= ' (fk_facture, amount, date_demande, fk_user_demande, code_banque, code_guichet, number, cle_rib)';
|
||||||
$sql .= ' VALUES ('.$this->id;
|
$sql .= ' VALUES ('.$this->id;
|
||||||
$sql .= ",'".price2num($resteapayer)."'";
|
$sql .= ",'".price2num($resteapayer)."'";
|
||||||
$sql .= ",'".$this->db->idate($now)."',";
|
$sql .= ",'".$this->db->idate($now)."'";
|
||||||
$sql .= ",".$user->id;
|
$sql .= ",".$user->id;
|
||||||
$sql .= ",'".$bac->code_banque."'";
|
$sql .= ",'".$bac->code_banque."'";
|
||||||
$sql .= ",'".$bac->code_guichet."'";
|
$sql .= ",'".$bac->code_guichet."'";
|
||||||
$sql .= ",'".$bac->number."'";
|
$sql .= ",'".$bac->number."'";
|
||||||
$sql .= ",'".$bac->cle_rib."')";
|
$sql .= ",'".$bac->cle_rib."')";
|
||||||
if ( $this->db->query($sql))
|
|
||||||
|
dol_syslog(get_class($this)."::demande_prelevement sql=".$sql);
|
||||||
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog(get_class($this).'::demandeprelevement Erreur');
|
dol_syslog(get_class($this).'::demandeprelevement Erreur');
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -526,7 +526,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
@ -733,7 +733,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
@ -952,7 +952,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -292,7 +292,7 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); }
|
if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); }
|
||||||
print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||||
@ -328,7 +328,7 @@ if ($result)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" name="search_skype" size="8" value="'.$search_skype.'">';
|
print '<input class="flat" type="text" name="search_skype" size="8" value="'.$search_skype.'">';
|
||||||
@ -397,7 +397,7 @@ if ($result)
|
|||||||
// EMail
|
// EMail
|
||||||
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
if (! empty($conf->skype->enabled)) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
||||||
|
|||||||
@ -1269,7 +1269,7 @@ class Contrat extends CommonObject
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('CONTRACT_LINE_DELETE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('LINECONTRACT_DELETE',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
@ -2118,7 +2118,7 @@ class ContratLigne
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('CONTRACT_LINE_MODIFY',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('LINECONTRACT_UPDATE',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|||||||
@ -577,10 +577,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
$colspan++;
|
$colspan++;
|
||||||
print '<td>'.$langs->trans("Skype").'</td>';
|
print '<td>'.$langs->trans("Skype").'</td>';
|
||||||
}
|
}
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'',$sortfield,$sortorder);
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
@ -610,10 +610,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
$colspan++;
|
$colspan++;
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||||
@ -682,7 +682,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
||||||
|
|||||||
@ -83,18 +83,6 @@ class modSkype extends DolibarrModules
|
|||||||
//------
|
//------
|
||||||
$this->boxes = array();
|
$this->boxes = array();
|
||||||
|
|
||||||
// Permissions
|
|
||||||
//------------
|
|
||||||
$this->rights = array(); // Permission array used by this module
|
|
||||||
$this->rights_class = 'skype';
|
|
||||||
$r=0;
|
|
||||||
|
|
||||||
$this->rights[$r][0] = 3101;
|
|
||||||
$this->rights[$r][1] = 'View skype link';
|
|
||||||
$this->rights[$r][3] = 1;
|
|
||||||
$this->rights[$r][4] = 'view';
|
|
||||||
$r++;
|
|
||||||
|
|
||||||
// Main menu entries
|
// Main menu entries
|
||||||
//------------------
|
//------------------
|
||||||
$this->menu = array();
|
$this->menu = array();
|
||||||
|
|||||||
@ -243,6 +243,10 @@ class InterfaceDemo
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'LINEORDER_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
elseif ($action == 'LINEORDER_DELETE')
|
elseif ($action == 'LINEORDER_DELETE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
@ -265,6 +269,18 @@ class InterfaceDemo
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'LINEORDER_SUPPLIER_DISPATCH')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEORDER_SUPPLIER_CREATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEORDER_SUPPLIER_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
|
||||||
// Proposals
|
// Proposals
|
||||||
elseif ($action == 'PROPAL_CREATE')
|
elseif ($action == 'PROPAL_CREATE')
|
||||||
@ -307,7 +323,7 @@ class InterfaceDemo
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
elseif ($action == 'LINEPROPAL_MODIFY')
|
elseif ($action == 'LINEPROPAL_UPDATE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
@ -337,6 +353,14 @@ class InterfaceDemo
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'LINECONTRACT_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINECONTRACT_DELETE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
|
||||||
// Bills
|
// Bills
|
||||||
elseif ($action == 'BILL_CREATE')
|
elseif ($action == 'BILL_CREATE')
|
||||||
@ -378,11 +402,27 @@ class InterfaceDemo
|
|||||||
elseif ($action == 'LINEBILL_INSERT')
|
elseif ($action == 'LINEBILL_INSERT')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEBILL_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
elseif ($action == 'LINEBILL_DELETE')
|
elseif ($action == 'LINEBILL_DELETE')
|
||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'LINEBILL_SUPPLIER_CREATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEBILL_SUPPLIER_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEBILL_SUPPLIER_DELETE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
|
||||||
// Payments
|
// Payments
|
||||||
elseif ($action == 'PAYMENT_CUSTOMER_CREATE')
|
elseif ($action == 'PAYMENT_CUSTOMER_CREATE')
|
||||||
@ -419,6 +459,18 @@ class InterfaceDemo
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
}
|
}
|
||||||
|
elseif ($action == 'LINEFICHINTER_CREATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEFICHINTER_UPDATE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
elseif ($action == 'LINEFICHINTER_DELETE')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
}
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
elseif ($action == 'MEMBER_CREATE')
|
elseif ($action == 'MEMBER_CREATE')
|
||||||
|
|||||||
@ -251,7 +251,7 @@ class Fichinter extends CommonObject
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('FICHINTER_UPDATE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('FICHINTER_MODIFY',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++; $this->errors=$interface->errors;
|
$error++; $this->errors=$interface->errors;
|
||||||
}
|
}
|
||||||
@ -1148,7 +1148,7 @@ class FichinterLigne
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$resulttrigger=$interface->run_triggers('FICHINTERDET_CREATE',$this,$user,$langs,$conf);
|
$resulttrigger=$interface->run_triggers('LINEFICHINTER_CREATE',$this,$user,$langs,$conf);
|
||||||
if ($resulttrigger < 0) {
|
if ($resulttrigger < 0) {
|
||||||
$error++; $this->errors=$interface->errors;
|
$error++; $this->errors=$interface->errors;
|
||||||
}
|
}
|
||||||
@ -1210,7 +1210,7 @@ class FichinterLigne
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$resulttrigger=$interface->run_triggers('FICHINTERDET_UPDATE',$this,$user,$langs,$conf);
|
$resulttrigger=$interface->run_triggers('LINEFICHINTER_UPDATE',$this,$user,$langs,$conf);
|
||||||
if ($resulttrigger < 0) {
|
if ($resulttrigger < 0) {
|
||||||
$error++; $this->errors=$interface->errors;
|
$error++; $this->errors=$interface->errors;
|
||||||
}
|
}
|
||||||
@ -1324,7 +1324,7 @@ class FichinterLigne
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$resulttrigger=$interface->run_triggers('FICHINTERDET_DELETE',$this,$user,$langs,$conf);
|
$resulttrigger=$interface->run_triggers('LINEFICHINTER_DELETE',$this,$user,$langs,$conf);
|
||||||
if ($resulttrigger < 0) {
|
if ($resulttrigger < 0) {
|
||||||
$error++; $this->errors=$interface->errors;
|
$error++; $this->errors=$interface->errors;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@ $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1";
|
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1";
|
||||||
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
|
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc";
|
||||||
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
||||||
if ($socname) {
|
if ($socname) {
|
||||||
$sql .= natural_search('s.nom', $socname);
|
$sql .= natural_search('s.nom', $socname);
|
||||||
@ -118,6 +118,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
|
dol_syslog('fourn/liste.php: sql='.$sql,LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -410,6 +410,5 @@ PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (rec
|
|||||||
PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (alternative Template)
|
PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (alternative Template)
|
||||||
# NumRef Modules
|
# NumRef Modules
|
||||||
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||||
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
|
||||||
|
|
||||||
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $action = GETPOST('action');
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id')?GETPOST('id','int'):GETPOST('socid','int');
|
||||||
if ($user->societe_id) $id=$user->societe_id;
|
if ($user->societe_id) $id=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $id, '&societe');
|
$result = restrictedArea($user, 'societe', $id, '&societe');
|
||||||
|
|
||||||
|
|||||||
@ -878,7 +878,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
}
|
}
|
||||||
@ -1302,7 +1302,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
}
|
}
|
||||||
@ -1616,7 +1616,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
|
||||||
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
|
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
|
||||||
@ -1737,7 +1737,7 @@ else
|
|||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3">';
|
||||||
if ($object->capital) print $object->capital.' '.$langs->trans("Currency".$conf->currency);
|
if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -243,6 +243,10 @@ class FactureTest extends PHPUnit_Framework_TestCase
|
|||||||
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
|
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
|
||||||
$this->assertNotEquals($localobject->date_creation, '');
|
$this->assertNotEquals($localobject->date_creation, '');
|
||||||
|
|
||||||
|
$result=$localobject->demande_prelevement($user);
|
||||||
|
print __METHOD__." result=".$result."\n";
|
||||||
|
$this->assertLessThan($result, 0);
|
||||||
|
|
||||||
return $localobject->id;
|
return $localobject->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user