From 8800bf8b25ee7b36162b78838ce066ab020c3539 Mon Sep 17 00:00:00 2001 From: aspangaro <alexandre.spangaro@gmail.com> Date: Wed, 26 Oct 2016 07:46:48 +0200 Subject: [PATCH] Update works --- htdocs/accountancy/expensereport/card.php | 107 +++++++------- htdocs/accountancy/expensereport/lines.php | 157 ++++++++++----------- htdocs/langs/en_US/accountancy.lang | 4 +- htdocs/langs/en_US/trips.lang | 1 + 4 files changed, 131 insertions(+), 138 deletions(-) diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index b8e709e152d..4819bd656ae 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -1,11 +1,11 @@ <?php -/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> - * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> - * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> +/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> + * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> + * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,19 +22,20 @@ * */ /** - * \file htdocs/accountancy/supplier/card.php - * \ingroup Accountancy - * \brief Card supplier ventilation + * \file htdocs/accountancy/supplier/card.php + * \ingroup Accountancy + * \brief Card expense report ventilation */ require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; // Langs $langs->load("bills"); $langs->load("accountancy"); +$langs->load("trips"); $action = GETPOST('action', 'alpha'); $codeventil = GETPOST('codeventil'); @@ -44,16 +45,15 @@ $id = GETPOST('id'); if ($user->societe_id > 0) accessforbidden(); - /* * Actions */ if ($action == 'ventil' && $user->rights->accounting->bind->write) { if (! GETPOST('cancel', 'alpha')) { - if ($codeventil < 0) $codeventil = 0; - - $sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det"; + if ($codeventil < 0) $codeventil = 0; + + $sql = " UPDATE " . MAIN_DB_PREFIX . "expensereport_det"; $sql .= " SET fk_code_ventilation = " . $codeventil; $sql .= " WHERE rowid = " . $id; @@ -63,7 +63,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) { } else { - setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } } else { header("Location: ./lines.php"); @@ -76,7 +76,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) { /* * View */ -llxHeader("", "", "FicheVentilation"); +llxHeader("", "FicheVentilation"); if ($cancel == $langs->trans("Cancel")) { $action = ''; @@ -84,64 +84,69 @@ if ($cancel == $langs->trans("Cancel")) { // Create $form = new Form($db); -$facturefournisseur_static = new FactureFournisseur($db); +$expensereport_static = new ExpenseReport($db); $formventilation = new FormVentilation($db); if (! empty($id)) { - $sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.rowid, l.fk_code_ventilation, "; - $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label"; - $sql .= ", aa.account_number, aa.label"; - $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn "; - $sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id; - $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy - - dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG); + $sql = "SELECT er.ref, er.rowid as facid, erd.fk_c_type_fees, erd.comments, erd.rowid, erd.fk_code_ventilation,"; + $sql .= " f.id as fees_id, f.label as fees_label,"; + $sql .= " aa.account_number, aa.label"; + $sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON erd.fk_code_ventilation = aa.rowid"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport"; + $sql .= " WHERE er.fk_statut > 0 AND erd.rowid = " . $id; + $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy + + dol_syslog("/accounting/expensereport/card.php sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); - + if ($result) { $num_lines = $db->num_rows($result); $i = 0; - + if ($num_lines) { $objp = $db->fetch_object($result); - + print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n"; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="ventil">'; - - print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_setup'); - + + print load_fiche_titre($langs->trans('ExpenseReportsVentilation'), '', 'title_setup'); + dol_fiche_head(); - + print '<table class="border" width="100%">'; - - // ref invoice - print '<tr><td>' . $langs->trans("BillsSuppliers") . '</td>'; - $facturefournisseur_static->ref = $objp->facnumber; - $facturefournisseur_static->id = $objp->facid; - print '<td>' . $facturefournisseur_static->getNomUrl(1) . '</td>'; + + // Ref + print '<tr><td class="titlefield">' . $langs->trans("ExpenseReport") . '</td>'; + $expensereport_static->ref = $objp->ref; + $expensereport_static->id = $objp->erid; + print '<td>' . $expensereport_static->getNomUrl(1) . '</td>'; print '</tr>'; - - print '<tr><td width="20%">' . $langs->trans("Line") . '</td>'; - print '<td>' . stripslashes(nl2br($objp->description)) . '</td></tr>'; - print '<tr><td width="20%">' . $langs->trans("ProductLabel") . '</td>'; - print '<td>' . dol_trunc($objp->product_label, 24) . '</td>'; - print '<tr><td width="20%">' . $langs->trans("Account") . '</td><td>'; + + print '<tr><td>' . $langs->trans("Line") . '</td>'; + print '<td>' . stripslashes(nl2br($objp->rowid)) . '</td></tr>'; + + print '<tr><td>' . $langs->trans("Description") . '</td>'; + print '<td>' . stripslashes(nl2br($objp->comments)) . '</td></tr>'; + + print '<tr><td>' . $langs->trans("TypeFees") . '</td>'; + print '<td>' . dol_trunc($objp->fees_label, 24) . '</td>'; + + print '<tr><td>' . $langs->trans("Account") . '</td><td>'; print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1); print '</td></tr>'; print '</table>'; - + dol_fiche_end(); - + print '<div class="center">'; print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">'; print ' '; print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">'; print '</div>'; - + print '</form>'; } else { print "Error"; diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 94af5c82dba..c66d5856631 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -1,9 +1,9 @@ <?php -/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> - * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> +/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> + * Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com> + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com> + * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> + * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,16 +20,15 @@ */ /** - * \file htdocs/accountancy/supplier/lines.php + * \file htdocs/accountancy/expensereport/lines.php * \ingroup Advanced accountancy - * \brief Page of detail of the lines of ventilation of invoices suppliers + * \brief Page of detail of the lines of ventilation of expense reports */ require '../../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; -require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; @@ -39,12 +38,12 @@ $langs->load("bills"); $langs->load("other"); $langs->load("main"); $langs->load("accountancy"); +$langs->load("trips"); $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost -$search_ref = GETPOST('search_ref', 'alpha'); -$search_invoice = GETPOST('search_invoice', 'alpha'); +$search_expensereport = GETPOST('search_expensereport', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $search_desc = GETPOST('search_desc', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); @@ -61,7 +60,7 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortfield) - $sortfield = "f.datef, f.ref, l.rowid"; + $sortfield = "er.date_create, er.ref, erd.rowid"; if (! $sortorder) { if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) { $sortorder = "DESC"; @@ -84,8 +83,7 @@ $formventilation = new FormVentilation($db); // Purge search criteria if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { - $search_ref = ''; - $search_invoice = ''; + $search_expensereport = ''; $search_label = ''; $search_desc = ''; $search_amount = ''; @@ -98,11 +96,11 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { $db->begin(); - $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as l"; - $sql1 .= " SET l.fk_code_ventilation=" . GETPOST('account_parent'); - $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')'; + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd"; + $sql1 .= " SET erd.fk_code_ventilation=" . GETPOST('account_parent'); + $sql1 .= ' WHERE erd.rowid IN (' . implode(',', $changeaccount) . ')'; - dol_syslog('accountancy/supplier/lines.php::changeaccount sql= ' . $sql1); + dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= ' . $sql1); $resql1 = $db->query($sql1); if (! $resql1) { $error ++; @@ -124,7 +122,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { * View */ -llxHeader('', $langs->trans("SuppliersVentilation") . ' - ' . $langs->trans("Dispatched")); +llxHeader('', $langs->trans("ExpenseReportVentilation") . ' - ' . $langs->trans("Dispatched")); print '<script type="text/javascript"> $(function () { @@ -144,38 +142,35 @@ print '<script type="text/javascript"> </script>'; /* - * Supplier Invoice lines + * Expense reports lines */ -$sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht , l.qty, l.rowid, l.tva_tx, aa.label, aa.account_number, "; -$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type"; -$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; +$sql = "SELECT er.ref, er.rowid as erid, erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, aa.label, aa.account_number, "; +$sql .= " f.id as fees_id, f.label as fees_label"; +$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er"; $sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa"; -$sql .= " , " . MAIN_DB_PREFIX . "facture_fourn_det as l"; -$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; -$sql .= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 "; -$sql .= " AND aa.rowid = l.fk_code_ventilation"; -if (strlen(trim($search_invoice))) { - $sql .= " AND f.ref like '%" . $search_invoice . "%'"; -} -if (strlen(trim($search_ref))) { - $sql .= " AND p.ref like '%" . $search_ref . "%'"; +$sql .= " , " . MAIN_DB_PREFIX . "expensereport_det as erd"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees"; +$sql .= " WHERE er.rowid = erd.fk_expensereport and er.fk_statut >= 5 AND erd.fk_code_ventilation <> 0 "; +$sql .= " AND aa.rowid = erd.fk_code_ventilation"; +if (strlen(trim($search_expensereport))) { + $sql .= " AND er.ref like '%" . $search_expensereport . "%'"; } if (strlen(trim($search_label))) { - $sql .= " AND p.label like '%" . $search_label . "%'"; + $sql .= " AND f.label like '%" . $search_label . "%'"; } if (strlen(trim($search_desc))) { - $sql .= " AND l.description like '%" . $search_desc . "%'"; + $sql .= " AND er.comments like '%" . $search_desc . "%'"; } if (strlen(trim($search_amount))) { - $sql .= " AND l.total_ht like '%" . $search_amount . "%'"; + $sql .= " AND erd.total_ht like '%" . $search_amount . "%'"; } if (strlen(trim($search_account))) { $sql .= " AND aa.account_number like '%" . $search_account . "%'"; } if (strlen(trim($search_vat))) { - $sql .= " AND (l.tva_tx like '" . $search_vat . "%')"; + $sql .= " AND (erd.tva_tx like '" . $search_vat . "%')"; } -$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy +$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy $sql .= $db->order($sortfield, $sortorder); @@ -189,7 +184,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); -dol_syslog('accountancy/supplier/lines.php::list'); +dol_syslog('accountancy/expensereport/lines.php::list'); $result = $db->query($sql); if ($result) { @@ -199,10 +194,8 @@ if ($result) { $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; - if ($search_invoice) - $param .= "&search_invoice=" . $search_invoice; - if ($search_ref) - $param .= "&search_ref=" . $search_ref; + if ($search_expensereport) + $param .= "&search_expensereport=" . $search_expensereport; if ($search_label) $param .= "&search_label=" . $search_label; if ($search_desc) @@ -223,34 +216,32 @@ if ($result) { print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; - - print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); - - print $langs->trans("DescVentilDoneSupplier") . '<br>'; - + + print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); + + print $langs->trans("DescVentilDoneExpenseReport") . '<br>'; + print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>'; print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1); print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>'; - + $moreforfilter = ''; - + print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n"; - + print '<tr class="liste_titre">'; - print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("ExpenseReport"), $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre(''); print_liste_field_titre('', '', '', '', '', 'align="center"'); print "</tr>\n"; - - print '<tr class="liste_titre"><td><input type="text" class="flat" name="search_invoice" size="10" value="' . $search_invoice . '"></td>'; - print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>'; + + print '<tr class="liste_titre"><td><input type="text" class="flat" name="search_expensereport" size="10" value="' . $search_expensereport . '"></td>'; print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>'; print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>'; print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>'; @@ -259,45 +250,39 @@ if ($result) { print '<td class="liste_titre" align="right"></td>'; print '<td class="liste_titre" align="right"></td>'; print '<td class="liste_titre" align="right">'; - $searchpitco=$form->showFilterAndCheckAddButtons(1); - print $searchpitco; + $searchpicto=$form->showFilterAndCheckAddButtons(1); + print $searchpicto; print '</td>'; print "</tr>\n"; - - $facturefournisseur_static = new FactureFournisseur($db); - $product_static = new Product($db); - + + $expensereport_static = new ExpenseReport($db); + $var = True; while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; $codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label; - + print '<tr '. $bc[$var].'>'; - + // Ref Invoice - $facturefournisseur_static->ref = $objp->facnumber; - $facturefournisseur_static->id = $objp->facid; - print '<td>' . $facturefournisseur_static->getNomUrl(1) . '</td>'; - - // Ref Product - $product_static->ref = $objp->product_ref; - $product_static->id = $objp->product_id; - $product_static->type = $objp->type; - $product_static->label = $objp->product_label; - print '<td>'; - if ($product_static->id) - print $product_static->getNomUrl(1); - else - print ' '; - print '</td>'; - - print '<td>' . dol_trunc($objp->product_label, 24) . '</td>'; - print '<td>' . nl2br(dol_trunc($objp->description, 32)) . '</td>'; + $expensereport_static->ref = $objp->ref; + $expensereport_static->id = $objp->erid; + print '<td>' . $expensereport_static->getNomUrl(1) . '</td>'; + + print '<td>' . dol_trunc($objp->fees_label, 24) . '</td>'; + + $trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32; + print '<td>' . nl2br(dol_trunc($objp->comments, $trunclength)) . '</td>'; + print '<td align="right">' . price($objp->total_ht) . '</td>'; + print '<td align="center">' . price($objp->tva_tx) . '</td>'; + print '<td>' . $codeCompta . '</td>'; + print '<td align="right">' . $objp->rowid . '</td>'; + print '<td align="left"><a href="./card.php?id=' . $objp->rowid . '">'; print img_edit(); print '</a></td>'; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index b52f24217d4..ac9fa3c5062 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -66,8 +66,10 @@ CAHTF=Total purchase supplier before tax TotalExpenseReport=Total expense report InvoiceLines=Lines of invoices to bind InvoiceLinesDone=Bound lines of invoices +ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account + Ventilate=Bind LineId=Id line Processing=Processing @@ -160,7 +162,7 @@ DescVentilSupplier=Consult here the list of supplier invoice lines bound or not DescVentilDoneSupplier=Consult here the list of the lines of invoices supplier and their accounting account DescVentilExpenseReport=Consult here the list of expense report lines bound (or not) to a fee accounting account DescVentilExpenseReportMore=In most cases, if you use configured fees, the application will be able to make all the binding between your expense report lines and the accounting account of your chart of accounts, just in one click with the button <strong>"%s"</strong>. If account was not set on fees dictionary or if you still has some lines not bound to any account, you will have to make a manual binding from the menu "<strong>%s</strong>". - +DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index 7178ac6df47..6a12588139d 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -8,6 +8,7 @@ TripCard=Expense report card AddTrip=Create expense report ListOfTrips=List of expense reports ListOfFees=List of fees +TypeFees=Types of fees ShowTrip=Show expense report NewTrip=New expense report CompanyVisited=Company/foundation visited -- GitLab