Remove pdate functions
This commit is contained in:
parent
226fdb6e6b
commit
5754f2ffaf
@ -72,7 +72,7 @@ print_fiche_titre($langs->trans("Bookmarks"));
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
$sql = "SELECT b.fk_soc as rowid, ".$db->pdate("b.dateb")." as dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon,";
|
||||
$sql = "SELECT b.fk_soc as rowid, b.dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon,";
|
||||
$sql.= " u.login, u.name, u.firstname";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid";
|
||||
$sql.= " WHERE 1=1";
|
||||
@ -166,7 +166,7 @@ if ($resql)
|
||||
print "</td>\n";
|
||||
|
||||
// Date creation
|
||||
print '<td align="center">'.dol_print_date($obj->dateb,'day') ."</td>";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateb),'day') ."</td>";
|
||||
|
||||
// Actions
|
||||
print "<td>";
|
||||
|
||||
@ -107,7 +107,7 @@ $form=new Form($db);
|
||||
$sql = "SELECT s.rowid as socid, s.nom,";
|
||||
$sql.= " p.rowid as cidp, p.name, p.firstname, p.email,";
|
||||
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv,";
|
||||
$sql.= " ".$db->pdate("p.tms")." as tms,";
|
||||
$sql.= " p.tms,";
|
||||
$sql.= " cp.code as pays_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as cp ON cp.rowid = p.fk_pays";
|
||||
@ -332,7 +332,7 @@ if ($result)
|
||||
}
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($obj->tms,"day").'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
||||
|
||||
// Private/Public
|
||||
print '<td align="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
|
||||
|
||||
@ -155,7 +155,7 @@ class CommActionRapport
|
||||
$pdf->SetFont('Arial','',8);
|
||||
|
||||
$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,";
|
||||
$sql.= " a.id,".$this->db->pdate("a.datep")." as dp, ".$this->db->pdate("a.datep2")." as dp2,";
|
||||
$sql.= " a.id, a.datep as dp, a.datep2 as dp2,";
|
||||
$sql.= " a.fk_contact, a.note, a.percent as percent,";
|
||||
$sql.= " c.libelle,";
|
||||
$sql.= " u.login";
|
||||
@ -196,7 +196,7 @@ class CommActionRapport
|
||||
$y++;
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $y);
|
||||
$pdf->MultiCell(22, $height, dol_print_date($obj->dp,"day")."\n".dol_print_date($obj->dp,"hour"), 0, 'L', 0);
|
||||
$pdf->MultiCell(22, $height, dol_print_date($this->db->jdate($obj->dp),"day")."\n".dol_print_date($this->db->jdate($obj->dp),"hour"), 0, 'L', 0);
|
||||
$y0 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY(26, $y);
|
||||
|
||||
@ -127,7 +127,7 @@ function show_array_actions_to_do($max=5)
|
||||
include_once(DOL_DOCUMENT_ROOT.'/comm/action/actioncomm.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/societe/class/client.class.php');
|
||||
|
||||
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, a.fk_user_author, a.percent,";
|
||||
$sql = "SELECT a.id, a.label, a.datep as dp, a.fk_user_author, a.percent,";
|
||||
$sql.= " c.code, c.libelle,";
|
||||
$sql.= " s.nom as sname, s.rowid, s.client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||
@ -178,13 +178,16 @@ function show_array_actions_to_do($max=5)
|
||||
$customerstatic->client=$obj->client;
|
||||
print '<td>'.$customerstatic->getNomUrl(1,'',16).'</td>';
|
||||
|
||||
// Date
|
||||
print '<td width="100" align="right">'.dol_print_date($obj->dp,'day').' ';
|
||||
$datep=$db->jdate($obj->dp);
|
||||
$datep2=$db->jdate($obj->dp2);
|
||||
|
||||
// Date
|
||||
print '<td width="100" align="right">'.dol_print_date($datep,'day').' ';
|
||||
$late=0;
|
||||
if ($obj->percent == 0 && $obj->dp && date("U",$obj->dp) < time()) $late=1;
|
||||
if ($obj->percent == 0 && ! $obj->dp && $obj->dp2 && date("U",$obj->dp) < time()) $late=1;
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && $obj->dp2 && date("U",$obj->dp2) < time()) $late=1;
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && ! $obj->dp2 && $obj->dp && date("U",$obj->dp) < time()) $late=1;
|
||||
if ($obj->percent == 0 && $datep && $datep < time()) $late=1;
|
||||
if ($obj->percent == 0 && ! $datep && $datep2 && $datep2 < time()) $late=1;
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) $late=1;
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && ! $datep2 && $datep && $datep < time()) $late=1;
|
||||
if ($late) print img_warning($langs->trans("Late"));
|
||||
print "</td>";
|
||||
|
||||
@ -214,7 +217,7 @@ function show_array_last_actions_done($max=5)
|
||||
{
|
||||
global $langs, $conf, $user, $db, $bc, $socid;
|
||||
|
||||
$sql = "SELECT a.id, a.percent, ".$db->pdate("a.datep")." as da, ".$db->pdate("a.datep2")." as da2, a.fk_user_author, a.label,";
|
||||
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
|
||||
$sql.= " c.code, c.libelle,";
|
||||
$sql.= " s.rowid, s.nom as sname, s.client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||
@ -265,7 +268,7 @@ function show_array_last_actions_done($max=5)
|
||||
print '<td>'.$customerstatic->getNomUrl(1,'',24).'</td>';
|
||||
|
||||
// Date
|
||||
print '<td width="100" align="right">'.dol_print_date($obj->da2,'day');
|
||||
print '<td width="100" align="right">'.dol_print_date($db->jdate($obj->da2),'day');
|
||||
print "</td>";
|
||||
|
||||
// Statut
|
||||
@ -274,8 +277,8 @@ function show_array_last_actions_done($max=5)
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
// TODO Ajouter rappel pour "il y a des contrats <EFBFBD> mettre en service"
|
||||
// TODO Ajouter rappel pour "il y a des contrats qui arrivent <EFBFBD> expiration"
|
||||
// TODO Ajouter rappel pour "il y a des contrats a mettre en service"
|
||||
// TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
|
||||
print "</table><br>";
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
@ -415,8 +415,8 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='')
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
$sql.= " ".$db->pdate("a.datep")." as dp,";
|
||||
$sql.= " ".$db->pdate("a.datea")." as da,";
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datea as da,";
|
||||
$sql.= " a.percent,";
|
||||
$sql.= " a.propalrowid, a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " c.code as acode, c.libelle,";
|
||||
@ -444,14 +444,16 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='')
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$datep=$obj->dp;
|
||||
|
||||
$obj = $db->fetch_object($result);
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td width="100" align="left" nowrap="nowrap">'.dol_print_date($obj->dp,'dayhour')."</td>\n";
|
||||
print '<td width="100" align="left" nowrap="nowrap">'.dol_print_date($datep,'dayhour')."</td>\n";
|
||||
|
||||
// Picto warning
|
||||
print '<td width="16">';
|
||||
if ($obj->dp && date("U",$obj->dp) < time()) print ' '.img_warning("Late");
|
||||
if ($datep && $datep < time()) print ' '.img_warning("Late");
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
@ -535,8 +537,8 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='')
|
||||
{
|
||||
// Recherche histo sur actioncomm
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
$sql.= " ".$db->pdate("a.datep")." as dp,";
|
||||
$sql.= " ".$db->pdate("a.datep2")." as dp2,";
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datep2 as dp2,";
|
||||
$sql.= " a.note, a.percent,";
|
||||
$sql.= " a.propalrowid as pid, a.fk_commande as oid, a.fk_facture as fid,";
|
||||
$sql.= " a.fk_user_author, a.fk_contact,";
|
||||
@ -562,7 +564,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='')
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$obj->dp2,'note'=>$obj->label,'percent'=>$obj->percent,
|
||||
$histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$db->jdate($obj->dp2),'note'=>$obj->label,'percent'=>$obj->percent,
|
||||
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
||||
'userid'=>$obj->user_id,'login'=>$obj->login,
|
||||
'contact_id'=>$obj->fk_contact,'name'=>$obj->name,'firstname'=>$obj->firstname,
|
||||
@ -582,7 +584,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='')
|
||||
$langs->load("mails");
|
||||
|
||||
// Recherche histo sur mailing
|
||||
$sql = "SELECT m.rowid as id, ".$db->pdate("mc.date_envoi")." as da, m.titre as note, '100' as percentage,";
|
||||
$sql = "SELECT m.rowid as id, mc.date_envoi as da, m.titre as note, '100' as percentage,";
|
||||
$sql.= " 'AC_EMAILING' as acode,";
|
||||
$sql.= " u.rowid as user_id, u.login"; // User that valid action
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u";
|
||||
@ -602,7 +604,7 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='')
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$histo[$numaction]=array('type'=>'mailing','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percentage,
|
||||
$histo[$numaction]=array('type'=>'mailing','id'=>$obj->id,'date'=>$db->jdate($obj->da),'note'=>$obj->note,'percent'=>$obj->percentage,
|
||||
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
||||
'userid'=>$obj->user_id,'login'=>$obj->login,
|
||||
'contact_id'=>$obj->contact_id);
|
||||
|
||||
@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
function shipping_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
|
||||
@ -71,7 +71,7 @@ function shipping_prepare_head($object)
|
||||
function delivery_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
|
||||
@ -126,8 +126,8 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='')
|
||||
|
||||
$sql = "SELECT obj.rowid, obj.fk_product, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked";
|
||||
$sql.= ", ed.qty as qty_shipped, ed.fk_expedition as expedition_id";
|
||||
$sql.= ", e.ref as exp_ref, ".$db->pdate("e.date_expedition")." as date_expedition,";
|
||||
//if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, ".$db->pdate("l.date_delivery")." as date_delivery, ld.qty as qty_received,";
|
||||
$sql.= ", e.ref as exp_ref, e.date_expedition,";
|
||||
//if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,";
|
||||
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid,';
|
||||
$sql.= ' p.description as product_desc';
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
|
||||
@ -221,7 +221,7 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='')
|
||||
|
||||
print '<td align="center">'.$objp->qty_shipped.'</td>';
|
||||
|
||||
print '<td align="center" nowrap="nowrap">'.dol_print_date($objp->date_expedition,'day').'</td>';
|
||||
print '<td align="center" nowrap="nowrap">'.dol_print_date($db->jdate($objp->date_expedition),'day').'</td>';
|
||||
if ($conf->livraison_bon->enabled)
|
||||
{
|
||||
if ($objp->livraison_id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user