Merge pull request #24638 from noec764/16_FIX_Expense_report_TTC_autofill
FIX: expense report autofill ttc input if force ttc conf is enabled
This commit is contained in:
commit
48358ef3a5
@ -2643,10 +2643,22 @@ if ($action == 'create') {
|
||||
,async:false
|
||||
,dataType:"json"
|
||||
,success:function(response) {
|
||||
if (response.response_status == "success"){
|
||||
jQuery("#value_unit_ht").val(response.data);
|
||||
jQuery("#value_unit_ht").trigger("change");
|
||||
jQuery("#value_unit").val("");
|
||||
if (response.response_status == "success"){';
|
||||
|
||||
if (!empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY)) {
|
||||
print '
|
||||
jQuery("#value_unit").val(parseFloat(response.data) * (100 + parseFloat(tva)) / 100);
|
||||
jQuery("#value_unit").trigger("change");
|
||||
';
|
||||
} else {
|
||||
print '
|
||||
jQuery("#value_unit_ht").val(response.data);
|
||||
jQuery("#value_unit_ht").trigger("change");
|
||||
jQuery("#value_unit").val("");
|
||||
';
|
||||
}
|
||||
|
||||
print '
|
||||
} else if(response.response_status == "error" && response.errorMessage != undefined && response.errorMessage.length > 0 ){
|
||||
$.jnotify(response.errorMessage, "error", {timeout: 0, type: "error"},{ remove: function (){} } );
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user