Remove pdate functions

This commit is contained in:
Laurent Destailleur 2010-05-08 16:29:37 +00:00
parent 793f2a9246
commit 226fdb6e6b
7 changed files with 30 additions and 30 deletions

View File

@ -627,13 +627,13 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
$helpurl='';
if (isset($_GET["type"]) && $_GET["type"] == 0) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
if (isset($_GET["type"]) && $_GET["type"] == 1) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
llxHeader('',$langs->trans("CardProduct".$_GET["type"]),$helpurl);
if (! isset($product))
{
$canvas = new Canvas($db,$user);
$product = $canvas->load_canvas('product',$_GET["canvas"]);
$canvas->assign_values('create');
@ -662,11 +662,11 @@ if ($_GET["id"] || $_GET["ref"])
if (!empty($productstatic->canvas))
{
$canvas = new Canvas($db,$user);
$product = $canvas->load_canvas('product',$productstatic->canvas);
$canvas->fetch($productstatic->id,'',$_GET["action"]);
}
llxHeader('',$langs->trans("CardProduct".$product->type));
if ( $result )
@ -695,7 +695,7 @@ if ($_GET["id"] || $_GET["ref"])
$ret=$html->form_confirm("fiche.php?id=".$product->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,2);
if ($ret == 'html') print '<br>';
}
$canvas->assign_values('view');
$canvas->display_canvas();
}
@ -776,7 +776,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
if($conf->propal->enabled && $user->rights->propale->creer)
{
$propal = new Propal($db);
$langs->load("propal");
print '<tr class="liste_titre"><td width="50%" valign="top" class="liste_titre">';
@ -797,7 +797,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
// Liste de "Mes propals"
print '<tr><td width="50%" valign="top">';
$sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.ref,".$db->pdate("p.datep")." as dp";
$sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.ref, p.datep as dp";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
$sql.= " WHERE p.fk_soc = s.rowid";
$sql.= " AND p.entity = ".$conf->entity;
@ -893,7 +893,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
if($conf->commande->enabled && $user->rights->commande->creer)
{
$commande = new Commande($db);
$langs->load("orders");
print '<tr class="liste_titre"><td width="50%" valign="top" class="liste_titre">';
@ -914,7 +914,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
// Liste de "Mes commandes"
print '<tr><td width="50%" valign="top">';
$sql = "SELECT s.nom, s.rowid as socid, c.rowid as commandeid, c.ref,".$db->pdate("c.date_commande")." as dc";
$sql = "SELECT s.nom, s.rowid as socid, c.rowid as commandeid, c.ref, c.date_commande as dc";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
$sql.= " WHERE c.fk_soc = s.rowid";
$sql.= " AND c.entity = ".$conf->entity;
@ -942,7 +942,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
print "<td nowrap>";
print "<a href=\"../commande/fiche.php?id=".$objc->commandeid."\">".img_object($langs->trans("ShowOrder"),"order")." ".$objc->ref."</a></td>\n";
print "<td><a href=\"../comm/fiche.php?socid=".$objc->socid."\">".dol_trunc($objc->nom,18)."</a></td>\n";
print "<td nowrap=\"nowrap\">".dol_print_date($objc->dc,"%d %b")."</td>\n";
print "<td nowrap=\"nowrap\">".dol_print_date($db->jdate($objc->dc),"%d %b")."</td>\n";
print '<td><input type="hidden" name="commandeid" value="'.$objc->commandeid.'">';
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort");
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%';
@ -1027,7 +1027,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
// Liste de Mes factures
print '<tr><td width="50%" valign="top">';
$sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df";
$sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber, f.datef as df";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
@ -1055,7 +1055,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
print "<td nowrap>";
print "<a href=\"../compta/facture.php?facid=".$objp->factureid."\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."</a></td>\n";
print "<td><a href=\"../comm/fiche.php?socid=".$objp->socid."\">".dol_trunc($objp->nom,18)."</a></td>\n";
print "<td nowrap=\"nowrap\">".dol_print_date($objp->df,"%d %b")."</td>\n";
print "<td nowrap=\"nowrap\">".dol_print_date($db->jdate($objp->df),"%d %b")."</td>\n";
print '<td><input type="hidden" name="factureid" value="'.$objp->factureid.'">';
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td nowrap>'.$langs->trans("ReductionShort");
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">%';
@ -1089,7 +1089,7 @@ if ($product->id && $_GET["action"] == '' && $product->status)
// Liste de Autres factures
$var=true;
$sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df";
$sql = "SELECT s.nom, s.rowid as socid, f.rowid as factureid, f.facnumber, f.datef as df";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;

View File

@ -413,7 +413,7 @@ if ($_GET["action"] == 'edit_price' && ($user->rights->produit->creer || $user->
// Liste des evolutions du prix
$sql = "SELECT p.rowid, p.price, p.price_ttc, p.price_base_type, p.tva_tx,";
$sql.= " p.price_level, p.price_min, p.price_min_ttc,";
$sql.= " ".$db->pdate("p.date_price")." as dp, u.rowid as user_id, u.login";
$sql.= " p.date_price as dp, u.rowid as user_id, u.login";
$sql.= " FROM ".MAIN_DB_PREFIX."product_price as p,";
$sql.= " ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE fk_product = ".$product->id;
@ -471,7 +471,7 @@ if ($result)
$var=!$var;
print "<tr $bc[$var]>";
// Date
print "<td>".dol_print_date($objp->dp,"dayhour")."</td>";
print "<td>".dol_print_date($db->jdate($objp->dp),"dayhour")."</td>";
// Price level
if ($conf->global->PRODUIT_MULTIPRICES)

View File

@ -73,7 +73,7 @@ if (isset($_REQUEST['catid']))
$title=$langs->trans("ProductsAndServices");
$sql = 'SELECT p.rowid, p.ref, p.label, p.price, p.fk_product_type, '.$db->pdate('p.tms').' as datem,';
$sql = 'SELECT p.rowid, p.ref, p.label, p.price, p.fk_product_type, p.tms as datem,';
$sql.= ' p.duration, p.envente as statut, p.seuil_stock_alerte,';
$sql.= ' SUM(s.reel) as stock_physique';
$sql.= ' FROM '.MAIN_DB_PREFIX.'product_stock as s,';

View File

@ -110,7 +110,7 @@ print '</td><td valign="top" width="70%" class="notopnoleft">';
$max=10;
$sql = "SELECT p.rowid, p.label as produit,";
$sql.= " s.label as stock, s.rowid as entrepot_id,";
$sql.= " m.value, ".$db->pdate("m.datem")." as datem";
$sql.= " m.value, m.datem";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as s";
$sql.= ", ".MAIN_DB_PREFIX."stock_mouvement as m";
$sql.= ", ".MAIN_DB_PREFIX."product as p";
@ -143,7 +143,7 @@ if ($resql)
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]>";
print '<td>'.dol_print_date($objp->datem,'dayhour').'</td>';
print '<td>'.dol_print_date($db->jdate($objp->datem),'dayhour').'</td>';
print "<td><a href=\"../fiche.php?id=$objp->rowid\">";
print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit;
print "</a></td>\n";

View File

@ -54,7 +54,7 @@ llxHeader();
print_fiche_titre($langs->trans("ListOfGroups"));
$sql = "SELECT g.rowid, g.nom, g.entity, ".$db->pdate("g.datec")." as datec";
$sql = "SELECT g.rowid, g.nom, g.entity, g.datec";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
$sql .= " WHERE g.entity IN (0,".$conf->entity.")";
if ($_POST["search_group"])
@ -91,7 +91,7 @@ if ($resql)
print img_redstar($langs->trans("GlobalGroup"));
}
print "</td>";
print '<td width="100" align="center">'.dol_print_date($obj->datec,"day").'</td>';
print '<td width="100" align="center">'.dol_print_date($db->jdate($obj->datec),"day").'</td>';
print "</tr>\n";
$i++;
}

View File

@ -80,7 +80,7 @@ print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
*/
$max=10;
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.fk_societe, ".$db->pdate("u.datec")." as datec,";
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.login, u.fk_societe, u.datec,";
$sql.= " u.entity, u.ldap_sid, s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid";
@ -125,7 +125,7 @@ if ($resql)
}
else print $langs->trans("InternalUser");
print '</td>';
print "<td align=\"right\">".dol_print_date($obj->datec,'dayhour')."</td>";
print "<td align=\"right\">".dol_print_date($db->jdate($obj->datec),'dayhour')."</td>";
print '</tr>';
$i++;
}
@ -144,7 +144,7 @@ else
*/
$max=5;
$sql = "SELECT g.rowid, g.nom, g.note, g.entity, ".$db->pdate("g.datec")." as datec";
$sql = "SELECT g.rowid, g.nom, g.note, g.entity, g.datec";
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
$sql.= " WHERE g.entity IN (0,".$conf->entity.")";
$sql.= " ORDER BY g.datec DESC";
@ -170,7 +170,7 @@ if ( $db->query($sql) )
print img_picto($langs->trans("GlobalGroup"),'redstar');
}
print "</td>";
print "<td width=\"80\" align=\"center\">".dol_print_date($obj->datec)."</td>";
print "<td width=\"80\" align=\"center\">".dol_print_date($db->jdate($obj->datec))."</td>";
print "</tr>";
$i++;
}

View File

@ -57,9 +57,9 @@ llxHeader();
print_fiche_titre($langs->trans("ListOfUsers"));
$sql = "SELECT u.rowid, u.name, u.firstname, u.admin, u.fk_societe, u.login,";
$sql.= " ".$db->pdate("u.datec")." as datec,";
$sql.= " ".$db->pdate("u.tms")." as datem,";
$sql.= " ".$db->pdate("u.datelastlogin")." as datelastlogin,";
$sql.= " u.datec,";
$sql.= " u.tms as datem,";
$sql.= " u.datelastlogin,";
$sql.= " u.ldap_sid, u.statut, u.entity,";
$sql.= " s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
@ -121,10 +121,10 @@ if ($result)
print '</td>';
// Date creation
print '<td nowrap="nowrap" align="center">'.dol_print_date($obj->datec,"day").'</td>';
print '<td nowrap="nowrap" align="center">'.dol_print_date($db->jdate($obj->datec),"day").'</td>';
// Date last login
print '<td nowrap="nowrap" align="center">'.dol_print_date($obj->datelastlogin,"dayhour").'</td>';
print '<td nowrap="nowrap" align="center">'.dol_print_date($db->jdate($obj->datelastlogin),"dayhour").'</td>';
// Statut
$userstatic->statut=$obj->statut;