mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Uniformize code: property "nom" for thirdparty is aliased into "name"
everywhere.
This commit is contained in:
parent
69475b7bf8
commit
97eec37f1c
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
|
@ -64,22 +64,22 @@ 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];
|
||||
|
||||
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
||||
$sql .= " WHERE rowid = " . $monId;
|
||||
|
||||
|
||||
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
print '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . $monCompte . '</font></div>';
|
||||
} else {
|
||||
print '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . $monCompte . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||
}
|
||||
|
||||
|
||||
$cpt ++;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -130,15 +130,15 @@ $result = $db->query($sql);
|
|||
if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
// TODO : print_barre_liste always use $conf->liste_limit and do not care about custom limit in list...
|
||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
|
||||
|
||||
print '<br><b>' . $langs->trans("DescVentilTodoCustomer") . '</b></br>';
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>' . $langs->trans("Invoice") . '</td>';
|
||||
print '<td>' . $langs->trans("Ref") . '</td>';
|
||||
|
|
@ -149,24 +149,24 @@ if ($result) {
|
|||
print '<td align="center">' . $langs->trans("IntoAccount") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("Ventilate") . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$facture_static = new Facture($db);
|
||||
$product_static = new Product($db);
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
$var = True;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$var = ! $var;
|
||||
|
||||
|
||||
// product_type: 0 = service ? 1 = product
|
||||
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
|
||||
// issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB !
|
||||
$code_sell_notset = '';
|
||||
|
||||
|
||||
if (empty($objp->code_sell)) {
|
||||
$code_sell_notset = 'color:red';
|
||||
|
||||
|
||||
if (! empty($objp->type)) {
|
||||
if ($objp->type == 1) {
|
||||
$objp->code_sell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
|
|
@ -175,7 +175,7 @@ if ($result) {
|
|||
}
|
||||
} else {
|
||||
$code_sell_notset = 'color:blue';
|
||||
|
||||
|
||||
if ($objp->type == 1) {
|
||||
$objp->code_sell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
} else {
|
||||
|
|
@ -183,14 +183,14 @@ if ($result) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
// Ref facture
|
||||
$facture_static->ref = $objp->facnumber;
|
||||
$facture_static->id = $objp->facid;
|
||||
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
|
||||
|
||||
|
||||
// Ref produit
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
|
|
@ -201,34 +201,34 @@ if ($result) {
|
|||
else
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td>' . dol_trunc($objp->product_label, 24) . '</td>';
|
||||
print '<td>' . nl2br(dol_trunc($objp->description, 32)) . '</td>';
|
||||
|
||||
|
||||
print '<td align="right">';
|
||||
print price($objp->total_ht);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td align="center" style="' . $code_sell_notset . '">';
|
||||
print $objp->code_sell;
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Colonne choix du compte
|
||||
print '<td align="center">';
|
||||
print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1);
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Colonne choix ligne a ventiler
|
||||
print '<td align="center">';
|
||||
print '<input type="checkbox" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '</tr>';
|
||||
$i ++;
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '"></td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -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();" />';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
||||
*
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
|
|
@ -63,25 +63,25 @@ if ($action == 'ventil') {
|
|||
print '<div><font color="red">' . count($_POST["mesCasesCochees"]) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
|
||||
$mesCodesVentilChoisis = $codeventil;
|
||||
$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];
|
||||
|
||||
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
||||
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
||||
$sql .= " WHERE rowid = " . $monId;
|
||||
|
||||
|
||||
dol_syslog('accountancy/supplier/list.php:: sql=' . $sql);
|
||||
if ($db->query($sql)) {
|
||||
print '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . $monCompte . '</font></div>';
|
||||
} else {
|
||||
print '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . $monCompte . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||
}
|
||||
|
||||
|
||||
$cpt ++;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -133,15 +133,15 @@ $result = $db->query($sql);
|
|||
if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
// TODO : print_barre_liste always use $conf->liste_limit and do not care about custom limit in list...
|
||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
|
||||
|
||||
print '<td align="left"><br><b>' . $langs->trans("DescVentilTodoSupplier") . '</b></br></td>';
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>Facture</td>';
|
||||
print '<td align="left">' . $langs->trans("Ref") . '</td>';
|
||||
|
|
@ -152,22 +152,22 @@ if ($result) {
|
|||
print '<td align="center">' . $langs->trans("IntoAccount") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("Ventilate") . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$facturefourn_static = new FactureFournisseur($db);
|
||||
$productfourn_static = new ProductFournisseur($db);
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
$var = True;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$var = ! $var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
// Ref facture
|
||||
$facturefourn_static->ref = $objp->ref;
|
||||
$facturefourn_static->id = $objp->facid;
|
||||
print '<td>' . $facturefourn_static->getNomUrl(1) . '</td>';
|
||||
|
||||
|
||||
// Ref facture supplier
|
||||
$productfourn_static->ref = $objp->product_ref;
|
||||
$productfourn_static->id = $objp->product_id;
|
||||
|
|
@ -178,23 +178,23 @@ if ($result) {
|
|||
else
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
|
||||
// print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objp->facid.'">'.$objp->ref.'</a></td>';
|
||||
|
||||
|
||||
// print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objp->facid.'">'.$objp->ref_supplier.'</a></td>';
|
||||
|
||||
|
||||
print '<td>' . dol_trunc($objp->product_label, 24) . '</td>';
|
||||
|
||||
|
||||
print '<td>' . stripslashes(nl2br($objp->description)) . '</td>';
|
||||
|
||||
|
||||
print '<td align="right">';
|
||||
print price($objp->price);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td align="right">';
|
||||
print $objp->code_buy;
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Colonne choix du compte
|
||||
print '<td align="center">';
|
||||
print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1);
|
||||
|
|
@ -203,15 +203,15 @@ if ($result) {
|
|||
print '<td align="center">';
|
||||
print '<input type="checkbox" name="mesCasesCochees[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print "</tr>";
|
||||
$i ++;
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventiler") . '"></td></tr>';
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print $db->error();
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class AdherentType extends CommonObject
|
|||
if ($result)
|
||||
{
|
||||
$action='update';
|
||||
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
$hookmanager->initHooks(array('membertypedao'));
|
||||
$parameters=array('membertype'=>$this->id);
|
||||
|
|
@ -151,21 +151,23 @@ 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)
|
||||
{
|
||||
if ( $this->db->affected_rows($resql) )
|
||||
if ($this->db->affected_rows($resql))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Vinícius Nogueira <viniciusvgn@gmail.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-cooncept.pro>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -166,18 +166,18 @@ if ($resql)
|
|||
}
|
||||
|
||||
print '<form method="post" action="search.php" name="search_form">';
|
||||
|
||||
|
||||
$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('StartDate') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
||||
$moreforfilter .= $langs->trans('EndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
if ($moreforfilter) {
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'b.rowid','',$param,'',$sortfield,$sortorder);
|
||||
|
|
@ -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"])
|
||||
{
|
||||
|
|
@ -141,7 +141,7 @@ if ($resql)
|
|||
$i = 0;
|
||||
|
||||
$langs->load('commercial');
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num);
|
||||
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
|
@ -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
|
||||
|
|
@ -212,39 +213,40 @@ class Don extends CommonObject
|
|||
global $langs;
|
||||
$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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -311,7 +312,7 @@ class Don extends CommonObject
|
|||
$this->country=($this->country?$this->country:$this->country);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."don (";
|
||||
|
|
@ -368,7 +369,7 @@ class Don extends CommonObject
|
|||
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('DON_CREATE',$user);
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
// End call triggers
|
||||
|
||||
$this->db->commit();
|
||||
|
|
@ -398,7 +399,7 @@ class Don extends CommonObject
|
|||
$this->country=($this->country?$this->country:$this->country);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET ";
|
||||
$sql .= "amount = " . price2num($this->amount);
|
||||
$sql .= ",fk_paiement = ".($this->modepaiementid?$this->modepaiementid:"null");
|
||||
|
|
@ -426,9 +427,9 @@ class Don extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('DON_UPDATE',$user);
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
// End call triggers
|
||||
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -448,7 +449,7 @@ class Don extends CommonObject
|
|||
*/
|
||||
function delete($rowid)
|
||||
{
|
||||
|
||||
|
||||
$this->db-begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0;";
|
||||
|
|
@ -460,9 +461,9 @@ class Don extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('DON_DELETE',$user);
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||
// End call triggers
|
||||
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ else
|
|||
{
|
||||
echo '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>';
|
||||
}
|
||||
|
||||
|
||||
if ($object->statut == 0 && $user->rights->facture->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&id='.$object->id.'">'.$langs->trans('Delete').'</a></div>';
|
||||
|
|
@ -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,13 +584,13 @@ 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";
|
||||
|
||||
echo '<td align="center">';
|
||||
|
||||
|
||||
if ($user->rights->facture->creer)
|
||||
{
|
||||
echo '<a href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$objp->socid.'&fac_rec='.$objp->facid.'">';
|
||||
|
|
|
|||
|
|
@ -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>";
|
||||
|
|
@ -160,7 +161,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2){
|
|||
print "</tr>\n";
|
||||
|
||||
$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell');
|
||||
|
||||
|
||||
$action = "tvaclient";
|
||||
$object = &$coll_list;
|
||||
$parameters["mode"] = $modetax;
|
||||
|
|
@ -170,7 +171,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2){
|
|||
// Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('externalbalance'));
|
||||
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
$var=true;
|
||||
|
|
@ -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('','');
|
||||
|
|
@ -210,7 +211,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2){
|
|||
}
|
||||
}
|
||||
$x_coll_sum = $total;
|
||||
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($total).'</td>';
|
||||
|
|
@ -240,7 +241,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
|||
print "</tr>\n";
|
||||
|
||||
$company_static=new Societe($db);
|
||||
|
||||
|
||||
$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy');
|
||||
$parameters["direction"] = 'buy';
|
||||
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
|
@ -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('','');
|
||||
|
|
@ -283,14 +284,14 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
|||
}
|
||||
}
|
||||
$x_paye_sum = $total;
|
||||
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>';
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class Paiement extends CommonObject
|
|||
if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice. We do nothing more.");
|
||||
else if ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more.");
|
||||
else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more.");
|
||||
else
|
||||
else
|
||||
{
|
||||
$result=$invoice->set_paid($user,'','');
|
||||
if ($result<0)
|
||||
|
|
@ -360,8 +360,8 @@ class Paiement extends CommonObject
|
|||
{
|
||||
// Appel des triggers
|
||||
$result=$this->call_trigger('PAYMENT_DELETE', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -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>';
|
||||
|
||||
|
|
|
|||
|
|
@ -63,17 +63,17 @@ if ($prev_id)
|
|||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||
|
||||
|
||||
// Status
|
||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if($bon->date_trans <> 0)
|
||||
{
|
||||
$muser = new User($db);
|
||||
$muser->fetch($bon->user_trans);
|
||||
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||
print dol_print_date($bon->date_trans,'day');
|
||||
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
|
||||
|
|
@ -87,19 +87,19 @@ if ($prev_id)
|
|||
print dol_print_date($bon->date_credit,'day');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||
$relativepath = 'receipts/'.$bon->ref;
|
||||
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -62,17 +62,17 @@ if ($prev_id)
|
|||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||
|
||||
|
||||
// Status
|
||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if($bon->date_trans <> 0)
|
||||
{
|
||||
$muser = new User($db);
|
||||
$muser->fetch($bon->user_trans);
|
||||
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||
print dol_print_date($bon->date_trans,'day');
|
||||
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
|
||||
|
|
@ -86,19 +86,19 @@ if ($prev_id)
|
|||
print dol_print_date($bon->date_credit,'day');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||
$relativepath = 'receipts/'.$bon->ref;
|
||||
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ if ($prev_id)
|
|||
print '</td></tr></table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -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,60 +153,49 @@ 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();
|
||||
$db->begin();
|
||||
|
||||
$originalId = $id;
|
||||
|
||||
$object = new ChargeSociales($db);
|
||||
$object->fetch($id);
|
||||
$originalId = $id;
|
||||
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$object->paye = 0;
|
||||
$object->id = $object->ref = null;
|
||||
|
||||
if(GETPOST('clone_for_next_month') != '') {
|
||||
|
||||
$object->date_ech = strtotime('+1month', $object->date_ech);
|
||||
$object->periode = strtotime('+1month', $object->periode);
|
||||
}
|
||||
|
||||
if ($object->check())
|
||||
{
|
||||
$id = $object->create($user);
|
||||
if ($id > 0)
|
||||
{
|
||||
$db->commit();
|
||||
$db->close();
|
||||
$object = new ChargeSociales($db);
|
||||
$object->fetch($id);
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$object->paye = 0;
|
||||
$object->id = $object->ref = null;
|
||||
|
||||
if(GETPOST('clone_for_next_month') != '') {
|
||||
|
||||
$object->date_ech = strtotime('+1month', $object->date_ech);
|
||||
$object->periode = strtotime('+1month', $object->periode);
|
||||
}
|
||||
|
||||
if ($object->check())
|
||||
{
|
||||
$id = $object->create($user);
|
||||
if ($id > 0)
|
||||
{
|
||||
$db->commit();
|
||||
$db->close();
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id=$originalId;
|
||||
$db->rollback();
|
||||
|
||||
setEventMessages($object->error,$object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -301,18 +290,18 @@ if ($id > 0)
|
|||
$head=tax_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill');
|
||||
|
||||
|
||||
// Clone confirmation
|
||||
if ($action === 'clone')
|
||||
{
|
||||
$formclone=array(
|
||||
array('type' => 'checkbox', 'name' => 'clone_for_next_month','label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes');
|
||||
}
|
||||
|
||||
|
||||
// Confirmation de la suppression de la charge
|
||||
if ($action == 'paid')
|
||||
{
|
||||
|
|
@ -492,7 +481,7 @@ if ($id > 0)
|
|||
{
|
||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&action=paid\">".$langs->trans("ClassifyPaid")."</a>";
|
||||
}
|
||||
|
||||
|
||||
// Clone
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,22 +106,23 @@ class ChargeSociales extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Check if a social contribution can be created into database
|
||||
*
|
||||
*/
|
||||
function check() {
|
||||
|
||||
|
||||
/**
|
||||
* Check if a social contribution can be created into database
|
||||
*
|
||||
* @return boolean True or false
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
$newamount=price2num($this->amount,'MT');
|
||||
|
||||
// Validation parametres
|
||||
if (! $newamount > 0 || empty($this->date_ech) || empty($this->periode))
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -357,7 +359,7 @@ class ChargeSociales extends CommonObject
|
|||
global $langs;
|
||||
$langs->load('customers');
|
||||
$langs->load('bills');
|
||||
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
if ($statut == 0) return $langs->trans("Unpaid");
|
||||
|
|
|
|||
|
|
@ -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(' ','.');
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class Contact extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CONTACT_CREATE',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ class Contact extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CONTACT_MODIFY',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
|
@ -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";
|
||||
|
|
@ -774,7 +774,7 @@ class Contact extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CONTACT_DELETE',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
|
@ -1060,7 +1060,7 @@ class Contact extends CommonObject
|
|||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CONTACT_ENABLEDISABLE',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"',
|
||||
|
|
@ -155,7 +155,7 @@ class box_actions extends ModeleBoxes
|
|||
global $langs, $conf;
|
||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||
if ($conf->global->SHOW_DIALOG_HOMEPAGE)
|
||||
{
|
||||
{
|
||||
$actioncejour=false;
|
||||
$contents=$this->info_box_contents;
|
||||
$nblines=count($contents);
|
||||
|
|
@ -170,7 +170,7 @@ class box_actions extends ModeleBoxes
|
|||
if (isset($contents[$i]))
|
||||
{
|
||||
// on affiche que les évènement du jours ou passé
|
||||
// qui ne sont pas à 100%
|
||||
// qui ne sont pas à 100%
|
||||
$actioncejour=true;
|
||||
$var=!$var;
|
||||
// TR
|
||||
|
|
@ -193,8 +193,8 @@ class box_actions extends ModeleBoxes
|
|||
print '</tr>';
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
}
|
||||
print '</div>';
|
||||
if ($actioncejour)
|
||||
|
|
|
|||
|
|
@ -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,16 +996,12 @@ 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 ";
|
||||
if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut<>0";
|
||||
$sql.= " ORDER BY sp.lastname ASC";
|
||||
|
||||
dol_syslog(get_class($this)."::select_contacts", LOG_DEBUG);
|
||||
|
|
@ -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 . "\"
|
||||
|
|
|
|||
|
|
@ -1143,8 +1143,8 @@ 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 User $user Object user
|
||||
* @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
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ abstract class ModeleNumRefBarCode
|
|||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
|
||||
/** Return model name
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
|
|
@ -70,10 +70,10 @@ abstract class ModeleNumRefBarCode
|
|||
*/
|
||||
function getNom($langs)
|
||||
{
|
||||
return $this->nom;
|
||||
return empty($this->name)?$this->nom:$this->name;
|
||||
}
|
||||
|
||||
/** Return a numbering example
|
||||
|
||||
/** Return a numbering example
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Example
|
||||
|
|
@ -96,7 +96,7 @@ abstract class ModeleNumRefBarCode
|
|||
global $langs;
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
}
|
||||
|
||||
|
||||
/** Return version of module
|
||||
*
|
||||
* @return string Version
|
||||
|
|
@ -112,7 +112,7 @@ abstract class ModeleNumRefBarCode
|
|||
if ($this->version) return $this->version;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
*
|
||||
|
|
@ -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>';
|
||||
|
|
@ -171,6 +171,6 @@ abstract class ModeleNumRefBarCode
|
|||
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -483,7 +483,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||
}
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -483,7 +483,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
}
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -440,7 +440,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||
}
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
}
|
||||
}
|
||||
if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva;
|
||||
|
||||
|
||||
if ($conf->facture->dir_output)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
|
@ -369,7 +369,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
// $pdf->Image does not increase value return by getY, so we save it manually
|
||||
$posYAfterImage=$curY+$imglinesize['height'];
|
||||
}
|
||||
|
||||
|
||||
// Description of product line
|
||||
$curX = $this->posxdesc-1;
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->commitTransaction();
|
||||
}
|
||||
$posYAfterDescription=$pdf->GetY();
|
||||
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter=$pdf->getPage();
|
||||
$pdf->setPage($pageposbefore);
|
||||
|
|
@ -487,7 +487,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$this->tva[$vatrate] += $tvaligne;
|
||||
|
||||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
|
||||
// Add line
|
||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||
{
|
||||
|
|
@ -1241,7 +1241,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//$pdf->MultiCell($this->posxtva-$this->posxpicture-1,2, $outputlangs->transnoentities("Photo"),'','C');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class mailing_framboise extends MailingTargets
|
|||
global $conf, $langs;
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
$cibles = array();
|
||||
|
||||
// Select the members from category
|
||||
|
|
@ -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>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||
function __construct($db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$this->db=$db;
|
||||
|
||||
$this->arrayofproducts=array();
|
||||
|
|
@ -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>';
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
@ -1020,7 +1020,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||
}
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
|
|
|||
|
|
@ -35,11 +35,12 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
var $prefix='PJ';
|
||||
var $error='';
|
||||
var $nom = "Simple";
|
||||
var $name = "Simple";
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return description of numbering module
|
||||
*
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
|
|
@ -49,9 +50,9 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return an example of numbering module values
|
||||
*
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
|
|
@ -62,7 +63,7 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
|
||||
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
*
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
|
|
@ -97,7 +98,7 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Value if OK, 0 if KO
|
||||
|
|
@ -130,7 +131,7 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
|
||||
//$yymm = strftime("%y%m",time());
|
||||
$yymm = strftime("%y%m",$date);
|
||||
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
else $num = sprintf("%04s",$max+1);
|
||||
|
||||
|
|
@ -139,9 +140,9 @@ class mod_project_simple extends ModeleNumRefProjects
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@ class mod_project_universal extends ModeleNumRefProjects
|
|||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
var $error = '';
|
||||
var $nom = 'Universal';
|
||||
var $name = 'Universal';
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi la description du modele de numerotation
|
||||
*
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
|
|
@ -78,7 +79,7 @@ class mod_project_universal extends ModeleNumRefProjects
|
|||
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
|
|
@ -99,7 +100,7 @@ class mod_project_universal extends ModeleNumRefProjects
|
|||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Value if OK, 0 if KO
|
||||
|
|
@ -126,9 +127,9 @@ class mod_project_universal extends ModeleNumRefProjects
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
|
|
|
|||
|
|
@ -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,11 +35,12 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
var $prefix='TK';
|
||||
var $error='';
|
||||
var $nom = "Simple";
|
||||
var $name = "Simple";
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return description of numbering module
|
||||
*
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
|
|
@ -49,9 +50,9 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return an example of numbering module values
|
||||
*
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
|
|
@ -62,7 +63,7 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
|
||||
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
*
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
|
|
@ -98,7 +99,7 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Task $task Object Task
|
||||
* @return string Value if OK, 0 if KO
|
||||
|
|
@ -130,7 +131,7 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
|
||||
//$yymm = strftime("%y%m",time());
|
||||
$yymm = strftime("%y%m",$date);
|
||||
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
else $num = sprintf("%04s",$max+1);
|
||||
|
||||
|
|
@ -139,9 +140,9 @@ class mod_task_simple extends ModeleNumRefTask
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Task $task Object task
|
||||
* @return string Next not used reference
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@ class mod_task_universal extends ModeleNumRefTask
|
|||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
var $error = '';
|
||||
var $nom = 'Universal';
|
||||
var $name = 'Universal';
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi la description du modele de numerotation
|
||||
*
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
|
|
@ -78,7 +79,7 @@ class mod_task_universal extends ModeleNumRefTask
|
|||
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
|
|
@ -99,7 +100,7 @@ class mod_task_universal extends ModeleNumRefTask
|
|||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Value if OK, 0 if KO
|
||||
|
|
@ -126,9 +127,9 @@ class mod_task_universal extends ModeleNumRefTask
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -518,7 +518,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||
}
|
||||
|
||||
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user