Qual: Utilisation de dolibarr_print_date chaque fois que c'est possible au lieu de strftime

This commit is contained in:
Laurent Destailleur 2007-08-08 15:14:52 +00:00
parent af929b1dc2
commit 119070e3ab
70 changed files with 83 additions and 87 deletions

View File

@ -355,7 +355,7 @@ class BonPrelevement
$subject = "Crédit prélèvement ".$this->ref." à la banque";
$message = "Le bon de prélèvement ".$this->ref;
$message .= " a été crédité par la banque.\n";
$message .= "Date crédit : ".strftime("%A %e %B %Y", $date);
$message .= "Date crédit : ".dolibarr_print_date($date,'dayhour');
$this->Notify($user, "cr", $subject, $message);
}
@ -427,7 +427,7 @@ class BonPrelevement
$message .= "\n\n";
$message .= "\nMontant : ".price($this->amount);
$message .= "\nMéthode : ".$this->methodes_trans[$this->method_trans];
$message .= "\nDate : ".strftime("%A %e %B %Y", $date);
$message .= "\nDate : ".dolibarr_print_date($date,'day');
$this->Notify($user,"tr", $subject, $message, 1);
}

View File

@ -80,7 +80,7 @@ if ($_GET['id'])
print '<td><a href="'.DOL_URL_ROOT.'/boutique/commande/fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche">&nbsp;';
print strftime("%d %B %Y",$objp->date_purchased)."</a>\n";
print dolibarr_print_date($objp->date_purchased,'dayhour')."</a>\n";
print $objp->total . "</a></TD>\n";
print "</tr>\n";
$i++;

View File

@ -63,7 +63,7 @@ class Commande {
$this->payment_method = stripslashes($array["payment_method"]);
$this->date = strftime("%d/%m/%Y %H:%M",$array["date_purchased"]);
$this->date = dolibarr_print_date($array["date_purchased"],'dayhour');
$this->delivery_adr->name = stripslashes($array["delivery_name"]);
$this->delivery_adr->street = stripslashes($array["delivery_street_address"]);

View File

@ -73,7 +73,7 @@ if ( $dbosc->query($sql) )
print '<td><a href="fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche">&nbsp;';
print $objp->orders_id ."</a></td><td>";
print strftime("%d %B %Y",$objp->date_purchased).'</td>';
print dolibarr_print_date($objp->date_purchased,'dayhour').'</td>';
print '<td><a href="../client/fiche.php?id='.$objp->customers_id.'">'.$objp->customers_name."</a></TD>\n";
print '<td align="right">'.price($objp->value).'</td>';
print "</tr>\n";

View File

@ -103,7 +103,7 @@ if ($resql)
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green_light.png" border="0"></a></td>';
print '<td align="center"><img src="/theme/'.$conf->theme.'/img/icon_status_red.png" border="0" alt="inactif"></td>';
}
print "<td>".strftime("%d/%m/%Y", $objp->fin)."</td>";
print "<td>".dolibarr_print_date($objp->fin,'day')."</td>";
print '<td align="right">'.price($objp->products_price)."</td>";
print '<td align="right">'.price($objp->specials_new_products_price)."</td>";
print "</tr>";

View File

@ -219,7 +219,7 @@ if ($_GET["id"] > 0)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=actions&file='.$act->id.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
print '<a href="'.DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id.'&action=delete&urlfile='.urlencode($file).'">'.img_delete($langs->trans('Delete')).'</a>';
print "</td></tr>\n";

View File

@ -122,7 +122,7 @@ if ($resql)
if (file_exists($file))
{
print '<td align="center"><a href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&amp;file='.urlencode($relativepath).'&amp;modulepart=actionsreport">'.img_pdf().'</a></td>';
print '<td align="center">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>';
print '<td align="center">'.filesize($file). ' '.$langs->trans("Bytes").'</td>';
}
else {

View File

@ -75,7 +75,6 @@ if ($_socid > 0)
$objsoc->id=$_socid;
$objsoc->fetch($_socid,$to);
$dac = strftime("%Y-%m-%d %H:%M", time());
if ($errmesg)
{
print '<div class="error">'.$errmesg.'</div><br>';

View File

@ -176,7 +176,7 @@ if ($_GET["propalid"] > 0)
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepath).'">'.$propal->ref.'.pdf</a></td>';
print '<td align="right">'.filesize($file). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>';
print '</tr>';
// Si fichier detail PDF existe
@ -185,7 +185,7 @@ if ($_GET["propalid"] > 0)
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepathdetail).'">'.$propal->ref.'-detail.pdf</a></td>';
print '<td align="right">'.filesize($filedetail). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).'</td>';
print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),'dayhour').'</td>';
print '</tr>';
}
print "</table>\n";

View File

@ -185,7 +185,7 @@ if ($propalid > 0)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=propal&file='.$propref.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
if ($file == $propref . '.pdf')
{

View File

@ -87,7 +87,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
if (!$user->rights->commercial->client->voir || $user->societe_id)
@ -122,7 +122,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
if (!$user->rights->commercial->client->voir || $user->societe_id)

View File

@ -83,7 +83,6 @@ if ($_socid > 0)
$objsoc->id=$_socid;
$objsoc->fetch($_socid,$to);
$dac = strftime("%Y-%m-%d %H:%M", time());
if ($errmesg)
{
print '<div class="error">'.$errmesg.'</div><br>';

View File

@ -116,8 +116,6 @@ if ($_socid > 0)
$objsoc->id=$_socid;
$objsoc->fetch($_socid,$to);
$dac = strftime("%Y-%m-%d %H:%M", time());
/*
* Affichage onglets
*/

View File

@ -164,7 +164,7 @@ if ($_GET["id"] > 0) {
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepath).'">'.$commande->ref.'.pdf</a></td>';
print '<td align="right">'.filesize($file). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>';
print '</tr>';
// Si fichier detail PDF existe
@ -173,7 +173,7 @@ if ($_GET["id"] > 0) {
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepathdetail).'">'.$commande->ref.'-detail.pdf</a></td>';
print '<td align="right">'.filesize($filedetail). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).'</td>';
print '<td align="right">'.dolibarr_print_date(filemtime($filedetail),'dayhour').'</td>';
print '</tr>';
}
print "</table>\n";

View File

@ -188,7 +188,7 @@ if ($id > 0)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=commande&file='.$commanderef.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' '.$langs->trans("bytes").'</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
if ($file == $facref . '.pdf')
{

View File

@ -95,7 +95,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
if (!$user->rights->commercial->client->voir || $user->societe_id)
@ -129,7 +129,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
if (!$user->rights->commercial->client->voir || $user->societe_id)

View File

@ -138,11 +138,11 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print "<td>".strftime("%B",mktime(1,1,1,$mois,1,2000))."</td>";
print "<td>".strftime("%B",dolibarr_mktime(1,1,1,$mois,1,2000))."</td>";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print '<td align="right" width="10%">&nbsp;';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
$case = strftime("%Y-%m",dolibarr_mktime(1,1,1,$mois,1,$annee));
if ($decaiss[$case]>0)
{
print price($decaiss[$case]);
@ -151,7 +151,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
print "</td>";
print '<td align="right" width="10%">&nbsp;';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
$case = strftime("%Y-%m",dolibarr_mktime(1,1,1,$mois,1,$annee));
if ($encaiss[$case]>0)
{
print price($encaiss[$case]);

View File

@ -95,5 +95,5 @@ print "</table>";
$db->close();
llxFooter(strftime("%H:%M",time()). " - <em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
llxFooter('$Date$ - $Revision$');
?>

View File

@ -408,7 +408,7 @@ if ($account > 0)
{
$data_credit[$i] = isset($credits[substr("0".($i+1),-2)]) ? $credits[substr("0".($i+1),-2)] : 0;
$data_debit[$i] = isset($debits[substr("0".($i+1),-2)]) ? $debits[substr("0".($i+1),-2)] : 0;
$labels[$i] = strftime("%b",mktime(1,1,1,$i+1,1,2000));
$labels[$i] = strftime("%b",dolibarr_mktime(1,1,1,$i+1,1,2000));
$datamin[$i] = $acct->min_desired;
}

View File

@ -159,7 +159,7 @@ if ($_GET["facid"] > 0)
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=facture&file='.urlencode($relativepath).'">'.$fac->ref.'.pdf</a></td>';
print '<td align="right">'.filesize($file). ' bytes</td>';
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
print '<td align="right">'.dolibarr_print_date(filemtime($file),'dayhour').'</td>';
print '</tr>';
// Si fichier detail PDF existe

View File

@ -194,7 +194,7 @@ if ($facid > 0)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=facture&file='.$facref.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' '.$langs->trans("bytes").'</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
if ($file == $facref . '.pdf')
{

View File

@ -80,7 +80,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
$filename_amount = $conf->facture->dir_temp."/factureamount".$year.".png";
@ -107,7 +107,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
$filename_avg = $conf->facture->dir_temp."/factureaverage".$year.".png";

View File

@ -106,7 +106,7 @@ if ($result)
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
print '<td align="center">'.strftime("%d/%m/%Y",$obj->datec)."</td>\n";
print '<td align="center">'.dolibarr_print_date($obj->datec,'day')."</td>\n";
print '<td align="right">'.price($obj->amount).' '.$langs->trans("Currency".$conf->monnaie)."</td>\n";

View File

@ -142,7 +142,7 @@ if ($result)
print "<tr $bc[$var]><td>";
print '<img border="0" src="./statut'.$obj->statut.'.png"></a>&nbsp;';
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
print '<td align="center">'.strftime("%d/%m/%Y",$obj->datec)."</td>\n";
print '<td align="center">'.dolibarr_print_date($obj->datec,'day')."</td>\n";
print '<td align="right">'.price($obj->amount).' '.$langs->trans("Currency".$conf->monnaie)."</td>\n";

View File

@ -149,7 +149,7 @@ if ($_GET["id"])
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->ref.'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.strftime("%e %B %Y",$bon->datec).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dolibarr_print_date($bon->datec,'dayhour').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
@ -169,7 +169,7 @@ if ($_GET["id"])
$muser->fetch();
print '<tr><td width="20%">Date Transmission / Par</td><td>';
print strftime("%e %B %Y",$bon->date_trans);
print dolibarr_print_date($bon->date_trans,'dayhour');
print ' par '.$muser->fullname.'</td></tr>';
print '<tr><td width="20%">Méthode Transmission</td><td>';
print $bon->methodes_trans[$bon->method_trans];
@ -178,7 +178,7 @@ if ($_GET["id"])
if($bon->date_credit <> 0)
{
print '<tr><td width="20%">Crédité le</td><td>';
print strftime("%e %B %Y",$bon->date_credit);
print dolibarr_print_date($bon->date_credit,'dayhour');
print '</td></tr>';
}

View File

@ -106,7 +106,7 @@ if ($_GET["id"])
}
else
{
print strftime("%d %B %Y",$rej->date_rejet);
print dolibarr_print_date($rej->date_rejet,'day');
}
print '</td></tr>';
}

View File

@ -247,7 +247,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
{
$var=!$var;
print "<tr $bc[$var]>";
print '<td nowrap>'.strftime("%b %Y",mktime(0,0,0,$m,1,$y)).'</td>';
print '<td nowrap>'.strftime("%b %Y",dolibarr_mktime(0,0,0,$m,1,$y)).'</td>';
$x_coll = tva_coll($db, $y, $m);
print "<td nowrap align=\"right\">".price($x_coll)."</td>";

View File

@ -249,7 +249,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
$x_coll_ht = 0;
$x_paye_sum = 0;
$x_paye_ht = 0;
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Quadri")." $q (".strftime("%b %Y",mktime(0,0,0,(($q-1)*3)+1,1,$y)).' - '.strftime("%b %Y",mktime(0,0,0,($q*3),1,$y)).')</td></tr>';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Quadri")." $q (".strftime("%b %Y",dolibarr_mktime(0,0,0,(($q-1)*3)+1,1,$y)).' - '.strftime("%b %Y",mktime(0,0,0,($q*3),1,$y)).')</td></tr>';
print '<tr class="liste_titre">';
print '<td align="left">'.$langs->trans("CustomersInvoices").'</td>';
print '<td align="left"> '.$langs->trans("Description").'</td>';

View File

@ -60,7 +60,7 @@ if ($resql)
$loc = get_exdir($obj->rowid).$obj->rowid.".pdf";
$file = stripslashes($obj->name);
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=ged&type=application/binary&file='.urlencode($loc).'">'.$file.'</a></td>';
print '<td>'.strftime("%d/%m/%Y %H:%M",$obj->date_generation).'</td>';
print '<td>'.dolibarr_print_date($obj->date_generation,'dayhour').'</td>';
print "</tr>\n";
}

View File

@ -297,7 +297,7 @@ Class methode_expedition
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Courier','B',12);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $propale->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($propale->date,'day'));
$pdf->Text(11, 94, "Proposition commerciale : ".$propale->ref);

View File

@ -416,7 +416,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$pdf->SetXY($blSocX,$blSocY+20);
$pdf->SetFont('Arial','B',8);
$pdf->SetTextColor(0,0,0);
$pdf->MultiCell(50, 8, "Date : " . strftime("%d %b %Y", $exp->date), '' , 'L');
$pdf->MultiCell(50, 8, "Date : " . dolibarr_print_date($exp->date,'day'), '' , 'L');
//Date Expedition
$pdf->SetXY($blSocX2,$blSocY+20);
$pdf->SetFont('Arial','B',8);

View File

@ -85,7 +85,7 @@ class ExpeditionStats
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
$data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)), $res[$i]);
}
return $data;
@ -101,7 +101,7 @@ class ExpeditionStats
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)),
$data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),
$data1[$i][1],
$data2[$i][1]);
}

View File

@ -354,7 +354,7 @@ function info()
// On change d'année fiscal si besoin
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
$this->yy = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
}
else
{
@ -366,7 +366,7 @@ function info()
{
$this->searchLastWithNoYear .= '[0-9]';
}
$previousYear = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")-1)),$numbityear);
$previousYear = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1)),$numbityear);
$this->searchLastWithPreviousYear .= $previousYear;
$k++;
}

View File

@ -134,7 +134,7 @@ if ($_GET["id"] > 0)
if ($commande->date_commande)
{
print strftime("%A %d %B %Y",$commande->date_commande)."\n";
print dolibarr_print_date($commande->date_commande,'dayhourtext')."\n";
}
print '&nbsp;</td><td width="50%">';

View File

@ -192,7 +192,7 @@ if ($facid > 0)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=facture_fournisseur&file='.get_exdir($facture->id,2).$facture->id.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
if ($file == $facref . '.pdf')
{

View File

@ -108,7 +108,7 @@ class mod_commande_diamant extends ModeleNumRefCommandes
//on vérifie si il y a une année précédente
//sinon le delta sera appliqué de nouveau sur la nouvelle année
$lastyy = 'C'.strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$lastyy = 'C'.strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$sql = "SELECT MAX(ref)";
$sql.= " FROM ".MAIN_DB_PREFIX."commande";
$sql.= " WHERE ref like '${lastyy}%'";

View File

@ -92,7 +92,7 @@ class mod_commande_emeraude extends ModeleNumRefCommandes
$current_month = date("n");
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -92,7 +92,7 @@ class mod_commande_rubis extends ModeleNumRefCommandes
$current_month = date("n");
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -356,7 +356,7 @@ function info()
// On change d'année fiscal si besoin
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
$this->yy = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
}
else
{
@ -368,7 +368,7 @@ function info()
{
$this->searchLastWithNoYear .= '[0-9]';
}
$previousYear = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")-1)),$numbityear);
$previousYear = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1)),$numbityear);
$this->searchLastWithPreviousYear .= $previousYear;
$k++;
}

View File

@ -363,7 +363,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',12);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $com->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($com->date,'day'));
$pdf->Text(11, 94, $langs->transnoentities("Order")." ".$com->ref);

View File

@ -231,7 +231,7 @@ function facture_meta_create($db, $facid, $message="")
$nblignes = sizeof($fac->lignes);
$client = $fac->client->nom . " " . $fac->client->adresse . " " . $fac->client->cp . " " . $fac->client->ville;
$meta = "REFERENCE=\"" . $fac->ref . "\"
DATE=\"" . strftime("%d/%m/%Y",$fac->date) . "\"
DATE=\"" . dolibarr_print_date($fac->date) . "\"
NB_ITEMS=\"" . $nblignes . "\"
CLIENT=\"" . $client . "\"
TOTAL_HT=\"" . $fac->total_ht . "\"

View File

@ -100,7 +100,7 @@ class mod_facture_neptune extends ModeleNumRefFactures
//on vérifie si il y a une année précédente
//sinon le delta sera appliqué de nouveau sur la nouvelle année
$lastyy = 'FA'.strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$lastyy = 'FA'.strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$sql = "SELECT MAX(facnumber)";
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
$sql.= " WHERE facnumber like '${lastyy}%'";

View File

@ -95,7 +95,7 @@ function info()
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -445,7 +445,7 @@ class pdf_crabe extends ModelePDFFactures
$row = $this->db->fetch_row();
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
$pdf->MultiCell(20, 4, strftime("%d/%m/%y",$row[0]), 0, 'L', 0);
$pdf->MultiCell(20, 4, dolibarr_print_date($row[0],'day'), 0, 'L', 0);
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 4, $row[1], 0, 'L', 0);
$pdf->SetXY ($tab3_posx+41, $tab3_top+$y);

View File

@ -588,7 +588,7 @@ class pdf_huitre extends ModelePDFFactures
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',14);
$pdf->Text(11, 88, $outputlangs->transnoentities('Date'));
$pdf->Text(35, 88, ": " . strftime("%d %b %Y", $fac->date));
$pdf->Text(35, 88, ": " . dolibarr_print_date($fac->date,'day'));
$pdf->Text(11, 94, $outputlangs->transnoentities('Invoice'));
$pdf->Text(35, 94, ": ".$fac->ref);

View File

@ -433,7 +433,7 @@ class pdf_oursin extends ModelePDFFactures
$row = $this->db->fetch_row();
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
$pdf->MultiCell(20, 4, strftime("%d/%m/%y",$row[0]), 0, 'L', 0);
$pdf->MultiCell(20, 4, dolibarr_print_date($row[0],'day'), 0, 'L', 0);
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
$pdf->MultiCell(20, 4, $row[1], 0, 'L', 0);
$pdf->SetXY ($tab3_posx+41, $tab3_top+$y);

View File

@ -96,7 +96,7 @@ function info()
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -356,7 +356,7 @@ function info()
// On change d'année fiscal si besoin
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
$this->yy = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
}
else
{

View File

@ -178,7 +178,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',14);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $fich->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($fich->date,'day'));
$pdf->Text(11, 94, $langs->trans("InterventionCard")." : ".$fich->ref);
$pdf->SetFillColor(220,220,220);

View File

@ -97,7 +97,7 @@ class mod_propale_diamant extends ModeleNumRefPropales
$prefix='PR';
$current_year = strftime("%y",time());
$last_year = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$last_year = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$pryy = $prefix.$current_year;

View File

@ -91,7 +91,7 @@ class mod_propale_emeraude extends ModeleNumRefPropales
$current_month = date("n");
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -76,7 +76,7 @@ class mod_propale_ivoire extends ModeleNumRefPropales
$prefix='PR';
$current_year = strftime("%y",time());
$last_year = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$last_year = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")-1));
$pryy = $prefix.$current_year;

View File

@ -91,7 +91,7 @@ class mod_propale_rubis extends ModeleNumRefPropales
$current_month = date("n");
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$yy = strftime("%y",mktime(0,0,0,date("m"),date("d"),date("Y")+1));
$yy = strftime("%y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1));
}
else
{

View File

@ -345,7 +345,7 @@ function info()
// On change d'année fiscal si besoin
if($conf->global->SOCIETE_FISCAL_MONTH_START > 1 && $current_month >= $conf->global->SOCIETE_FISCAL_MONTH_START && $create_month >= $conf->global->SOCIETE_FISCAL_MONTH_START)
{
$this->yy = substr(strftime("%Y",mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
$this->yy = substr(strftime("%Y",dolibarr_mktime(0,0,0,date("m"),date("d"),date("Y")+1)),$numbityear);
}
else
{

View File

@ -330,7 +330,7 @@ class pdf_propale_bleu extends ModelePDFPropales
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Courier','B',12);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $propale->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($propale->date,'day'));
$pdf->Text(11, 94, "Proposition commerciale : ".$propale->ref);

View File

@ -341,7 +341,7 @@ class pdf_propale_jaune extends ModelePDFPropales
$pdf->SetXY(10,90);
$pdf->MultiCell(110, 10, "Numéro : ".$propale->ref);
$pdf->SetXY(110,90);
$pdf->MultiCell(100, 10, "Date : " . strftime("%d %B %Y", $propale->date));
$pdf->MultiCell(100, 10, "Date : " . dolibarr_print_date($propale->date,'day'));
}
}
?>

View File

@ -350,7 +350,7 @@ class pdf_propale_rouge extends ModelePDFPropales
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',12);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $propale->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($propale->date,'day'));
$pdf->Text(11, 94, "Proposition commerciale : ".$propale->ref);

View File

@ -364,7 +364,7 @@ class pdf_propale_vert extends ModelePDFPropales
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',12);
$pdf->Text(11, 88, "Date : " . strftime("%d %b %Y", $propale->date));
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($propale->date,'day'));
$pdf->Text(11, 94, "Proposition commerciale : ".$propale->ref);

View File

@ -215,7 +215,7 @@ if ($_GET["action"] == 'create')
print "</td></tr>";
print "<tr><td>".$langs->trans("Date")."</td>";
print "<td>".strftime("%A %d %B %Y",$commande->date)."</td>\n";
print "<td>".dolibarr_print_date($commande->date,'dayhourtext')."</td>\n";
print '<td>'.$langs->trans("Order").'</td><td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref.'</a>';
print "</td></tr>\n";

View File

@ -99,7 +99,7 @@ if ($result)
print img_file();
print "</a>&nbsp;<a href=\"offre.php?id=$obj->idp\">$obj->nom</A></td>\n"; print "<TD>".$obj->prenom."&nbsp;</TD>\n";
print '<td align="center">'.strftime("%d/%m/%Y",$obj->da)."</td>\n";
print '<td align="center">'.dolibarr_print_date($obj->da,'day')."</td>\n";
print '<td align="center"><a href="liste.php?id='.$obj->idp.'&amp;action=deac">Deac</a></td>';
print "</TR>\n";
$i++;

View File

@ -92,7 +92,7 @@ if ($result)
print "</a>&nbsp;<a href=\"offre.php?id=$obj->idp\">$obj->ref</A></td>\n";
print "<TD>".$obj->ville."&nbsp;</TD>\n";
print '<td align="center">'.strftime("%d/%m/%Y",$obj->da)."</td>\n";
print '<td align="center">'.dolibarr_print_date($obj->da,'day')."</td>\n";
print "</TR>\n";
$i++;

View File

@ -112,7 +112,7 @@ else
print '<table class="border" width="100%">';
print '<tr><td width="20%">Nom</td><td width="30%">'.$soc->nom.'</td>';
print '<td>Mise à jour</td><td>'.strftime("%d %B %Y %H:%M",$socdet->date_fiche_update).' ';
print '<td>Mise à jour</td><td>'.dolibarr_print_date($socdet->date_fiche_update,'dayhour').' ';
print '</td></tr>';
@ -131,7 +131,7 @@ else
print '<tr><td>Forme juridique</td><td colspan="3">'.$soc->forme_juridique.'</td></tr>';
print '<tr><td>'.$langs->trans("Staff").'</td><td>'.$soc->effectif.'</td>';
print '<td>Création</td><td>'.strftime("%d %B %Y",$soc->date_creation).'</td></tr>';
print '<td>Création</td><td>'.dolibarr_print_date($soc->date_creation,'day').'</td></tr>';
print '<tr><td>Contact</td><td>'.$socdet->contact_nom.' '.$socdet->contact_email.'</td>';
print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
@ -144,7 +144,7 @@ else
{
print '<td><a href="'.DOL_URL_ROOT.'/document/sl/catalogue-'.$soc->id.'.pdf">'.img_pdf().'</a></td>';
print '<td>'.filesize($file). ' bytes</td>';
print '<td>'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
print '<td>'.dolibarr_print_date(filemtime($file),'dayhour').'</td>';
}
print '</tr>';
/*

View File

@ -91,7 +91,7 @@ if ($result)
print "</a>&nbsp;<a href=\"offre.php?id=$obj->idp\">$obj->ref</A></td>\n";
print "<TD>".$obj->ville."&nbsp;</TD>\n";
print '<td align="center">'.strftime("%d/%m/%Y",$obj->da)."</td>\n";
print '<td align="center">'.dolibarr_print_date($obj->da,'day')."</td>\n";
print "</TR>\n";
$i++;

View File

@ -205,7 +205,7 @@ if ($product->id)
echo '<a href="'.DOL_URL_ROOT.'/document.php?modulepart=produit&file='.$prodref.'/'.urlencode($file).'">'.$file.'</a>';
print "</td>\n";
print '<td align="right">'.filesize($upload_dir.'/'.$file). ' bytes</td>';
print '<td align="center">'.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).'</td>';
print '<td align="center">'.dolibarr_print_date(filemtime($upload_dir.'/'.$file),'dayhour').'</td>';
print '<td align="center">';
if ($file == $propref . '.pdf')
{

View File

@ -128,7 +128,7 @@ if (sizeof($commandes)>0 && is_array($commandes))
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"../commande/fiche.php?id=$commande->id\">$commande->ref</a></td>\n";
print '<td>'.strftime("%d %B %Y",$commande->date).'</td>';
print '<td>'.dolibarr_print_date($commande->date,'day').'</td>';
print '<td align="right">'.price($commande->total_ht).'</td><td>&nbsp;</td></tr>';
$total = $total + $commande->total_ht;

View File

@ -126,7 +126,7 @@ if (sizeof($factures)>0 && is_array($factures))
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"../compta/facture.php?facid=$facture->id\">$facture->ref</a></td>\n";
print '<td>'.strftime("%d %B %Y",$facture->date).'</td>';
print '<td>'.dolibarr_print_date($facture->date,'day').'</td>';
print '<td align="right">'.price($facture->total_ht).'</td><td>&nbsp;</td></tr>';
$total = $total + $facture->total_ht;

View File

@ -60,7 +60,7 @@ if ( $db->query( $sql) )
print "<TR $bc[$var]>";
print "<td>".stripslashes($objp->nom)."</TD>\n";
print "<TD>".strftime("%d %B %Y",$objp->datef)."</td>\n";
print "<TD>".dolibarr_print_date($objp->datef,'dayhour')."</td>\n";
print '<TD align="right">'.number_format($objp->total,2,'.','').' '.$langs->trans("Currency".$conf->monnaie);
if ($objp->paye == 1)

View File

@ -83,7 +83,7 @@ if ($conf->don->enabled)
if ($ref_commande)
{
$date_limite = strftime("%A %d %B %Y",time() + (3 * 7 * 24 * 3600));
$date_limite = dolibarr_print_date(time() + (3 * 7 * 24 * 3600), 'dayhourtext');
include ("mail.php");

View File

@ -77,7 +77,7 @@ class Atome
$value = $this->datas[$index];
}
$libelle = ucfirst(strftime("%b", mktime(12,0,0,($i+1),1,2004)));
$libelle = ucfirst(strftime("%b", dolibarr_mktime(12,0,0,($i+1),1,2004)));
$this->graph_values[$i] = array($libelle, $value);
}

View File

@ -101,7 +101,7 @@ if ($resql)
print "<td>".$obj->tarif."</td>\n";
print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n";
print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n";
print "<td>".strftime('%d/%m/%y %H:%M',$obj->date)."</td>\n";
print "<td>".dolibarr_print_date($obj->date,'dayhour')."</td>\n";
print "<td>".stripslashes($obj->firstname)." ".stripslashes($obj->name)."</td>\n";
print "</tr>\n";
$i++;
@ -167,7 +167,7 @@ if ($resql)
print "<td>".$obj->tarif."</td>\n";
print "<td>".sprintf("%01.4f",$obj->temporel)."</td>\n";
print "<td>".sprintf("%01.4f",$obj->fixe)."</td>\n";
print "<td>".strftime('%d/%m/%y %H:%M',$obj->date)."</td>\n";
print "<td>".dolibarr_print_date($obj->date,'dayhour')."</td>\n";
print "<td>".stripslashes($obj->firstname)." ".stripslashes($obj->name)."</td>\n";
print "</tr>\n";
$i++;