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 '</td>';
}
else
else
{
print '<td align="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),

View File

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

View File

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

View File

@ -8,7 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
*
*
* 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
* 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 $versiontrans;
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)) {
$newversion = getURLContent($objMod->url_last_version);
if(isset($newversion['content'])){

View File

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

View File

@ -169,21 +169,21 @@ if ($action == 'edit')
print '<table class="noborder" width="100%">';
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 $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
print '</td></tr>';
// Separator
// Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method
// Method
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);
else print '<font class="error">'.$langs->trans("None").'</font>';
print '</td></tr>';
// From
// From
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></tr>';
@ -213,20 +213,20 @@ else
print '<table class="noborder" width="100%">';
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>';
// Separator
// Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method
// Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
$text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE];
if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning();
print $text;
print '</td></tr>';
// From
// From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
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"));

View File

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

View File

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

View File

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

View File

@ -52,7 +52,7 @@ p {
}
.logopos {
padding-top: 20px;
max-height: 40px;
max-height: 40px;
}
/* ------------------- 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']);
// 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
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),
// then we are not losing periods
// then we are not losing periods
$starttime = $_SESSION['auto_check_events_not_before'];
// 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.");
$starttime = $time;
}
}
else
else
{
$starttime = $time;
}
$_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 !
session_write_close();
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']);
$sql = 'SELECT id';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'actioncomm a, ' . MAIN_DB_PREFIX . 'actioncomm_resources ar';
$sql .= ' WHERE a.id = ar.fk_actioncomm';
@ -91,11 +91,11 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
$actionmod = new ActionComm($db);
while ($obj = $db->fetch_object($resql))
while ($obj = $db->fetch_object($resql))
{
$langs->load("agenda");
$langs->load("commercial");
$actionmod->fetch($obj->id);
// 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['titulo'] = $actionmod->label;
$event['location'] = $langs->transnoentities('Location').': '.$actionmod->location;
$eventfound[] = $event;
}
}

View File

@ -67,14 +67,14 @@ class FormContract
if ($socid > 0)
{
// 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)";
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.= " 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 ";
@ -140,14 +140,14 @@ class FormContract
}
print '</select>';
$db->free($resql);
if (!empty($conf->use_javascript_ajax))
{
// Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname);
}
return $num;
}
else
@ -156,7 +156,7 @@ class FormContract
return -1;
}
}
/**
* 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)
{
global $langs;
print "\n";
print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="action" value="setcontract">';
@ -179,6 +179,6 @@ class FormContract
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>';
}
}
}

View File

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

View File

@ -23,23 +23,23 @@
/**
* addDispatchLine
* Adds new table row for dispatching to multiple stock locations
*
*
* @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 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'
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
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
qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val()),
qtyDispatched;
if (mode === 'lessone')
if (mode === 'lessone')
{
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;
}
if (qtyDispatched < qtyOrdered)
{
//replace tr suffix nbr
@ -62,19 +62,19 @@ function addDispatchLine(index, type, mode)
$row.attr('name',type+'_'+nbrTrs+'_'+index);
//insert new row before last row
$("tr[name^='"+type+"_'][name$='_"+index+"']:last").after($row);
//remove cloned select2 with duplicate id.
$("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component
$(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach();
/* Suffix of lines are: _ trs.length _ index */
$("#qty_"+nbrTrs+"_"+index).focus();
$("#qty_dispatched_0_"+index).val(qtyDispatched);
//hide all buttons then show only the last one
$("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide();
$("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show();
if (mode === 'lessone')
{
qty = 1; // keep 1 in old line
@ -94,11 +94,11 @@ function addDispatchLine(index, type, mode)
/**
* 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.
* 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)
*/
@ -124,4 +124,4 @@ function onChangeDispatchLineQty() {
}
$(this).data('qty', $(this).val());
}
}
}

View File

@ -418,7 +418,7 @@ class Holiday extends CommonObject
}
else
{
// SQL Error
// SQL Error
$this->error="Error ".$this->db->lasterror();
return -1;
}
@ -542,7 +542,7 @@ class Holiday extends CommonObject
}
else
{
// SQL Error
// SQL Error
$this->error="Error ".$this->db->lasterror();
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
respectant les principes de diffusion des logiciels libres. Vous pouvez
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".
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
termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE.
@ -120,10 +120,10 @@ Creation : Feb 2008
borghesi@unistra.fr
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
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
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
de Studs.
*/
/*bandeau de titre*/
div.bandeau{
div.bandeau{
line-height:35px;
text-align:center;
background-color: #0b419b;
@ -146,7 +146,7 @@ div.bandeau{
vertical-align:middle;
font-size:35px;
font-family:arial, sans-serif;
padding:8px;
padding:8px;
height:35px;
position:static;
top:6px;
@ -154,30 +154,30 @@ div.bandeau{
right:6px;
}
div.logo{
div.logo{
height:64px;
float:right;
top:8px;
right:8px;
margin-left: 0;
margin-right:0;
margin-right:0;
margin-bottom:auto;
}
/*Sous bandeau avec bouton de navigation*/
div.bandeautitre{
div.bandeautitre{
height:17px;
font-size:14px;
font-weight:bold;
text-align:center;
vertical-align:middle;
font-family:arial, sans-serif;
padding:3px;
padding:3px;
position:static;
top:57px;
left:6px;
right:6px;
}
div.sousbandeau{
}
div.sousbandeau{
height:17px;
background-color: #DDDDDD;
font-size:11px;
@ -191,15 +191,15 @@ div.sousbandeau{
right:6px;
}
/*bandeau de pied*/
div.surbandeaupied{
div.surbandeaupied{
background-color: #0077DD;
position:absolute;
bottom:30px;
left:6px;
right:6px;
right:6px;
height:6px;
}
div.bandeaupied{
div.bandeaupied{
text-align:center;
background-color: #0b419b;
color:white;
@ -209,29 +209,29 @@ div.bandeaupied{
position:fixed;
bottom:6px;
left:6px;
right:6px;
right:6px;
margin:2px;
}
div.surbandeaupiedmobile{
div.surbandeaupiedmobile{
background-color: #0077DD;
position:static;
position:static;
bottom:32px;
left:6px;
right:6px;
right:6px;
height:6px;
}
div.bandeaupiedmobile{
div.bandeaupiedmobile{
text-align:center;
background-color: #0b419b;
color:white;
font-size:11px;
font-family:arial, sans-serif;
padding:6px;
position:static;
padding:6px;
position:static;
}
/*les boutons se trouvant dans le sousbandeau*/
div.sousbandeau a, div.sousbandeau span.sousbandeaulangue a {
background-color: #0b419b;
background-color: #0b419b;
height:16px;
padding: 2px 6px 2px 6px;
vertical-align:middle;
@ -249,7 +249,7 @@ span.sousbandeaulangue {
float:right;
}
/*corps de la page index.php*/
div.corps{
div.corps{
font-size:12px;
font-family:arial, sans-serif;
position:static;
@ -257,10 +257,10 @@ div.corps{
}
div.corps table{
font-family:arial, sans-serif;
font-size:12px;
font-size:12px;
font-weight:bold;
}
div.corpscentre{
div.corpscentre{
font-size:12px;
font-family:arial, sans-serif;
text-align:center;
@ -285,7 +285,7 @@ div.jourschoisis {
div.bodydate {
padding:10px;
font-family:arial, sans-serif;
font-size:12px;
font-size:12px;
text-align:center;
position:static;
top:330px;
@ -294,7 +294,7 @@ div.bodydate {
}
div.bodydate table{
font-family:arial, sans-serif;
font-size:12px;
font-size:12px;
font-weight:bold;
}
/*cadre de commentaires*/
@ -302,7 +302,7 @@ div.presentationdate {
width:100%;
font-family:arial, sans-serif;
text-align:center;
font-size:12px;
font-size:12px;
border-top:1px solid;
border-bottom:1px solid;
border-left: none;
@ -321,14 +321,14 @@ div.presentationdatefin {
border: 1px solid;
margin-top: 10px;
margin-left: 30%;
margin-right: 30%;
margin-right: 30%;
position:static;
}
/*cadre principal de studs.php*/
div.cadre {
padding:10px;
padding:10px;
font-family:arial, sans-serif;
font-size:12px;
font-size:12px;
position:static;
top:235px;
text-align:center;
@ -350,54 +350,54 @@ div.cadre td {
}
/*case de tableau OK dans affichage de sondage*/
div.cadre td.ok {
background-color: #66FF99;
font-size:12px;
background-color: #66FF99;
font-size:12px;
text-align:center;
}
/*Case de tableau NON dans affichage de sondage*/
div.cadre td.non {
background-color: #FF7777;
background-color: #FF7777;
min-width: 60px;
}
/*Case de tableau VIDE dans affichage de sondage*/
div.cadre td.vide {
background-color: #DDDDDD;
background-color: #DDDDDD;
text-align:center;
}
/*Case de tableau contenant les noms dans affichage de sondage*/
div.cadre td.nom {
background-color: #DDDDDD;
font-size:12px;
background-color: #DDDDDD;
font-size:12px;
text-align:center;
}
div.cadre td.casevide {
background-color: white;
background-color: white;
text-align:center;
}
/*les cases contenant les sommes de chaque colonne dans l'affichage de calendrier*/
div.cadre td.somme {
font-weight: bold;
font-size:14px;
font-size:14px;
}
/*Case de tableau SUJET dans affichage de sondage*/
div.cadre td.sujet, div.cadre td.jour, div.cadre td.heure {
border: 2px;
background-color: #DDDDDD;
background-color: #DDDDDD;
font-size:14px;
padding:1px 5px;
}
div.cadre td.annee {
border: 2px;
background-color: #969696;
background-color: #969696;
font-weight: bold;
font-size:14px;
padding:1px 5px;
}
div.cadre td.mois {
border: 2px;
background-color: #C0C0C0;
background-color: #C0C0C0;
font-weight: bold;
font-size:14px;
padding:1px 5px;
@ -421,7 +421,7 @@ div.calendrier td.joursemaine {
font-family:arial, sans-serif;
font-size:14px;
border: 2px;
background-color: white;
background-color: white;
}
div.calendrier td.jourwe {
width:65px;
@ -429,7 +429,7 @@ div.calendrier td.jourwe {
font-family:arial, sans-serif;
font-size:14px;
border: 2px;
background-color: #C0C0C0;
background-color: #C0C0C0;
}
/*jour avant le premier jour du mois dans calendrier*/
div.calendrier td.avant {
@ -438,21 +438,21 @@ div.calendrier td.avant {
border: 2px;
font-family:arial, sans-serif;
font-size:13px;
background-color: #DDDDDD;
background-color: #DDDDDD;
}
/*jour libre dans calendrier*/
div.calendrier td.libre {
width:65px;
text-align: center;
border: 2px;
background-color: #66FF99;
background-color: #66FF99;
}
/*jour deja selectionné dans calendrier*/
div.calendrier td.choisi {
width:65px;
text-align: center;
border: 2px;
background-color: #0077DD;
background-color: #0077DD;
}
/* Le paragraphe de fin */
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>
*
* This program is free software; you can redistribute it and/or modify
@ -147,7 +147,7 @@ padding: 4px 4px 4px 4px;
tr.title
{
background: #DDDFDD;
background: #DDDFDD;
}
table { font-size: 12px; }