Merge pull request #5130 from frederic34/patch-9
FIX if type fee not specified, line is invisible and can't edit it
This commit is contained in:
commit
3c2c9a25b8
@ -1625,7 +1625,7 @@ else
|
||||
$sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,';
|
||||
$sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid';
|
||||
$sql.= ' WHERE fde.fk_expensereport = '.$object->id;
|
||||
|
||||
@ -1691,7 +1691,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td style="text-align:center;">'.$langs->trans("TF_".strtoupper($objp->type_fees_libelle)).'</td>';
|
||||
print '<td style="text-align:center;">'.$langs->trans("TF_".strtoupper(empty($objp->type_fees_libelle)?'OTHER':$objp->type_fees_libelle)).'</td>';
|
||||
print '<td style="text-align:left;">'.$objp->comments.'</td>';
|
||||
print '<td style="text-align:right;">'.vatrate($objp->vatrate,true).'</td>';
|
||||
print '<td style="text-align:right;">'.price($objp->value_unit).'</td>';
|
||||
|
||||
@ -746,7 +746,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,';
|
||||
$sql.= ' p.ref as ref_projet, p.title as title_projet';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as de';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON de.fk_projet = p.rowid';
|
||||
$sql.= ' WHERE de.'.$this->fk_element.' = '.$this->id;
|
||||
|
||||
@ -776,7 +776,7 @@ class ExpenseReport extends CommonObject
|
||||
$deplig->total_tva = $objp->total_tva;
|
||||
$deplig->total_ttc = $objp->total_ttc;
|
||||
|
||||
$deplig->type_fees_code = $objp->code_type_fees;
|
||||
$deplig->type_fees_code = empty($objp->code_type_fees)?'TF_OTHER':$objp->code_type_fees;
|
||||
$deplig->type_fees_libelle = $objp->libelle_type_fees;
|
||||
$deplig->tva_tx = $objp->tva_tx;
|
||||
$deplig->vatrate = $objp->tva_tx;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user