add trigger on js
This commit is contained in:
parent
a549e922a9
commit
0b0f3af6c0
@ -76,6 +76,7 @@ if (empty($fk_expense) || $fk_expense < 0) {
|
||||
$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
|
||||
|
||||
$rep->response_status = 'error';
|
||||
|
||||
} else {
|
||||
// @see ndfp.class.php:3576 (method: compute_total_km)
|
||||
$expense = new ExpenseReport($db);
|
||||
|
||||
@ -2626,6 +2626,7 @@ if ($action == 'create') {
|
||||
,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("");
|
||||
}
|
||||
},
|
||||
|
||||
@ -2610,7 +2610,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport e ON e.rowid = n.fk_expensereport";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_fees tf ON tf.id = n.fk_c_type_fees";
|
||||
$sql.= " WHERE e.fk_user_author = ".(int) $this->fk_user_author;
|
||||
$sql.= " AND YEAR(n.date) = ".(int) $arrayDate['year'] ;
|
||||
$sql.= " AND YEAR(n.date) = ".(int) $arrayDate['year'];
|
||||
$sql.= " AND tf.code = 'EX_KME' ";
|
||||
$sql.= " AND e.fk_statut = ".(int) ExpenseReport::STATUS_VALIDATED;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user