Skip to content
Snippets Groups Projects
Commit e431e248 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

parents c36f9239 ec4c1a49
No related branches found
No related tags found
No related merge requests found
......@@ -1220,6 +1220,11 @@ class Propal extends CommonObject
$result = $this->db->query($sql);
if ($result)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafieldsline=new ExtraFields($this->db);
$line = new PropaleLigne($this->db);
$extralabelsline=$extrafieldsline->fetch_name_optionals_label($line->table_element,true);
$num = $this->db->num_rows($result);
$i = 0;
......@@ -1229,7 +1234,8 @@ class Propal extends CommonObject
$line = new PropaleLigne($this->db);
$line->rowid = $objp->rowid;
$line->rowid = $objp->rowid; //Deprecated
$line->id = $objp->rowid;
$line->fk_propal = $objp->fk_propal;
$line->fk_parent_line = $objp->fk_parent_line;
$line->product_type = $objp->product_type;
......@@ -1270,6 +1276,8 @@ class Propal extends CommonObject
$line->date_start = $objp->date_start;
$line->date_end = $objp->date_end;
$line->fetch_optionals($line->id,$extralabelsline);
$this->lines[$i] = $line;
//dol_syslog("1 ".$line->fk_product);
//print "xx $i ".$this->lines[$i]->fk_product;
......@@ -1283,12 +1291,6 @@ class Propal extends CommonObject
return -1;
}
// Retreive all extrafield for propal
// fetch optionals attributes and labels
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
$this->fetch_optionals($this->id,$extralabels);
return 1;
}
......
......@@ -640,6 +640,11 @@ class Contrat extends CommonObject
$now=dol_now();
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafieldsline=new ExtraFields($this->db);
$line = new ContratLigne($this->db);
$extralabelsline=$extrafieldsline->fetch_name_optionals_label($line->table_element,true);
$this->lines=array();
// Selectionne les lignes contrats liees a un produit
......@@ -718,6 +723,10 @@ class Contrat extends CommonObject
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
$line->date_fin_reel = $this->db->jdate($objp->date_cloture);
// Retreive all extrafield for propal
// fetch optionals attributes and labels
$line->fetch_optionals($line->id,$extralabelsline);
$this->lines[] = $line;
//dol_syslog("1 ".$line->desc);
......@@ -813,6 +822,13 @@ class Contrat extends CommonObject
if ($line->statut == 4 && (! empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++;
if ($line->statut == 5) $this->nbofservicesclosed++;
// Retreive all extrafield for propal
// fetch optionals attributes and labels
$line->fetch_optionals($line->id,$extralabelsline);
$this->lines[] = $line;
$total_ttc+=$objp->total_ttc;
......
......@@ -615,12 +615,12 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
$pdf->SetXY($curx, $cury);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0);
$cury+=3;
if ($diffsizecontent <= 2) $cury+=1;
}
$pdf->SetFont('','',$default_font_size - $diffsizecontent);
if (empty($onlynumber) && ! empty($account->domiciliation))
{
$pdf->SetXY($curx, $cury);
......@@ -631,8 +631,18 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
$tmpy=$pdf->getStringHeight(100, $val);
$cury+=$tmpy;
}
if (! empty($account->proprio))
{
$pdf->SetXY($curx, $cury);
$val=$outputlangs->transnoentities("BankAccountOwner").': ' . $outputlangs->convToOutputCharset($account->proprio);
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
$tmpy=$pdf->getStringHeight(100, $val);
$cury+=$tmpy;
}
else if (! $usedetailedbban) $cury+=1;
// Use correct name of bank id according to country
$ibankey="IBANNumber";
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
......
......@@ -197,14 +197,34 @@ class modCategorie extends DolibarrModules
'p.fax' => 'Fax',
'p.email' => 'Email',
'p.note_private' => 'NotePrivate',
'p.note_public' => 'NotePublic'
'p.note_public' => 'NotePublic',
's.nom'=>"Name",
's.client'=>"Customer",
's.fournisseur'=>"Supplier",
's.status'=>"Status",
's.address'=>"Address",
's.zip'=>"Zip",
's.town'=>"Town",
's.phone'=>"Phone",
's.fax'=>"Fax",
's.url'=>"Url",
's.email'=>"Email"
);
$this->export_TypeFields_array[$r] = array (
'u.label' => "Text",
'u.description' => "Text",
'p.rowid' => 'List:contact:lastname',
'p.lastname' => 'Text',
'p.firstname' => 'Text'
'p.firstname' => 'Text',
's.nom'=>"Text",
's.status'=>"Text",
's.address'=>"Text",
's.zip'=>"Text",
's.town'=>"Text",
's.phone'=>"Text",
's.fax'=>"Text",
's.url'=>"Text",
's.email'=>"Text"
);
$this->export_entities_array[$r] = array (
'u.rowid' => "category",
......@@ -227,11 +247,23 @@ class modCategorie extends DolibarrModules
'p.fax' => 'contact',
'p.email' => 'contact',
'p.note_private' => 'contact',
'p.note_public' => 'contact'
'p.note_public' => 'contact',
's.nom'=>"company",
's.client'=>"company",
's.fournisseur'=>"company",
's.status'=>"company",
's.address'=>"company",
's.zip'=>"company",
's.town'=>"company",
's.phone'=>"company",
's.fax'=>"company",
's.url'=>"company",
's.email'=>"company"
); // We define here only fields that use another picto
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe as s ON s.rowid = p.fk_soc';
$this->export_sql_end[$r] .= ' WHERE u.rowid = cp.fk_categorie AND cp.fk_socpeople = p.rowid AND u.entity IN ('.getEntity('category',1).')';
$this->export_sql_end[$r] .= ' AND u.type = 4'; // contact categories
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment