Clean code

This commit is contained in:
Laurent Destailleur
2021-10-17 15:47:29 +02:00
parent 79177b0a11
commit 0aa90e82ea
7 changed files with 193 additions and 168 deletions

View File

@@ -9307,11 +9307,12 @@ class Form
*
* @param string $save_label Alternative label for save button
* @param string $cancel_label Alternative label for cancel button
* @param array $morefields Add additional buttons between save and cancel
* @param array $morebuttons Add additional buttons between save and cancel
* @param bool $withoutdiv Option to remove enclosing centered div
* @param string $morecss More CSS
* @return string Html code with the buttons
*/
public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morefields = array(), $withoutdiv = 0)
public function buttonsSaveCancel($save_label = 'Save', $cancel_label = 'Cancel', $morebuttons = array(), $withoutdiv = 0, $morecss = '')
{
global $langs;
@@ -9335,8 +9336,8 @@ class Form
!empty($save_label) ? $buttons[] = $save : '';
if (!empty($morefields)) {
$buttons[] = $morefields;
if (!empty($morebuttons)) {
$buttons[] = $morebuttons;
}
!empty($cancel_label) ? $buttons[] = $cancel : '';
@@ -9345,7 +9346,7 @@ class Form
foreach ($buttons as $button) {
$addclass = empty($button['addclass']) ? '' : $button['addclass'];
$retstring .= '<input type="submit" class="button button-'.$button['name'].' '.$addclass.'" name="'.$button['name'].'" value="'.dol_escape_htmltag($langs->trans($button['label_key'])).'">';
$retstring .= '<input type="submit" class="button button-'.$button['name'].($morecss ? ' '.$morecss : '').' '.$addclass.'" name="'.$button['name'].'" value="'.dol_escape_htmltag($langs->trans($button['label_key'])).'">';
}
$retstring .= $withoutdiv ? '': '</div>';

View File

@@ -1696,20 +1696,20 @@ if ($action == 'create') {
}
}
}*/
$morehtmlref .= '</div>';
$morehtmlref .= '</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield centpercent">';
print '<table class="border tableforfield centpercent">';
// Author
print '<tr>';
print '<td class="titlefield">'.$langs->trans("User").'</td>';
print '<td>';
// Author
print '<tr>';
print '<td class="titlefield">'.$langs->trans("User").'</td>';
print '<td>';
if ($object->fk_user_author > 0) {
$userauthor = new User($db);
$result = $userauthor->fetch($object->fk_user_author);
@@ -1719,15 +1719,15 @@ if ($action == 'create') {
print $userauthor->getNomUrl(-1);
}
}
print '</td></tr>';
print '</td></tr>';
// Period
print '<tr>';
print '<td class="titlefield">'.$langs->trans("Period").'</td>';
print '<td>';
print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0);
print '</td>';
print '</tr>';
// Period
print '<tr>';
print '<td class="titlefield">'.$langs->trans("Period").'</td>';
print '<td>';
print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0);
print '</td>';
print '</tr>';
if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) {
print '<tr>';
print '<td>'.$langs->trans("ModePaiement").'</td>';
@@ -1735,20 +1735,20 @@ if ($action == 'create') {
print '</tr>';
}
// Validation date
print '<tr>';
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
print '<td>'.dol_print_date($object->date_valid, 'dayhour', 'tzuser');
// Validation date
print '<tr>';
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
print '<td>'.dol_print_date($object->date_valid, 'dayhour', 'tzuser');
if ($object->status == 2 && $object->hasDelay('toapprove')) {
print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToApprove"));
}
if ($object->status == 5 && $object->hasDelay('topay')) {
print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToPay"));
}
print '</td></tr>';
print '</tr>';
print '</td></tr>';
print '</tr>';
// User to inform for approval
// User to inform for approval
if ($object->status <= ExpenseReport::STATUS_VALIDATED) { // informed
print '<tr>';
print '<td>'.$langs->trans("VALIDATOR").'</td>'; // approver
@@ -1842,24 +1842,24 @@ if ($action == 'create') {
*/
}
// Other attributes
$cols = 2;
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Other attributes
$cols = 2;
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
print '</table>';
print '</table>';
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield centpercent">';
print '<table class="border tableforfield centpercent">';
// Amount
print '<tr>';
print '<td class="titlefieldmiddle">'.$langs->trans("AmountHT").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'</td>';
$rowspan = 5;
// Amount
print '<tr>';
print '<td class="titlefieldmiddle">'.$langs->trans("AmountHT").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'</td>';
$rowspan = 5;
if ($object->status <= ExpenseReport::STATUS_VALIDATED) {
$rowspan++;
} elseif ($object->status == ExpenseReport::STATUS_CANCELED) {
@@ -1873,15 +1873,15 @@ if ($action == 'create') {
if ($object->status == ExpenseReport::STATUS_CLOSED) {
$rowspan += 2;
}
print "</td>";
print '</tr>';
print "</td>";
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("AmountVAT").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).'</td>';
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("AmountVAT").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_tva, 1, '', 1, -1, -1, $conf->currency).'</td>';
print '</tr>';
// Amount Local Taxes
// Amount Local Taxes
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1
print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
print '<td class="valuefield">'.price($object->total_localtax1, 1, '', 1, -1, -1, $conf->currency).'</td></tr>';
@@ -1891,45 +1891,45 @@ if ($action == 'create') {
print '<td class="valuefield">'.price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency).'</td></tr>';
}
print '<tr>';
print '<td>'.$langs->trans("AmountTTC").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("AmountTTC").'</td>';
print '<td class="nowrap amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
print '</tr>';
// List of payments already done
$nbcols = 3;
// List of payments already done
$nbcols = 3;
if (!empty($conf->banque->enabled)) {
$nbrows++;
$nbcols++;
}
print '<table class="noborder paymenttable" width="100%">';
print '<table class="noborder paymenttable" width="100%">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans('Payments').'</td>';
print '<td class="liste_titre">'.$langs->trans('Date').'</td>';
print '<td class="liste_titre">'.$langs->trans('Type').'</td>';
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans('Payments').'</td>';
print '<td class="liste_titre">'.$langs->trans('Date').'</td>';
print '<td class="liste_titre">'.$langs->trans('Type').'</td>';
if (!empty($conf->banque->enabled)) {
print '<td class="liste_titre right">'.$langs->trans('BankAccount').'</td>';
}
print '<td class="liste_titre right">'.$langs->trans('Amount').'</td>';
print '<td class="liste_titre" width="18">&nbsp;</td>';
print '</tr>';
print '<td class="liste_titre right">'.$langs->trans('Amount').'</td>';
print '<td class="liste_titre" width="18">&nbsp;</td>';
print '</tr>';
// Payments already done (from payment on this expensereport)
$sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,";
$sql .= "c.code as p_code, c.libelle as payment_type,";
$sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
$sql .= " WHERE e.rowid = '".$id."'";
$sql .= " AND p.fk_expensereport = e.rowid";
$sql .= ' AND e.entity IN ('.getEntity('expensereport').')';
$sql .= " ORDER BY dp";
// Payments already done (from payment on this expensereport)
$sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount, p.fk_bank,";
$sql .= "c.code as p_code, c.libelle as payment_type,";
$sql .= "ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."payment_expensereport as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
$sql .= " WHERE e.rowid = '".$id."'";
$sql .= " AND p.fk_expensereport = e.rowid";
$sql .= ' AND e.entity IN ('.getEntity('expensereport').')';
$sql .= " ORDER BY dp";
$resql = $db->query($sql);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0; $totalpaid = 0;
@@ -2000,29 +2000,29 @@ if ($action == 'create') {
} else {
dol_print_error($db);
}
print "</table>";
print "</table>";
print '</div>';
print '</div>';
print '</div>';
print '</div>';
print '</div>';
print '</div>';
print '<div class="clearboth"></div><br>';
print '<div class="clearboth"></div><br>';
print '<div style="clear: both;"></div>';
print '<div style="clear: both;"></div>';
$actiontouse = 'updateline';
$actiontouse = 'updateline';
if (($object->status == 0 || $object->status == 99) && $action != 'editline') {
$actiontouse = 'addline';
}
print '<form name="expensereport" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" method="post" >';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="'.$actiontouse.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="fk_expensereport" value="'.$object->id.'" />';
print '<form name="expensereport" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" method="post" >';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="'.$actiontouse.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="fk_expensereport" value="'.$object->id.'" />';
print '<div class="div-table-responsive-no-min">';
print '<table id="tablelines" class="noborder centpercent">';
print '<div class="div-table-responsive-no-min">';
print '<table id="tablelines" class="noborder centpercent">';
if (!empty($object->lines)) {
$i = 0; $total = 0;
@@ -2214,6 +2214,7 @@ if ($action == 'create') {
$colspan++;
}
print '<!-- line of expense report -->'."\n";
print '<tr class="tredited">';
print '<td class="center">';
@@ -2333,8 +2334,10 @@ if ($action == 'create') {
//print $line->fk_ecm_files;
print '</td>';
print '<td>';
print '<input type="hidden" name="rowid" value="'.$line->rowid.'">';
print $form->buttonsSaveCancel();
print $form->buttonsSaveCancel('Save', 'Cancel', array(), 0, 'small');
print '</td>';
print '</tr>';
}
@@ -2344,10 +2347,8 @@ if ($action == 'create') {
}
// Add a new line
if (($object->status == ExpenseReport::STATUS_DRAFT || $object->status == ExpenseReport::STATUS_REFUSED)
&& $action != 'editline'
&& $user->rights->expensereport->creer) {
$colspan = 11;
if (($object->status == ExpenseReport::STATUS_DRAFT || $object->status == ExpenseReport::STATUS_REFUSED) && $action != 'editline' && $user->rights->expensereport->creer) {
$colspan = 11;
if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) {
$colspan++;
}
@@ -2358,8 +2359,8 @@ if ($action == 'create') {
$colspan++;
}
$nbFiles = $nbLinks = 0;
$arrayoffiles = array();
$nbFiles = $nbLinks = 0;
$arrayoffiles = array();
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
@@ -2370,21 +2371,21 @@ if ($action == 'create') {
$nbLinks = Link::count($db, $object->element, $object->id);
}
// Add line with link to add new file or attach to an existing file
print '<tr class="liste_titre">';
print '<td colspan="'.$colspan.'" class="liste_titre">';
print '<a href="" class="commonlink auploadnewfilenow reposition">'.$langs->trans("UploadANewFileNow");
print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
print '</a>';
// Add line with link to add new file or attach to an existing file
print '<tr class="liste_titre">';
print '<td colspan="'.$colspan.'" class="liste_titre">';
print '<a href="" class="commonlink auploadnewfilenow reposition">'.$langs->trans("UploadANewFileNow");
print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
print '</a>';
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
print ' &nbsp; - &nbsp; <a href="" class="commonlink aattachtodoc reposition">'.$langs->trans("AttachTheNewLineToTheDocument");
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
print '</a>';
}
print '<!-- Code to open/close section to submit or link files in the form to add new line -->'."\n";
print '<script language="javascript">'."\n";
print '$(document).ready(function() {
print '<!-- Code to open/close section to submit or link files in the form to add new line -->'."\n";
print '<script language="javascript">'."\n";
print '$(document).ready(function() {
$( ".auploadnewfilenow" ).click(function() {
console.log("We click on toggle of auploadnewfilenow");
jQuery(".truploadnewfilenow").toggle();
@@ -2405,7 +2406,7 @@ if ($action == 'create') {
if (is_array(GETPOST('attachfile', 'array')) && count(GETPOST('attachfile', 'array')) && $action != 'updateline') {
print 'jQuery(".trattachnewfilenow").show();'."\n";
}
print '
print '
jQuery("form[name=\"expensereport\"]").submit(function() {
if (jQuery(".truploadnewfilenow").is(":hidden")) {
/* When section to send file is not expanded, we disable the button sendit that submit form to add a new file, so button to submit line will work. */
@@ -2416,47 +2417,47 @@ if ($action == 'create') {
}
});
';
print '
print '
});
';
print '</script>'."\n";
print '</td></tr>';
print '</script>'."\n";
print '</td></tr>';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
print '<tr class="liste_titre">';
print '<td></td>';
print '<td class="center">'.$langs->trans('Date').'</td>';
print '<tr class="liste_titre">';
print '<td></td>';
print '<td class="center">'.$langs->trans('Date').'</td>';
if (!empty($conf->projet->enabled)) {
print '<td class="minwidth100imp">'.$form->textwithpicto($langs->trans('Project'), $langs->trans("ClosedProjectsAreHidden")).'</td>';
}
print '<td class="center">'.$langs->trans('Type').'</td>';
print '<td class="center">'.$langs->trans('Type').'</td>';
if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) {
print '<td>'.$langs->trans('CarCategory').'</td>';
}
print '<td>'.$langs->trans('Description').'</td>';
print '<td class="right">'.$langs->trans('VAT').'</td>';
print '<td class="right">'.$langs->trans('PriceUHT').'</td>';
print '<td class="right">'.$langs->trans('PriceUTTC').'</td>';
print '<td class="right">'.$langs->trans('Qty').'</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '</tr>';
print '<td>'.$langs->trans('Description').'</td>';
print '<td class="right">'.$langs->trans('VAT').'</td>';
print '<td class="right">'.$langs->trans('PriceUHT').'</td>';
print '<td class="right">'.$langs->trans('PriceUTTC').'</td>';
print '<td class="right">'.$langs->trans('Qty').'</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '</tr>';
print '<tr class="oddeven nohover">';
print '<tr class="oddeven nohover">';
// Line number
print '<td></td>';
// Line number
print '<td></td>';
// Select date
print '<td class="center">';
print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1);
print '</td>';
// Select date
print '<td class="center">';
print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1);
print '</td>';
// Select project
// Select project
if (!empty($conf->projet->enabled)) {
print '<td>';
$formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300');
@@ -2475,48 +2476,48 @@ if ($action == 'create') {
print '</td>';
}
// Add comments
print '<td>';
print '<textarea class="flat_ndf centpercent" name="comments" rows="'.ROWS_2.'">'.dol_escape_htmltag($comments, 0, 1).'</textarea>';
print '</td>';
// Add comments
print '<td>';
print '<textarea class="flat_ndf centpercent" name="comments" rows="'.ROWS_2.'">'.dol_escape_htmltag($comments, 0, 1).'</textarea>';
print '</td>';
// Select VAT
print '<td class="right">';
$defaultvat = -1;
// Select VAT
print '<td class="right">';
$defaultvat = -1;
if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) {
$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
}
print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1);
print '</td>';
print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1);
print '</td>';
// Unit price net
print '<td class="right">';
print '<input type="text" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag($value_unit_ht).'"'.$taxlessUnitPriceDisabled.' />';
print '</td>';
// Unit price net
print '<td class="right">';
print '<input type="text" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag($value_unit_ht).'"'.$taxlessUnitPriceDisabled.' />';
print '</td>';
// Unit price with tax
print '<td class="right">';
print '<input type="text" class="right maxwidth50" id="value_unit" name="value_unit" value="'.dol_escape_htmltag($value_unit).'">';
print '</td>';
// Unit price with tax
print '<td class="right">';
print '<input type="text" class="right maxwidth50" id="value_unit" name="value_unit" value="'.dol_escape_htmltag($value_unit).'">';
print '</td>';
// Quantity
print '<td class="right">';
print '<input type="text" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($qty ? $qty : 1).'">'; // We must be able to enter decimal qty
print '</td>';
// Quantity
print '<td class="right">';
print '<input type="text" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($qty ? $qty : 1).'">'; // We must be able to enter decimal qty
print '</td>';
// Picture
print '<td></td>';
// Picture
print '<td></td>';
if ($action != 'editline') {
print '<td class="right"></td>';
print '<td class="right"></td>';
}
print '<td class="center">';
print $form->buttonsSaveCancel("Add", '', '', 1);
print '</td>';
print '<td class="center">';
print $form->buttonsSaveCancel("Add", '', '', 1);
print '</td>';
print '</tr>';
print '</tr>';
} // Fin si c'est payé/validé
print '</table>';

View File

@@ -2,7 +2,14 @@
// Add line to upload new file
print '<!-- expensereport_addfile.tpl.php -->'."\n";
print '<tr class="truploadnewfilenow'.(empty($tredited) ? ' oddeven nohover' : ' '.$tredited).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>';
print '<td colspan="'.$colspan.'">';
// Num line
if ($action == 'editline') {
print '<td></td>';
}
// Upload section
print '<td colspan="'.($action == 'editline' ? $colspan - 1 : $colspan).'">';
$modulepart = 'expensereport';
$permission = $user->rights->expensereport->creer;

View File

@@ -13,7 +13,14 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
if ($nbFiles > 0) {
print '<tr class="trattachnewfilenow'.(empty($tredited) ? ' oddeven nohover' : ' '.$tredited).'"'.(!GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>';
print '<td colspan="'.$colspan.'">';
// Num line
if ($action == 'editline') {
print '<td></td>';
}
// Select image section
print '<td colspan="'.($action == 'editline' ? $colspan - 1 : $colspan).'">';
//print '<span class="opacitymedium">'.$langs->trans("AttachTheNewLineToTheDocument").'</span><br>';
$modulepart = 'expensereport'; $maxheightmini = 48;
$relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/';
@@ -112,8 +119,8 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
if (!empty($filenamelinked) && $filenamelinked == $file['relativename']) {
$checked = ' checked';
}
print '<div class="margintoponly minwidth150 maxwidth150"><input type="checkbox"'.$checked.' id="radio'.$filei.'" name="attachfile[]" class="checkboxattachfile" value="'.$file['relativename'].'">';
print '<label class="wordbreak checkboxattachfilelabel" for="radio'.$filei.'"> '.$file['relativename'].'</label>';
print '<div class="margintoponly minwidth150 maxwidth150 divoverflow"><input type="checkbox"'.$checked.' id="radio'.$filei.'" name="attachfile[]" class="checkboxattachfile valignmiddle" value="'.$file['relativename'].'">';
print '<label class="wordbreak checkboxattachfilelabel paddingrightonly valignmiddle" for="radio'.$filei.'" title="'.dol_escape_htmltag($file['relativename']).'">'.$file['relativename'].'</label>';
print '</div>';
print '</div>';

View File

@@ -274,6 +274,7 @@ NewInter=Nouvelle intervention
OneLinePerTask=Une ligne par tâche
OneLinePerPeriod=Une ligne par période
OneLinePerTimeSpentLine=Une ligne pour chaque déclaration de temps passé
AddDetailDateAndDuration=Avec date et durée dans la description de la ligne
RefTaskParent=Réf. Tâche parent
ProfitIsCalculatedWith=Le bénéfice est calculé sur la base de
AddPersonToTask=Ajouter également aux tâches
@@ -281,3 +282,4 @@ UsageOrganizeEvent=Utilisation: Organisation d'événements
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classer le projet comme étant clos lorsque toutes ses tâches sont terminées (progression 100%%)
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Remarque : les projets existants avec toutes les tâches terminées à 100%% ne seront pas affectés : vous devrez les fermer manuellement. Cette option naffecte que les projets ouverts.
SelectLinesOfTimeSpentToInvoice=Sélectionnez les lignes de temps consacré non facturées, puis l'action groupée "Générer la facture" pour les facturer
ProjectTasksWithoutTimeSpent=Project tasks without time spent

View File

@@ -33,7 +33,7 @@ PropalStatusSigned=Signée (à facturer)
PropalStatusNotSigned=Non signée (fermée)
PropalStatusBilled=Facturée
PropalStatusDraftShort=Brouillon
PropalStatusValidatedShort=Validé (ouvert)
PropalStatusValidatedShort=Ouvert
PropalStatusClosedShort=Fermée
PropalStatusSignedShort=Signée
PropalStatusNotSignedShort=Non signée

View File

@@ -886,6 +886,13 @@ span.fa.fa-plus-circle.paddingleft {
font-size: 1.5em; vertical-align: text-bottom;
}
.divoverflow {
overflow: hidden;
white-space: nowrap;
vertical-align: middle;
text-overflow: ellipsis;
}
/* Themes for badges */