forked from Wavyzz/dolibarr
Uniformize code: property "nom" for thirdparty is aliased into "name"
everywhere.
This commit is contained in:
@@ -64,7 +64,7 @@ if ($action == 'ventil') {
|
||||
$cpt = 0;
|
||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
||||
// print '<div><font color="red">id selectionnee : '.$monChoix."</font></div>";
|
||||
$maLigneCourante = split("_", $maLigneCochee);
|
||||
$maLigneCourante = explode("_", $maLigneCochee);
|
||||
$monId = $maLigneCourante[0];
|
||||
$monNumLigne = $maLigneCourante[1];
|
||||
$monCompte = $mesCodesVentilChoisis[$monNumLigne];
|
||||
|
||||
@@ -189,7 +189,7 @@ if ($result) {
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->nom = $links[$key]['label'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ if ($result) {
|
||||
} else if ($links[$key]['type'] == 'company') {
|
||||
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->nom = $links[$key]['label'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
} else if ($links[$key]['type'] == 'sc') {
|
||||
@@ -448,14 +448,14 @@ if ($action == 'export_csv') {
|
||||
|
||||
llxHeader('', $langs->trans("CashJournal"), '');
|
||||
|
||||
$nom = $langs->trans("CashJournal");
|
||||
$name = $langs->trans("CashJournal");
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
$builddate = time();
|
||||
$description = $langs->trans("DescCashJournal") . '<br>';
|
||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
report_header($name, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
|
||||
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ if ($action == 'ventil') {
|
||||
|
||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
||||
// print '<div><font color="red">id selectionnee : '.$monChoix."</font></div>";
|
||||
$maLigneCourante = split("_", $maLigneCochee);
|
||||
$maLigneCourante = explode("_", $maLigneCochee);
|
||||
$monId = $maLigneCourante[0];
|
||||
$monNumLigne = $maLigneCourante[1];
|
||||
$monCompte = $mesCodesVentilChoisis[$monNumLigne];
|
||||
|
||||
@@ -151,11 +151,13 @@ class AdherentType extends CommonObject
|
||||
* Fonction qui permet de supprimer le status de l'adherent
|
||||
*
|
||||
* @param int $rowid Id of member type to delete
|
||||
* @return int >0 if OK, < 0 if KO
|
||||
* @return int >0 if OK, 0 if not found, < 0 if KO
|
||||
*/
|
||||
function delete($rowid)
|
||||
function delete($rowid='')
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = $rowid";
|
||||
if (empty($rowid)) $rowid=$this->id;
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = ".$rowid;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@@ -396,7 +396,7 @@ if ($conf->produit->enabled)
|
||||
$var = !$var;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$modBarCode->nom."</td><td>\n";
|
||||
print '<td>'.(isset($modBarCode->name)?$modBarCode->name:$modBarCode->nom)."</td><td>\n";
|
||||
print $modBarCode->info($langs);
|
||||
print '</td>';
|
||||
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
|
||||
|
||||
@@ -287,7 +287,7 @@ if ($conf->product->enabled || $conf->product->service)
|
||||
{
|
||||
print $langs->trans("BarCodeNumberManager").": ";
|
||||
$objproduct=new Product($db);
|
||||
print '<b>'.$modBarCodeProduct->nom.'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>';
|
||||
print '<b>'.(isset($modBarCodeProduct->name)?$modBarCodeProduct->name:$modBarCodeProduct->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>';
|
||||
$disabled=0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -72,7 +72,7 @@ if ($type == "f")
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, st.libelle as stcomm";
|
||||
$sql = "SELECT s.rowid, s.nom as name, st.libelle as stcomm";
|
||||
$sql.= ", p.rowid as cidp, p.name, p.firstname, p.email, p.phone";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_stcomm as st,";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
||||
@@ -159,7 +159,7 @@ if ($resql)
|
||||
print "<td>$obj->firstname</TD>";
|
||||
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?type='.$type.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").'</a> ';
|
||||
print "<a href=\"".$urlfiche."?socid=".$obj->rowid."\">$obj->nom</a></td>\n";
|
||||
print "<a href=\"".$urlfiche."?socid=".$obj->rowid."\">$obj->name</a></td>\n";
|
||||
|
||||
print '<td>'.dol_print_phone($obj->email,$obj->cidp,$obj->rowid,'AC_EMAIL').'</td>';
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$langs->load("propal");
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as 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";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -497,7 +497,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
|
||||
print "</td>";
|
||||
|
||||
print '<td align="left"><a href="card.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
|
||||
print '<td align="left"><a href="card.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,44).'</a></td>'."\n";
|
||||
print '<td align="right">';
|
||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
|
||||
@@ -381,7 +381,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
/*
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -433,7 +433,7 @@ if (! empty($conf->propal->enabled))
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td>';
|
||||
|
||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
@@ -453,7 +453,7 @@ if (! empty($conf->propal->enabled))
|
||||
*/
|
||||
/*if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -505,7 +505,7 @@ if (! empty($conf->propal->enabled))
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
|
||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ if (! $sortorder) $sortorder='DESC';
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
|
||||
$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client,';
|
||||
$sql = 'SELECT s.rowid, s.nom as name, s.town, s.client, s.code_client,';
|
||||
$sql.= ' p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
$sql.= ' u.login';
|
||||
@@ -246,7 +246,7 @@ if ($result)
|
||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
||||
if ($search_author) $param.='&search_author='.$search_author;
|
||||
if ($search_town) $param.='&search_town='.$search_town;
|
||||
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->name:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@@ -375,7 +375,7 @@ if ($result)
|
||||
|
||||
// Company
|
||||
$companystatic->id=$objp->rowid;
|
||||
$companystatic->nom=$objp->nom;
|
||||
$companystatic->name=$objp->name;
|
||||
$companystatic->client=$objp->client;
|
||||
$companystatic->code_client=$objp->code_client;
|
||||
print '<td>';
|
||||
|
||||
@@ -178,7 +178,7 @@ if ($action == 'cstc')
|
||||
$formother=new FormOther($db);
|
||||
$form=new Form($db);
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,";
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,";
|
||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
||||
$sql.= " d.nom as departement";
|
||||
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)
|
||||
@@ -402,7 +402,7 @@ if ($resql)
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
$prospectstatic->id=$obj->rowid;
|
||||
$prospectstatic->nom=$obj->nom;
|
||||
$prospectstatic->name=$obj->name;
|
||||
$prospectstatic->status=$obj->status;
|
||||
$prospectstatic->code_client=$obj->code_client;
|
||||
$prospectstatic->client=$obj->client;
|
||||
|
||||
@@ -64,8 +64,8 @@ if ($socid > 0)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Nom
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
// Name
|
||||
print '<tr><td width="20%">'.$langs->trans("Thirdpary").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
|
||||
@@ -63,8 +63,8 @@ if ($socid > 0)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Nom
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
// Name
|
||||
print '<tr><td width="20%">'.$langs->trans("Thirdparty").'</td><td width="80%" colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
|
||||
@@ -167,7 +167,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// Client
|
||||
print "<tr><td>".$langs->trans("Customer")."</td>";
|
||||
print '<td colspan="2">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$soc->id.'">'.$soc->nom.'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$soc->id.'">'.$soc->getNomUrl(1).'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ $thirdpartystatic=new Societe($db);
|
||||
* Mode List
|
||||
*/
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea";
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea";
|
||||
$sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta ";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."commande as c";
|
||||
@@ -161,7 +161,7 @@ if ($resql)
|
||||
$lien=$lienfin='';
|
||||
$lien = '<a href="'.dol_buildpath('/commande/orderstoinvoice.php',1).'?socid='.$obj->rowid.'">';
|
||||
$lienfin='</a>';
|
||||
$name=$obj->nom;
|
||||
$name=$obj->name;
|
||||
$result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
|
||||
$result.=$lien.(dol_trunc($name,$maxlen)).$lienfin;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ else
|
||||
*/
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -195,7 +195,7 @@ if (! empty($conf->commande->enabled))
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">';
|
||||
print "<a href=\"card.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ $max=5;
|
||||
*/
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, c.date_cloture as datec, c.tms as datem,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -268,7 +268,7 @@ if ($resql)
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datem),'day').'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
print '</tr>';
|
||||
@@ -285,7 +285,7 @@ else dol_print_error($db);
|
||||
*/
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -337,7 +337,7 @@ if (! empty($conf->commande->enabled))
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td>';
|
||||
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
@@ -356,7 +356,7 @@ if (! empty($conf->commande->enabled))
|
||||
*/
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -408,7 +408,7 @@ if (! empty($conf->commande->enabled))
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ $companystatic = new Societe($db);
|
||||
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||
llxHeader('',$langs->trans("Orders"),$help_url);
|
||||
|
||||
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
||||
$sql = 'SELECT s.nom as name, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
||||
$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison, c.fk_statut, c.facture as facturee';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||
@@ -221,7 +221,7 @@ if ($resql)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($socid);
|
||||
$title = $langs->trans('ListOfOrders') . ' - '.$soc->nom;
|
||||
$title = $langs->trans('ListOfOrders') . ' - '.$soc->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -367,7 +367,7 @@ if ($resql)
|
||||
|
||||
// Company
|
||||
$companystatic->id=$objp->socid;
|
||||
$companystatic->nom=$objp->nom;
|
||||
$companystatic->name=$objp->name;
|
||||
$companystatic->client=$objp->client;
|
||||
print '<td>';
|
||||
print $companystatic->getNomUrl(1,'customer');
|
||||
@@ -380,7 +380,7 @@ if ($resql)
|
||||
if (($objp->fk_statut > 0 && $objp->fk_statut < 3) || ($objp->fk_statut == 3 && $objp->facturee == 0))
|
||||
{
|
||||
print ' <a href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$companystatic->id.'">';
|
||||
print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->nom, 'object_bill', 'hideonsmartphone').'</a>';
|
||||
print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->name, 'object_bill', 'hideonsmartphone').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ if (($action != 'create' && $action != 'add') || !$error)
|
||||
{
|
||||
// Company
|
||||
$companystatic->id=$socid;
|
||||
$companystatic->nom=$soc->nom;
|
||||
$companystatic->name=$soc->name;
|
||||
print '<h3>'.$companystatic->getNomUrl(1,'customer').'</h3>';
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($links[$key]['type']=='company')
|
||||
{
|
||||
$societestatic->id=$links[$key]['url_id'];
|
||||
$societestatic->nom=$links[$key]['label'];
|
||||
$societestatic->name=$links[$key]['label'];
|
||||
print $societestatic->getNomUrl(1,'',16);
|
||||
}
|
||||
else if ($links[$key]['type']=='user')
|
||||
|
||||
@@ -158,7 +158,7 @@ if ($resql)
|
||||
if (GETPOST("bid"))
|
||||
{
|
||||
$result=$bankcateg->fetch(GETPOST("bid"));
|
||||
print_barre_liste($langs->trans("BankTransactionForCategory",$bankcateg->label).' '.($socid?' '.$soc->nom:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
||||
print_barre_liste($langs->trans("BankTransactionForCategory",$bankcateg->label).' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -278,7 +278,7 @@ if ($resql)
|
||||
if ($objp->url_id)
|
||||
{
|
||||
$companystatic->id=$objp->url_id;
|
||||
$companystatic->nom=$objp->labelurl;
|
||||
$companystatic->name=$objp->labelurl;
|
||||
print $companystatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -148,7 +148,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
|
||||
// Customer invoices
|
||||
$sql = "SELECT 'invoice' as family, f.rowid as objid, f.facnumber as ref, f.total_ttc, f.type, f.date_lim_reglement as dlr,";
|
||||
$sql.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql.= " s.rowid as socid, s.nom as name, s.fournisseur";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
@@ -158,7 +158,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
|
||||
// Supplier invoices
|
||||
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
|
||||
$sql2.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql2.= " s.rowid as socid, s.nom as name, s.fournisseur";
|
||||
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";
|
||||
$sql2.= " WHERE ff.entity = ".$conf->entity;
|
||||
@@ -265,7 +265,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$ref = $facturefournstatic->getNomUrl(1,'');
|
||||
|
||||
$societestatic->id = $obj->socid;
|
||||
$societestatic->nom = $obj->nom;
|
||||
$societestatic->name = $obj->name;
|
||||
$refcomp=$societestatic->getNomUrl(1,'',24);
|
||||
|
||||
$paiement = -1*$facturefournstatic->getSommePaiement(); // Payment already done
|
||||
@@ -279,7 +279,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$ref = $facturestatic->getNomUrl(1,'');
|
||||
|
||||
$societestatic->id = $obj->socid;
|
||||
$societestatic->nom = $obj->nom;
|
||||
$societestatic->name = $obj->name;
|
||||
$refcomp=$societestatic->getNomUrl(1,'',24);
|
||||
|
||||
$paiement = $facturestatic->getSommePaiement(); // Payment already done
|
||||
|
||||
@@ -73,7 +73,7 @@ if ($action == 'note')
|
||||
if ($mode == 'search') {
|
||||
if ($modesearch == 'soc') {
|
||||
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
|
||||
$sql.= " WHERE lower(s.nom) LIKE '%".$db->escape(strtolower($socname))."%'";
|
||||
$sql.= " WHERE s.nom LIKE '%".$db->escape(strtolower($socname))."%'";
|
||||
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ if ($mode == 'search') {
|
||||
* Mode List
|
||||
*/
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea";
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea";
|
||||
$sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta ";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
@@ -107,13 +107,13 @@ if (dol_strlen($stcomm))
|
||||
}
|
||||
if ($socname)
|
||||
{
|
||||
$sql.= " AND s.nom LIKE '%".$db->escape(strtolower($socname))."%'";
|
||||
$sql.= " AND s.nom LIKE '%".$db->escape($socname)."%'";
|
||||
$sortfield = "s.nom";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
if ($_GET["search_nom"])
|
||||
{
|
||||
$sql.= " AND s.nom LIKE '%".$db->escape(strtolower($_GET["search_nom"]))."%'";
|
||||
$sql.= " AND s.nom LIKE '%".$db->escape($_GET["search_nom"])."%'";
|
||||
}
|
||||
if ($_GET["search_compta"])
|
||||
{
|
||||
@@ -188,7 +188,7 @@ if ($resql)
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->rowid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
$thirdpartystatic->client=$obj->client;
|
||||
print $thirdpartystatic->getNomUrl(1,'compta');
|
||||
print '</td>';
|
||||
|
||||
@@ -202,7 +202,8 @@ class Don extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Check params
|
||||
* Check params and init ->errors array.
|
||||
* TODO This function seems to not be used by core code.
|
||||
*
|
||||
* @param int $minimum Minimum
|
||||
* @return int 0 if KO, >0 if OK
|
||||
@@ -213,38 +214,39 @@ class Don extends CommonObject
|
||||
$langs->load('main');
|
||||
$langs->load('companies');
|
||||
|
||||
$error_string = array();
|
||||
$err = 0;
|
||||
|
||||
if (dol_strlen(trim($this->societe)) == 0)
|
||||
{
|
||||
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Company').'/'.$langs->trans('Firstname').'-'.$langs->trans('Lastname'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Company').'/'.$langs->trans('Firstname').'-'.$langs->trans('Lastname'));
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->address)) == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Address'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Address'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->zip)) == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Zip'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Zip'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->town)) == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Town'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Town'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
if (dol_strlen(trim($this->email)) == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('EMail'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('EMail'));
|
||||
$err++;
|
||||
}
|
||||
|
||||
@@ -256,7 +258,7 @@ class Don extends CommonObject
|
||||
{
|
||||
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$err++;
|
||||
$amount_invalid = 1;
|
||||
break;
|
||||
@@ -267,14 +269,14 @@ class Don extends CommonObject
|
||||
{
|
||||
if ($this->amount == 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||
$err++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->amount < $minimum && $minimum > 0)
|
||||
{
|
||||
$error_string[$err] = $langs->trans('MinimumAmount',$langs->trans('$minimum'));
|
||||
$error_string[] = $langs->trans('MinimumAmount',$langs->trans('$minimum'));
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@@ -282,14 +284,13 @@ class Don extends CommonObject
|
||||
|
||||
if ($err)
|
||||
{
|
||||
$this->error = $error_string;
|
||||
$this->errors = $error_string;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -544,7 +544,7 @@ else
|
||||
/*
|
||||
* List mode
|
||||
*/
|
||||
$sql = "SELECT s.nom, s.rowid as socid, f.titre, f.total, f.rowid as facid";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, f.titre, f.total, f.rowid as facid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
@@ -584,7 +584,7 @@ else
|
||||
print "</a></td>\n";
|
||||
|
||||
$companystatic->id=$objp->socid;
|
||||
$companystatic->name=$objp->nom;
|
||||
$companystatic->name=$objp->name;
|
||||
print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
|
||||
|
||||
print '<td align="right">'.price($objp->total).'</td>'."\n";
|
||||
|
||||
@@ -395,7 +395,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.email";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.email";
|
||||
$sql.= ", f.rowid as facid, f.facnumber, f.ref_client, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp";
|
||||
$sql.= ", f.datef as df, f.date_lim_reglement as datelimite";
|
||||
$sql.= ", f.paye as paye, f.fk_statut, f.type, f.fk_mode_reglement";
|
||||
@@ -462,7 +462,7 @@ if ($resql)
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||
$urlsource.=str_replace('&','&',$param);
|
||||
|
||||
$titre=(! empty($socid)?$langs->trans("BillsCustomersUnpaidForCompany",$soc->nom):$langs->trans("BillsCustomersUnpaid"));
|
||||
$titre=(! empty($socid)?$langs->trans("BillsCustomersUnpaidForCompany",$soc->name):$langs->trans("BillsCustomersUnpaid"));
|
||||
if ($option == 'late') $titre.=' ('.$langs->trans("Late").')';
|
||||
else $titre.=' ('.$langs->trans("All").')';
|
||||
|
||||
@@ -658,7 +658,7 @@ if ($resql)
|
||||
print '<td>';
|
||||
$thirdparty=new Societe($db);
|
||||
$thirdparty->id=$objp->socid;
|
||||
$thirdparty->nom=$objp->nom;
|
||||
$thirdparty->name=$objp->name;
|
||||
$thirdparty->client=$objp->client;
|
||||
$thirdparty->code_client=$objp->code_client;
|
||||
print $thirdparty->getNomUrl(1,'customer');
|
||||
|
||||
@@ -144,7 +144,7 @@ else $sql = 'SELECT DISTINCT';
|
||||
$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,';
|
||||
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
||||
$sql.= ' f.paye as paye, f.fk_statut,';
|
||||
$sql.= ' s.nom, s.rowid as socid, s.code_client, s.client ';
|
||||
$sql.= ' s.nom as name, s.rowid as socid, s.code_client, s.client ';
|
||||
if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
|
||||
@@ -265,7 +265,7 @@ if ($resql)
|
||||
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
||||
if ($search_montant_ttc) $param.='&search_montant_ttc='.$search_montant_ttc;
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->nom:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
|
||||
$i = 0;
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
@@ -400,7 +400,7 @@ if ($resql)
|
||||
print '<td>';
|
||||
$thirdparty=new Societe($db);
|
||||
$thirdparty->id=$objp->socid;
|
||||
$thirdparty->nom=$objp->nom;
|
||||
$thirdparty->name=$objp->name;
|
||||
$thirdparty->client=$objp->client;
|
||||
$thirdparty->code_client=$objp->code_client;
|
||||
print $thirdparty->getNomUrl(1,'customer');
|
||||
|
||||
@@ -145,7 +145,7 @@ if (! empty($conf->don->enabled) && $user->rights->don->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -185,7 +185,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->nom=$obj->nom;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=1;
|
||||
print $companystatic->getNomUrl(1,'',16);
|
||||
print '</td>';
|
||||
@@ -219,7 +219,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT f.ref, f.rowid, f.total_ttc, f.type,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0";
|
||||
@@ -254,7 +254,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->nom=$obj->nom;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=1;
|
||||
print $companystatic->getNomUrl(1,'',16);
|
||||
print '</td>';
|
||||
@@ -294,7 +294,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
|
||||
$sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.type, f.total, f.total_ttc, f.paye, f.tms,";
|
||||
$sql.= " f.date_lim_reglement as datelimite,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " sum(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture";
|
||||
@@ -351,7 +351,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
$thirdpartystatic->client=1;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer',44);
|
||||
print '</td>';
|
||||
@@ -392,7 +392,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye";
|
||||
$sql.= ", s.nom, s.rowid as socid";
|
||||
$sql.= ", s.nom as name, s.rowid as socid";
|
||||
$sql.= ", SUM(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
|
||||
@@ -432,7 +432,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
$thirdpartystatic->fournisseur=1;
|
||||
print $thirdpartystatic->getNomUrl(1,'supplier',44);
|
||||
print '</td>';
|
||||
@@ -613,7 +613,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
||||
$langs->load("orders");
|
||||
|
||||
$sql = "SELECT sum(f.total) as tot_fht, sum(f.total_ttc) as tot_fttc,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.total_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -675,7 +675,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
||||
|
||||
print '<td align="left">';
|
||||
$societestatic->id=$obj->socid;
|
||||
$societestatic->nom=$obj->nom;
|
||||
$societestatic->name=$obj->name;
|
||||
$societestatic->client=1;
|
||||
print $societestatic->getNomUrl(1,'customer',44);
|
||||
print '</a></td>';
|
||||
@@ -717,7 +717,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
|
||||
$sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.datef, f.type, f.total, f.total_ttc, f.paye, f.tms,";
|
||||
$sql.= " f.date_lim_reglement as datelimite,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " sum(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture";
|
||||
@@ -774,7 +774,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
print '</td>';
|
||||
print '<td align="left">' ;
|
||||
$societestatic->id=$obj->socid;
|
||||
$societestatic->nom=$obj->nom;
|
||||
$societestatic->name=$obj->name;
|
||||
$societestatic->client=1;
|
||||
print $societestatic->getNomUrl(1,'customer',44);
|
||||
print '</a></td>';
|
||||
@@ -821,7 +821,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " sum(pf.amount) as am";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
|
||||
@@ -863,7 +863,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
print $facstatic->getNomUrl(1,'');
|
||||
print '</td>';
|
||||
$societestatic->id=$obj->socid;
|
||||
$societestatic->nom=$obj->nom;
|
||||
$societestatic->name=$obj->name;
|
||||
$societestatic->client=0;
|
||||
print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
|
||||
@@ -149,7 +149,8 @@ $vatcust=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
|
||||
$vatsup=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
|
||||
|
||||
// IRPF that the customer has retained me
|
||||
if($conf->global->$calc ==0 || $conf->global->$calc == 2){
|
||||
if($conf->global->$calc ==0 || $conf->global->$calc == 2)
|
||||
{
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td align="left">'.$langs->trans("Num")."</td>";
|
||||
@@ -196,7 +197,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2){
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">'.$i."</td>";
|
||||
$company_static->id=$coll->socid;
|
||||
$company_static->nom=$coll->nom;
|
||||
$company_static->name=$coll->name;
|
||||
print '<td class="nowrap">'.$company_static->getNomUrl(1).'</td>';
|
||||
$find = array(' ','.');
|
||||
$replace = array('','');
|
||||
@@ -269,7 +270,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">'.$i."</td>";
|
||||
$company_static->id=$coll->socid;
|
||||
$company_static->nom=$coll->nom;
|
||||
$company_static->name=$coll->name;
|
||||
print '<td class="nowrap">'.$company_static->getNomUrl(1).'</td>';
|
||||
$find = array(' ','.');
|
||||
$replace = array('','');
|
||||
|
||||
@@ -273,7 +273,7 @@ print '</table>';
|
||||
*/
|
||||
|
||||
$disable_delete = 0;
|
||||
$sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.total_ttc, f.paye, f.fk_statut, pf.amount, s.nom, s.rowid as socid';
|
||||
$sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.total_ttc, f.paye, f.fk_statut, pf.amount, s.nom as name, s.rowid as socid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= ' WHERE pf.fk_facture = f.rowid';
|
||||
$sql.= ' AND f.fk_soc = s.rowid';
|
||||
@@ -322,7 +322,7 @@ if ($resql)
|
||||
// Third party
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$objp->socid;
|
||||
$thirdpartystatic->nom=$objp->nom;
|
||||
$thirdpartystatic->name=$objp->name;
|
||||
print $thirdpartystatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ class Paiement extends CommonObject
|
||||
$bank_line_id,
|
||||
$fac->thirdparty->id,
|
||||
DOL_URL_ROOT.'/comm/card.php?socid=',
|
||||
$fac->thirdparty->nom,
|
||||
$fac->thirdparty->name,
|
||||
'company'
|
||||
);
|
||||
if ($result <= 0) dol_print_error($this->db);
|
||||
@@ -501,7 +501,7 @@ class Paiement extends CommonObject
|
||||
$bank_line_id,
|
||||
$fac->thirdparty->id,
|
||||
DOL_URL_ROOT.'/fourn/card.php?socid=',
|
||||
$fac->thirdparty->nom,
|
||||
$fac->thirdparty->name,
|
||||
'company'
|
||||
);
|
||||
if ($result <= 0) dol_print_error($this->db);
|
||||
|
||||
@@ -85,7 +85,7 @@ else
|
||||
//$sql.= " c.libelle as paiement_type,";
|
||||
$sql.= " c.code as paiement_code,";
|
||||
$sql.= " ba.rowid as bid, ba.label,";
|
||||
$sql.= " s.rowid as socid, s.nom";
|
||||
$sql.= " s.rowid as socid, s.nom as name";
|
||||
//$sql.= " f.facnumber";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_paiement as c, ".MAIN_DB_PREFIX."paiement as p)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid";
|
||||
@@ -197,7 +197,7 @@ if ($resql)
|
||||
if ($objp->socid)
|
||||
{
|
||||
$companystatic->id=$objp->socid;
|
||||
$companystatic->nom=$objp->nom;
|
||||
$companystatic->name=$objp->name;
|
||||
print $companystatic->getNomUrl(1,'',24);
|
||||
}
|
||||
else print ' ';
|
||||
|
||||
@@ -760,7 +760,7 @@ class BonPrelevement extends CommonObject
|
||||
$sql = "SELECT f.rowid, pfd.rowid as pfdrowid, f.fk_soc";
|
||||
$sql.= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib";
|
||||
$sql.= ", pfd.amount";
|
||||
$sql.= ", s.nom";
|
||||
$sql.= ", s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
@@ -829,8 +829,8 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("Error on default bank number RIB/IBAN for thirdparty reported by verif() ".$fact->socid." ".$soc->nom, LOG_ERR);
|
||||
$facture_errors[$fac[0]]="Error on default bank number RIB/IBAN for thirdparty reported by function verif() ".$fact->socid." ".$soc->nom;
|
||||
dol_syslog("Error on default bank number RIB/IBAN for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_ERR);
|
||||
$facture_errors[$fac[0]]="Error on default bank number RIB/IBAN for thirdparty reported by function verif() ".$fact->socid." ".$soc->name;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1262,7 +1262,7 @@ class BonPrelevement extends CommonObject
|
||||
* section Debiteur (sepa Debiteurs bloc lines)
|
||||
*/
|
||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, soc.datec, c.code as country_code,";
|
||||
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " pl.client_nom as name, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
||||
$sql.= " FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||
@@ -1286,7 +1286,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->facnumber, $obj->idfac, $obj->iban, $obj->bic, $obj->datec, $obj->drum);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->name, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->facnumber, $obj->idfac, $obj->iban, $obj->bic, $obj->datec, $obj->drum);
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@@ -1490,7 +1490,7 @@ class BonPrelevement extends CommonObject
|
||||
* Write recipient of request (customer)
|
||||
*
|
||||
* @param string $row_code_client soc.code_client as code,
|
||||
* @param string $row_nom pl.client_nom AS nom,
|
||||
* @param string $row_nom pl.client_nom AS name,
|
||||
* @param string $row_address soc.address AS adr,
|
||||
* @param string $row_zip soc.zip
|
||||
* @param string $row_town soc.town
|
||||
|
||||
@@ -244,7 +244,7 @@ class RejetPrelevement
|
||||
$arr_mime = array();
|
||||
$arr_name = array();
|
||||
$facref = $fac->ref;
|
||||
$socname = $soc->nom;
|
||||
$socname = $soc->name;
|
||||
$amount = price($fac->total_ttc);
|
||||
$userinfo = $this->user->getFullName($langs);
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ print '<br>';
|
||||
* Invoices waiting for withdraw
|
||||
*/
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
|
||||
$sql.= " pfd.date_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s,";
|
||||
@@ -197,7 +197,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
|
||||
@@ -67,7 +67,7 @@ if (! $sortfield) $sortfield="f.facnumber";
|
||||
*/
|
||||
|
||||
$sql= "SELECT f.facnumber, f.rowid, f.total_ttc,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " pfd.date_demande as date_demande,";
|
||||
$sql.= " pfd.fk_user_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
@@ -137,7 +137,7 @@ if ($resql)
|
||||
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ $offset = $conf->liste_limit * $page ;
|
||||
*/
|
||||
$sql = "SELECT pf.rowid";
|
||||
$sql.= ",f.rowid as facid, f.facnumber as ref, f.total_ttc";
|
||||
$sql.= ", s.rowid as socid, s.nom, pl.statut";
|
||||
$sql.= ", s.rowid as socid, s.nom as name, pl.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
@@ -166,7 +166,7 @@ if ($result)
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">';
|
||||
print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."</a></td>\n";
|
||||
print img_object($langs->trans("ShowCompany"),"company"). ' '.$obj->name."</a></td>\n";
|
||||
|
||||
print '<td align="center">'.price($obj->total_ttc)."</td>\n";
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ $rej = new RejetPrelevement($db, $user);
|
||||
* Liste des factures
|
||||
*/
|
||||
$sql = "SELECT pl.rowid, pl.amount, pl.statut";
|
||||
$sql.= " , s.rowid as socid, s.nom";
|
||||
$sql.= " , s.rowid as socid, s.nom as name";
|
||||
$sql.= " , pr.motif, pr.afacturer, pr.fk_facture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
@@ -152,7 +152,7 @@ if ($resql)
|
||||
print img_picto('', 'statut'.$obj->statut).' ';
|
||||
print substr('000000'.$obj->rowid, -6);
|
||||
print '</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.$obj->name."</a></td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td>'.$rej->motifs[$obj->motif].'</td>';
|
||||
|
||||
@@ -96,7 +96,7 @@ print '</td></tr></table><br>';
|
||||
*/
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,";
|
||||
$sql.= " pfd.date_demande,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -137,7 +137,7 @@ if ($resql)
|
||||
|
||||
print '<td>';
|
||||
$thirdpartystatic->id=$obj->socid;
|
||||
$thirdpartystatic->nom=$obj->nom;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ if ($id)
|
||||
print '<td colspan="3">'.$langs->trans("WithdrawalRefused").'</td></tr>';
|
||||
|
||||
//Select yes/no
|
||||
print '<tr><td class="valid">'.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->nom.' ?</td>';
|
||||
print '<tr><td class="valid">'.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->name.' ?</td>';
|
||||
print '<td colspan="2" class="valid">';
|
||||
print $form->selectyesno("confirm",1,0);
|
||||
print '</td></tr>';
|
||||
@@ -257,7 +257,7 @@ if ($id)
|
||||
*/
|
||||
$sql = "SELECT pf.rowid";
|
||||
$sql.= " ,f.rowid as facid, f.facnumber as ref, f.total_ttc";
|
||||
$sql.= " , s.rowid as socid, s.nom";
|
||||
$sql.= " , s.rowid as socid, s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
@@ -308,7 +308,7 @@ if ($id)
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n";
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">';
|
||||
print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."</a></td>\n";
|
||||
print img_object($langs->trans("ShowCompany"),"company"). ' '.$obj->name."</a></td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ $pagenext = $page + 1;
|
||||
*
|
||||
*/
|
||||
$sql = "SELECT pl.rowid, pl.statut, pl.amount";
|
||||
$sql.= ", s.rowid as socid, s.nom";
|
||||
$sql.= ", s.rowid as socid, s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_bons as pb";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -175,7 +175,7 @@ if ($result)
|
||||
print substr('000000'.$obj->rowid, -6);
|
||||
print '</a></td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.$obj->name."</a></td>\n";
|
||||
|
||||
print '<td align="center">'.price($obj->amount)."</td>\n";
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ llxHeader('',$langs->trans("WithdrawalsLines"));
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut, p.datec";
|
||||
$sql.= " ,f.rowid as facid, f.facnumber, f.total_ttc";
|
||||
$sql.= " , s.rowid as socid, s.nom, s.code_client";
|
||||
$sql.= " , s.rowid as socid, s.nom as name, s.code_client";
|
||||
$sql.= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
@@ -162,7 +162,7 @@ if ($result)
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
|
||||
print '</a></td>';
|
||||
|
||||
print '<td><a href="card.php?id='.$obj->rowid.'">'.$obj->nom."</a></td>\n";
|
||||
print '<td><a href="card.php?id='.$obj->rowid.'">'.$obj->name."</a></td>\n";
|
||||
|
||||
print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ if ($socid > 0)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Nom
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
// Name
|
||||
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->name.'</td></tr>';
|
||||
|
||||
// Prefix
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
|
||||
@@ -120,7 +120,7 @@ $total_ttc=0;
|
||||
// Affiche en-tete de rapport
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
|
||||
$name=$langs->trans("AnnualByCompaniesDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@@ -132,7 +132,7 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else {
|
||||
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
|
||||
$name=$langs->trans("AnnualByCompaniesInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||
@@ -142,7 +142,7 @@ else {
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
|
||||
// Show report array
|
||||
print '<table class="noborder" width="100%">';
|
||||
@@ -160,7 +160,7 @@ print '<tr><td colspan="4">'.$langs->trans("CustomersInvoices").'</td></tr>';
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
@@ -178,7 +178,7 @@ else
|
||||
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
|
||||
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
|
||||
*/
|
||||
$sql = "SELECT s.nom as nom, s.rowid as socid, sum(pf.amount) as amount_ttc";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, sum(pf.amount) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiement_facture as pf";
|
||||
@@ -206,7 +206,7 @@ if ($result) {
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print "<td>".$langs->trans("Bills").' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$objp->socid.'">'.$objp->nom."</td>\n";
|
||||
print "<td>".$langs->trans("Bills").' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$objp->socid.'">'.$objp->name."</td>\n";
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
print "<td align=\"right\">".price($objp->amount_ht)."</td>\n";
|
||||
@@ -225,7 +225,7 @@ if ($result) {
|
||||
// On ajoute les paiements clients anciennes version, non lie par paiement_facture
|
||||
if ($modecompta != 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT 'Autres' as nom, '0' as idp, sum(p.amount) as amount_ttc";
|
||||
$sql = "SELECT 'Autres' as name, '0' as idp, sum(p.amount) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
|
||||
@@ -236,8 +236,8 @@ if ($modecompta != 'CREANCES-DETTES')
|
||||
$sql.= " AND ba.entity = ".$conf->entity;
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||
$sql.= " GROUP BY nom, idp";
|
||||
$sql.= " ORDER BY nom";
|
||||
$sql.= " GROUP BY name, idp";
|
||||
$sql.= " ORDER BY name";
|
||||
|
||||
dol_syslog("get old customer payments not linked to invoices", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
@@ -290,7 +290,7 @@ print '</tr>';
|
||||
*/
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
@@ -338,7 +338,7 @@ if ($result) {
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print "<td>".$langs->trans("Bills")." <a href=\"".DOL_URL_ROOT."/fourn/facture/list.php?socid=".$objp->socid."\">".$objp->nom."</a></td>\n";
|
||||
print "<td>".$langs->trans("Bills")." <a href=\"".DOL_URL_ROOT."/fourn/facture/list.php?socid=".$objp->socid."\">".$objp->name."</a></td>\n";
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
print "<td align=\"right\">".price(-$objp->amount_ht)."</td>\n";
|
||||
@@ -381,7 +381,7 @@ print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->t
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
|
||||
$sql = "SELECT c.id, c.libelle as label, sum(cs.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql.= " WHERE cs.fk_type = c.id";
|
||||
@@ -391,7 +391,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
|
||||
$sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||
@@ -424,7 +424,7 @@ if ($result) {
|
||||
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print '<td>'.$obj->nom.'</td>';
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
print '</tr>';
|
||||
@@ -455,7 +455,7 @@ print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->t
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
|
||||
$sql = "SELECT c.id, c.libelle as label, sum(cs.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql.= " WHERE cs.fk_type = c.id";
|
||||
@@ -468,7 +468,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
|
||||
$sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||
@@ -501,7 +501,7 @@ if ($result) {
|
||||
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print '<td>'.$obj->nom.'</td>';
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
@@ -550,7 +550,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
@@ -618,7 +618,7 @@ if ($conf->salaries->enabled)
|
||||
if ($conf->donation->enabled)
|
||||
{
|
||||
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql = "SELECT p.societe as name, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND fk_statut=2";
|
||||
@@ -650,7 +650,7 @@ if ($conf->donation->enabled)
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
|
||||
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/compta/dons/list.php?search_company=".$obj->nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/compta/dons/list.php?search_company=".$obj->name."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->name. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price($obj->amount).'</td>';
|
||||
print '<td align="right">'.price($obj->amount).'</td>';
|
||||
|
||||
@@ -153,7 +153,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->cr
|
||||
if ($action == 'confirm_clone' && $confirm != 'yes') { $action=''; }
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->charges->creer))
|
||||
{
|
||||
|
||||
$db->begin();
|
||||
|
||||
$originalId = $id;
|
||||
@@ -188,16 +187,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
|
||||
$id=$originalId;
|
||||
$db->rollback();
|
||||
|
||||
if (count($object->errors))
|
||||
{
|
||||
setEventMessage($object->errors, 'errors');
|
||||
dol_print_error($db,$object->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans($object->error), 'errors');
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
setEventMessages($object->error,$object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,7 +196,6 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
|
||||
$db->rollback();
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -106,18 +106,19 @@ class ChargeSociales extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
/**
|
||||
* Check if a social contribution can be created into database
|
||||
*
|
||||
* @return boolean True or false
|
||||
*/
|
||||
function check() {
|
||||
|
||||
function check()
|
||||
{
|
||||
$newamount=price2num($this->amount,'MT');
|
||||
|
||||
// Validation parametres
|
||||
if (! $newamount > 0 || empty($this->date_ech) || empty($this->periode))
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,7 +139,8 @@ class ChargeSociales extends CommonObject
|
||||
// Nettoyage parametres
|
||||
$newamount=price2num($this->amount,'MT');
|
||||
|
||||
if(!$this->check()) {
|
||||
if (!$this->check())
|
||||
{
|
||||
$this->error="ErrorBadParameter";
|
||||
return -2;
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
|
||||
// Affiche en-tete du rapport
|
||||
if ($modetax==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByCustomersInDueDebtMode");
|
||||
$name=$langs->trans("VATReportByCustomersInDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeVATDebt");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
//$nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
|
||||
//$name.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATDueServices");
|
||||
@@ -138,10 +138,10 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
}
|
||||
if ($modetax==0) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByCustomersInInputOutputMode");
|
||||
$name=$langs->trans("VATReportByCustomersInInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeVATEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
//$nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')';
|
||||
//$name.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATInServices");
|
||||
@@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
$amountsup=$langs->trans("AmountHT");
|
||||
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
$vatcust=$langs->trans("VATReceived");
|
||||
$vatsup=$langs->trans("VATPaid");
|
||||
@@ -223,7 +223,7 @@ if (is_array($coll_list))
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">'.$i."</td>";
|
||||
$company_static->id=$coll->socid;
|
||||
$company_static->nom=$coll->nom;
|
||||
$company_static->name=$coll->name;
|
||||
$company_static->client=1;
|
||||
print '<td class="nowrap">'.$company_static->getNomUrl(1,'customer').'</td>';
|
||||
$find = array(' ','.');
|
||||
@@ -304,7 +304,7 @@ if (is_array($coll_list))
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">'.$i."</td>";
|
||||
$company_static->id=$coll->socid;
|
||||
$company_static->nom=$coll->nom;
|
||||
$company_static->name=$coll->name;
|
||||
$company_static->fournisseur=1;
|
||||
print '<td class="nowrap">'.$company_static->getNomUrl(1,'supplier').'</td>';
|
||||
$find = array(' ','.');
|
||||
|
||||
@@ -374,7 +374,7 @@ class Contact extends CommonObject
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($this->socid);
|
||||
|
||||
$info[$conf->global->LDAP_CONTACT_FIELD_COMPANY] = $soc->nom;
|
||||
$info[$conf->global->LDAP_CONTACT_FIELD_COMPANY] = $soc->name;
|
||||
if ($soc->client == 1) $info["businessCategory"] = "Customers";
|
||||
if ($soc->client == 2) $info["businessCategory"] = "Prospects";
|
||||
if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers";
|
||||
|
||||
@@ -75,7 +75,7 @@ if ($company->id)
|
||||
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country_code, "WORK;POSTAL");
|
||||
if ($company->email != $contact->email) $v->setEmail($company->email,'internet');
|
||||
// Si contact lie a un tiers non de type "particulier"
|
||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom);
|
||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
||||
}
|
||||
|
||||
// Personal informations
|
||||
|
||||
@@ -227,7 +227,7 @@ print "</table><br>";
|
||||
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
{
|
||||
$sql = "SELECT c.rowid as ref, c.rowid,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.rowid = c.fk_soc";
|
||||
@@ -262,7 +262,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->nom=$obj->nom;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=1;
|
||||
print $companystatic->getNomUrl(1,'',16);
|
||||
print '</td>';
|
||||
@@ -298,7 +298,7 @@ $sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.d
|
||||
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now)."')",1,0).') as nb_expired,';
|
||||
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now - $conf->contrat->services->expires->warning_delay)."')",1,0).') as nb_late,';
|
||||
$sql.= ' sum('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,';
|
||||
$sql.= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid as socid";
|
||||
$sql.= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."contrat as c";
|
||||
@@ -342,7 +342,7 @@ if ($result)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$staticcompany->id=$obj->socid;
|
||||
$staticcompany->nom=$obj->nom;
|
||||
$staticcompany->name=$obj->name;
|
||||
print $staticcompany->getNomUrl(1,'',20);
|
||||
print '</td>';
|
||||
print '<td align="center">'.dol_print_date($obj->tms,'dayhour').'</td>';
|
||||
@@ -369,7 +369,7 @@ print '<br>';
|
||||
// Last modified services
|
||||
$sql = "SELECT c.ref, c.fk_soc, ";
|
||||
$sql.= " cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat, cd.date_fin_validite,";
|
||||
$sql.= " s.nom,";
|
||||
$sql.= " s.nom as name,";
|
||||
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -423,7 +423,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$staticcompany->id=$obj->fk_soc;
|
||||
$staticcompany->nom=$obj->nom;
|
||||
$staticcompany->name=$obj->name;
|
||||
print $staticcompany->getNomUrl(1,'',20);
|
||||
print '</td>';
|
||||
print '<td class="nowrap" align="right"><a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
|
||||
@@ -447,7 +447,7 @@ print '<br>';
|
||||
|
||||
// Not activated services
|
||||
$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
|
||||
$sql.= " s.nom,";
|
||||
$sql.= " s.nom as name,";
|
||||
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -503,7 +503,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$staticcompany->id=$obj->fk_soc;
|
||||
$staticcompany->nom=$obj->nom;
|
||||
$staticcompany->name=$obj->name;
|
||||
print $staticcompany->getNomUrl(1,'',20);
|
||||
print '</td>';
|
||||
print '<td width="16" align="right"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
|
||||
@@ -526,7 +526,7 @@ print '<br>';
|
||||
|
||||
// Expired services
|
||||
$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
|
||||
$sql.= " s.nom,";
|
||||
$sql.= " s.nom as name,";
|
||||
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -583,7 +583,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$staticcompany->id=$obj->fk_soc;
|
||||
$staticcompany->nom=$obj->nom;
|
||||
$staticcompany->name=$obj->name;
|
||||
print $staticcompany->getNomUrl(1,'',20);
|
||||
print '</td>';
|
||||
print '<td width="16" align="right"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
|
||||
|
||||
@@ -96,9 +96,8 @@ if (!empty($search_ref_customer)) {
|
||||
if ($sall) {
|
||||
$sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall);
|
||||
}
|
||||
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut,";
|
||||
$sql.= " s.nom, s.rowid";
|
||||
$sql.= " ORDER BY $sortfield $sortorder";
|
||||
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, s.nom, s.rowid";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit + 1, $offset);
|
||||
|
||||
$resql=$db->query($sql);
|
||||
@@ -157,7 +156,7 @@ if ($resql)
|
||||
if ($obj->nb_late) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '<td>'.$obj->ref_customer.'</td>';
|
||||
print '<td><a href="../comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td><a href="../comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
//print '<td align="center">'.dol_print_date($obj->datec).'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_contrat)).'</td>';
|
||||
//print '<td align="center">'.$staticcontrat->LibStatut($obj->statut,3).'</td>';
|
||||
|
||||
@@ -80,7 +80,7 @@ $form=new Form($db);
|
||||
llxHeader();
|
||||
|
||||
$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut,";
|
||||
$sql.= " s.rowid as socid, s.nom,";
|
||||
$sql.= " s.rowid as socid, s.nom as name,";
|
||||
$sql.= " cd.rowid, cd.description, cd.statut,";
|
||||
$sql.= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype,";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
@@ -225,7 +225,7 @@ if ($resql)
|
||||
// Third party
|
||||
print '<td>';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->nom=$obj->nom;
|
||||
$companystatic->name=$obj->name;
|
||||
$companystatic->client=1;
|
||||
print $companystatic->getNomUrl(1,'customer',28);
|
||||
print '</td>';
|
||||
|
||||
@@ -64,7 +64,7 @@ class box_actions extends ModeleBoxes
|
||||
{
|
||||
$sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage,";
|
||||
$sql.= " ta.code,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
$sql.= " s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
|
||||
$sql.= MAIN_DB_PREFIX."actioncomm AS a)";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
@@ -112,7 +112,7 @@ class box_actions extends ModeleBoxes
|
||||
'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''));
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->nom,24),
|
||||
'text' => dol_trunc($objp->name,24),
|
||||
'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left" class="nowrap"',
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_clients extends ModeleBoxes
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms, s.status";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.datec, s.tms, s.status";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.client IN (1, 3)";
|
||||
@@ -93,7 +93,7 @@ class box_clients extends ModeleBoxes
|
||||
'url' => $url.$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => $url.$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_commandes extends ModeleBoxes
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " c.ref, c.tms, c.rowid,";
|
||||
$sql.= " c.fk_statut, c.facture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -101,7 +101,7 @@ class box_commandes extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
|
||||
@@ -60,7 +60,7 @@ class box_contracts extends ModeleBoxes
|
||||
|
||||
if ($user->rights->contrat->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -108,7 +108,7 @@ class box_contracts extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->nom,40),
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
|
||||
@@ -66,7 +66,7 @@ class box_factures extends ModeleBoxes
|
||||
{
|
||||
$sql = "SELECT f.rowid as facid, f.facnumber, f.type, f.amount, f.datef as df";
|
||||
$sql.= ", f.paye, f.fk_statut, f.datec, f.tms";
|
||||
$sql.= ", s.nom, s.rowid as socid";
|
||||
$sql.= ", s.nom as name, s.rowid as socid";
|
||||
$sql.= ", f.date_lim_reglement as datelimite";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -113,7 +113,7 @@ class box_factures extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'maxlength'=>40,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.amount,";
|
||||
$sql.= " f.paye, f.fk_statut,";
|
||||
$sql.= ' f.datef as df,';
|
||||
@@ -115,7 +115,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
|
||||
@@ -60,7 +60,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.date_lim_reglement as datelimite,";
|
||||
$sql.= " f.amount, f.datef as df,";
|
||||
$sql.= " f.paye, f.fk_statut, f.type";
|
||||
@@ -111,7 +111,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_factures_imp extends ModeleBoxes
|
||||
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " f.facnumber, f.date_lim_reglement as datelimite,";
|
||||
$sql.= " f.amount, f.datef as df,";
|
||||
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
|
||||
@@ -110,7 +110,7 @@ class box_factures_imp extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'maxlength'=>44,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class box_ficheinter extends ModeleBoxes
|
||||
$sql.= " f.datec,";
|
||||
$sql.= " f.date_valid as datev,";
|
||||
$sql.= " f.tms as datem,";
|
||||
$sql.= " s.nom, s.rowid as socid, s.client";
|
||||
$sql.= " s.nom as name, s.rowid as socid, s.client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (! $user->rights->societe->client->voir)
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -109,7 +109,7 @@ class box_ficheinter extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->nom,40),
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
|
||||
@@ -62,7 +62,7 @@ class box_fournisseurs extends ModeleBoxes
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.datec, s.tms, s.status";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.datec, s.tms, s.status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.fournisseur = 1";
|
||||
@@ -89,7 +89,7 @@ class box_fournisseurs extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
|
||||
@@ -62,7 +62,7 @@ class box_propales extends ModeleBoxes
|
||||
|
||||
if ($user->rights->propale->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " p.rowid, p.ref, p.fk_statut, p.datep as dp, p.datec, p.fin_validite, p.date_cloture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
@@ -106,7 +106,7 @@ class box_propales extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->nom,40),
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_prospect extends ModeleBoxes
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.datec, s.tms, s.status";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.fk_stcomm, s.datec, s.tms, s.status";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.client IN (2, 3)";
|
||||
@@ -92,7 +92,7 @@ class box_prospect extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
|
||||
@@ -62,7 +62,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
|
||||
if ($user->rights->service->lire && $user->rights->contrat->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " c.rowid,";
|
||||
$sql.= " cd.rowid as cdid, cd.tms as datem, cd.statut,";
|
||||
$sql.= " p.rowid as pid, p.label, p.fk_product_type";
|
||||
@@ -125,7 +125,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'maxlength' => 28,
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class box_services_expired extends ModeleBoxes
|
||||
// Select contracts with at least one expired service
|
||||
$sql = "SELECT ";
|
||||
$sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat,";
|
||||
$sql.= " s.nom, s.rowid as socid,";
|
||||
$sql.= " s.nom as name, s.rowid as socid,";
|
||||
$sql.= " MIN(cd.date_fin_validite) as date_line, COUNT(cd.rowid) as nb_services";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe s, ".MAIN_DB_PREFIX."contratdet as cd";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -104,7 +104,7 @@ class box_services_expired extends ModeleBoxes
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => dol_trunc($objp->nom,40),
|
||||
'text' => dol_trunc($objp->name,40),
|
||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="center"',
|
||||
|
||||
@@ -62,7 +62,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||
$sql.= " c.ref, c.tms, c.rowid,";
|
||||
$sql.= " c.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
@@ -102,7 +102,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
'url' => $urls);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'text' => $objp->name,
|
||||
'url' => $urls);
|
||||
|
||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||
|
||||
@@ -769,7 +769,7 @@ class Form
|
||||
$outarray=array();
|
||||
|
||||
// On recherche les societes
|
||||
$sql = "SELECT s.rowid, s.nom, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX ."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
|
||||
@@ -836,11 +836,11 @@ class Form
|
||||
if (($obj->fournisseur) && (!empty($obj->code_fournisseur))) {
|
||||
$label .= $obj->code_fournisseur. ' - ';
|
||||
}
|
||||
$label.=' '.$obj->nom;
|
||||
$label.=' '.$obj->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$label=$obj->nom;
|
||||
$label=$obj->name;
|
||||
}
|
||||
|
||||
if ($showtype)
|
||||
@@ -996,13 +996,9 @@ class Form
|
||||
|
||||
// On recherche les societes
|
||||
$sql = "SELECT sp.rowid, sp.lastname, sp.statut, sp.firstname, sp.poste";
|
||||
if ($showsoc > 0) {
|
||||
$sql.= " , s.nom as company";
|
||||
}
|
||||
if ($showsoc > 0) $sql.= " , s.nom as company";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX ."socpeople as sp";
|
||||
if ($showsoc > 0) {
|
||||
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX ."societe as s ON s.rowid=sp.fk_soc ";
|
||||
}
|
||||
if ($showsoc > 0) $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX ."societe as s ON s.rowid=sp.fk_soc";
|
||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||
if ($socid > 0) $sql.= " AND sp.fk_soc=".$socid;
|
||||
if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut<>0";
|
||||
@@ -1839,7 +1835,7 @@ class Form
|
||||
|
||||
$sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration,";
|
||||
$sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,";
|
||||
$sql.= " s.nom";
|
||||
$sql.= " s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
if ($socid) $sql.= " AND pfp.fk_soc = ".$socid;
|
||||
@@ -1951,8 +1947,8 @@ class Form
|
||||
}
|
||||
if (! $socid)
|
||||
{
|
||||
$opt .= " - ".dol_trunc($objp->nom,8);
|
||||
$outval.=" - ".dol_trunc($objp->nom,8);
|
||||
$opt .= " - ".dol_trunc($objp->name,8);
|
||||
$outval.=" - ".dol_trunc($objp->name,8);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2007,7 +2003,7 @@ class Form
|
||||
|
||||
$sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration,";
|
||||
$sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.unitprice,";
|
||||
$sql.= " s.nom";
|
||||
$sql.= " s.nom as name";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
@@ -2044,7 +2040,7 @@ class Form
|
||||
if($num == 1) {
|
||||
$opt .= ' selected="selected"';
|
||||
}
|
||||
$opt.= '>'.$objp->nom.' - '.$objp->ref_fourn.' - ';
|
||||
$opt.= '>'.$objp->name.' - '.$objp->ref_fourn.' - ';
|
||||
|
||||
if ($objp->quantity == 1)
|
||||
{
|
||||
@@ -4433,7 +4429,7 @@ class Form
|
||||
$out='';
|
||||
|
||||
// On recherche les groupes
|
||||
$sql = "SELECT ug.rowid, ug.nom ";
|
||||
$sql = "SELECT ug.rowid, ug.nom as name";
|
||||
if (! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
$sql.= ", e.label";
|
||||
@@ -4478,7 +4474,7 @@ class Form
|
||||
}
|
||||
$out.= '>';
|
||||
|
||||
$out.= $obj->nom;
|
||||
$out.= $obj->name;
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1)
|
||||
{
|
||||
$out.= " (".$obj->label.")";
|
||||
|
||||
@@ -222,7 +222,7 @@ class FormCompany
|
||||
$out='';
|
||||
|
||||
// On recherche les departements/cantons/province active d'une region et pays actif
|
||||
$sql = "SELECT d.rowid, d.code_departement as code , d.nom, d.active, c.label as country, c.code as country_code FROM";
|
||||
$sql = "SELECT d.rowid, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code FROM";
|
||||
$sql .= " ".MAIN_DB_PREFIX ."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid";
|
||||
$sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1";
|
||||
@@ -270,7 +270,7 @@ class FormCompany
|
||||
$out.= '<option value="'.$obj->rowid.'">';
|
||||
}
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
$out.= $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->nom!='-'?$obj->nom:''));
|
||||
$out.= $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||
$out.= '</option>';
|
||||
}
|
||||
$i++;
|
||||
@@ -292,7 +292,7 @@ class FormCompany
|
||||
* Retourne la liste deroulante des regions actives dont le pays est actif
|
||||
* La cle de la liste est le code (il peut y avoir plusieurs entree pour
|
||||
* un code donnee mais dans ce cas, le champ pays et lang differe).
|
||||
* Ainsi les liens avec les regions se font sur une region independemment de son nom.
|
||||
* Ainsi les liens avec les regions se font sur une region independemment de son name.
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select field
|
||||
@@ -529,20 +529,20 @@ class FormCompany
|
||||
global $conf, $langs;
|
||||
|
||||
// On recherche les societes
|
||||
$sql = "SELECT s.rowid, s.nom FROM";
|
||||
$sql = "SELECT s.rowid, s.nom as name FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
|
||||
if ($selected && $conf->use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) $sql.= " AND rowid = ".$selected;
|
||||
if ($selected && $conf->use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) $sql.= " AND s.rowid = ".$selected;
|
||||
else
|
||||
{
|
||||
// For ajax search we limit here. For combo list, we limit later
|
||||
if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT
|
||||
&& is_array($limitto) && count($limitto))
|
||||
{
|
||||
$sql.= " AND rowid IN (".join(',',$limitto).")";
|
||||
$sql.= " AND s.rowid IN (".join(',',$limitto).")";
|
||||
}
|
||||
}
|
||||
$sql.= " ORDER BY nom ASC";
|
||||
$sql.= " ORDER BY s.nom ASC";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
@@ -620,7 +620,7 @@ class FormCompany
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" size="30" id="search_'.$htmlname.'" name="search_'.$htmlname.'" value="'.$obj->nom.'" '.$htmloption.' />';
|
||||
print '<input type="text" size="30" id="search_'.$htmlname.'" name="search_'.$htmlname.'" value="'.$obj->name.'" '.$htmloption.' />';
|
||||
}
|
||||
print ajax_autocompleter(($socid?$socid:-1),$htmlname,DOL_URL_ROOT.'/societe/ajaxcompanies.php','',$minLength);
|
||||
//print '</td>';
|
||||
@@ -653,14 +653,14 @@ class FormCompany
|
||||
{
|
||||
print '<option value="'.$obj->rowid.'"';
|
||||
if ($disabled) print ' disabled="disabled"';
|
||||
print ' selected="selected">'.dol_trunc($obj->nom,24).'</option>';
|
||||
print ' selected="selected">'.dol_trunc($obj->name,24).'</option>';
|
||||
$firstCompany = $obj->rowid;
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<option value="'.$obj->rowid.'"';
|
||||
if ($disabled) print ' disabled="disabled"';
|
||||
print '>'.dol_trunc($obj->nom,24).'</option>';
|
||||
print '>'.dol_trunc($obj->name,24).'</option>';
|
||||
}
|
||||
$i ++;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,8 @@ class InfoBox
|
||||
|
||||
$db->begin();
|
||||
|
||||
// Sauve parametre indiquant que le user a une config dediee
|
||||
// Save parameters to say user has a dedicated setup
|
||||
$tab=array();
|
||||
$confuserzone='MAIN_BOXES_'.$zone;
|
||||
$tab[$confuserzone]=1;
|
||||
if (dol_set_user_param($db, $conf, $user, $tab) < 0)
|
||||
|
||||
@@ -954,7 +954,7 @@ function dol_meta_create($object)
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$nblignes = count($object->lines);
|
||||
$client = $object->client->nom . " " . $object->client->address . " " . $object->client->zip . " " . $object->client->town;
|
||||
$client = $object->client->name . " " . $object->client->address . " " . $object->client->zip . " " . $object->client->town;
|
||||
$meta = "REFERENCE=\"" . $object->ref . "\"
|
||||
DATE=\"" . dol_print_date($object->date,'') . "\"
|
||||
NB_ITEMS=\"" . $nblignes . "\"
|
||||
|
||||
@@ -1144,7 +1144,7 @@ function weight_convert($weight,&$from_unit,$to_unit)
|
||||
* @param DoliDB $db Handler database
|
||||
* @param Conf $conf Object conf
|
||||
* @param User $user Object user
|
||||
* @param array $tab Tableau (cle=>valeur) des parametres a sauvegarder
|
||||
* @param array $tab Array (key=>value) with all parameters to save
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*
|
||||
* @see dolibarr_get_const, dolibarr_set_const, dolibarr_del_const
|
||||
|
||||
@@ -682,7 +682,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $fromcompany->nom,
|
||||
'__FROM_NAME__' => $fromcompany->name,
|
||||
'__FROM_EMAIL__' => $fromcompany->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
|
||||
@@ -124,7 +124,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
}
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
$sql = "SELECT s.rowid as socid, s.nom as nom, s.siren as tva_intra, s.tva_assuj as assuj,";
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.siren as tva_intra, s.tva_assuj as assuj,";
|
||||
$sql.= " sum(fd.total_ht) as amount, sum(fd.".$total_tva.") as tva,";
|
||||
$sql.= " sum(fd.".$total_localtax1.") as localtax1,";
|
||||
$sql.= " sum(fd.".$total_localtax2.") as localtax2";
|
||||
|
||||
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.class.php'
|
||||
*/
|
||||
class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
{
|
||||
var $nom='Standard'; // Model Name
|
||||
var $name='Standard'; // Model Name
|
||||
var $code_modifiable; // Editable code
|
||||
var $code_modifiable_invalide; // Modified code if it is invalid
|
||||
var $code_modifiable_null; // Modified code if it is null
|
||||
|
||||
@@ -70,7 +70,7 @@ abstract class ModeleNumRefBarCode
|
||||
*/
|
||||
function getNom($langs)
|
||||
{
|
||||
return $this->nom;
|
||||
return empty($this->name)?$this->nom:$this->name;
|
||||
}
|
||||
|
||||
/** Return a numbering example
|
||||
@@ -128,7 +128,7 @@ abstract class ModeleNumRefBarCode
|
||||
$langs->load("admin");
|
||||
|
||||
$s='';
|
||||
$s.=$langs->trans("Name").': <b>'.$this->nom.'</b><br>';
|
||||
$s.=$langs->trans("Name").': <b>'.$this->name.'</b><br>';
|
||||
$s.=$langs->trans("Version").': <b>'.$this->getVersion().'</b><br>';
|
||||
if ($type != -1) $s.=$langs->trans("ValidityControledByModule").': <b>'.$this->getNom($langs).'</b><br>';
|
||||
$s.='<br>';
|
||||
|
||||
@@ -277,7 +277,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
|
||||
@@ -1233,12 +1233,12 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,($usecontact?$object->contact:''),$usecontact,'target');
|
||||
|
||||
@@ -1190,12 +1190,12 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,($usecontact?$object->contact:''),$usecontact,'target');
|
||||
|
||||
@@ -586,12 +586,12 @@ class pdf_strato extends ModelePDFContract
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$this->recipient->name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->recipient->name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$this->recipient->name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');
|
||||
|
||||
@@ -277,7 +277,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
|
||||
@@ -617,12 +617,12 @@ class pdf_merou extends ModelePdfExpedition
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,((!empty($object->contact))?$object->contact:null),$usecontact,'targetwithdetails');
|
||||
|
||||
@@ -631,12 +631,12 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,(!empty($object->contact)?$object->contact:null),$usecontact,'targetwithdetails');
|
||||
|
||||
@@ -285,7 +285,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
|
||||
@@ -1479,12 +1479,12 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,($usecontact?$object->contact:''),$usecontact,'target');
|
||||
|
||||
@@ -565,12 +565,12 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');
|
||||
|
||||
@@ -825,12 +825,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
else $socname = $object->client->name;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,($usecontact?$object->contact:''),$usecontact,'target');
|
||||
|
||||
@@ -229,10 +229,6 @@ class mailing_framboise extends MailingTargets
|
||||
*/
|
||||
function url($id)
|
||||
{
|
||||
//$companystatic=new Societe($this->db);
|
||||
//$companystatic->id=$id;
|
||||
//$companystatic->nom='';
|
||||
//return $companystatic->getNomUrl(1); // Url too long
|
||||
return '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$id.'">'.img_object('',"user").'</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -240,10 +240,6 @@ class mailing_thirdparties extends MailingTargets
|
||||
*/
|
||||
function url($id)
|
||||
{
|
||||
//$companystatic=new Societe($this->db);
|
||||
//$companystatic->id=$id;
|
||||
//$companystatic->nom='';
|
||||
//return $companystatic->getNomUrl(1); // Url too long
|
||||
return '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$id.'">'.img_object('',"company").'</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -233,10 +233,6 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
*/
|
||||
function url($id)
|
||||
{
|
||||
//$companystatic=new Societe($this->db);
|
||||
//$companystatic->id=$id;
|
||||
//$companystatic->nom='';
|
||||
//return $companystatic->getNomUrl(1); // Url too long
|
||||
return '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$id.'">'.img_object('',"company").'</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php'
|
||||
class mod_codeproduct_elephant extends ModeleProductCode
|
||||
{
|
||||
var $nom='Elephant'; // Nom du modele
|
||||
var $name='Elephant'; // Nom du modele
|
||||
var $code_modifiable; // Code modifiable
|
||||
var $code_modifiable_invalide; // Code modifiable si il est invalide
|
||||
var $code_modifiable_null; // Code modifiables si il est null
|
||||
|
||||
@@ -40,6 +40,7 @@ class mod_codeproduct_leopard extends ModeleProductCode
|
||||
*/
|
||||
|
||||
var $nom='Leopard'; // Nom du modele
|
||||
var $name='Leopard'; // Nom du modele
|
||||
var $code_modifiable; // Code modifiable
|
||||
var $code_modifiable_invalide; // Code modifiable si il est invalide
|
||||
var $code_modifiable_null; // Code modifiables si il est null
|
||||
|
||||
@@ -46,7 +46,7 @@ abstract class ModeleProductCode
|
||||
*/
|
||||
function getNom($langs)
|
||||
{
|
||||
return $this->nom;
|
||||
return empty($this->name)?$this->nom:$this->name;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ abstract class ModeleProductCode
|
||||
$langs->load("admin");
|
||||
|
||||
$s='';
|
||||
if ($type == -1) $s.=$langs->trans("Name").': <b>'.$this->nom.'</b><br>';
|
||||
if ($type == -1) $s.=$langs->trans("Name").': <b>'.$this->getNom($langs).'</b><br>';
|
||||
if ($type == -1) $s.=$langs->trans("Version").': <b>'.$this->getVersion().'</b><br>';
|
||||
if ($type == 0) $s.=$langs->trans("ProductCodeDesc").'<br>';
|
||||
if ($type == 1) $s.=$langs->trans("ServiceCodeDesc").'<br>';
|
||||
|
||||
@@ -452,7 +452,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
|
||||
@@ -35,6 +35,7 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
var $prefix='PJ';
|
||||
var $error='';
|
||||
var $nom = "Simple";
|
||||
var $name = "Simple";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,7 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
var $error = '';
|
||||
var $nom = 'Universal';
|
||||
var $name = 'Universal';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -438,7 +438,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
|
||||
@@ -35,6 +35,7 @@ class mod_task_simple extends ModeleNumRefTask
|
||||
var $prefix='TK';
|
||||
var $error='';
|
||||
var $nom = "Simple";
|
||||
var $name = "Simple";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,7 @@ class mod_task_universal extends ModeleNumRefTask
|
||||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
var $error = '';
|
||||
var $nom = 'Universal';
|
||||
var $name = 'Universal';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -311,7 +311,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->nom,
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user