Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/localtax/index.php htdocs/compta/tva/index.php
This commit is contained in:
commit
57f81217ee
@ -692,7 +692,7 @@ class Adherent extends CommonObject
|
|||||||
$lthirdparty=new Societe($this->db);
|
$lthirdparty=new Societe($this->db);
|
||||||
$result=$lthirdparty->fetch($this->fk_soc);
|
$result=$lthirdparty->fetch($this->fk_soc);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$lthirdparty->address=$this->address;
|
$lthirdparty->address=$this->address;
|
||||||
$lthirdparty->zip=$this->zip;
|
$lthirdparty->zip=$this->zip;
|
||||||
@ -716,7 +716,7 @@ class Adherent extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
elseif ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$lthirdparty->error;
|
$this->error=$lthirdparty->error;
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -1061,8 +1061,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->nb=array();
|
$this->nb=array();
|
||||||
$sql = "SELECT count(a.id) as nb";
|
$sql = "SELECT count(a.id) as nb";
|
||||||
}
|
}
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
|
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||||
$sql.= ")";
|
|
||||||
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";
|
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";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
$sql.= " WHERE 1 = 1";
|
$sql.= " WHERE 1 = 1";
|
||||||
|
|||||||
@ -121,7 +121,7 @@ function pt($db, $sql, $date)
|
|||||||
if ($obj->mode == 'claimed' && ! empty($previousmode))
|
if ($obj->mode == 'claimed' && ! empty($previousmode))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -271,7 +271,7 @@ $mend = $tmp['mon'];
|
|||||||
|
|
||||||
$total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
|
$total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
|
||||||
$i=0; $mcursor=0;
|
$i=0; $mcursor=0;
|
||||||
while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop
|
while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop
|
||||||
{
|
{
|
||||||
//$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12);
|
//$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12);
|
||||||
if ($m == 13) $y++;
|
if ($m == 13) $y++;
|
||||||
@ -536,7 +536,7 @@ while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcu
|
|||||||
if ($i > 2)
|
if ($i > 2)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</td>';
|
||||||
|
|||||||
@ -505,7 +505,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
|||||||
if ($i > 2)
|
if ($i > 2)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</td>';
|
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</td>';
|
||||||
|
|||||||
@ -1317,6 +1317,8 @@ else
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
$soc = $object->thirdparty; // $soc is used later
|
||||||
|
|
||||||
$result=$object->fetch_lines(); // This also init $this->nbofserviceswait, $this->nbofservicesopened, $this->nbofservicesexpired=, $this->nbofservicesclosed
|
$result=$object->fetch_lines(); // This also init $this->nbofserviceswait, $this->nbofservicesopened, $this->nbofservicesexpired=, $this->nbofservicesclosed
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
dol_print_error($db, $object->error);
|
dol_print_error($db, $object->error);
|
||||||
|
|||||||
@ -89,8 +89,7 @@ class box_actions extends ModeleBoxes
|
|||||||
$sql.= ", s.nom as name";
|
$sql.= ", s.nom as name";
|
||||||
$sql.= ", s.rowid as socid";
|
$sql.= ", s.rowid as socid";
|
||||||
$sql.= ", s.code_client";
|
$sql.= ", s.code_client";
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a";
|
||||||
$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";
|
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";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
$sql.= " WHERE a.fk_action = ta.id";
|
$sql.= " WHERE a.fk_action = ta.id";
|
||||||
|
|||||||
@ -210,7 +210,8 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_icon[$r] = 'invoice';
|
$this->export_icon[$r] = 'invoice';
|
||||||
$this->export_permission[$r] = array(array("facture", "facture", "export", "other"));
|
$this->export_permission[$r] = array(array("facture", "facture", "export", "other"));
|
||||||
$this->export_fields_array[$r] = array(
|
$this->export_fields_array[$r] = array(
|
||||||
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
|
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State',
|
||||||
|
's.phone'=>'Phone',
|
||||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
@ -232,7 +233,7 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
|
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
|
||||||
}
|
}
|
||||||
$this->export_TypeFields_array[$r] = array(
|
$this->export_TypeFields_array[$r] = array(
|
||||||
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
||||||
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
||||||
'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
||||||
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'none.rest'=>"NumericCompute", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric',
|
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'none.rest'=>"NumericCompute", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric',
|
||||||
@ -262,7 +263,8 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
|
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid';
|
||||||
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,';
|
||||||
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture as f';
|
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture as f';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid';
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid';
|
||||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid';
|
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid';
|
||||||
@ -282,7 +284,8 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_icon[$r] = 'invoice';
|
$this->export_icon[$r] = 'invoice';
|
||||||
$this->export_permission[$r] = array(array("facture", "facture", "export"));
|
$this->export_permission[$r] = array(array("facture", "facture", "export"));
|
||||||
$this->export_fields_array[$r] = array(
|
$this->export_fields_array[$r] = array(
|
||||||
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
|
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State',
|
||||||
|
's.phone'=>'Phone',
|
||||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
|
||||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
|
||||||
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
|
||||||
@ -302,7 +305,7 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
|
$this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
|
||||||
}
|
}
|
||||||
$this->export_TypeFields_array[$r] = array(
|
$this->export_TypeFields_array[$r] = array(
|
||||||
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
|
||||||
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
|
||||||
'f.rowid'=>"Numeric", 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
'f.rowid'=>"Numeric", 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
|
||||||
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'none.rest'=>'NumericCompute', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status',
|
'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'none.rest'=>'NumericCompute', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status',
|
||||||
@ -324,7 +327,8 @@ class modFacture extends DolibarrModules
|
|||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
|
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture as f';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture as f';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid';
|
||||||
|
|||||||
@ -20,11 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup fournisseur suppliers Module
|
* \defgroup fournisseur Module suppliers
|
||||||
* \brief Module to manage companies and contacts of supplier type
|
|
||||||
* \file htdocs/core/modules/modFournisseur.class.php
|
* \file htdocs/core/modules/modFournisseur.class.php
|
||||||
* \ingroup fournisseur
|
* \ingroup fournisseur
|
||||||
* \brief Description and activation file for module Fournisseur
|
* \brief Description and activation file for module Supplier
|
||||||
*/
|
*/
|
||||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup ticket Ticket module
|
* \defgroup ticket Module Ticket
|
||||||
* \brief Ticket module descriptor.
|
|
||||||
* \file core/modules/modTicket.class.php
|
* \file core/modules/modTicket.class.php
|
||||||
* \ingroup ticket
|
* \ingroup ticket
|
||||||
* \brief Description and activation file for module Ticket
|
* \brief Description and activation file for module Ticket
|
||||||
|
|||||||
@ -327,6 +327,16 @@ class Entrepot extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::fetch id=".$id." ref=".$ref);
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if (! $id && ! $ref)
|
||||||
|
{
|
||||||
|
$this->error='ErrorWrongParameters';
|
||||||
|
dol_syslog(get_class($this)."::fetch ".$this->error);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_parent, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id";
|
$sql = "SELECT rowid, fk_parent, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot";
|
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot";
|
||||||
if ($id)
|
if ($id)
|
||||||
@ -339,7 +349,6 @@ class Entrepot extends CommonObject
|
|||||||
if ($ref) $sql.= " AND ref = '".$this->db->escape($ref)."'";
|
if ($ref) $sql.= " AND ref = '".$this->db->escape($ref)."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1586,7 +1586,7 @@ class User extends CommonObject
|
|||||||
$adh=new Adherent($this->db);
|
$adh=new Adherent($this->db);
|
||||||
$result=$adh->fetch($this->fk_member);
|
$result=$adh->fetch($this->fk_member);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$adh->firstname=$this->firstname;
|
$adh->firstname=$this->firstname;
|
||||||
$adh->lastname=$this->lastname;
|
$adh->lastname=$this->lastname;
|
||||||
@ -1625,7 +1625,7 @@ class User extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
elseif ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$adh->error;
|
$this->error=$adh->error;
|
||||||
$this->errors=$adh->errors;
|
$this->errors=$adh->errors;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user