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

This commit is contained in:
Laurent Destailleur 2013-09-23 11:25:06 +02:00
commit 7ed5d5e543
17 changed files with 313 additions and 115 deletions

View File

@ -85,6 +85,7 @@ For developers:
- New: Add hook addHomeSetup. - New: Add hook addHomeSetup.
- New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK. - New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK.
- New: A trigger can return an array of error strings instead of one error string. - New: A trigger can return an array of error strings instead of one error string.
- New: Add method to use a dictionnary as a combo box.
WARNING: Following change may create regression for some external modules, but was necessary to make WARNING: Following change may create regression for some external modules, but was necessary to make
Dolibarr better: Dolibarr better:

View File

@ -139,11 +139,11 @@ Warning: Name and email must match value into debian/control file (Entry added h
> git-buildpackage -us -uc > git-buildpackage -us -uc
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: Package is built into directory ../build-area
* If package .deb is ok: * If package .deb is ok:
Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit
> git-buildpackage --git-tag > git-buildpackage --git-tag-only --git-retag
> git push --all ou git push origin --all > git push --all ou git push origin --all
> git push --tags > git push --tags
@ -195,10 +195,11 @@ Warning: Name and email must match value into debian/control file (Entry added h
> git-buildpackage -us -uc > git-buildpackage -us -uc
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: Package is built into directory ../build-area
* If package .deb is ok: * If package .deb is ok:
Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit
> git-buildpackage --git-tag > git-buildpackage --git-tag-only --git-retag
> git push --all ou git push origin --all > git push --all ou git push origin --all
> git push --tags > git push --tags

View File

@ -340,6 +340,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;

View File

@ -1003,7 +1003,7 @@ if ($id > 0)
{ {
$project=new Project($db); $project=new Project($db);
$project->fetch($act->fk_project); $project->fetch($act->fk_project);
print $project->getNomUrl(1); print $project->getNomUrl(1,'',1);
} }
print '</td></tr>'; print '</td></tr>';
} }

View File

@ -876,13 +876,17 @@ else if ($action == 'add' && $user->rights->facture->creer)
if ($id > 0) if ($id > 0)
{ {
// If deposit invoice // If deposit invoice
if ($_POST['type'] == 3) { if ($_POST['type'] == 3)
{
$typeamount=GETPOST('typedeposit','alpha'); $typeamount=GETPOST('typedeposit','alpha');
$valuedeposit=GETPOST('valuedeposit','int'); $valuedeposit=GETPOST('valuedeposit','int');
if ($typeamount=='amount') { if ($typeamount=='amount')
{
$amountdeposit=$valuedeposit; $amountdeposit=$valuedeposit;
}else { }
else
{
$amountdeposit=0; $amountdeposit=0;
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
@ -890,19 +894,20 @@ else if ($action == 'add' && $user->rights->facture->creer)
$classname = ucfirst($subelement); $classname = ucfirst($subelement);
$srcobject = new $classname($db); $srcobject = new $classname($db);
dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add deposit line"); dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add deposit lines");
$result=$srcobject->fetch($object->origin_id); $result=$srcobject->fetch($object->origin_id);
if ($result > 0) if ($result > 0)
{ {
$totalamount=0; $totalamount=0;
$lines = $srcobject->lines; $lines = $srcobject->lines;
$num=count($lines); $numlines=count($lines);
for ($i=0;$i<$num;$i++) for ($i=0; $i<$numlines; $i++)
{ {
$totalamount=+$lines[$i]->subprice; $totalamount += $lines[$i]->subprice;
} }
if ($totalamount!=0) { if ($totalamount!=0)
{
$amountdeposit=($totalamount*$valuedeposit)/100; $amountdeposit=($totalamount*$valuedeposit)/100;
} }
} }
@ -2058,8 +2063,7 @@ if ($action == 'create')
// Ref // Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
// Tiers // Thirdparty
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>'; print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>';
if($soc->id > 0) if($soc->id > 0)
{ {
@ -2076,7 +2080,7 @@ if ($action == 'create')
} }
print '</tr>'."\n"; print '</tr>'."\n";
// Factures predefinies // Predefined invoices
if (empty($origin) && empty($originid) && $socid > 0) if (empty($origin) && empty($originid) && $socid > 0)
{ {
$sql = 'SELECT r.rowid, r.titre, r.total_ttc'; $sql = 'SELECT r.rowid, r.titre, r.total_ttc';
@ -2183,10 +2187,13 @@ if ($action == 'create')
print '</td><td valign="middle" class="nowrap">'; print '</td><td valign="middle" class="nowrap">';
$desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
print '<table class="nobordernopadding"><tr><td>'.$desc.'</td>'; print '<table class="nobordernopadding"><tr><td>'.$desc.'</td>';
if (($origin=='propal') || ($origin=='commande')) { if (($origin=='propal') || ($origin=='commande'))
print '<td><select name="typedeposit"><option value="amount">'.$langs->trans('FixAmount').'</option>'; {
print '<option value="variable">'.$langs->trans('VarAmount').'</option></select></td>'; print '<td class="nowrap" style="padding-left: 5px">';
print '<td>'.$langs->trans('Value').':<input type="text" name="valuedeposit" size="3" value="'.GETPOST('valuedeposit','int').'"/>'; $arraylist=array('amount'=>'FixAmount','variable'=>'VarAmount');
print $form->selectarray('typedeposit',$arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">'.$langs->trans('Value').':<input type="text" name="valuedeposit" size="3" value="'.GETPOST('valuedeposit','int').'"/>';
} }
print '</td></tr></table>'; print '</td></tr></table>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
@ -2455,6 +2462,7 @@ if ($action == 'create')
print '</table>'; print '</table>';
} }
print '<br>';
} }
else if ($id > 0 || ! empty($ref)) else if ($id > 0 || ! empty($ref))
{ {

View File

@ -83,17 +83,29 @@ class box_graph_invoices_permonth extends ModeleBoxes
if ($user->rights->facture->lire) if ($user->rights->facture->lire)
{ {
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; $param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
$shownb=GETPOST($param_shownb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showtot=GETPOST($param_showtot,'alpha',4); {
$endyear=GETPOST($param_year,'int');
$shownb=GETPOST($param_shownb,'alpha');
$showtot=GETPOST($param_showtot,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$endyear=$tmparray['year'];
$shownb=$tmparray['shownb'];
$showtot=$tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) $showtot=1; if (empty($shownb) && empty($showtot)) $showtot=1;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1; $startyear=$endyear-1;
$mode='customer'; $mode='customer';
$userid=0; $userid=0;
@ -191,7 +203,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,shownb,showtot">';
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth");
$stringtoshow.=' &nbsp; '; $stringtoshow.=' &nbsp; ';
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT");

View File

@ -82,17 +82,29 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
if ($user->rights->fournisseur->facture->lire) if ($user->rights->fournisseur->facture->lire)
{ {
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; $param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
$shownb=GETPOST($param_shownb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showtot=GETPOST($param_showtot,'alpha',4); {
$endyear=GETPOST($param_year,'int');
$shownb=GETPOST($param_shownb,'alpha');
$showtot=GETPOST($param_showtot,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$endyear=$tmparray['year'];
$shownb=$tmparray['shownb'];
$showtot=$tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) $showtot=1; if (empty($shownb) && empty($showtot)) $showtot=1;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1; $startyear=$endyear-1;
$mode='supplier'; $mode='supplier';
$userid=0; $userid=0;
@ -190,7 +202,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,shownb,showtot">';
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth");
$stringtoshow.=' &nbsp; '; $stringtoshow.=' &nbsp; ';
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT");

View File

@ -83,17 +83,29 @@ class box_graph_orders_permonth extends ModeleBoxes
if ($user->rights->commande->lire) if ($user->rights->commande->lire)
{ {
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; $param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
$shownb=GETPOST($param_shownb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showtot=GETPOST($param_showtot,'alpha',4); {
$endyear=GETPOST($param_year,'int');
$shownb=GETPOST($param_shownb,'alpha');
$showtot=GETPOST($param_showtot,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$endyear=$tmparray['year'];
$shownb=$tmparray['shownb'];
$showtot=$tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) $showtot=1; if (empty($shownb) && empty($showtot)) $showtot=1;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1; $startyear=$endyear-1;
$mode='customer'; $mode='customer';
$userid=0; $userid=0;
@ -191,7 +203,7 @@ class box_graph_orders_permonth extends ModeleBoxes
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,shownb,showtot">';
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth");
$stringtoshow.=' &nbsp; '; $stringtoshow.=' &nbsp; ';
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT");

View File

@ -82,17 +82,29 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
if ($user->rights->fournisseur->commande->lire) if ($user->rights->fournisseur->commande->lire)
{ {
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; $param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
$shownb=GETPOST($param_shownb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showtot=GETPOST($param_showtot,'alpha',4); {
$endyear=GETPOST($param_year,'int');
$shownb=GETPOST($param_shownb,'alpha');
$showtot=GETPOST($param_showtot,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$endyear=$tmparray['year'];
$shownb=$tmparray['shownb'];
$showtot=$tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) $showtot=1; if (empty($shownb) && empty($showtot)) $showtot=1;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1; $startyear=$endyear-1;
$mode='supplier'; $mode='supplier';
$userid=0; $userid=0;
@ -190,7 +202,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,shownb,showtot">';
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth");
$stringtoshow.=' &nbsp; '; $stringtoshow.=' &nbsp; ';
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT");

View File

@ -82,20 +82,33 @@ class box_graph_product_distribution extends ModeleBoxes
'target'=>'none' // Set '' to get target="_blank" 'target'=>'none' // Set '' to get target="_blank"
); );
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_showinvoicenb='DOLUSERCOOKIE_param'.$this->boxcode.'showinvoicenb'; $param_showinvoicenb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showinvoicenb';
$param_showpropalnb='DOLUSERCOOKIE_param'.$this->boxcode.'showpropalnb'; $param_showpropalnb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showpropalnb';
$param_showordernb='DOLUSERCOOKIE_param'.$this->boxcode.'showordernb'; $param_showordernb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showordernb';
$showinvoicenb=GETPOST($param_showinvoicenb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showpropalnb=GETPOST($param_showpropalnb,'alpha',4); {
$showordernb=GETPOST($param_showordernb,'alpha',4); $year=GETPOST($param_year,'int');
$showinvoicenb=GETPOST($param_showinvoicenb,'alpha');
$showpropalnb=GETPOST($param_showpropalnb,'alpha');
$showordernb=GETPOST($param_showordernb,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$year=$tmparray['year'];
$showinvoicenb=$tmparray['showinvoicenb'];
$showpropalnb=$tmparray['showpropalnb'];
$showordernb=$tmparray['showordernb'];
}
if (empty($showinvoicenb) && empty($showpropalnb) && empty($showordernb)) { $showpropalnb=1; $showinvoicenb=1; $showordernb=1; } if (empty($showinvoicenb) && empty($showpropalnb) && empty($showordernb)) { $showpropalnb=1; $showinvoicenb=1; $showordernb=1; }
if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) $showinvoicenb=0; if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) $showinvoicenb=0;
if (empty($conf->propal->enabled) || empty($user->rights->propal->lire)) $showpropalnb=0; if (empty($conf->propal->enabled) || empty($user->rights->propal->lire)) $showpropalnb=0;
if (empty($conf->commande->enabled) || empty($user->rights->commande->lire)) $showordernb=0; if (empty($conf->commande->enabled) || empty($user->rights->commande->lire)) $showordernb=0;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$year=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($year)) $year=$nowarray['year'];
$nbofgraph=0; $nbofgraph=0;
if ($showinvoicenb) $nbofgraph++; if ($showinvoicenb) $nbofgraph++;
@ -300,7 +313,7 @@ class box_graph_product_distribution extends ModeleBoxes
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_showinvoicenb.','.$param_showpropalnb.','.$param_showordernb.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,showinvoicenb,showpropalnb,showordernb">';
if (! empty($conf->facture->enabled) || ! empty($user->rights->facture->lire)) if (! empty($conf->facture->enabled) || ! empty($user->rights->facture->lire))
{ {
$stringtoshow.='<input type="checkbox" name="'.$param_showinvoicenb.'"'.($showinvoicenb?' checked="true"':'').'> '.$langs->trans("ForCustomersInvoices"); $stringtoshow.='<input type="checkbox" name="'.$param_showinvoicenb.'"'.($showinvoicenb?' checked="true"':'').'> '.$langs->trans("ForCustomersInvoices");

View File

@ -83,17 +83,29 @@ class box_graph_propales_permonth extends ModeleBoxes
if ($user->rights->propal->lire) if ($user->rights->propal->lire)
{ {
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; $param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php';
$shownb=GETPOST($param_shownb,'alpha',4); if (GETPOST('DOL_AUTOSET_COOKIE'))
$showtot=GETPOST($param_showtot,'alpha',4); {
$endyear=GETPOST($param_year,'int');
$shownb=GETPOST($param_shownb,'alpha');
$showtot=GETPOST($param_showtot,'alpha');
}
else
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
$tmparray=dol_json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode],true);
$endyear=$tmparray['year'];
$shownb=$tmparray['shownb'];
$showtot=$tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) $showtot=1; if (empty($shownb) && empty($showtot)) $showtot=1;
$nowarray=dol_getdate(dol_now(),true); $nowarray=dol_getdate(dol_now(),true);
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1; $startyear=$endyear-1;
$mode='customer'; $mode='customer';
$userid=0; $userid=0;
@ -196,7 +208,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$stringtoshow.='<div class="center hideobject divboxfilter" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden $stringtoshow.='<div class="center hideobject divboxfilter" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; $stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">'; $stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,shownb,showtot">';
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfProposalsByMonth");
$stringtoshow.=' &nbsp; '; $stringtoshow.=' &nbsp; ';
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfProposalsByMonthHT");

View File

@ -1084,6 +1084,68 @@ class FormOther
} }
/**
* Return a HTML select list of bank accounts
*
* @param string $htmlname Name of select zone
* @param string $dictionnarytable Dictionnary table
* @param string $keyfield Field for key
* @param string $labelfield Label field
* @param string $selected Selected value
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @return void
*/
function select_dictionnary($htmlname,$dictionnarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0)
{
global $langs, $conf;
$langs->load("admin");
$sql = "SELECT rowid, ".$keyfield.", ".$labelfield;
$sql.= " FROM ".MAIN_DB_PREFIX.$dictionnarytable;
$sql.= " ORDER BY ".$labelfield;
dol_syslog(get_class($this)."::select_dictionnary sql=".$sql);
$result = $this->db->query($sql);
if ($result)
{
$num = $this->db->num_rows($result);
$i = 0;
if ($num)
{
print '<select id="select'.$htmlname.'" class="flat selectdictionnary" name="'.$htmlname.'"'.($moreattrib?' '.$moreattrib:'').'>';
if ($useempty == 1 || ($useempty == 2 && $num > 1))
{
print '<option value="-1">&nbsp;</option>';
}
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid || $selected == $obj->$keyfield)
{
print '<option value="'.$obj->$keyfield.'" selected="selected">';
}
else
{
print '<option value="'.$obj->$keyfield.'">';
}
print $obj->$labelfield;
print '</option>';
$i++;
}
print "</select>";
}
else
{
print $langs->trans("DictionnaryEmpty");
}
}
else {
dol_print_error($this->db);
}
}
} }
?> ?>

View File

@ -3478,16 +3478,18 @@ function dol_html_entity_decode($a,$b,$c='UTF-8')
/** /**
* Replace htmlentities functions to manage errors * Replace htmlentities functions to manage errors
* http://php.net/manual/en/function.htmlentities.php
* *
* @param string $a Operand a * @param string $string The input string.
* @param string $b Operand b * @param int $flags Flags(see PHP doc above)
* @param string $c Operand c * @param string $encoding Encoding
* @return string String encoded * @param bool $double_encode When double_encode is turned off PHP will not encode existing html entities
* @return string $ret Encoded string
*/ */
function dol_htmlentities($a,$b,$c='UTF-8') function dol_htmlentities($string, $flags=null, $encoding='UTF-8', $double_encode=false)
{ {
// We use @ to avoid warning on PHP4 that does not support entity decoding to UTF8; // We use @ to avoid warning on PHP4 that does not support entity decoding to UTF8;
$ret=@htmlentities($a,$b,$c); $ret=@htmlentities($string, $flags, $encoding, $double_encode);
return $ret; return $ret;
} }

View File

@ -176,27 +176,34 @@ class modProjet extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("projet","export")); $this->export_permission[$r]=array(array("projet","export"));
$this->export_dependencies_array[$r]=array('task_time'=>'ppt.rowid');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country', $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country',
's.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode',
'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote", 'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote",
'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc"); 'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc",
'ptt.task_date'=>'TaskTimeDate','ptt.task_duration'=>"TimesSpent",'ptt.fk_user'=>"TaskTimeUser",'ptt.note'=>"TaskTimeNote");
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', $this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle',
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle',
'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.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text',
'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text", 'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text",
'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.planned_workload'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text"); 'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.planned_workload'=>"Number",'pt.progress'=>"Number",'pt.description'=>"Text",
'ptt.task_date'=>'Date','ptt.task_duration'=>"Duree",'ptt.fk_user'=>"List:user:Name",'ptt.note'=>"Text");
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company', $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company',
's.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', 's.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company',
'f.rowid'=>"project",'f.ref'=>"project",'f.datec'=>"project",'f.duree'=>"project",'f.fk_statut'=>"project",'f.description'=>"project", 'f.rowid'=>"project",'f.ref'=>"project",'f.datec'=>"project",'f.duree'=>"project",'f.fk_statut'=>"project",'f.description'=>"project",
'pt.rowid'=>'task','pt.dateo'=>"task",'pt.datee'=>"task",'pt.duration_effective'=>"task",'pt.planned_workload'=>"task",'pt.progress'=>"task",'pt.description'=>"task"); 'pt.rowid'=>'task','pt.dateo'=>"task",'pt.datee'=>"task",'pt.duration_effective'=>"task",'pt.planned_workload'=>"task",'pt.progress'=>"task",'pt.description'=>"task",
'ptt.task_date'=>'task_time','ptt.task_duration'=>"task_time",'ptt.fk_user'=>"task_time",'ptt.note'=>"task_time");
$this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'projet as p, '.MAIN_DB_PREFIX.'projet_task as pt, '.MAIN_DB_PREFIX.'societe as s)'; $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'projet as p, '.MAIN_DB_PREFIX.'societe as s)';
$this->export_sql_end[$r] .=' WHERE p.fk_soc = s.rowid AND p.rowid = pt.fk_projet '; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task as pt ON (p.rowid = pt.fk_projet)";
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON (pt.rowid = ptt.fk_task)";
$this->export_sql_end[$r] .=' WHERE p.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' AND p.entity = '.$conf->entity; $this->export_sql_end[$r] .=' AND p.entity = '.$conf->entity;
$r++;
} }

View File

@ -165,13 +165,21 @@ require_once 'filefunc.inc.php';
// If there is a POST parameter to tell to save automatically some POST params into a cookies, we do it // If there is a POST parameter to tell to save automatically some POST params into a cookies, we do it
if (! empty($_POST["DOL_AUTOSET_COOKIE"])) if (! empty($_POST["DOL_AUTOSET_COOKIE"]))
{ {
$tmplist=explode(',',$_POST["DOL_AUTOSET_COOKIE"]); require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
foreach ($tmplist as $value) $tmpautoset=explode(':',$_POST["DOL_AUTOSET_COOKIE"],2);
$tmplist=explode(',',$tmpautoset[1]);
$cookiearrayvalue='';
foreach ($tmplist as $tmpkey)
{ {
//var_dump('setcookie key='.$value.' value='.$_POST[$value]); $postkey=$tmpautoset[0].'_'.$tmpkey;
setcookie($value, empty($_POST[$value])?'':$_POST[$value], empty($_POST[$value])?0:(time()+(86400*354)), '/'); // keep cookie 1 year //var_dump('tmpkey='.$tmpkey.' postkey='.$postkey.' value='.$_POST[$postkey]);
if (empty($_POST[$value])) unset($_COOKIE[$value]); if (! empty($_POST[$postkey])) $cookiearrayvalue[$tmpkey]=$_POST[$postkey];
} }
$cookiename=$tmpautoset[0];
$cookievalue=dol_json_encode($cookiearrayvalue);
//var_dump('setcookie cookiename='.$cookiename.' cookievalue='.$cookievalue);
setcookie($cookiename, empty($cookievalue)?'':$cookievalue, empty($cookievalue)?0:(time()+(86400*354)), '/'); // keep cookie 1 year
if (empty($cookievalue)) unset($_COOKIE[$cookiename]);
} }
// Init session. Name of session is specific to Dolibarr instance. // Init session. Name of session is specific to Dolibarr instance.

View File

@ -1664,6 +1664,41 @@ class Societe extends CommonObject
return $contacts; return $contacts;
} }
/**
* Renvoie la liste des contacts de cette societe
*
* @return array $contacts tableau des contacts
*/
function contact_array_objects()
{
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
$contacts = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'";
$resql=$this->db->query($sql);
if ($resql)
{
$nump = $this->db->num_rows($resql);
if ($nump)
{
$i = 0;
while ($i < $nump)
{
$obj = $this->db->fetch_object($resql);
$contact = new Contact($this->db);
$contact->fetch($obj->rowid);
$contacts[] = $contact;
$i++;
}
}
}
else
{
dol_print_error($this->db);
}
return $contacts;
}
/** /**
* Return property of contact from its id * Return property of contact from its id
* *