Qual: Renamed all function dolibarr_xxx to dol_xxx to use same prefix everywhere.
This commit is contained in:
parent
1f013bb354
commit
0bdd1efe2b
@ -991,8 +991,8 @@ class Adherent extends CommonObject
|
||||
else
|
||||
{
|
||||
// If no end date, end date = date + 1 year - 1 day
|
||||
$datefin = dolibarr_time_plus_duree($date,1,'y');
|
||||
$datefin = dolibarr_time_plus_duree($datefin,-1,'d');
|
||||
$datefin = dol_time_plus_duree($date,1,'y');
|
||||
$datefin = dol_time_plus_duree($datefin,-1,'d');
|
||||
}
|
||||
|
||||
// Create subscription
|
||||
|
||||
@ -89,7 +89,7 @@ if ($user->rights->adherent->cotisation->creer && $_POST["action"] == 'cotisatio
|
||||
}
|
||||
if (! $datesubend)
|
||||
{
|
||||
$datesubend=dolibarr_time_plus_duree(dolibarr_time_plus_duree($datecotisation,$defaultdelay,$defaultdelayunit),-1,'d');
|
||||
$datesubend=dol_time_plus_duree(dol_time_plus_duree($datecotisation,$defaultdelay,$defaultdelayunit),-1,'d');
|
||||
}
|
||||
|
||||
// Payment informations
|
||||
@ -398,7 +398,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
if ($adh->datefin > 0)
|
||||
{
|
||||
$datefrom=dolibarr_time_plus_duree($adh->datefin,1,'d');
|
||||
$datefrom=dol_time_plus_duree($adh->datefin,1,'d');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -415,7 +415,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
||||
}
|
||||
if (! $dateto)
|
||||
{
|
||||
//$dateto=dolibarr_time_plus_duree(dolibarr_time_plus_duree($datefrom,$defaultdelay,$defaultdelayunit),-1,'d');
|
||||
//$dateto=dol_time_plus_duree(dol_time_plus_duree($datefrom,$defaultdelay,$defaultdelayunit),-1,'d');
|
||||
$dateto=-1; // By default, no date is suggested
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("DateEndSubscription").'</td><td>';
|
||||
|
||||
@ -61,12 +61,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("Member"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($adh);
|
||||
dol_print_object_info($adh);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -72,12 +72,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("Subscription"));
|
||||
$subscription->info($rowid);
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($subscription);
|
||||
dol_print_object_info($subscription);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ class InfoBox
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param $DB Handler d'accès base
|
||||
* \param $DB Handler d'acc<EFBFBD>s base
|
||||
*/
|
||||
function InfoBox($DB)
|
||||
{
|
||||
@ -170,6 +170,8 @@ class InfoBox
|
||||
*/
|
||||
function saveboxorder($zone,$boxorder,$userid=0)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
|
||||
dolibarr_syslog("InfoBoxes::saveboxorder zone=".$zone." user=".$userid);
|
||||
|
||||
if (! $userid || $userid == 0) return 0;
|
||||
@ -181,7 +183,7 @@ class InfoBox
|
||||
// Sauve parametre indiquant que le user a une
|
||||
$confuserzone='MAIN_BOXES_'.$zone;
|
||||
$tab[$confuserzone]=1;
|
||||
if (! dolibarr_set_user_page_param($this->db, $user, '', $tab))
|
||||
if (! dol_set_user_page_param($this->db, $user, '', $tab))
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
|
||||
@ -172,8 +172,8 @@ if ($_GET["socid"])
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$soc->url\" target=\"_blank\">".$soc->url."</a> </td></tr>";
|
||||
|
||||
|
||||
@ -770,7 +770,7 @@ if ($_GET["id"])
|
||||
{
|
||||
if ($act->societe->fetch($act->societe->id))
|
||||
{
|
||||
print "<br>".dolibarr_print_phone($act->societe->tel);
|
||||
print "<br>".dol_print_phone($act->societe->tel);
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
@ -783,7 +783,7 @@ if ($_GET["id"])
|
||||
{
|
||||
if ($act->contact->fetch($act->contact->id))
|
||||
{
|
||||
print "<br>".dolibarr_print_phone($act->contact->phone_pro);
|
||||
print "<br>".dol_print_phone($act->contact->phone_pro);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,9 +335,9 @@ if ($showbirthday)
|
||||
$obj = $db->fetch_object($resql);
|
||||
$action=new ActionComm($db);
|
||||
$action->id=$obj->rowid; // We put contact id in action id for birthdays events
|
||||
$datebirth=dolibarr_stringtotime($obj->birthday);
|
||||
$datebirth=dol_stringtotime($obj->birthday);
|
||||
//print 'ee'.$obj->birthday.'-'.$datebirth;
|
||||
$datearray=dolibarr_getdate($datebirth,true);
|
||||
$datearray=dol_getdate($datebirth,true);
|
||||
$action->datep=dolibarr_mktime(0,0,0,$datearray['mon'],$datearray['mday'],$year);
|
||||
$action->datef=$action->datep;
|
||||
$action->type_code='BIRTHDAY';
|
||||
|
||||
@ -70,7 +70,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("Action"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($act);
|
||||
dol_print_object_info($act);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -413,9 +413,9 @@ else
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$livraison->lignes[$i]->pays.'</td>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($livraison->lignes[$i]->tel,$livraison->lignes[$i]->pays_code,0,$livraison->socid).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($livraison->lignes[$i]->tel,$livraison->lignes[$i]->pays_code,0,$livraison->socid).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($livraison->lignes[$i]->fax,$livraison->lignes[$i]->pays_code,0,$livraison->socid).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($livraison->lignes[$i]->fax,$livraison->lignes[$i]->pays_code,0,$livraison->socid).'</td></tr>';
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ if ($resql)
|
||||
|
||||
print '<td><a href="action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->cidp.'&socid='.$obj->rowid.'">'.$obj->email.'</a> </td>';
|
||||
|
||||
print '<td>'.dolibarr_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->rowid).' </td>';
|
||||
print '<td>'.dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->rowid).' </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -189,10 +189,10 @@ if ($socid > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($objsoc->tel,$objsoc->pays_code,0,$objsoc->id).'</td>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($objsoc->tel,$objsoc->pays_code,0,$objsoc->id).'</td>';
|
||||
|
||||
// Fax
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code,0,$objsoc->id).'</td></tr>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($objsoc->fax,$objsoc->pays_code,0,$objsoc->id).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$objsoc->url\" target=\"_blank\">".$objsoc->url."</a> </td></tr>";
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@ require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
|
||||
$langs->load('companies');
|
||||
$langs->load('propal');
|
||||
@ -1335,7 +1336,7 @@ if ($_GET['propalid'] > 0)
|
||||
// Remise %
|
||||
if ($objp->remise_percent > 0 && $objp->special_code != 3)
|
||||
{
|
||||
print '<td align="right">'.dolibarr_print_reduction($objp->remise_percent)."</td>\n";
|
||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -58,12 +58,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans('Proposal'));
|
||||
$propal->info($propal->id);
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($propal);
|
||||
dol_print_object_info($propal);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ if ($socid > 0)
|
||||
else print $societe->pays;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>Fax</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>Fax</td><td>'.dol_print_phone($societe->fax,$societe->pays_code).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a></td></tr>";
|
||||
|
||||
if ($societe->rubrique)
|
||||
|
||||
@ -34,7 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/includes/modules/commande/modules_commande.php"
|
||||
require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php');
|
||||
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php');
|
||||
@ -1553,7 +1553,7 @@ else
|
||||
print '</td>';
|
||||
if ($objp->remise_percent > 0)
|
||||
{
|
||||
print '<td align="right">'.dolibarr_print_reduction($objp->remise_percent).'</td>';
|
||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -56,12 +56,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("CustomerOrder"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($commande);
|
||||
dol_print_object_info($commande);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -57,12 +57,12 @@ $h++;
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("LineRecord"));
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($line);
|
||||
dol_print_object_info($line);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/modules/facture/modules_facture.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php');
|
||||
@ -2638,7 +2639,7 @@ else
|
||||
print '</td>';
|
||||
if ($objp->remise_percent > 0)
|
||||
{
|
||||
print '<td align="right">'.dolibarr_print_reduction($objp->remise_percent)."</td>\n";
|
||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -52,12 +52,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($fac);
|
||||
dol_print_object_info($fac);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ if ($socid > 0)
|
||||
else print $societe->pays;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code,0,$societe->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\" target=\"_blank\">$societe->url</a> </td></tr>";
|
||||
|
||||
// Assujeti a TVA ou pas
|
||||
|
||||
@ -67,12 +67,12 @@ print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($paiement);
|
||||
dol_print_object_info($paiement);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -422,7 +422,7 @@ class Contact extends CommonObject
|
||||
$this->priv = $obj->priv;
|
||||
$this->mail = $obj->email;
|
||||
|
||||
$this->birthday = dolibarr_stringtotime($obj->birthday);
|
||||
$this->birthday = dol_stringtotime($obj->birthday);
|
||||
//print "fetch: ".$obj->birthday.'-'.$this->birthday;
|
||||
$this->birthday_alert = $obj->birthday_alert;
|
||||
$this->note = $obj->note;
|
||||
|
||||
@ -483,7 +483,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
{
|
||||
$login=strtolower(substr($contact->prenom, 0, 4)) . strtolower(substr($contact->nom, 0, 4));
|
||||
|
||||
// Crée un tableau formulaire
|
||||
// Cr<EFBFBD>e un tableau formulaire
|
||||
$formquestion=array(
|
||||
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login));
|
||||
|
||||
@ -533,11 +533,11 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
||||
print $contact->pays;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td>'.dolibarr_print_phone($contact->phone_pro,$contact->pays_code,$contact->id,$contact->socid).'</td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td>'.dolibarr_print_phone($contact->phone_perso,$contact->pays_code,$contact->id,$contact->socid).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td>'.dol_print_phone($contact->phone_pro,$contact->pays_code,$contact->id,$contact->socid).'</td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td>'.dol_print_phone($contact->phone_perso,$contact->pays_code,$contact->id,$contact->socid).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td>'.dolibarr_print_phone($contact->phone_mobile,$contact->pays_code,$contact->id,$contact->socid).'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($contact->fax,$contact->pays_code,$contact->id,$contact->socid).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td>'.dol_print_phone($contact->phone_mobile,$contact->pays_code,$contact->id,$contact->socid).'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($contact->fax,$contact->pays_code,$contact->id,$contact->socid).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td>';
|
||||
if ($contact->email && ! ValidEmail($contact->email))
|
||||
|
||||
@ -314,14 +314,14 @@ if ($result)
|
||||
|
||||
// Phone
|
||||
print '<td>';
|
||||
print dolibarr_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid);
|
||||
print dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid);
|
||||
print '</td>';
|
||||
|
||||
if ($_GET["view"] == 'phone')
|
||||
{
|
||||
print '<td>'.dolibarr_print_phone($obj->phone_mobile,$obj->pays_code,$obj->cidp,$obj->socid).' </td>';
|
||||
print '<td>'.dol_print_phone($obj->phone_mobile,$obj->pays_code,$obj->cidp,$obj->socid).' </td>';
|
||||
|
||||
print '<td>'.dolibarr_print_phone($obj->fax,$obj->pays_code,$obj->cidp,$obj->socid).' </td>';
|
||||
print '<td>'.dol_print_phone($obj->fax,$obj->pays_code,$obj->cidp,$obj->socid).' </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -73,11 +73,11 @@ if ($contact->socid > 0)
|
||||
print $langs->trans("Company").' : '.$societe->getNomUrl(0).'<br>';
|
||||
}
|
||||
|
||||
dolibarr_print_object_info($contact);
|
||||
dol_print_object_info($contact);
|
||||
|
||||
print "</div>";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -1064,7 +1064,7 @@ else
|
||||
{
|
||||
$product=new Product($db);
|
||||
$product->fetch($objp->fk_product);
|
||||
$dateactend = dolibarr_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
$dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1112,7 +1112,7 @@ else
|
||||
{
|
||||
$product=new Product($db);
|
||||
$product->fetch($objp->fk_product);
|
||||
$dateactend = dolibarr_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
$dateactend = dol_time_plus_duree (time(), $product->duration_value, $product->duration_unit);
|
||||
}
|
||||
}
|
||||
$now=mktime();
|
||||
|
||||
@ -51,12 +51,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("Contract"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($contrat);
|
||||
dol_print_object_info($contrat);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -838,7 +838,7 @@ elseif ($_GET["id"] > 0)
|
||||
|
||||
// Date intervention
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
$timearray=dolibarr_getdate(mktime());
|
||||
$timearray=dol_getdate(mktime());
|
||||
$timewithnohour=dolibarr_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
|
||||
$html->select_date($timewithnohour,'di',1,1,0,"addinter");
|
||||
print '</td>';
|
||||
|
||||
@ -54,12 +54,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans('InterventionCard'));
|
||||
$fichinter->info($fichinter->id);
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($fichinter);
|
||||
dol_print_object_info($fichinter);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/modules/supplier_order/modules_command
|
||||
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.product.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/lib/fourn.lib.php";
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
|
||||
$langs->load('orders');
|
||||
@ -723,7 +724,7 @@ if ($id > 0)
|
||||
print '<td align="right" nowrap="nowrap">'.$commandline->qty.'</td>';
|
||||
if ($commandline->remise_percent > 0)
|
||||
{
|
||||
print '<td align="right" nowrap="nowrap">'.dolibarr_print_reduction($commandline->remise_percent)."</td>\n";
|
||||
print '<td align="right" nowrap="nowrap">'.dol_print_reduction($commandline->remise_percent)."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -51,12 +51,12 @@ $titre=$langs->trans('SupplierInvoice');
|
||||
dolibarr_fiche_head($head, 'info', $langs->trans('SupplierInvoice'));
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($fac);
|
||||
dol_print_object_info($fac);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ if ( $societe->fetch($socid) )
|
||||
else print $societe->pays;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code,0,$societe->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id).'</td><td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
|
||||
// Assujetti a TVA ou pas
|
||||
|
||||
@ -59,12 +59,12 @@ $paiement->fetch($_GET["id"], $user);
|
||||
$paiement->info($_GET["id"]);
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($paiement);
|
||||
dol_print_object_info($paiement);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -18,16 +18,15 @@
|
||||
|
||||
/**
|
||||
\file htdocs/html.formmail.class.php
|
||||
\brief Fichier de la classe permettant la génération du formulaire html d'envoi de mail unitaire
|
||||
\brief Fichier de la classe permettant la g<EFBFBD>n<EFBFBD>ration du formulaire html d'envoi de mail unitaire
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.lib.php");
|
||||
|
||||
|
||||
/** \class FormMail
|
||||
\brief Classe permettant la génération du formulaire html d'envoi de mail unitaire
|
||||
\brief Classe permettant la g<EFBFBD>n<EFBFBD>ration du formulaire html d'envoi de mail unitaire
|
||||
\remarks Utilisation: $formail = new FormMail($db)
|
||||
\remarks $formmail->proprietes=1 ou chaine ou tableau de valeurs
|
||||
\remarks $formmail->show_form() affiche le formulaire
|
||||
@ -67,7 +66,7 @@ class FormMail
|
||||
|
||||
/**
|
||||
\brief Constructeur
|
||||
\param DB handler d'accès base de donnée
|
||||
\param DB handler d'acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
*/
|
||||
function FormMail($DB)
|
||||
{
|
||||
@ -153,7 +152,7 @@ class FormMail
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propriétés
|
||||
* \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propri<EFBFBD>t<EFBFBD>s
|
||||
* \param addfileaction Name of action when posting file attachments
|
||||
* \remarks this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
|
||||
*/
|
||||
@ -457,10 +456,10 @@ class FormMail
|
||||
|
||||
/*
|
||||
* \brief Affiche la partie de formulaire pour saisie d'un mail
|
||||
* \param withtopic 1 pour proposer à la saisie le sujet
|
||||
* \param withbody 1 pour proposer à la saisie le corps du message
|
||||
* \param withfile 1 pour proposer à la saisie l'ajout d'un fichier joint
|
||||
* \todo Fonction a virer quand fichier /comm/mailing.php viré (= quand ecran dans /comm/mailing prets)
|
||||
* \param withtopic 1 pour proposer <EFBFBD> la saisie le sujet
|
||||
* \param withbody 1 pour proposer <EFBFBD> la saisie le corps du message
|
||||
* \param withfile 1 pour proposer <EFBFBD> la saisie l'ajout d'un fichier joint
|
||||
* \todo Fonction a virer quand fichier /comm/mailing.php vir<EFBFBD> (= quand ecran dans /comm/mailing prets)
|
||||
*/
|
||||
function mail_topicmessagefile($withtopic=1,$withbody=1,$withfile=1,$defaultbody) {
|
||||
global $langs;
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/modules_commande.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
@ -301,7 +302,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
if ($com->lignes[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dolibarr_print_reduction($com->lignes[$i]->remise_percent), 0, 'R');
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dol_print_reduction($com->lignes[$i]->remise_percent), 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
@ -320,7 +321,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
if ($fac->lignes[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dolibarr_print_reduction($fac->lignes[$i]->remise_percent), 0, 'R');
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($fac->lignes[$i]->remise_percent), 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
@ -303,7 +304,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
if ($propale->lignes[$i]->remise_percent && $propale->lignes[$i]->special_code != 3)
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dolibarr_print_reduction($propale->lignes[$i]->remise_percent), 0, 'R');
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($propale->lignes[$i]->remise_percent), 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
|
||||
@ -87,8 +87,6 @@ pHeader($langs->trans("SetupEnd"),"etape5");
|
||||
|
||||
if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.lib.php");
|
||||
|
||||
print '<table cellspacing="0" cellpadding="2" width="100%">';
|
||||
$error=0;
|
||||
|
||||
|
||||
@ -298,10 +298,10 @@ function show_contacts($conf,$langs,$db,$objsoc)
|
||||
|
||||
// Lien click to dial
|
||||
print '<td>';
|
||||
print dolibarr_print_phone($obj->phone,$obj->pays_code,$obj->rowid,$objsoc->id);
|
||||
print dol_print_phone($obj->phone,$obj->pays_code,$obj->rowid,$objsoc->id);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dolibarr_print_phone($obj->fax,$obj->pays_code,$obj->rowid,$objsoc->id);
|
||||
print dol_print_phone($obj->fax,$obj->pays_code,$obj->rowid,$objsoc->id);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
@ -310,7 +310,7 @@ function show_contacts($conf,$langs,$db,$objsoc)
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
// \TODO
|
||||
//if ($obj->email) print dol_email_link($obj->email);
|
||||
if ($obj->email) print dol_email_link($obj->email);
|
||||
print ' </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
|
||||
@ -115,7 +115,7 @@ function displayBox($selectedDate,$month,$year){
|
||||
$thedate=dolibarr_mktime(12,0,0,$month,1,$year);
|
||||
//print "thedate=$thedate";
|
||||
$today=mktime();
|
||||
$todayArray=dolibarr_getdate($today);
|
||||
$todayArray=dol_getdate($today);
|
||||
if($selectedDate != "00000000")
|
||||
{
|
||||
$selDate=xyzToUnixTimestamp($selectedDate);
|
||||
@ -156,7 +156,7 @@ function displayBox($selectedDate,$month,$year){
|
||||
</tr>
|
||||
<?php
|
||||
//print "x ".$thedate." y";
|
||||
$firstdate=dolibarr_getdate($thedate);
|
||||
$firstdate=dol_getdate($thedate);
|
||||
$mydate=$firstdate;
|
||||
|
||||
// Loop on each day of month
|
||||
@ -205,7 +205,7 @@ function displayBox($selectedDate,$month,$year){
|
||||
}
|
||||
else
|
||||
{
|
||||
$mydate=dolibarr_getdate($thedate);
|
||||
$mydate=dol_getdate($thedate);
|
||||
if ($firstdate["month"] != $mydate["month"]) $stoploop=1;
|
||||
}
|
||||
}
|
||||
@ -219,7 +219,7 @@ function displayBox($selectedDate,$month,$year){
|
||||
<tr><td id="dpExp" class="dpExplanation" colspan="7"><?php
|
||||
if($selDate)
|
||||
{
|
||||
$tempDate=dolibarr_getdate($selDate);
|
||||
$tempDate=dol_getdate($selDate);
|
||||
print $langs->trans($selectMonth)." ";
|
||||
print sprintf("%02s",$tempDate["mday"]);
|
||||
print ", ".$selectYear;
|
||||
|
||||
@ -158,6 +158,12 @@ function dol_escape_js($stringtoescape)
|
||||
}
|
||||
|
||||
|
||||
/* For backward compatiblity */
|
||||
function dolibarr_syslog($message, $level=LOG_INFO)
|
||||
{
|
||||
return dol_syslog($message, $level);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Write log message in a file or to syslog process
|
||||
* Pour fichier: fichier defined by SYSLOG_FILE
|
||||
@ -172,7 +178,7 @@ function dol_escape_js($stringtoescape)
|
||||
* \remarks On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=LOG_DEBUG=6
|
||||
* On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
|
||||
*/
|
||||
function dolibarr_syslog($message, $level=LOG_INFO)
|
||||
function dol_syslog($message, $level=LOG_INFO)
|
||||
{
|
||||
global $conf,$user,$langs,$REQUEST;
|
||||
|
||||
@ -273,14 +279,21 @@ function dolibarr_syslog($message, $level=LOG_INFO)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche le header d'une fiche
|
||||
\param links Tableau de titre d'onglets
|
||||
\param active 0=onglet non actif, 1=onglet actif
|
||||
\param title Titre tabelau ("" par defaut)
|
||||
\param notab 0=Add tab header, 1=no tab header
|
||||
*/
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_fiche_head($links, $active='0', $title='', $notab=0)
|
||||
{
|
||||
return dol_fiche_head($links, $active, $title, $notab);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche le header d'une fiche
|
||||
* \param links Tableau de titre d'onglets
|
||||
* \param active 0=onglet non actif, 1=onglet actif
|
||||
* \param title Titre tabelau ("" par defaut)
|
||||
* \param notab 0=Add tab header, 1=no tab header
|
||||
*/
|
||||
function dol_fiche_head($links, $active='0', $title='', $notab=0)
|
||||
{
|
||||
print "\n".'<div class="tabs">'."\n";
|
||||
|
||||
@ -325,112 +338,13 @@ function dolibarr_fiche_head($links, $active='0', $title='', $notab=0)
|
||||
|
||||
|
||||
/**
|
||||
\brief Sauvegarde parametrage personnel
|
||||
\param db Handler d'acc<EFBFBD>s base
|
||||
\param user Objet utilisateur
|
||||
\param url Si defini, on sauve parametre du tableau tab dont cl<EFBFBD> = (url avec sortfield, sortorder, begin et page)
|
||||
Si non defini on sauve tous parametres du tableau tab
|
||||
\param tab Tableau (cl<EFBFBD>=>valeur) des param<EFBFBD>tres a sauvegarder
|
||||
\return int <0 si ko, >0 si ok
|
||||
* \brief Add a delay to a date
|
||||
* \param time Date timestamp ou au format YYYY-MM-DD
|
||||
* \param duration_value Value of delay to add
|
||||
* \param duration_unit Unit of added delay (d, m, y)
|
||||
* \return int New timestamp
|
||||
*/
|
||||
function dolibarr_set_user_page_param($db, &$user, $url='', $tab)
|
||||
{
|
||||
// Verification parametres
|
||||
if (sizeof($tab) < 1) return -1;
|
||||
|
||||
$db->begin();
|
||||
|
||||
// On efface anciens param<61>tres pour toutes les cl<63> dans $ta
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param";
|
||||
$sql.= " WHERE fk_user = ".$user->id;
|
||||
if ($url) $sql.=" AND page='".$url."'";
|
||||
else $sql.=" AND page=''"; // Page ne peut etre null
|
||||
$sql.= " AND param in (";
|
||||
$i=0;
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
if ($i > 0) $sql.=',';
|
||||
$sql.="'".$key."'";
|
||||
$i++;
|
||||
}
|
||||
$sql.= ")";
|
||||
dolibarr_syslog("functions.lib::dolibarr_set_user_page_param $sql");
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
$db->rollback();
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
// On positionne nouveaux param<61>tres
|
||||
if ($value && (! $url || in_array($key,array('sortfield','sortorder','begin','page'))))
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,page,param,value)";
|
||||
$sql.= " VALUES (".$user->id.",";
|
||||
if ($url) $sql.= " '".urlencode($url)."',";
|
||||
else $sql.= " '',";
|
||||
$sql.= " '".$key."','".addslashes($value)."');";
|
||||
dolibarr_syslog("functions.lib::dolibarr_set_user_page_param $sql");
|
||||
|
||||
$result=$db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
$db->rollback();
|
||||
exit;
|
||||
}
|
||||
|
||||
$user->page_param[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Formattage des nombres
|
||||
\param ca valeur a formater
|
||||
\return int valeur format<EFBFBD>e
|
||||
*/
|
||||
function dolibarr_print_ca($ca)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
if ($ca > 1000)
|
||||
{
|
||||
$cat = round(($ca / 1000),2);
|
||||
$cat = "$cat K".$langs->trans("Currency".$conf->monnaie);
|
||||
}
|
||||
else
|
||||
{
|
||||
$cat = round($ca,2);
|
||||
$cat = "$cat ".$langs->trans("Currency".$conf->monnaie);
|
||||
}
|
||||
|
||||
if ($ca > 1000000)
|
||||
{
|
||||
$cat = round(($ca / 1000000),2);
|
||||
$cat = "$cat M".$langs->trans("Currency".$conf->monnaie);
|
||||
}
|
||||
|
||||
return $cat;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Effectue un d<EFBFBD>calage de date par rapport a une dur<EFBFBD>e
|
||||
\param time Date timestamp ou au format YYYY-MM-DD
|
||||
\param duration_value Valeur de la dur<EFBFBD>e a ajouter
|
||||
\param duration_unit Unit<EFBFBD> de la dur<EFBFBD>e a ajouter (d, m, y)
|
||||
\return int Nouveau timestamp
|
||||
*/
|
||||
function dolibarr_time_plus_duree($time,$duration_value,$duration_unit)
|
||||
function dol_time_plus_duree($time,$duration_value,$duration_unit)
|
||||
{
|
||||
if ($duration_value == 0) return $time;
|
||||
if ($duration_value > 0) $deltastring="+".abs($duration_value);
|
||||
@ -442,6 +356,12 @@ function dolibarr_time_plus_duree($time,$duration_value,$duration_unit)
|
||||
}
|
||||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
{
|
||||
return dol_print_date($time,$format,$to_gmt,$outputlangs);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Output date in a string format according to language $conf->language
|
||||
* \param time GM Timestamps date (or 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' in server TZ)
|
||||
@ -455,7 +375,7 @@ function dolibarr_time_plus_duree($time,$duration_value,$duration_unit)
|
||||
* This means output is endoded in UTF-8 in default case.
|
||||
* \return string Formated date or '' if time is null
|
||||
*/
|
||||
function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -519,12 +439,12 @@ function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
* \return date Date
|
||||
* \example 19700101020000 -> 7200
|
||||
*/
|
||||
function dolibarr_stringtotime($string)
|
||||
function dol_stringtotime($string)
|
||||
{
|
||||
if (eregi('^([0-9]+)\/([0-9]+)\/([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?',$string,$reg))
|
||||
{
|
||||
// This part of code should not be used.
|
||||
dolibarr_syslog("Functions.lib::dolibarr_stringtotime call to function with deprecated parameter", LOG_WARN);
|
||||
dolibarr_syslog("Functions.lib::dol_stringtotime call to function with deprecated parameter", LOG_WARN);
|
||||
// Date est au format 'DD/MM/YY' ou 'DD/MM/YY HH:MM:SS'
|
||||
// Date est au format 'DD/MM/YYYY' ou 'DD/MM/YYYY HH:MM:SS'
|
||||
$sday = $reg[1];
|
||||
@ -574,7 +494,7 @@ function dolibarr_stringtotime($string)
|
||||
* 'ndays' => $ndays
|
||||
* \remarks PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
||||
*/
|
||||
function dolibarr_getdate($timestamp,$fast=false)
|
||||
function dol_getdate($timestamp,$fast=false)
|
||||
{
|
||||
$usealternatemethod=false;
|
||||
if ($timestamp <= 0) $usealternatemethod=true; // <= 1970
|
||||
@ -592,6 +512,12 @@ function dolibarr_getdate($timestamp,$fast=false)
|
||||
return $arrayinfo;
|
||||
}
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
{
|
||||
return dol_mktime($hour,$minute,$second,$month,$day,$year,$gm,$check);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a GMT date built from detailed informations
|
||||
* Replace function mktime not available under Windows if year < 1970
|
||||
@ -606,7 +532,7 @@ function dolibarr_getdate($timestamp,$fast=false)
|
||||
* @param check 0=No check on parameters (Can use day 32, etc...)
|
||||
* @return timestamp Date en timestamp, '' if error
|
||||
*/
|
||||
function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
{
|
||||
//print "- ".$hour.",".$minute.",".$second.",".$month.",".$day.",".$year.",".$_SERVER["WINDIR"]." -";
|
||||
|
||||
@ -651,6 +577,11 @@ function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
}
|
||||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_date($fmt, $timestamp, $gm=0)
|
||||
{
|
||||
return dol_date($fmt, $timestamp, $gm);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Returns formated date
|
||||
@ -659,7 +590,7 @@ function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
* \param gm 1 if timestamp was built with gmmktime, 0 if timestamp was build with mktime
|
||||
* \return string Formated date
|
||||
*/
|
||||
function dolibarr_date($fmt, $timestamp, $gm=0)
|
||||
function dol_date($fmt, $timestamp, $gm=0)
|
||||
{
|
||||
$usealternatemethod=false;
|
||||
if ($timestamp <= 0) $usealternatemethod=true;
|
||||
@ -682,7 +613,7 @@ function dolibarr_date($fmt, $timestamp, $gm=0)
|
||||
* \brief Affiche les informations d'un objet
|
||||
* \param object objet a afficher
|
||||
*/
|
||||
function dolibarr_print_object_info($object)
|
||||
function dol_print_object_info($object)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("other");
|
||||
@ -718,6 +649,13 @@ function dolibarr_print_object_info($object)
|
||||
print $langs->trans("DateConciliating")." : " . dolibarr_print_date($object->date_rappro,"dayhourtext") . '<br>';
|
||||
}
|
||||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_print_phone($phone,$country="FR",$cid=0,$socid=0,$nolinks=false,$separ=" ")
|
||||
{
|
||||
return dol_print_phone($phone,$country,$cid,$socid,$nolinks,$separ);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Format phone numbers according to country
|
||||
* \param phone Phone number to format
|
||||
@ -728,7 +666,7 @@ function dolibarr_print_object_info($object)
|
||||
* \param separ separation between numbers for a better visibility example : xx.xx.xx.xx.xx
|
||||
* \return string Formated phone number
|
||||
*/
|
||||
function dolibarr_print_phone($phone,$country="FR",$cid=0,$socid=0,$nolinks=false,$separ=" ")
|
||||
function dol_print_phone($phone,$country="FR",$cid=0,$socid=0,$nolinks=false,$separ=" ")
|
||||
{
|
||||
global $conf,$user;
|
||||
|
||||
@ -903,7 +841,13 @@ function dol_substr($string,$start,$length,$stringencoding='')
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_trunc($string,$size=40,$trunc='right',$stringencoding='')
|
||||
{
|
||||
return dol_trunc($string,$size,$trunc,$stringencoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Truncate a string to a particular length adding '...' if string larger than length
|
||||
* \param string String to truncate
|
||||
@ -912,7 +856,7 @@ function dol_substr($string,$start,$length,$stringencoding='')
|
||||
* \return string Truncated string
|
||||
* \remarks USE_SHORT_TITLE=0 can disable all truncings
|
||||
*/
|
||||
function dolibarr_trunc($string,$size=40,$trunc='right',$stringencoding='')
|
||||
function dol_trunc($string,$size=40,$trunc='right',$stringencoding='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -952,26 +896,6 @@ function dolibarr_trunc($string,$size=40,$trunc='right',$stringencoding='')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Complete une chaine a une taille donnee par des espaces
|
||||
* \param string Chaine a completer
|
||||
* \param size Longueur de la chaine.
|
||||
* \param side 0=Completion a droite, 1=Completion a gauche
|
||||
* \param char Chaine de completion
|
||||
* \return string Chaine complete
|
||||
*/
|
||||
function dolibarr_pad($string,$size,$side,$char=' ')
|
||||
{
|
||||
$taille=sizeof($string);
|
||||
$i=0;
|
||||
while($i < ($size - $taille))
|
||||
{
|
||||
if ($side > 0) $string.=$char;
|
||||
else $string=$char.$string;
|
||||
$i++;
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche picto propre a une notion/module (fonction g<EFBFBD>n<EFBFBD>rique)
|
||||
@ -1600,6 +1524,12 @@ function accessforbidden($message='',$printheader=1)
|
||||
}
|
||||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_print_error($db='',$error='')
|
||||
{
|
||||
return dol_print_error($db, $error);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remont<EFBFBD>e des bugs.
|
||||
* On doit appeler cette fonction quand une erreur technique bloquante est rencontree.
|
||||
@ -1608,7 +1538,7 @@ function accessforbidden($message='',$printheader=1)
|
||||
* \param db Database handler
|
||||
* \param error Chaine erreur ou tableau de chaines erreur complementaires a afficher
|
||||
*/
|
||||
function dolibarr_print_error($db='',$error='')
|
||||
function dol_print_error($db='',$error='')
|
||||
{
|
||||
global $conf,$langs,$argv;
|
||||
$syslog = '';
|
||||
@ -2766,29 +2696,6 @@ function monthArrayOrSelected($selected=0)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Returns formated reduction
|
||||
* \param reduction Reduction percentage
|
||||
* \return string Formated reduction
|
||||
*/
|
||||
function dolibarr_print_reduction($reduction=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("main");
|
||||
|
||||
$string = '';
|
||||
if ($reduction == 100)
|
||||
{
|
||||
$string = $langs->trans("Offered");
|
||||
}
|
||||
else
|
||||
{
|
||||
$string = $reduction.'%';
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns formated reduction
|
||||
|
||||
@ -439,3 +439,95 @@ function weight_convert($weight,&$from_unit,$to_unit)
|
||||
return $weight;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Save personnal parameter
|
||||
* \param db Handler database
|
||||
* \param user Object user
|
||||
* \param url Si defini, on sauve parametre du tableau tab dont cle = (url avec sortfield, sortorder, begin et page)
|
||||
* Si non defini on sauve tous parametres du tableau tab
|
||||
* \param tab Tableau (cle=>valeur) des parametres a sauvegarder
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function dol_set_user_page_param($db, &$user, $url='', $tab)
|
||||
{
|
||||
// Verification parametres
|
||||
if (sizeof($tab) < 1) return -1;
|
||||
|
||||
$db->begin();
|
||||
|
||||
// We remove old parameters for all keys in $tab
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_param";
|
||||
$sql.= " WHERE fk_user = ".$user->id;
|
||||
if ($url) $sql.=" AND page='".$url."'";
|
||||
else $sql.=" AND page=''"; // Page ne peut etre null
|
||||
$sql.= " AND param in (";
|
||||
$i=0;
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
if ($i > 0) $sql.=',';
|
||||
$sql.="'".$key."'";
|
||||
$i++;
|
||||
}
|
||||
$sql.= ")";
|
||||
dolibarr_syslog("functions2.lib::dol_set_user_page_param $sql");
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
$db->rollback();
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
// Set new parameters
|
||||
if ($value && (! $url || in_array($key,array('sortfield','sortorder','begin','page'))))
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,page,param,value)";
|
||||
$sql.= " VALUES (".$user->id.",";
|
||||
if ($url) $sql.= " '".urlencode($url)."',";
|
||||
else $sql.= " '',";
|
||||
$sql.= " '".$key."','".addslashes($value)."');";
|
||||
dolibarr_syslog("functions2.lib::dol_set_user_page_param $sql");
|
||||
|
||||
$result=$db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
$db->rollback();
|
||||
exit;
|
||||
}
|
||||
|
||||
$user->page_param[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns formated reduction
|
||||
* \param reduction Reduction percentage
|
||||
* \return string Formated reduction
|
||||
*/
|
||||
function dol_print_reduction($reduction=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("main");
|
||||
|
||||
$string = '';
|
||||
if ($reduction == 100)
|
||||
{
|
||||
$string = $langs->trans("Offered");
|
||||
}
|
||||
else
|
||||
{
|
||||
$string = $reduction.'%';
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($entrepot);
|
||||
dol_print_object_info($entrepot);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -1025,8 +1025,8 @@ else
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">'.$soc->departement.'</td>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('EMail').'</td><td>';
|
||||
if ($soc->email) { print '<a href="mailto:'.$soc->email.'" target="_blank">'.$soc->email.'</a>'; }
|
||||
|
||||
@ -116,8 +116,8 @@ if ($_GET["socid"])
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
|
||||
|
||||
@ -57,12 +57,12 @@ dolibarr_fiche_head($head, 'info', $langs->trans("ThirdParty"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($soc);
|
||||
dol_print_object_info($soc);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
|
||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||
print '<div class="tabsAction">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -118,8 +118,8 @@ if($_GET["socid"])
|
||||
|
||||
print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->pays."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->pays_code,0,$soc->id).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->pays_code,0,$soc->id).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
|
||||
|
||||
@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/user.class.php");
|
||||
|
||||
$langs->load("users");
|
||||
|
||||
// Sécurité accés client et commerciaux
|
||||
// S<EFBFBD>curit<EFBFBD> acc<63>s client et commerciaux
|
||||
$id = isset($_GET["id"])?$_GET["id"]:'';
|
||||
|
||||
$fuser = new User($db);
|
||||
@ -59,7 +59,7 @@ dolibarr_fiche_head($head, 'info', $langs->trans("User"));
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dolibarr_print_object_info($fuser);
|
||||
dol_print_object_info($fuser);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formadmin.class.php");
|
||||
|
||||
@ -93,7 +94,7 @@ if ($_POST["action"] == 'update' && ($caneditfield || $user->admin))
|
||||
$tabparam["MAIN_SEARCHFORM_SOCIETE"]=$_POST["main_searchform_societe"];
|
||||
$tabparam["MAIN_SEARCHFORM_PRODUITSERVICE"]=$_POST["main_searchform_produitservice"];
|
||||
|
||||
dolibarr_set_user_page_param($db, $fuser, '', $tabparam);
|
||||
dol_set_user_page_param($db, $fuser, '', $tabparam);
|
||||
|
||||
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
||||
|
||||
|
||||
@ -134,10 +134,10 @@ if ($result >= 0)
|
||||
$justthese=array();
|
||||
|
||||
|
||||
// On désactive la synchro Dolibarr vers LDAP
|
||||
// On d<EFBFBD>sactive la synchro Dolibarr vers LDAP
|
||||
$conf->global->LDAP_MEMBER_ACTIVE=0;
|
||||
|
||||
// Liste des champs a récupérer de LDAP
|
||||
// Liste des champs a r<EFBFBD>cup<EFBFBD>rer de LDAP
|
||||
$required_fields = array(
|
||||
$conf->global->LDAP_FIELD_FULLNAME,
|
||||
$conf->global->LDAP_FIELD_LOGIN,
|
||||
@ -175,7 +175,7 @@ if ($result >= 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
// Warning $ldapuser a une clé en minuscule
|
||||
// Warning $ldapuser a une cl<EFBFBD> en minuscule
|
||||
foreach ($ldaprecords as $key => $ldapuser)
|
||||
{
|
||||
$member = new Adherent($db);
|
||||
@ -204,13 +204,13 @@ if ($result >= 0)
|
||||
$member->morphy='phy';
|
||||
$member->photo='';
|
||||
$member->public=1;
|
||||
$member->naiss=dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_BIRTHDATE]);
|
||||
$member->naiss=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_BIRTHDATE]);
|
||||
|
||||
$member->statut=-1;
|
||||
if (isset($ldapuser[$conf->global->LDAP_FIELD_MEMBER_STATUS]))
|
||||
{
|
||||
$member->datec=dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$member->datevalid=dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$member->datec=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$member->datevalid=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$member->statut=$ldapuser[$conf->global->LDAP_FIELD_MEMBER_STATUS];
|
||||
}
|
||||
//if ($member->statut > 1) $member->statut=1;
|
||||
@ -240,19 +240,19 @@ if ($result >= 0)
|
||||
$datefirst='';
|
||||
if ($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE)
|
||||
{
|
||||
$datefirst=dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$datefirst=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]);
|
||||
$pricefirst=price2num($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT]);
|
||||
}
|
||||
|
||||
$datelast='';
|
||||
if ($conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE)
|
||||
{
|
||||
$datelast=dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE]);
|
||||
$datelast=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE]);
|
||||
$pricelast=price2num($ldapuser[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT]);
|
||||
}
|
||||
elseif ($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)
|
||||
{
|
||||
$datelast=dolibarr_time_plus_duree(dolibarr_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION]),-1,'y')+60*60*24;
|
||||
$datelast=dol_time_plus_duree(dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION]),-1,'y')+60*60*24;
|
||||
$pricelast=price2num($ldapuser[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT]);
|
||||
|
||||
// Cas special ou date derniere <= date premiere
|
||||
@ -265,7 +265,7 @@ if ($result >= 0)
|
||||
}
|
||||
|
||||
|
||||
// Insertion première adhésion
|
||||
// Insertion premi<EFBFBD>re adh<64>sion
|
||||
if ($datefirst)
|
||||
{
|
||||
// Cree premiere cotisation et met a jour datefin dans adherent
|
||||
@ -273,7 +273,7 @@ if ($result >= 0)
|
||||
$crowid=$member->cotisation($datefirst, $pricefirst, 0);
|
||||
}
|
||||
|
||||
// Insertion dernière adhésion
|
||||
// Insertion derni<EFBFBD>re adh<64>sion
|
||||
if ($datelast)
|
||||
{
|
||||
// Cree derniere cotisation et met a jour datefin dans adherent
|
||||
|
||||
Loading…
Reference in New Issue
Block a user