correction de bugs sur les dates
This commit is contained in:
parent
13f921be0a
commit
95068b7121
@ -275,10 +275,23 @@ if ($_GET["action"] == 'create')
|
||||
if ($_GET["afaire"] == 1)
|
||||
{
|
||||
print $html->select_date('','ac');
|
||||
} else if ($_GET["afaire"] == 2) {
|
||||
print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
|
||||
print_heure_select("heure",8,20);
|
||||
print '</td></tr>';
|
||||
}
|
||||
else if ($_GET["afaire"] == 2)
|
||||
{
|
||||
print $html->select_date('','ac',1,1);
|
||||
} else {
|
||||
print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
|
||||
print_heure_select("heure",8,20);
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $html->select_date('','ac',1,1);
|
||||
print '<tr><td width="10%">'.$langs->trans("Hour").'</td><td width="40%">';
|
||||
print_heure_select("heure",8,20);
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -489,16 +489,24 @@ if ($_socid > 0)
|
||||
$obj = $db->fetch_object( $i);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
if ($oldyear == strftime("%Y",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
} else {
|
||||
if ($oldyear == strftime("%Y",$obj->da) )
|
||||
{
|
||||
//print '<td align="center">|</td>';
|
||||
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
} else {
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) )
|
||||
{
|
||||
//print '<td align="center">|</td>';
|
||||
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">" .strftime("%b",$obj->da)."</TD>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
}
|
||||
|
||||
@ -137,6 +137,7 @@ if ($_POST["action"] == "set")
|
||||
$dir[5] = "$main_data_dir/rapport";
|
||||
$dir[6] = "$main_data_dir/images";
|
||||
$dir[7] = "$main_data_dir/rsscache";
|
||||
$dir[8] = "$main_data_dir/logo";
|
||||
|
||||
if (! is_dir($main_dir))
|
||||
{
|
||||
|
||||
@ -65,12 +65,13 @@ if ($_GET["id"])
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
$dir = DOL_DOCUMENT_ROOT."/document/produit/".$product->id;
|
||||
$dir = DOL_DOCUMENT_ROOT."/documents/produit/".$product->id;
|
||||
if (! file_exists($dir))
|
||||
{
|
||||
umask(0);
|
||||
mkdir(DOL_DOCUMENT_ROOT."/document");
|
||||
mkdir(DOL_DOCUMENT_ROOT."/document/produit");
|
||||
rmdir(DOL_DOCUMENT_ROOT."/documents/produits");
|
||||
//mkdir(DOL_DOCUMENT_ROOT."/documents");
|
||||
mkdir(DOL_DOCUMENT_ROOT."/documents/produit");
|
||||
if (! mkdir($dir, 0755))
|
||||
{
|
||||
$mesg = $langs->trans("ErrorCanNotCreateDir",$dir);
|
||||
@ -152,10 +153,10 @@ if ($_GET["id"])
|
||||
print '<td align="center" width="50%" colspan="2">Nombre de pièces vendues</td></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
|
||||
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/vente12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/vente12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
|
||||
print '</td><td align="center" colspan="2">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/vendu12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/vendu12mois.png" alt="Ventes sur les 12 derniers mois">';
|
||||
|
||||
print '</td></tr><tr>';
|
||||
if (file_exists($filenbvente) && filemtime($filenbvente))
|
||||
@ -182,7 +183,7 @@ if ($_GET["id"])
|
||||
print '<td align="center" width="50%" colspan="2">-</td></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
|
||||
print '<img src="'.DOL_URL_ROOT.'/document/produit/'.$product->id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/documents/produit/'.$product->id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">';
|
||||
|
||||
print '</td><td align="center" colspan="2">TODO AUTRE GRAPHIQUE';
|
||||
|
||||
|
||||
@ -480,7 +480,7 @@ class Propal
|
||||
{
|
||||
if ($user->rights->propale->valider)
|
||||
{
|
||||
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_statut = 1, date_valid=now(), fk_user_valid=$user->id";
|
||||
$sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;";
|
||||
|
||||
|
||||
@ -26,7 +26,8 @@ require("pre.inc.php");
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
//$socid = $user->societe_id;
|
||||
$socid = $_GET["socid"];
|
||||
}
|
||||
|
||||
$socid = $_GET["socid"];
|
||||
@ -62,10 +63,10 @@ if ($_GET["action"] == 'delete')
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".$_GET["actid"].";";
|
||||
$db->query($sql);
|
||||
|
||||
if ($db->query($sql))
|
||||
{
|
||||
// if ($db->query($sql))
|
||||
// {
|
||||
// TODO ajouter une sécu pour la suppression
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user