2
0
forked from Wavyzz/dolibarr

Code comment

This commit is contained in:
Laurent Destailleur
2021-07-05 20:32:05 +02:00
parent 6a6216898e
commit db95339085
2 changed files with 30 additions and 30 deletions

View File

@@ -7439,7 +7439,7 @@ function print_date_range($date_start, $date_end, $format = '', $outputlangs = '
* @param int $date_end End date * @param int $date_end End date
* @param string $format Output format * @param string $format Output format
* @param Translate $outputlangs Output language * @param Translate $outputlangs Output language
* @param integer $withparenthesis 1=Add parenthesis, 0=non parenthesis * @param integer $withparenthesis 1=Add parenthesis, 0=no parenthesis
* @return string String * @return string String
*/ */
function get_date_range($date_start, $date_end, $format = '', $outputlangs = '', $withparenthesis = 1) function get_date_range($date_start, $date_end, $format = '', $outputlangs = '', $withparenthesis = 1)

View File

@@ -1675,15 +1675,15 @@ if ($action == 'create') {
print '<tr>'; print '<tr>';
print '<td class="titlefield">'.$langs->trans("User").'</td>'; print '<td class="titlefield">'.$langs->trans("User").'</td>';
print '<td>'; print '<td>';
if ($object->fk_user_author > 0) { if ($object->fk_user_author > 0) {
$userauthor = new User($db); $userauthor = new User($db);
$result = $userauthor->fetch($object->fk_user_author); $result = $userauthor->fetch($object->fk_user_author);
if ($result < 0) { if ($result < 0) {
dol_print_error('', $userauthor->error); dol_print_error('', $userauthor->error);
} elseif ($result > 0) { } elseif ($result > 0) {
print $userauthor->getNomUrl(-1); print $userauthor->getNomUrl(-1);
} }
} }
print '</td></tr>'; print '</td></tr>';
// Period // Period
@@ -2474,32 +2474,32 @@ if ($action == 'create') {
print '</tr>'; print '</tr>';
} // Fin si c'est payé/validé } // Fin si c'est payé/validé
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '<script javascript> print '<script javascript>
/* JQuery for product free or predefined select */ /* JQuery for product free or predefined select */
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery("#value_unit_ht").keyup(function(event) { jQuery("#value_unit_ht").keyup(function(event) {
console.log(event.which); // discard event tag and arrows console.log(event.which); // discard event tag and arrows
if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#value_unit_ht").val() != "") { if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#value_unit_ht").val() != "") {
jQuery("#value_unit").val(""); jQuery("#value_unit").val("");
} }
});
jQuery("#value_unit").keyup(function(event) {
console.log(event.which); // discard event tag and arrows
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#value_unit").val() != "") {
jQuery("#value_unit_ht").val("");
}
});
}); });
jQuery("#value_unit").keyup(function(event) {
console.log(event.which); // discard event tag and arrows
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#value_unit").val() != "") {
jQuery("#value_unit_ht").val("");
}
});
});
</script>'; </script>';
print '</form>'; print '</form>';
print dol_get_fiche_end(); print dol_get_fiche_end();
} }
} else { } else {
dol_print_error($db); dol_print_error($db);