Qual: Uniformize use of dolibarr_print_date
This commit is contained in:
parent
bd3b44262f
commit
70b0f0042e
@ -452,7 +452,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print strftime("%Y",($datefrom?$datefrom:time())).'" ></td></tr>';
|
||||
print dolibarr_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
|
||||
|
||||
@ -226,7 +226,7 @@ if ($result)
|
||||
print '<td>';
|
||||
if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation)
|
||||
{
|
||||
print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.strftime("%Y",$objp->dateadh)."\" >\n";
|
||||
print "<input name=\"label\" type=\"text\" class=\"flat\" size=\"30\" value=\"".$langs->trans("Subscriptions").' '.dolibarr_print_date($objp->dateadh,"%Y")."\" >\n";
|
||||
// print "<td><input name=\"debit\" type=\"text\" size=8></td>";
|
||||
// print "<td><input name=\"credit\" type=\"text\" size=8></td>";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
|
||||
@ -254,7 +254,7 @@ if ($result)
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$year=strftime("%Y",$objp->dateadh);
|
||||
$year=dolibarr_print_date($objp->dateadh,"%Y");
|
||||
$Total[$year]+=$objp->cotisation;
|
||||
$Number[$year]+=1;
|
||||
$tot+=$objp->cotisation;
|
||||
|
||||
@ -140,7 +140,6 @@ if ($socid > 0)
|
||||
$objsoc->id=$socid;
|
||||
$objsoc->fetch($socid,$to);
|
||||
|
||||
$dac = strftime("%Y-%m-%d %H:%M", time());
|
||||
if ($errmesg)
|
||||
{
|
||||
print "<b>$errmesg</b><br>";
|
||||
|
||||
@ -2024,14 +2024,15 @@ else
|
||||
|
||||
// Date propale
|
||||
print '<td align="center">';
|
||||
$y = strftime('%Y',$objp->dp);
|
||||
$m = strftime('%m',$objp->dp);
|
||||
|
||||
print strftime('%d',$objp->dp)."\n";
|
||||
$y = dolibarr_print_date($objp->dp,'%Y');
|
||||
$m = dolibarr_print_date($objp->dp,'%m');
|
||||
$mt= dolibarr_print_date($objp->dp,'%b');
|
||||
$d = dolibarr_print_date($objp->dp,'%d');
|
||||
print $d."\n";
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'&month='.$m.'">';
|
||||
print dolibarr_print_date($objp->dp,'%b')."</a>\n";
|
||||
print $mt."</a>\n";
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?year='.$y.'">';
|
||||
print strftime('%Y',$objp->dp)."</a></td>\n";
|
||||
print $y."</a></td>\n";
|
||||
|
||||
// Date fin validite
|
||||
if ($objp->dfv)
|
||||
|
||||
@ -125,7 +125,7 @@ $data = array();
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
|
||||
$data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
||||
}
|
||||
|
||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||
|
||||
@ -140,7 +140,7 @@ $data = array();
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
|
||||
$data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
||||
}
|
||||
|
||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||
|
||||
@ -50,9 +50,9 @@ if ($_GET["account"] || $_GET["ref"])
|
||||
if (! empty($_GET["lib"])) $conf->global->MAIN_GRAPH_LIBRARY=$_GET["lib"];
|
||||
|
||||
$datetime = time();
|
||||
$year = strftime("%Y", $datetime);
|
||||
$month = strftime("%m", $datetime);
|
||||
$day = strftime("%d", $datetime);
|
||||
$year = dolibarr_print_date($datetime, "%Y");
|
||||
$month = dolibarr_print_date($datetime, "%m");
|
||||
$day = dolibarr_print_date($datetime, "%d");
|
||||
if (! empty($_GET["year"])) $year=sprintf("%04d",$_GET["year"]);
|
||||
if (! empty($_GET["month"])) $month=sprintf("%02d",$_GET["month"]);
|
||||
|
||||
@ -166,7 +166,6 @@ if ($_GET["account"] || $_GET["ref"])
|
||||
$i = 0;
|
||||
while ($xmonth == $month)
|
||||
{
|
||||
//print strftime ("%e %d %m %y",$day)."\n";
|
||||
$subtotal = $subtotal + (isset($amounts[$textdate]) ? $amounts[$textdate] : 0);
|
||||
if ($day > time())
|
||||
{
|
||||
@ -601,7 +600,7 @@ if ($_GET["account"] || $_GET["ref"])
|
||||
{
|
||||
$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",dolibarr_mktime(12,0,0,$i+1,1,2000));
|
||||
$labels[$i] = dolibarr_print_date(dolibarr_mktime(12,0,0,$i+1,1,2000),"%b");
|
||||
$datamin[$i] = $acct->min_desired;
|
||||
}
|
||||
|
||||
|
||||
@ -158,14 +158,15 @@ if ($resql)
|
||||
print "</td>";
|
||||
|
||||
print "<td align=\"center\">";
|
||||
$y = strftime("%Y",$objp->date_commande);
|
||||
$m = strftime("%m",$objp->date_commande);
|
||||
|
||||
print strftime("%d",$objp->date_commande)."\n";
|
||||
$y = dolibarr_print_date($objp->date_commande,"%Y");
|
||||
$m = dolibarr_print_date($objp->date_commande,"%m");
|
||||
$mt = dolibarr_print_date($objp->date_commande,"%b");
|
||||
$d = dolibarr_print_date($objp->date_commande,"%d");
|
||||
print $d."\n";
|
||||
print " <a href=\"liste.php?year=$y&month=$m\">";
|
||||
print strftime("%B",$objp->date_commande)."</a>\n";
|
||||
print $mt."</a>\n";
|
||||
print " <a href=\"liste.php?year=$y\">";
|
||||
print strftime("%Y",$objp->date_commande)."</a></td>\n";
|
||||
print $y."</a></td>\n";
|
||||
|
||||
print '<td align="right">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facture,5).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -166,7 +166,7 @@ if ($_GET["facid"] > 0)
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=facture&file='.urlencode($relativepathdetail).'">'.$fac->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),"%d %b %Y %H:%M:%S").'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ $data = array();
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
|
||||
$data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
||||
}
|
||||
|
||||
$filename_avg = $dir."/invoicesaverage-".$year.".png";
|
||||
|
||||
@ -777,13 +777,15 @@ else
|
||||
|
||||
// Date
|
||||
print "<td align=\"right\">";
|
||||
$y = strftime("%Y",$objp->dp);
|
||||
$m = strftime("%m",$objp->dp);
|
||||
print strftime("%d",$objp->dp)."\n";
|
||||
$y = dolibarr_print_date($objp->dp,"%Y");
|
||||
$m = dolibarr_print_date($objp->dp,"%m");
|
||||
$mt = dolibarr_print_date($objp->dp,"%b");
|
||||
$d = dolibarr_print_date($objp->dp,"%d");
|
||||
print $d."\n";
|
||||
print " <a href=\"propal.php?year=$y&month=$m\">";
|
||||
print strftime("%B",$objp->dp)."</a>\n";
|
||||
print $b."</a>\n";
|
||||
print " <a href=\"propal.php?year=$y\">";
|
||||
print strftime("%Y",$objp->dp)."</a></td>\n";
|
||||
print $y."</a></td>\n";
|
||||
|
||||
// Prix
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
|
||||
@ -495,7 +495,7 @@ for ($mois = 1 ; $mois <= 12 ; $mois++)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print "<td>".strftime("%B",dolibarr_mktime(12,0,0,$mois,1,$annee))."</td>";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,$annee),"%b")."</td>";
|
||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
$case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee));
|
||||
|
||||
@ -284,7 +284,7 @@ if ($chid > 0)
|
||||
print "<td>";
|
||||
if ($cha->paye==0 && $_GET['action'] == 'edit')
|
||||
{
|
||||
print "<input type=\"text\" name=\"period\" value=\"".strftime("%Y%m%d",$cha->periode)."\"> (YYYYMMDD)";
|
||||
print "<input type=\"text\" name=\"period\" value=\"".dolibarr_print_date($cha->periode,"%Y%m%d")."\"> (YYYYMMDD)";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -188,7 +188,7 @@ function pt ($db, $sql, $year) {
|
||||
if ($obj->dm > $month ) {
|
||||
for ($b = $month ; $b < $obj->dm ; $b++) {
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</td>\n";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
@ -199,7 +199,7 @@ function pt ($db, $sql, $year) {
|
||||
if ($obj->sum > 0) {
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"comp.php?details=1&year=$year&month=$obj->dm\">";
|
||||
print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))."</td>\n";
|
||||
print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">".price($obj->sum)."</td>\n";
|
||||
|
||||
print "</TR>\n";
|
||||
@ -220,7 +220,7 @@ function pt ($db, $sql, $year) {
|
||||
for ($b = $beg + 1 ; $b < 13 ; $b++) {
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</td>\n";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$ca[$b] = 0;
|
||||
@ -295,7 +295,7 @@ function ppt ($db, $year, $socid)
|
||||
$delta = $ca[$b] - $prev[$b];
|
||||
$deltat = $deltat + $delta ;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</td>\n";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">".price($delta)."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ function pt ($db, $sql, $year) {
|
||||
if ($obj->dm > $month ) {
|
||||
for ($b = $month ; $b < $obj->dm ; $b++) {
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</td>\n";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
@ -134,7 +134,7 @@ function pt ($db, $sql, $year) {
|
||||
if ($obj->sum > 0) {
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>";
|
||||
print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))."</td>\n";
|
||||
print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">".price($obj->sum)."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
@ -155,7 +155,7 @@ function pt ($db, $sql, $year) {
|
||||
for ($b = $beg + 1 ; $b < 13 ; $b++) {
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</td>\n";
|
||||
print "<td>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$ca[$b] = 0;
|
||||
@ -234,7 +234,7 @@ function ppt ($db, $year, $socid)
|
||||
$delta = $ca[$b] - $prev[$b];
|
||||
$deltat = $deltat + $delta ;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD>".strftime("%B",mktime(12,0,0,$b, 1, $year))."</TD>\n";
|
||||
print "<TD>".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")."</TD>\n";
|
||||
print "<TD align=\"right\">".price($delta)."</TD>\n";
|
||||
print "<TD align=\"right\">".price($deltat)."</TD>\n";
|
||||
print "</TR>\n";
|
||||
@ -255,5 +255,5 @@ ppt($db, $cyear, $socid);
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter('$Date$ révision $Revision$');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -177,12 +177,12 @@ 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>".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,2000),"%b")."</td>";
|
||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
$casenow = strftime("%Y-%m",mktime());
|
||||
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
|
||||
$caseprev = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee-1));
|
||||
$casenow = dolibarr_print_date(mktime(),"%Y-%m");
|
||||
$case = dolibarr_print_date(mktime(1,1,1,$mois,1,$annee),"%Y-%m");
|
||||
$caseprev = dolibarr_print_date(mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
||||
|
||||
if ($annee == $year_current) {
|
||||
$total_CA += $cum[$case];
|
||||
|
||||
@ -248,7 +248,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap>'.strftime("%b %Y",dolibarr_mktime(0,0,0,$m,1,$y)).'</td>';
|
||||
print '<td nowrap>'.dolibarr_print_date(dolibarr_mktime(0,0,0,$m,1,$y),"%b %Y").'</td>';
|
||||
|
||||
$x_coll = tva_coll($db, $y, $m);
|
||||
print "<td nowrap align=\"right\">".price($x_coll)."</td>";
|
||||
|
||||
@ -217,7 +217,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
$subtot_paye_vat = 0;
|
||||
for ($q = 1 ; $q <= 4 ; $q++ )
|
||||
{
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"8\">".$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=\"8\">".$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,($q*3),1,$y),"%b %Y").")</td></tr>";
|
||||
$var=true;
|
||||
|
||||
$x_coll = tva_coll($db, $y, $q);
|
||||
|
||||
@ -84,7 +84,7 @@ if ($modetax==1) // Caluclate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
$nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=0">','</a>').')';
|
||||
$period=$year_start.' - '.$langs->trans("Quadri")." $q (".strftime("%b %Y",dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start)).' - '.strftime("%b %Y",dolibarr_mktime(12,0,0,($q*3),1,$year_start)).")";
|
||||
$period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
else { $prevquarter=4; $prevyear--; }
|
||||
@ -113,7 +113,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
$nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=1">','</a>').')';
|
||||
$period=$year_start.' - '.$langs->trans("Quadri")." $q (".strftime("%b %Y",dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start)).' - '.strftime("%b %Y",dolibarr_mktime(12,0,0,($q*3),1,$year_start)).")";
|
||||
$period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
else { $prevquarter=4; $prevyear--; }
|
||||
|
||||
@ -968,7 +968,7 @@ else
|
||||
//print '<br />';
|
||||
$dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
$dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
|
||||
$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",strftime("%A %d %B %Y", $dateactstart)),"confirm_active");
|
||||
$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dolibarr_print_date($dateactstart,"%A %d %B %Y")),"confirm_active");
|
||||
print '<table class="noborder" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>';
|
||||
}
|
||||
|
||||
@ -980,7 +980,7 @@ else
|
||||
//print '<br />';
|
||||
$dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
$dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
|
||||
$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",strftime("%A %d %B %Y", $dateactend)),"confirm_closeline");
|
||||
$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",dolibarr_print_date($dateactend,"%A %d %B %Y")),"confirm_closeline");
|
||||
print '<table class="noborder" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>';
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ class pdf_courrier_droit_editeur
|
||||
$this->marge_haute=10;
|
||||
$this->marge_basse=10;
|
||||
|
||||
$this->name = "Courrier des droits ".strftime("%Y", time());
|
||||
$this->name = "Courrier des droits ".dolibarr_print_date(time(),"%Y");
|
||||
$this->file = '1'.strftime("%Y", time()).'.pdf';
|
||||
}
|
||||
|
||||
|
||||
@ -149,14 +149,15 @@ if ($resql)
|
||||
}
|
||||
|
||||
print "<td align=\"right\">";
|
||||
$y = strftime("%Y",$objp->date_expedition);
|
||||
$m = strftime("%m",$objp->date_expedition);
|
||||
|
||||
print strftime("%d",$objp->date_expedition)."\n";
|
||||
$y = dolibarr_print_date($objp->date_expedition,"%Y");
|
||||
$m = dolibarr_print_date($objp->date_expedition,"%m");
|
||||
$mt = dolibarr_print_date($objp->date_expedition,"%b");
|
||||
$d = dolibarr_print_date($objp->date_expedition,"%d");
|
||||
print $d."\n";
|
||||
print " <a href=\"propal.php?year=$y&month=$m\">";
|
||||
print strftime("%B",$objp->date_expedition)."</a>\n";
|
||||
print $b."</a>\n";
|
||||
print " <a href=\"propal.php?year=$y\">";
|
||||
print strftime("%Y",$objp->date_expedition)."</a></TD>\n";
|
||||
print $y."</a></TD>\n";
|
||||
|
||||
print '<td align="right">'.$expedition->LibStatut($objp->fk_statut,5).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -85,7 +85,7 @@ class ExpeditionStats
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)), $res[$i]);
|
||||
$data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"), $res[$i]);
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -101,7 +101,7 @@ class ExpeditionStats
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),
|
||||
$data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),
|
||||
$data1[$i][1],
|
||||
$data2[$i][1]);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ $sql .= " ORDER BY $sortfield $sortorder ";
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$title = "Rapport d'activité de " . strftime("%B %Y",strtotime ($start));
|
||||
$title = $langs->trans("Report")." ".dolibarr_print_date(strtotime($start),"%B %Y");
|
||||
print_barre_liste($title, $page, "rapport.php","&socid=$socid",$sortfield,$sortorder,'',$num);
|
||||
|
||||
$i = 0;
|
||||
@ -124,7 +124,7 @@ if ( $db->query($sql) )
|
||||
print "<a href=\"".DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->rowid.$filter."\">".$objp->nom."</a></TD>\n";
|
||||
}
|
||||
print '<td>'.nl2br($objp->description).'</td>';
|
||||
print "<td>".strftime("%d %B %Y",$objp->dp)."</td>\n";
|
||||
print "<td>".dolibarr_print_date($objp->dp,"%d %B %Y")."</td>\n";
|
||||
print '<td align="center">'.sprintf("%.1f",$objp->duree).'</td>';
|
||||
$DureeTotal += $objp->duree;
|
||||
print "</tr>\n";
|
||||
|
||||
@ -2400,13 +2400,13 @@ function create_exdir($dir)
|
||||
|
||||
|
||||
/**
|
||||
\brief Retourne le num<EFBFBD>ro de la semaine par rapport a une date
|
||||
\brief Retourne le numero de la semaine par rapport a une date
|
||||
\param time Date au format 'timestamp'
|
||||
\return int Num<EFBFBD>ro de semaine
|
||||
\return int Numero de semaine
|
||||
*/
|
||||
function numero_semaine($time)
|
||||
{
|
||||
$stime = strftime( '%Y-%m-%d',$time);
|
||||
$stime = strftime('%Y-%m-%d',$time);
|
||||
|
||||
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?',$stime,$reg))
|
||||
{
|
||||
|
||||
@ -1418,7 +1418,7 @@ class Product extends CommonObject
|
||||
|
||||
for ($j = 0 ; $j < 12 ; $j++)
|
||||
{
|
||||
$idx=ucfirst(substr( strftime("%b",mktime(12,0,0,$month,1,$year)) ,0,3) );
|
||||
$idx=ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$month,1,$year),"%b") ,0,3) );
|
||||
$monthnum=sprintf("%02s",$month);
|
||||
|
||||
$result[$j] = array($idx,isset($tab[$year.$month])?$tab[$year.$month]:0);
|
||||
|
||||
@ -196,7 +196,7 @@ class Stats
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,0,0,$i,1,$year)),0,3)), $res[$i]);
|
||||
$data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -236,7 +236,7 @@ class Stats
|
||||
|
||||
for ($i = 1 ; $i < 13 ; $i++)
|
||||
{
|
||||
$data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,0,0,$i,1,$year)),0,3)), $res[$i]);
|
||||
$data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@ -163,7 +163,7 @@ class Translate {
|
||||
* \brief Load in a memory array, translation key-value for a particular file.
|
||||
* If data for file already loaded, do nothing.
|
||||
* All data in translation array are stored in ISO-8859-1 format.
|
||||
* \param domain File name to load (.lang file)
|
||||
* \param domain File name to load (.lang file). Use @ before value if domain is in a module directory.
|
||||
* \param alt Use alternate file even if file in target language is found
|
||||
* \return int <0 if KO, >0 if OK
|
||||
* \remarks tab_loaded is completed with $domain key.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user