FIX: expense reports: error when selecting mileage fees expense type if MAIN_USE_EXPENSE_IK disabled

This commit is contained in:
Marc de Lima Lucio 2023-03-02 11:51:06 +01:00
parent 597e6c0a7b
commit 0ddb4eb9b2

View File

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