Merge pull request #24089 from marc-dll/16.0_FIX_expensereport_ik

FIX: expense reports: JS error when selecting mileage fees expense type if MAIN_USE_EXPENSE_IK disabled
This commit is contained in:
Laurent Destailleur 2023-03-02 16:24:56 +01:00 committed by GitHub
commit 0c9a95e8a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2594,8 +2594,8 @@ if ($action == 'create') {
print '</table>';
print '</div>';
//var_dump($object);
print '<script javascript>
print '<script>
/* JQuery for product free or predefined select */
jQuery(document).ready(function() {
@ -2611,6 +2611,10 @@ if ($action == 'create') {
jQuery("#value_unit_ht").val("");
}
});
';
if (! empty($conf->global->MAIN_USE_EXPENSE_IK)) {
print '
/* unit price coéf calculation */
jQuery(".input_qty, #fk_c_type_fees, #select_fk_c_exp_tax_cat, #vatrate ").change(function(event) {
@ -2656,6 +2660,10 @@ if ($action == 'create') {
jQuery("#value_unit_ht").val("");
}*/
});
';
}
print '
});