trim trailing

This commit is contained in:
Frédéric FRANCE 2018-07-26 18:22:16 +02:00
parent c991a4d204
commit 8312d95174
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
17 changed files with 179 additions and 179 deletions

View File

@ -420,7 +420,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
print '</a>'; print '</a>';
print '</td>'; print '</td>';
} }
else else
{ {
print '<td align="center">' . "\n"; print '<td align="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),

View File

@ -6,10 +6,10 @@ div.divsearchfield {
} }
.margeCoteGauche,.margeCote{ .margeCoteGauche,.margeCote{
padding-right: 20px!important; padding-right: 20px!important;
} }
.margeCote,.margeCoteDroite{ .margeCote,.margeCoteDroite{
padding-left: 20px!important; padding-left: 20px!important;
} }
.nomargesupinf{ .nomargesupinf{
margin-top: 0; margin-top: 0;
@ -26,13 +26,13 @@ div.divsearchfield {
width: 100%; width: 100%;
} }
.tree{ .tree{
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
padding:0px; padding:0px;
list-style: none; line-height: 2em; font-family: Arial; list-style: none; line-height: 2em; font-family: Arial;
} }
.tree li{ .tree li{
font-size: 16px; font-size: 16px;
position: relative;list-style: none; position: relative;list-style: none;
} }
.tree li:before{ .tree li:before{
position: absolute; position: absolute;
@ -65,7 +65,7 @@ div.divsearchfield {
.tree li.root:after{ .tree li.root:after{
display: none; display: none;
} }
.tree li:last-child:after{ .tree li:last-child:after{
display: none display: none
} }
.blockUI { .blockUI {
@ -159,7 +159,7 @@ textarea.row4{
.reviewList { .reviewList {
max-height: 150px; max-height: 150px;
overflow-y: scroll; overflow-y: scroll;
} }
.reviewRow{ .reviewRow{

View File

@ -94,7 +94,7 @@ print "</tr>\n";
foreach ($eventstolog as $key => $arr) foreach ($eventstolog as $key => $arr)
{ {
if ($arr['id']) if ($arr['id'])
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$arr['id'].'</td>'; print '<td>'.$arr['id'].'</td>';
print '<td>'; print '<td>';

View File

@ -8,7 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
@ -672,7 +672,7 @@ if ($mode == 'common')
print '<td class="center nowrap" width="120px">'; print '<td class="center nowrap" width="120px">';
print $versiontrans; print $versiontrans;
if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){ if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (!empty($objMod->url_last_version)) { if (!empty($objMod->url_last_version)) {
$newversion = getURLContent($objMod->url_last_version); $newversion = getURLContent($objMod->url_last_version);
if(isset($newversion['content'])){ if(isset($newversion['content'])){

View File

@ -243,14 +243,14 @@ if ($mode == 'config' && $user->admin)
print "</tr>\n"; print "</tr>\n";
$ret = $printer->listprinters(); $ret = $printer->listprinters();
$nbofprinters = count($printer->listprinters); $nbofprinters = count($printer->listprinters);
if ($ret > 0) { if ($ret > 0) {
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} else { } else {
for ($line=0; $line < $nbofprinters; $line++) for ($line=0; $line < $nbofprinters; $line++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid)
{ {
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">'; print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>'; print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
@ -285,7 +285,7 @@ if ($mode == 'config' && $user->admin)
} }
} }
if ($action!='editprinter') if ($action!='editprinter')
{ {
if ($nbofprinters > 0) if ($nbofprinters > 0)
{ {
@ -299,7 +299,7 @@ if ($mode == 'config' && $user->admin)
print '<th></th>'; print '<th></th>';
print "</tr>\n"; print "</tr>\n";
} }
print '<tr>'; print '<tr>';
print '<td><input size="50" type="text" name="printername"></td>'; print '<td><input size="50" type="text" name="printername"></td>';
$ret = $printer->selectTypePrinter(); $ret = $printer->selectTypePrinter();
@ -315,7 +315,7 @@ if ($mode == 'config' && $user->admin)
print '</table>'; print '</table>';
dol_fiche_end(); dol_fiche_end();
if ($action!='editprinter') { if ($action!='editprinter') {
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'"></div>'; print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'"></div>';
} else { } else {
@ -324,9 +324,9 @@ if ($mode == 'config' && $user->admin)
print '</form>'; print '</form>';
print '<div><p></div>'; print '<div><p></div>';
dol_fiche_head(); dol_fiche_head();
print $langs->trans("ReceiptPrinterTypeDesc")."<br><br>\n"; print $langs->trans("ReceiptPrinterTypeDesc")."<br><br>\n";
print '<table class="noborder" width="100%">'."\n"; print '<table class="noborder" width="100%">'."\n";
print '<tr class="oddeven"><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>';
@ -338,7 +338,7 @@ if ($mode == 'config' && $user->admin)
dol_fiche_end(); dol_fiche_end();
print '<div><p></div>'; print '<div><p></div>';
dol_fiche_head(); dol_fiche_head();
print $langs->trans("ReceiptPrinterProfileDesc")."<br><br>\n"; print $langs->trans("ReceiptPrinterProfileDesc")."<br><br>\n";
print '<table class="noborder" width="100%">'."\n"; print '<table class="noborder" width="100%">'."\n";
@ -378,7 +378,7 @@ if ($mode == 'template' && $user->admin)
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} else { } else {
$max = count($printer->listprinterstemplates); $max = count($printer->listprinterstemplates);
for ($line=0; $line < $max; $line++) for ($line=0; $line < $max; $line++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) {
@ -423,7 +423,7 @@ if ($mode == 'template' && $user->admin)
print '<th>'.$langs->trans("Description").'</th>'; print '<th>'.$langs->trans("Description").'</th>';
print "</tr>\n"; print "</tr>\n";
$max = count($printer->tags); $max = count($printer->tags);
for ($tag=0; $tag < $max; $tag++) for ($tag=0; $tag < $max; $tag++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>&lt;'.$printer->tags[$tag].'&gt;</td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>'; print '<td>&lt;'.$printer->tags[$tag].'&gt;</td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
@ -436,14 +436,14 @@ if ($mode == 'template' && $user->admin)
} }
// to remove after test // to remove after test
$object=new stdClass(); // $object=new stdClass();
$object->date_time = '2015-11-02 22:30:25'; // $object->date_time = '2015-11-02 22:30:25';
$object->id = 1234; // $object->id = 1234;
$object->customer_firstname = 'John'; // $object->customer_firstname = 'John';
$object->customer_lastname = 'Deuf'; // $object->customer_lastname = 'Deuf';
$object->vendor_firstname = 'Jim'; // $object->vendor_firstname = 'Jim';
$object->vendor_lastname = 'Big'; // $object->vendor_lastname = 'Big';
$object->barcode = '3700123862396'; // $object->barcode = '3700123862396';
//$printer->sendToPrinter($object, 1, 16); //$printer->sendToPrinter($object, 1, 16);
//setEventMessages($printer->error, $printer->errors, 'errors'); //setEventMessages($printer->error, $printer->errors, 'errors');

View File

@ -169,21 +169,21 @@ if ($action == 'edit')
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
// Disable // Disable
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>';
print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
print '</td></tr>'; print '</td></tr>';
// Separator // Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>'; print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method // Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1);
else print '<font class="error">'.$langs->trans("None").'</font>'; else print '<font class="error">'.$langs->trans("None").'</font>';
print '</td></tr>'; print '</td></tr>';
// From // From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
print '<td><input class="flat" name="MAIN_MAIL_SMS_FROM" size="32" value="' . $conf->global->MAIN_MAIL_SMS_FROM; print '<td><input class="flat" name="MAIN_MAIL_SMS_FROM" size="32" value="' . $conf->global->MAIN_MAIL_SMS_FROM;
print '"></td></tr>'; print '"></td></tr>';
@ -213,20 +213,20 @@ else
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
// Disable // Disable
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_SMS).'</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_SMS).'</td></tr>';
// Separator // Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>'; print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method // Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
$text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE]; $text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE];
if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning(); if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning();
print $text; print $text;
print '</td></tr>'; print '</td></tr>';
// From // From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
print '<td>'.$conf->global->MAIN_MAIL_SMS_FROM; print '<td>'.$conf->global->MAIN_MAIL_SMS_FROM;
if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone"));

View File

@ -373,7 +373,7 @@ if($conf->invoice->enabled)
print "</tr>\n"; print "</tr>\n";
} }
if($conf->order->enabled) if($conf->order->enabled)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>'; print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
@ -388,7 +388,7 @@ if($conf->order->enabled)
print "</tr>\n"; print "</tr>\n";
} }
if($conf->expedition->enabled) if($conf->expedition->enabled)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>'; print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>';

View File

@ -79,17 +79,17 @@ foreach($modulesdir as $dir)
{ {
try { try {
$objMod = new $modName($db); $objMod = new $modName($db);
$modules[$objMod->numero]=$objMod; $modules[$objMod->numero]=$objMod;
$modules_names[$objMod->numero]=$objMod->name; $modules_names[$objMod->numero]=$objMod->name;
$modules_files[$objMod->numero]=$file; $modules_files[$objMod->numero]=$file;
$modules_fullpath[$file]=$dir.$file; $modules_fullpath[$file]=$dir.$file;
$picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic'; $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
} }
catch(Exception $e) catch(Exception $e)
{ {
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
} }
} }
else else
{ {

View File

@ -54,11 +54,11 @@ if ($action == 'updateMask') {
$error++; $error++;
} }
if (!$error) if (!$error)
{ {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} }
else else
{ {
setEventMessages($langs->trans("Error"), null, 'errors'); setEventMessages($langs->trans("Error"), null, 'errors');
} }

View File

@ -52,7 +52,7 @@ p {
} }
.logopos { .logopos {
padding-top: 20px; padding-top: 20px;
max-height: 40px; max-height: 40px;
} }
/* ------------------- Header ------------------- */ /* ------------------- Header ------------------- */

View File

@ -44,37 +44,37 @@ $eventfound = array();
//dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']); //dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']);
// TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened.
if ($time >= $_SESSION['auto_check_events_not_before']) if ($time >= $_SESSION['auto_check_events_not_before'])
{ {
$time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined $time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined
if (! empty($_SESSION['auto_check_events_not_before'])) if (! empty($_SESSION['auto_check_events_not_before']))
{ {
// We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer), // We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer),
// then we are not losing periods // then we are not losing periods
$starttime = $_SESSION['auto_check_events_not_before']; $starttime = $_SESSION['auto_check_events_not_before'];
// Protection to avoid too long sessions // Protection to avoid too long sessions
if ($starttime < ($time - (int) $conf->global->MAIN_SESSION_TIMEOUT)) if ($starttime < ($time - (int) $conf->global->MAIN_SESSION_TIMEOUT))
{ {
dol_syslog("We ask to check browser notification on a too large period. We fix this with current date."); dol_syslog("We ask to check browser notification on a too large period. We fix this with current date.");
$starttime = $time; $starttime = $time;
} }
} }
else else
{ {
$starttime = $time; $starttime = $time;
} }
$_SESSION['auto_check_events_not_before'] = $time + $time_update; $_SESSION['auto_check_events_not_before'] = $time + $time_update;
// Force save of session change we did. // Force save of session change we did.
// WARNING: Any change in sessions after that will not be saved ! // WARNING: Any change in sessions after that will not be saved !
session_write_close(); session_write_close();
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']); dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']);
$sql = 'SELECT id'; $sql = 'SELECT id';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'actioncomm a, ' . MAIN_DB_PREFIX . 'actioncomm_resources ar'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'actioncomm a, ' . MAIN_DB_PREFIX . 'actioncomm_resources ar';
$sql .= ' WHERE a.id = ar.fk_actioncomm'; $sql .= ' WHERE a.id = ar.fk_actioncomm';
@ -91,11 +91,11 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
$actionmod = new ActionComm($db); $actionmod = new ActionComm($db);
while ($obj = $db->fetch_object($resql)) while ($obj = $db->fetch_object($resql))
{ {
$langs->load("agenda"); $langs->load("agenda");
$langs->load("commercial"); $langs->load("commercial");
$actionmod->fetch($obj->id); $actionmod->fetch($obj->id);
// Message must be formated and translated to be used with javascript directly // Message must be formated and translated to be used with javascript directly
@ -105,7 +105,7 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
$event['tipo'] = $langs->transnoentities('Action' . $actionmod->code); $event['tipo'] = $langs->transnoentities('Action' . $actionmod->code);
$event['titulo'] = $actionmod->label; $event['titulo'] = $actionmod->label;
$event['location'] = $langs->transnoentities('Location').': '.$actionmod->location; $event['location'] = $langs->transnoentities('Location').': '.$actionmod->location;
$eventfound[] = $event; $eventfound[] = $event;
} }
} }

View File

@ -67,14 +67,14 @@ class FormContract
if ($socid > 0) if ($socid > 0)
{ {
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all')
{ {
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
$sql.= " OR c.fk_soc IS NULL)"; $sql.= " OR c.fk_soc IS NULL)";
} }
} }
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
$sql.= " ORDER BY c.ref "; $sql.= " ORDER BY c.ref ";
@ -140,14 +140,14 @@ class FormContract
} }
print '</select>'; print '</select>';
$db->free($resql); $db->free($resql);
if (!empty($conf->use_javascript_ajax)) if (!empty($conf->use_javascript_ajax))
{ {
// Make select dynamic // Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname); print ajax_combobox($htmlname);
} }
return $num; return $num;
} }
else else
@ -156,7 +156,7 @@ class FormContract
return -1; return -1;
} }
} }
/** /**
* Show a form to select a contract * Show a form to select a contract
* *
@ -171,7 +171,7 @@ class FormContract
function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{ {
global $langs; global $langs;
print "\n"; print "\n";
print '<form method="post" action="'.$page.'">'; print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="action" value="setcontract">'; print '<input type="hidden" name="action" value="setcontract">';
@ -179,6 +179,6 @@ class FormContract
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty); $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>'; print '</form>';
} }
} }

View File

@ -101,7 +101,7 @@ if ($action == 'add') {
$action = "create"; $action = "create";
$error++; $error++;
} }
if (! GETPOST('socid')) { if (! GETPOST('socid')) {
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Customer")), null, 'errors'); setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Customer")), null, 'errors');
$action = "create"; $action = "create";
@ -144,7 +144,7 @@ if ($action == 'add') {
$date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear);
$object->date_when = $date_next_execution; $object->date_when = $date_next_execution;
if ($object->create($user) > 0) { if ($object->create($user) > 0) {
$id = $object->id; $id = $object->id;
$action = ''; $action = '';
@ -155,10 +155,10 @@ if ($action == 'add') {
} }
} elseif ($action == 'createfrommodel') { } elseif ($action == 'createfrommodel') {
$newinter = new fichinter($db); $newinter = new fichinter($db);
// on récupère les enregistrements // on récupère les enregistrements
$object->fetch($id); $object->fetch($id);
// on transfert les données de l'un vers l'autre // on transfert les données de l'un vers l'autre
if ($object->socid > 0) { if ($object->socid > 0) {
@ -167,14 +167,14 @@ if ($action == 'add') {
$newinter->fk_contrat=$object->fk_contrat; $newinter->fk_contrat=$object->fk_contrat;
} else } else
$newinter->socid=GETPOST("socid"); $newinter->socid=GETPOST("socid");
$newinter->entity=$object->entity; $newinter->entity=$object->entity;
$newinter->duree=$object->duree; $newinter->duree=$object->duree;
$newinter->description=$object->description; $newinter->description=$object->description;
$newinter->note_private=$object->note_private; $newinter->note_private=$object->note_private;
$newinter->note_public=$object->note_public; $newinter->note_public=$object->note_public;
// on créer un nouvelle intervention // on créer un nouvelle intervention
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($newinter->table_element); $extralabels = $extrafields->fetch_name_optionals_label($newinter->table_element);
@ -182,7 +182,7 @@ if ($action == 'add') {
$newinter->array_options = $array_options; $newinter->array_options = $array_options;
$newfichinterid = $newinter->create($user); $newfichinterid = $newinter->create($user);
if ($newfichinterid > 0) { if ($newfichinterid > 0) {
// on ajoute les lignes de détail ensuite // on ajoute les lignes de détail ensuite
foreach ($object->lines as $ficheinterligne) foreach ($object->lines as $ficheinterligne)
@ -205,14 +205,14 @@ if ($action == 'add') {
header('Location: '.$_SERVER["PHP_SELF"]); header('Location: '.$_SERVER["PHP_SELF"]);
exit; exit;
} elseif ($action == 'setfrequency' && $user->rights->ficheinter->creer) { } elseif ($action == 'setfrequency' && $user->rights->ficheinter->creer) {
// Set frequency and unit frequency // Set frequency and unit frequency
$object->fetch($id); $object->fetch($id);
$object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha'));
} elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) { } elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) {
// Set next date of execution // Set next date of execution
$object->fetch($id); $object->fetch($id);
$date = dol_mktime( $date = dol_mktime(
GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0,
GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear') GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')
); );
if (!empty($date)) $object->setNextDate($date); if (!empty($date)) $object->setNextDate($date);
@ -239,7 +239,7 @@ if (! empty($conf->projet->enabled))
$now = dol_now(); $now = dol_now();
$tmparray=dol_getdate($now); $tmparray=dol_getdate($now);
$today = dol_mktime( $today = dol_mktime(
23, 59, 59, 23, 59, 59,
$tmparray['mon'], $tmparray['mday'], $tmparray['year'] $tmparray['mon'], $tmparray['mday'], $tmparray['year']
); // Today is last second of current day ); // Today is last second of current day
@ -265,7 +265,7 @@ if ($action == 'create') {
$rowspan=4; $rowspan=4;
if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++; if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++;
if (! empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++; if (! empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++;
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
$object->fetch_thirdparty(); $object->fetch_thirdparty();
@ -297,12 +297,12 @@ if ($action == 'create') {
// Duration // Duration
print '<tr><td>'.$langs->trans("TotalDuration").'</td>'; print '<tr><td>'.$langs->trans("TotalDuration").'</td>';
print '<td colspan="3">'.convertSecondToTime( print '<td colspan="3">'.convertSecondToTime(
$object->duration, 'all', $object->duration, 'all',
$conf->global->MAIN_DURATION_OF_WORKDAY $conf->global->MAIN_DURATION_OF_WORKDAY
).'</td>'; ).'</td>';
print '</tr>'; print '</tr>';
} }
// Project // Project
if (! empty($conf->projet->enabled)) { if (! empty($conf->projet->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
@ -345,7 +345,7 @@ if ($action == 'create') {
print "</td><td>"; print "</td><td>";
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' />&nbsp;"; print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' />&nbsp;";
print $form->selectarray( print $form->selectarray(
'unit_frequency', 'unit_frequency',
array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')),
(GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m') (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')
); );
@ -424,7 +424,7 @@ if ($action == 'create') {
} }
$db->free($result); $db->free($result);
} else } else
print $db->error(); print $db->error();
print "</table>"; print "</table>";
@ -466,7 +466,7 @@ if ($action == 'create') {
} else { } else {
/* /*
* View mode * View mode
* *
*/ */
if ($id > 0) { if ($id > 0) {
if ($object->fetch($id) > 0) { if ($object->fetch($id) > 0) {
@ -497,7 +497,7 @@ if ($action == 'create') {
$morehtmlref.=img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; $morehtmlref.=img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : ';
} }
if ($action == 'classify') { if ($action == 'classify') {
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref.='<input type="hidden" name="action" value="classin">'; $morehtmlref.='<input type="hidden" name="action" value="classin">';
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -512,7 +512,7 @@ if ($action == 'create') {
$object->socid, $object->fk_project, $object->socid, $object->fk_project,
'none', 0, 0, 0, 1 'none', 0, 0, 0, 1
); );
} }
} else { } else {
if (! empty($object->fk_project)) { if (! empty($object->fk_project)) {
$proj = new Project($db); $proj = new Project($db);
@ -567,7 +567,7 @@ if ($action == 'create') {
if ($action == 'contrat') { if ($action == 'contrat') {
$formcontract= new Formcontract($db); $formcontract= new Formcontract($db);
$formcontract->formSelectContract( $formcontract->formSelectContract(
$_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid,
$object->fk_contrat, 'contratid', 0, 1 $object->fk_contrat, 'contratid', 0, 1
); );
} else { } else {
@ -594,9 +594,9 @@ if ($action == 'create') {
$title = $langs->trans("Recurrence"); $title = $langs->trans("Recurrence");
print load_fiche_titre($title, '', 'calendar'); print load_fiche_titre($title, '', 'calendar');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// if "frequency" is empty or = 0, the reccurence is disabled // if "frequency" is empty or = 0, the reccurence is disabled
print '<tr><td style="width: 50%">'; print '<tr><td style="width: 50%">';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
@ -616,26 +616,26 @@ if ($action == 'create') {
print '<tr><td>'; print '<tr><td>';
print "<input type='text' name='frequency' value='".$object->frequency."' size='5' />&nbsp;"; print "<input type='text' name='frequency' value='".$object->frequency."' size='5' />&nbsp;";
print $form->selectarray( print $form->selectarray(
'unit_frequency', 'unit_frequency',
array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')),
($object->unit_frequency?$object->unit_frequency:'m') ($object->unit_frequency?$object->unit_frequency:'m')
); );
print '</td>'; print '</td>';
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>'; print '</tr></table></form>';
} else { } else {
if ($object->frequency > 0) if ($object->frequency > 0)
print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency);
else else
print $langs->trans("NotARecurringInterventionalTemplate"); print $langs->trans("NotARecurringInterventionalTemplate");
} }
print '</td></tr>'; print '</td></tr>';
// Date when // Date when
print '<tr><td>'; print '<tr><td>';
if ( $user->rights->ficheinter->creer && ($action == 'date_when' || $object->frequency > 0)) { if ( $user->rights->ficheinter->creer && ($action == 'date_when' || $object->frequency > 0)) {
print $form->editfieldkey( print $form->editfieldkey(
$langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $langs->trans("NextDateToExecution"), 'date_when', $object->date_when,
$object, $user->rights->facture->creer, 'day' $object, $user->rights->facture->creer, 'day'
); );
} else { } else {
@ -650,12 +650,12 @@ if ($action == 'create') {
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Max period / Rest period // Max period / Rest period
print '<tr><td>'; print '<tr><td>';
if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) { if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) {
print $form->editfieldkey( print $form->editfieldkey(
$langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max,
$object, $user->rights->facture->creer $object, $user->rights->facture->creer
); );
} else } else
@ -673,29 +673,29 @@ if ($action == 'create') {
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
// Frequencry/Recurring section // Frequencry/Recurring section
if ($object->frequency > 0) { if ($object->frequency > 0) {
print '<br>'; print '<br>';
if (empty($conf->cron->enabled)) { if (empty($conf->cron->enabled)) {
$txtinfoadmin=$langs->trans( $txtinfoadmin=$langs->trans(
"EnableAndSetupModuleCron", "EnableAndSetupModuleCron",
$langs->transnoentitiesnoconv("Module2300Name") $langs->transnoentitiesnoconv("Module2300Name")
); );
print info_admin($txtinfoadmin); print info_admin($txtinfoadmin);
} }
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
// Nb of generation already done // Nb of generation already done
print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>'; print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>';
print '<td>'; print '<td>';
print $object->nb_gen_done?$object->nb_gen_done:'0'; print $object->nb_gen_done?$object->nb_gen_done:'0';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Date last // Date last
print '<tr><td>'; print '<tr><td>';
print $langs->trans("DateLastGeneration"); print $langs->trans("DateLastGeneration");
@ -788,7 +788,7 @@ if ($action == 'create') {
$sql = "SELECT f.rowid as fich_rec, s.nom as name, s.rowid as socid, f.rowid as facid, f.titre, "; $sql = "SELECT f.rowid as fich_rec, s.nom as name, s.rowid as socid, f.rowid as facid, f.titre, ";
$sql.= " f.duree, f.fk_contrat, f.fk_projet, f.frequency, f.nb_gen_done, f.nb_gen_max,"; $sql.= " f.duree, f.fk_contrat, f.fk_projet, f.frequency, f.nb_gen_done, f.nb_gen_max,";
$sql.= " f.date_last_gen, f.date_when, f.datec"; $sql.= " f.date_last_gen, f.date_when, f.datec";
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter_rec as f"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter_rec as f";
$sql.= " , ".MAIN_DB_PREFIX."societe as s "; $sql.= " , ".MAIN_DB_PREFIX."societe as s ";
if (! $user->rights->societe->client->voir && ! $socid) { if (! $user->rights->societe->client->voir && ! $socid) {
@ -813,7 +813,7 @@ if ($action == 'create') {
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print_barre_liste( print_barre_liste(
$langs->trans("RepeatableInterventional"), $page, $langs->trans("RepeatableInterventional"), $page,
$_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder, $_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder,
'', $num, '', 'title_commercial.png' '', $num, '', 'title_commercial.png'
); );
@ -824,12 +824,12 @@ if ($action == 'create') {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "", $langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "",
'width="200px" align="left"', $sortfiled, $sortorder 'width="200px" align="left"', $sortfiled, $sortorder
); );
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "", $langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "",
'width="200px" align="left"', $sortfiled, $sortorder 'width="200px" align="left"', $sortfiled, $sortorder
); );
if (! empty($conf->contrat->enabled)) if (! empty($conf->contrat->enabled))
@ -847,7 +847,7 @@ if ($action == 'create') {
); );
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Duration"), $_SERVER['PHP_SELF'], $langs->trans("Duration"), $_SERVER['PHP_SELF'],
'f.duree', '', '', 'f.duree', '', '',
'width="50px" align="right"', $sortfiled, $sortorder 'width="50px" align="right"', $sortfiled, $sortorder
); );
// Recurring or not // Recurring or not
@ -915,7 +915,7 @@ if ($action == 'create') {
print '<td align=right>'.convertSecondToTime($objp->duree).'</td>'; print '<td align=right>'.convertSecondToTime($objp->duree).'</td>';
print '<td align="center">'.yn($objp->frequency?1:0).'</td>'; print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
print '<td align="center">'; print '<td align="center">';
if ($objp->frequency) { if ($objp->frequency) {
print $objp->nb_gen_done.($objp->nb_gen_max>0?' / '. $objp->nb_gen_max:'') ; print $objp->nb_gen_done.($objp->nb_gen_max>0?' / '. $objp->nb_gen_max:'') ;
@ -938,7 +938,7 @@ if ($action == 'create') {
print '<span class="opacitymedium">'.$langs->trans('NA').'</span>'; print '<span class="opacitymedium">'.$langs->trans('NA').'</span>';
print '</td>'; print '</td>';
} }
if ($user->rights->ficheinter->creer) { if ($user->rights->ficheinter->creer) {
// Action column // Action column
print '<td align="center">'; print '<td align="center">';
@ -958,7 +958,7 @@ if ($action == 'create') {
$i++; $i++;
} }
} }
} else } else
print '<tr '.$bc[false].'><td colspan="6">'.$langs->trans("NoneF").'</td></tr>'; print '<tr '.$bc[false].'><td colspan="6">'.$langs->trans("NoneF").'</td></tr>';
print "</table>"; print "</table>";

View File

@ -23,23 +23,23 @@
/** /**
* addDispatchLine * addDispatchLine
* Adds new table row for dispatching to multiple stock locations * Adds new table row for dispatching to multiple stock locations
* *
* @param index int index of product line. 0 = first product line * @param index int index of product line. 0 = first product line
* @param type string type of dispatch (batch = batch dispatch, dispatch = non batch dispatch) * @param type string type of dispatch (batch = batch dispatch, dispatch = non batch dispatch)
* @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one * @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one
*/ */
function addDispatchLine(index, type, mode) function addDispatchLine(index, type, mode)
{ {
mode = mode || 'qtymissing' mode = mode || 'qtymissing'
console.log("fourn/js/lib_dispatch.js Split line type="+type+" index="+index+" mode="+mode); console.log("fourn/js/lib_dispatch.js Split line type="+type+" index="+index+" mode="+mode);
var $row = $("tr[name='"+type+'_0_'+index+"']").clone(true), // clone first batch line to jQuery object var $row = $("tr[name='"+type+'_0_'+index+"']").clone(true), // clone first batch line to jQuery object
nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length, // position of line for batch nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length, // position of line for batch
qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()), // Qty ordered is same for all rows qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()), // Qty ordered is same for all rows
qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val()), qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val()),
qtyDispatched; qtyDispatched;
if (mode === 'lessone') if (mode === 'lessone')
{ {
qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + 1; qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + 1;
} }
@ -47,7 +47,7 @@ function addDispatchLine(index, type, mode)
{ {
qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + qty; qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + qty;
} }
if (qtyDispatched < qtyOrdered) if (qtyDispatched < qtyOrdered)
{ {
//replace tr suffix nbr //replace tr suffix nbr
@ -62,19 +62,19 @@ function addDispatchLine(index, type, mode)
$row.attr('name',type+'_'+nbrTrs+'_'+index); $row.attr('name',type+'_'+nbrTrs+'_'+index);
//insert new row before last row //insert new row before last row
$("tr[name^='"+type+"_'][name$='_"+index+"']:last").after($row); $("tr[name^='"+type+"_'][name$='_"+index+"']:last").after($row);
//remove cloned select2 with duplicate id. //remove cloned select2 with duplicate id.
$("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component $("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component
$(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach(); $(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach();
/* Suffix of lines are: _ trs.length _ index */ /* Suffix of lines are: _ trs.length _ index */
$("#qty_"+nbrTrs+"_"+index).focus(); $("#qty_"+nbrTrs+"_"+index).focus();
$("#qty_dispatched_0_"+index).val(qtyDispatched); $("#qty_dispatched_0_"+index).val(qtyDispatched);
//hide all buttons then show only the last one //hide all buttons then show only the last one
$("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide(); $("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide();
$("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show(); $("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show();
if (mode === 'lessone') if (mode === 'lessone')
{ {
qty = 1; // keep 1 in old line qty = 1; // keep 1 in old line
@ -94,11 +94,11 @@ function addDispatchLine(index, type, mode)
/** /**
* onChangeDispatchLineQty * onChangeDispatchLineQty
* *
* Change event handler for dispatch qty input field, * Change event handler for dispatch qty input field,
* recalculate qty dispatched when qty input has changed. * recalculate qty dispatched when qty input has changed.
* If qty is more then qty ordered reset input qty to max qty to dispatch. * If qty is more then qty ordered reset input qty to max qty to dispatch.
* *
* element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line) * element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line)
*/ */
@ -124,4 +124,4 @@ function onChangeDispatchLineQty() {
} }
$(this).data('qty', $(this).val()); $(this).data('qty', $(this).val());
} }
} }

View File

@ -418,7 +418,7 @@ class Holiday extends CommonObject
} }
else else
{ {
// SQL Error // SQL Error
$this->error="Error ".$this->db->lasterror(); $this->error="Error ".$this->db->lasterror();
return -1; return -1;
} }
@ -542,7 +542,7 @@ class Holiday extends CommonObject
} }
else else
{ {
// SQL Error // SQL Error
$this->error="Error ".$this->db->lasterror(); $this->error="Error ".$this->db->lasterror();
return -1; return -1;
} }

View File

@ -104,10 +104,10 @@ borghesi@unistra.fr
Ce logiciel est régi par la licence CeCILL-B soumise au droit français et Ce logiciel est régi par la licence CeCILL-B soumise au droit français et
respectant les principes de diffusion des logiciels libres. Vous pouvez respectant les principes de diffusion des logiciels libres. Vous pouvez
utiliser, modifier et/ou redistribuer ce programme sous les conditions utiliser, modifier et/ou redistribuer ce programme sous les conditions
de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA
sur le site "http://www.cecill.info". sur le site "http://www.cecill.info".
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
pris connaissance de la licence CeCILL-B, et que vous en avez accepté les pris connaissance de la licence CeCILL-B, et que vous en avez accepté les
termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE. termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE.
@ -120,10 +120,10 @@ Creation : Feb 2008
borghesi@unistra.fr borghesi@unistra.fr
This software is governed by the CeCILL-B license under French law and This software is governed by the CeCILL-B license under French law and
abiding by the rules of distribution of free software. You can use, abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-B modify and/ or redistribute the software under the terms of the CeCILL-B
license as circulated by CEA, CNRS and INRIA at the following URL license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info". "http://www.cecill.info".
The fact that you are presently reading this means that you have had The fact that you are presently reading this means that you have had
knowledge of the CeCILL-B license and that you accept its terms. You can knowledge of the CeCILL-B license and that you accept its terms. You can
@ -133,12 +133,12 @@ find a copy of this license in the file LICENSE.
*/ */
/* /*
Le fichier style.css est le fichier de style de studs. Il se trouve à la racine Le fichier style.css est le fichier de style de studs. Il se trouve à la racine
du répertoire studs. Il contient toutes les mises en forme des fichiers PHP du répertoire studs. Il contient toutes les mises en forme des fichiers PHP
de Studs. de Studs.
*/ */
/*bandeau de titre*/ /*bandeau de titre*/
div.bandeau{ div.bandeau{
line-height:35px; line-height:35px;
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
@ -146,7 +146,7 @@ div.bandeau{
vertical-align:middle; vertical-align:middle;
font-size:35px; font-size:35px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:8px; padding:8px;
height:35px; height:35px;
position:static; position:static;
top:6px; top:6px;
@ -154,30 +154,30 @@ div.bandeau{
right:6px; right:6px;
} }
div.logo{ div.logo{
height:64px; height:64px;
float:right; float:right;
top:8px; top:8px;
right:8px; right:8px;
margin-left: 0; margin-left: 0;
margin-right:0; margin-right:0;
margin-bottom:auto; margin-bottom:auto;
} }
/*Sous bandeau avec bouton de navigation*/ /*Sous bandeau avec bouton de navigation*/
div.bandeautitre{ div.bandeautitre{
height:17px; height:17px;
font-size:14px; font-size:14px;
font-weight:bold; font-weight:bold;
text-align:center; text-align:center;
vertical-align:middle; vertical-align:middle;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:3px; padding:3px;
position:static; position:static;
top:57px; top:57px;
left:6px; left:6px;
right:6px; right:6px;
} }
div.sousbandeau{ div.sousbandeau{
height:17px; height:17px;
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:11px; font-size:11px;
@ -191,15 +191,15 @@ div.sousbandeau{
right:6px; right:6px;
} }
/*bandeau de pied*/ /*bandeau de pied*/
div.surbandeaupied{ div.surbandeaupied{
background-color: #0077DD; background-color: #0077DD;
position:absolute; position:absolute;
bottom:30px; bottom:30px;
left:6px; left:6px;
right:6px; right:6px;
height:6px; height:6px;
} }
div.bandeaupied{ div.bandeaupied{
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
color:white; color:white;
@ -209,29 +209,29 @@ div.bandeaupied{
position:fixed; position:fixed;
bottom:6px; bottom:6px;
left:6px; left:6px;
right:6px; right:6px;
margin:2px; margin:2px;
} }
div.surbandeaupiedmobile{ div.surbandeaupiedmobile{
background-color: #0077DD; background-color: #0077DD;
position:static; position:static;
bottom:32px; bottom:32px;
left:6px; left:6px;
right:6px; right:6px;
height:6px; height:6px;
} }
div.bandeaupiedmobile{ div.bandeaupiedmobile{
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
color:white; color:white;
font-size:11px; font-size:11px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:6px; padding:6px;
position:static; position:static;
} }
/*les boutons se trouvant dans le sousbandeau*/ /*les boutons se trouvant dans le sousbandeau*/
div.sousbandeau a, div.sousbandeau span.sousbandeaulangue a { div.sousbandeau a, div.sousbandeau span.sousbandeaulangue a {
background-color: #0b419b; background-color: #0b419b;
height:16px; height:16px;
padding: 2px 6px 2px 6px; padding: 2px 6px 2px 6px;
vertical-align:middle; vertical-align:middle;
@ -249,7 +249,7 @@ span.sousbandeaulangue {
float:right; float:right;
} }
/*corps de la page index.php*/ /*corps de la page index.php*/
div.corps{ div.corps{
font-size:12px; font-size:12px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
position:static; position:static;
@ -257,10 +257,10 @@ div.corps{
} }
div.corps table{ div.corps table{
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
} }
div.corpscentre{ div.corpscentre{
font-size:12px; font-size:12px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
text-align:center; text-align:center;
@ -285,7 +285,7 @@ div.jourschoisis {
div.bodydate { div.bodydate {
padding:10px; padding:10px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
position:static; position:static;
top:330px; top:330px;
@ -294,7 +294,7 @@ div.bodydate {
} }
div.bodydate table{ div.bodydate table{
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
} }
/*cadre de commentaires*/ /*cadre de commentaires*/
@ -302,7 +302,7 @@ div.presentationdate {
width:100%; width:100%;
font-family:arial, sans-serif; font-family:arial, sans-serif;
text-align:center; text-align:center;
font-size:12px; font-size:12px;
border-top:1px solid; border-top:1px solid;
border-bottom:1px solid; border-bottom:1px solid;
border-left: none; border-left: none;
@ -321,14 +321,14 @@ div.presentationdatefin {
border: 1px solid; border: 1px solid;
margin-top: 10px; margin-top: 10px;
margin-left: 30%; margin-left: 30%;
margin-right: 30%; margin-right: 30%;
position:static; position:static;
} }
/*cadre principal de studs.php*/ /*cadre principal de studs.php*/
div.cadre { div.cadre {
padding:10px; padding:10px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
position:static; position:static;
top:235px; top:235px;
text-align:center; text-align:center;
@ -350,54 +350,54 @@ div.cadre td {
} }
/*case de tableau OK dans affichage de sondage*/ /*case de tableau OK dans affichage de sondage*/
div.cadre td.ok { div.cadre td.ok {
background-color: #66FF99; background-color: #66FF99;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
} }
/*Case de tableau NON dans affichage de sondage*/ /*Case de tableau NON dans affichage de sondage*/
div.cadre td.non { div.cadre td.non {
background-color: #FF7777; background-color: #FF7777;
min-width: 60px; min-width: 60px;
} }
/*Case de tableau VIDE dans affichage de sondage*/ /*Case de tableau VIDE dans affichage de sondage*/
div.cadre td.vide { div.cadre td.vide {
background-color: #DDDDDD; background-color: #DDDDDD;
text-align:center; text-align:center;
} }
/*Case de tableau contenant les noms dans affichage de sondage*/ /*Case de tableau contenant les noms dans affichage de sondage*/
div.cadre td.nom { div.cadre td.nom {
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
} }
div.cadre td.casevide { div.cadre td.casevide {
background-color: white; background-color: white;
text-align:center; text-align:center;
} }
/*les cases contenant les sommes de chaque colonne dans l'affichage de calendrier*/ /*les cases contenant les sommes de chaque colonne dans l'affichage de calendrier*/
div.cadre td.somme { div.cadre td.somme {
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
} }
/*Case de tableau SUJET dans affichage de sondage*/ /*Case de tableau SUJET dans affichage de sondage*/
div.cadre td.sujet, div.cadre td.jour, div.cadre td.heure { div.cadre td.sujet, div.cadre td.jour, div.cadre td.heure {
border: 2px; border: 2px;
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
} }
div.cadre td.annee { div.cadre td.annee {
border: 2px; border: 2px;
background-color: #969696; background-color: #969696;
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
} }
div.cadre td.mois { div.cadre td.mois {
border: 2px; border: 2px;
background-color: #C0C0C0; background-color: #C0C0C0;
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
@ -421,7 +421,7 @@ div.calendrier td.joursemaine {
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:14px; font-size:14px;
border: 2px; border: 2px;
background-color: white; background-color: white;
} }
div.calendrier td.jourwe { div.calendrier td.jourwe {
width:65px; width:65px;
@ -429,7 +429,7 @@ div.calendrier td.jourwe {
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:14px; font-size:14px;
border: 2px; border: 2px;
background-color: #C0C0C0; background-color: #C0C0C0;
} }
/*jour avant le premier jour du mois dans calendrier*/ /*jour avant le premier jour du mois dans calendrier*/
div.calendrier td.avant { div.calendrier td.avant {
@ -438,21 +438,21 @@ div.calendrier td.avant {
border: 2px; border: 2px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:13px; font-size:13px;
background-color: #DDDDDD; background-color: #DDDDDD;
} }
/*jour libre dans calendrier*/ /*jour libre dans calendrier*/
div.calendrier td.libre { div.calendrier td.libre {
width:65px; width:65px;
text-align: center; text-align: center;
border: 2px; border: 2px;
background-color: #66FF99; background-color: #66FF99;
} }
/*jour deja selectionné dans calendrier*/ /*jour deja selectionné dans calendrier*/
div.calendrier td.choisi { div.calendrier td.choisi {
width:65px; width:65px;
text-align: center; text-align: center;
border: 2px; border: 2px;
background-color: #0077DD; background-color: #0077DD;
} }
/* Le paragraphe de fin */ /* Le paragraphe de fin */
p.affichageresultats{ p.affichageresultats{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -147,7 +147,7 @@ padding: 4px 4px 4px 4px;
tr.title tr.title
{ {
background: #DDDFDD; background: #DDDFDD;
} }
table { font-size: 12px; } table { font-size: 12px; }