Skip to content

Commit

Permalink
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 8, 2017
2 parents 7dbd0bd + f92eded commit 835cd43
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 6 deletions.
63 changes: 63 additions & 0 deletions htdocs/admin/fichinter.php
Expand Up @@ -221,9 +221,38 @@
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == 'set_FICHINTER_WITHOUT_DURATION') {
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
$conf->entity);

if (!$res > 0) {
$error++;
}

if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == 'set_FICHINTER_DATE_WITHOUT_HOUR') {
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '',
$conf->entity);

if (!$res > 0) {
$error++;
}

if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}



/*
* View
*/
Expand Down Expand Up @@ -576,6 +605,40 @@
print '</td>';
print '</tr>';
print '</form>';
// Use duration
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_FICHINTER_WITHOUT_DURATION">';
print '<tr class="oddeven">';
print '<td>';
print $langs->trans("UseDurationOnFichinter");
print '</td>';
print '<td align="center">';
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"' . ($conf->global->FICHINTER_WITHOUT_DURATION?' checked':'') . '>';
print '</td>';
print '<td align="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</td>';
print '</tr>';
print '</form>';
// use date without hour
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_FICHINTER_DATE_WITHOUT_HOUR">';
print '<tr class="oddeven">';
print '<td>';
print $langs->trans("UseDateWithoutHourOnFichinter");
print '</td>';
print '<td align="center">';
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"' . ($conf->global->FICHINTER_DATE_WITHOUT_HOUR?' checked':'') . '>';
print '</td>';
print '<td align="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</td>';
print '</tr>';
print '</form>';




print '</table>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/pdf.php
Expand Up @@ -77,7 +77,7 @@


dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", $_POST["MAIN_PDF_MAIN_HIDE_SECOND_TAX"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", $_POST["_MAIN_PDF_MAIN_HIDE_THIRD_TAX"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", $_POST["MAIN_PDF_MAIN_HIDE_THIRD_TAX"],'chaine',0,'',$conf->entity);

header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit;
Expand Down
3 changes: 2 additions & 1 deletion htdocs/core/actions_extrafields.inc.php
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*
*
* $elementype must be defined.
*/

Expand All @@ -25,6 +25,7 @@

$maxsizestring=255;
$maxsizeint=10;
$mesg=array();

$extrasize=GETPOST('size','int');
$type=GETPOST('type','alpha');
Expand Down
10 changes: 9 additions & 1 deletion htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
Expand Up @@ -277,7 +277,15 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid
$curX = $this->posxdesc-1;

// Description of product line
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true);
if (empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR))
{
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true);
}
else
{
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'day',false,$outputlangs,true);
}

if ($objectligne->duration > 0)
{
$txt.=" - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration);
Expand Down
8 changes: 5 additions & 3 deletions htdocs/fichinter/card.php
Expand Up @@ -1379,7 +1379,7 @@
print dol_htmlentitiesbr($objp->description);

// Date
print '<td align="center" width="150">'.dol_print_date($db->jdate($objp->date_intervention),'dayhour').'</td>';
print '<td align="center" width="150">'.(empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)?dol_print_date($db->jdate($objp->date_intervention),'dayhour'):dol_print_date($db->jdate($objp->date_intervention),'day')).'</td>';

// Duration
print '<td align="right" width="150">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertSecondToTime($objp->duree):'').'</td>';
Expand Down Expand Up @@ -1452,7 +1452,8 @@

// Date d'intervention
print '<td align="center" class="nowrap">';
$form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) $form->select_date($db->jdate($objp->date_intervention),'di',0,0,0,"date_intervention");
else $form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
print '</td>';

// Duration
Expand Down Expand Up @@ -1519,7 +1520,8 @@
$timearray=dol_getdate($now);
if (! GETPOST('diday','int')) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
else $timewithnohour=dol_mktime(GETPOST('dihour','int'),GETPOST('dimin','int'), 0,GETPOST('dimonth','int'),GETPOST('diday','int'),GETPOST('diyear','int'));
$form->select_date($timewithnohour,'di',1,1,0,"addinter");
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) $form->select_date($timewithnohour,'di',0,0,0,"addinter");
else $form->select_date($timewithnohour,'di',1,1,0,"addinter");
print '</td>';

// Duration
Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/en_US/interventions.lang
Expand Up @@ -48,6 +48,8 @@ TypeContact_fichinter_external_CUSTOMER=Following-up customer contact
PrintProductsOnFichinter=Print also lines of type "product" (not only services) on intervention card
PrintProductsOnFichinterDetails=interventions generated from orders
UseServicesDurationOnFichinter=Use services duration for interventions generated from orders
UseDurationOnFichinter=Hides the duration field for intervention records
UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for intervention records
InterventionStatistics=Statistics of interventions
NbOfinterventions=Nb of intervention cards
NumberOfInterventionsByMonth=Nb of intervention cards by month (date of validation)
Expand Down
2 changes: 2 additions & 0 deletions htdocs/langs/fr_FR/interventions.lang
Expand Up @@ -48,6 +48,8 @@ TypeContact_fichinter_external_CUSTOMER=Contact client suivi de l'intervention
PrintProductsOnFichinter=Imprimer aussi les lignes de type "produit" (pas seulement de type service) sur les fiches d'intervention
PrintProductsOnFichinterDetails=interventions générées à partir des commandes
UseServicesDurationOnFichinter=Utiliser la durée des services dans les interventions créées depuis des commandes
UseDurationOnFichinter=Masquer le champ durée dans les fiches d'intervention
UseDateWithoutHourOnFichinter=Masquer l'heure de la date d'intervention
InterventionStatistics=Statistiques des interventions
NbOfinterventions=Nb de fiches d'intervention
NumberOfInterventionsByMonth=Nb de fiches d'intervention par mois (date de validation)
Expand Down
2 changes: 2 additions & 0 deletions htdocs/public/stripe/newpayment.php
Expand Up @@ -2,6 +2,7 @@
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
Expand Down Expand Up @@ -1084,6 +1085,7 @@ class="stripe-button"
box-shadow: 0 1px 3px 0 #e6ebf1;
-webkit-transition: box-shadow 150ms ease;
transition: box-shadow 150ms ease;
width: 350px;
}
.StripeElement--focus {
Expand Down

0 comments on commit 835cd43

Please sign in to comment.