Debug v11
This commit is contained in:
parent
ec81474694
commit
622dc7e8d7
@ -1800,7 +1800,7 @@ class Propal extends CommonObject
|
|||||||
$this->newref = $num;
|
$this->newref = $num;
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||||
$sql .= " SET ref = '".$num."',";
|
$sql .= " SET ref = '".$this->db->escape($num)."',";
|
||||||
$sql .= " fk_statut = ".self::STATUS_VALIDATED.", date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id;
|
$sql .= " fk_statut = ".self::STATUS_VALIDATED.", date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id;
|
||||||
$sql .= " WHERE rowid = ".$this->id." AND fk_statut = ".self::STATUS_DRAFT;
|
$sql .= " WHERE rowid = ".$this->id." AND fk_statut = ".self::STATUS_DRAFT;
|
||||||
|
|
||||||
|
|||||||
@ -1705,13 +1705,13 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
|
|
||||||
// Date
|
// Date
|
||||||
$out .= '<td class="center nowrap">';
|
$out .= '<td class="center nowrap">';
|
||||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour');
|
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel');
|
||||||
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart'])
|
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart'])
|
||||||
{
|
{
|
||||||
$tmpa = dol_getdate($histo[$key]['datestart'], true);
|
$tmpa = dol_getdate($histo[$key]['datestart'], true);
|
||||||
$tmpb = dol_getdate($histo[$key]['dateend'], true);
|
$tmpb = dol_getdate($histo[$key]['dateend'], true);
|
||||||
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour');
|
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel');
|
||||||
else $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour');
|
else $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel');
|
||||||
}
|
}
|
||||||
$late = 0;
|
$late = 0;
|
||||||
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1;
|
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1;
|
||||||
|
|||||||
@ -345,6 +345,10 @@ if (empty($reshook))
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
} else {
|
} else {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
|
// Redirect to avoid to action done a second time if we make a back from browser
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -585,7 +589,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'<br></span>';
|
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'<br></span>';
|
||||||
print $langs->trans("MovementLabel").': <input type="text" class="minwidth300" name="inventorylabel" value="'.$defaultstockmovementlabel.'"> ';
|
print $langs->trans("MovementLabel").': <input type="text" class="minwidth300" name="inventorylabel" value="'.$defaultstockmovementlabel.'"> ';
|
||||||
print $langs->trans("InventoryCode").': <input type="text" class="maxwidth150" name="inventorycode" value="'.$defaultstockmovementcode.'"><br><br>';
|
print $langs->trans("InventoryCode").': <input type="text" class="maxwidth150" name="inventorycode" value="'.$defaultstockmovementcode.'"><br><br>';
|
||||||
print '<input type="checkbox" name="autoclose" value="1" checked="checked"> '.$langs->trans("AutoCloseMO").'<br>';
|
print '<input type="checkbox" id="autoclose" name="autoclose" value="1"'.(GETPOSTISSET('inventorylabel') ? (GETPOST('autoclose') ? ' checked="checked"' : '') : ' checked="checked"').'> <label for="autoclose">'.$langs->trans("AutoCloseMO").'</label><br>';
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Confirm").'" name="confirm">';
|
print '<input class="button" type="submit" value="'.$langs->trans("Confirm").'" name="confirm">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Cancel").'" name="cancel">';
|
print '<input class="button" type="submit" value="'.$langs->trans("Cancel").'" name="cancel">';
|
||||||
|
|||||||
@ -750,6 +750,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
if (!empty($arrayfields['m.datem']['checked']))
|
if (!empty($arrayfields['m.datem']['checked']))
|
||||||
{
|
{
|
||||||
|
// Date
|
||||||
print '<td class="liste_titre nowraponall">';
|
print '<td class="liste_titre nowraponall">';
|
||||||
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
|
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
|
||||||
if (empty($conf->productbatch->enabled)) print ' ';
|
if (empty($conf->productbatch->enabled)) print ' ';
|
||||||
@ -1006,7 +1007,7 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['m.datem']['checked']))
|
if (!empty($arrayfields['m.datem']['checked']))
|
||||||
{
|
{
|
||||||
// Date
|
// Date
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>';
|
print '<td class="nowraponall">'.dol_print_date($db->jdate($objp->datem), 'dayhour', 'tzuserrel').'</td>';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.ref']['checked']))
|
if (!empty($arrayfields['p.ref']['checked']))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user