Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/accountancy/customer/lines.php
	htdocs/accountancy/expensereport/lines.php
	htdocs/accountancy/supplier/lines.php
This commit is contained in:
Laurent Destailleur 2020-08-21 13:19:28 +02:00
commit b80ba1179f
6 changed files with 47 additions and 48 deletions

View File

@ -488,7 +488,7 @@ class AccountingAccount extends CommonObject
{ {
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
$label = $langs->trans("ShowAccoutingAccount"); $label = $langs->trans("ShowAccountingAccount");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
} }
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@ -65,9 +65,9 @@ $sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page < 0) $page = 0; if (empty($page) || $page < 0) $page = 0;
$offset = $limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
$offset = $limit * $page;
if (!$sortfield) if (!$sortfield)
$sortfield = "f.datef, f.ref, fd.rowid"; $sortfield = "f.datef, f.ref, fd.rowid";
if (!$sortorder) { if (!$sortorder) {
@ -92,7 +92,7 @@ $formaccounting = new FormAccounting($db);
// Purge search criteria // Purge search criteria
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
{ {
$search_societe=''; $search_societe = '';
$search_lineid = ''; $search_lineid = '';
$search_ref = ''; $search_ref = '';
$search_invoice = ''; $search_invoice = '';
@ -176,7 +176,8 @@ print '<script type="text/javascript">
$sql = "SELECT f.rowid as facid, f.ref as ref, f.type, f.datef, f.ref_client,"; $sql = "SELECT f.rowid as facid, f.ref as ref, f.type, f.datef, f.ref_client,";
$sql .= " fd.rowid, fd.description, fd.product_type as line_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,"; $sql .= " fd.rowid, fd.description, fd.product_type as line_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,"; $sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,"; $sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell,";
$sql .= " aa.rowid as fk_compte, aa.account_number, aa.label, aa.labelshort,";
$sql .= " fd.situation_percent,"; $sql .= " fd.situation_percent,";
$sql .= " co.code as country_code, co.label as country,"; $sql .= " co.code as country_code, co.label as country,";
$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur";
@ -344,20 +345,18 @@ if ($result) {
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
$clickpicto = $form->showCheckAddButtons(); $checkpicto = $form->showCheckAddButtons();
print_liste_field_titre($clickpicto, '', '', '', '', '', '', '', 'center '); print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
print "</tr>\n"; print "</tr>\n";
$thirdpartystatic=new Societe($db); $thirdpartystatic = new Societe($db);
$facturestatic = new Facture($db); $facturestatic = new Facture($db);
$productstatic = new Product($db); $productstatic = new Product($db);
$accountingaccountstatic = new AccountingAccount($db); $accountingaccountstatic = new AccountingAccount($db);
while ($objp = $db->fetch_object($result)) $i = 0;
{ while ($i < min($num_lines, $limit)) {
$accountingaccountstatic->account_number = $objp->account_number; $objp = $db->fetch_object($result);
$accountingaccountstatic->label = $objp->label_account;
$accountingaccountstatic->labelshort = $objp->labelshort_account;
$facturestatic->ref = $objp->ref; $facturestatic->ref = $objp->ref;
$facturestatic->id = $objp->facid; $facturestatic->id = $objp->facid;
@ -379,6 +378,11 @@ if ($result) {
$productstatic->label = $objp->product_label; $productstatic->label = $objp->product_label;
$productstatic->type = $objp->line_type; $productstatic->type = $objp->line_type;
$accountingaccountstatic->rowid = $objp->fk_compte;
$accountingaccountstatic->label = $objp->label;
$accountingaccountstatic->labelshort = $objp->labelshort;
$accountingaccountstatic->account_number = $objp->account_number;
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Line id // Line id
@ -391,7 +395,7 @@ if ($result) {
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>';
// Ref Product // Ref Product
print '<td>'; print '<td class="tdoverflowmax100">';
if ($productstatic->id > 0) print $productstatic->getNomUrl(1); if ($productstatic->id > 0) print $productstatic->getNomUrl(1);
if ($productstatic->id > 0 && $objp->product_label) print '<br>'; if ($productstatic->id > 0 && $objp->product_label) print '<br>';
if ($objp->product_label) print '<span class="opacitymedium">'.$objp->product_label.'</span>'; if ($objp->product_label) print '<span class="opacitymedium">'.$objp->product_label.'</span>';
@ -424,17 +428,14 @@ if ($result) {
print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1); print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1);
print ' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">'; print ' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit(); print img_edit();
print '</a>'; print '</a></td>';
print '</td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>'; print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>';
print "</tr>"; print '</tr>';
$i++; $i++;
} }
print '</table>';
print "</table>"; print "</div>";
print "</div>";
if ($nbtotalofrecords > $limit) { if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);

View File

@ -26,14 +26,13 @@
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch", "hrm")); $langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch", "hrm"));
@ -168,7 +167,7 @@ $sql = "SELECT er.ref, er.rowid as erid,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.vat_src_code, erd.date,"; $sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.vat_src_code, erd.date,";
$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,"; $sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,";
$sql .= " u.rowid, u.login, u.lastname, u.firstname, u.email, u.gender, u.employee, u.photo, u.statut,"; $sql .= " u.rowid, u.login, u.lastname, u.firstname, u.email, u.gender, u.employee, u.photo, u.statut,";
$sql .= " aa.label as label_account, aa.labelshort as labelshort_account, aa.account_number"; $sql .= " aa.label, aa.labelshort, aa.account_number";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as er"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as er";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport_det as erd ON er.rowid = erd.fk_expensereport"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."expensereport_det as erd ON er.rowid = erd.fk_expensereport";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
@ -278,7 +277,7 @@ if ($result) {
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>'; print '<td class="liste_titre right"><input type="text" class="flat maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" value="'.dol_escape_htmltag($search_vat).'"></td>'; print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" value="'.dol_escape_htmltag($search_vat).'"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>'; print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
print '<td class="liste_titre right">'; print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons(); $searchpicto = $form->showFilterButtons();
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -305,13 +304,10 @@ if ($result) {
$accountingaccountstatic = new AccountingAccount($db); $accountingaccountstatic = new AccountingAccount($db);
$userstatic = new User($db); $userstatic = new User($db);
$i = 0;
while ($i < min($num_lines, $limit)) { while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$accountingaccountstatic->account_number = $objp->account_number;
$accountingaccountstatic->label = $objp->label_account;
$accountingaccountstatic->labelshort = $objp->labelshort_account;
$expensereportstatic->ref = $objp->ref; $expensereportstatic->ref = $objp->ref;
$expensereportstatic->id = $objp->erid; $expensereportstatic->id = $objp->erid;
@ -326,6 +322,11 @@ if ($result) {
$userstatic->employee = $objp->employee; $userstatic->employee = $objp->employee;
$userstatic->photo = $objp->photo; $userstatic->photo = $objp->photo;
$accountingaccountstatic->rowid = $objp->fk_compte;
$accountingaccountstatic->label = $objp->label;
$accountingaccountstatic->labelshort = $objp->labelshort;
$accountingaccountstatic->account_number = $objp->account_number;
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Login // Login
@ -368,7 +369,6 @@ if ($result) {
print ' <a class="editfielda reposition marginleftonly marginrightonly" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">'; print ' <a class="editfielda reposition marginleftonly marginrightonly" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit(); print img_edit();
print '</a></td>'; print '</a></td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>'; print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>';
print "</tr>"; print "</tr>";

View File

@ -33,7 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@ -178,7 +177,7 @@ print '<script type="text/javascript">
*/ */
$sql = "SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,"; $sql = "SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
$sql .= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,"; $sql .= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
$sql .= " aa.label, aa.account_number, "; $sql .= " aa.label, aa.labelshort, aa.account_number,";
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,"; $sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,";
$sql .= " co.code as country_code, co.label as country,"; $sql .= " co.code as country_code, co.label as country,";
$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur";
@ -262,9 +261,8 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql .= $db->plimit($limit + 1, $offset); $sql .= $db->plimit($limit + 1, $offset);
dol_syslog('accountancy/supplier/lines.php'); dol_syslog("accountancy/supplier/lines.php", LOG_DEBUG);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) { if ($result) {
$num_lines = $db->num_rows($result); $num_lines = $db->num_rows($result);
$i = 0; $i = 0;
@ -272,7 +270,7 @@ if ($result) {
$param = ''; $param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($search_societe) $param .= "&search_societe=" . urlencode($search_societe); if ($search_societe) $param .= "&search_societe=".urlencode($search_societe);
if ($search_invoice) $param .= "&search_invoice=".urlencode($search_invoice); if ($search_invoice) $param .= "&search_invoice=".urlencode($search_invoice);
if ($search_ref) $param .= "&search_ref=".urlencode($search_ref); if ($search_ref) $param .= "&search_ref=".urlencode($search_ref);
if ($search_label) $param .= "&search_label=".urlencode($search_label); if ($search_label) $param .= "&search_label=".urlencode($search_label);
@ -295,12 +293,11 @@ if ($result) {
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>'; print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>';
print '<br><div class="inline-block divButAction">'.$langs->trans("ChangeAccount").'<br>'; print '<br><div class="inline-block divButAction">'.$langs->trans("ChangeAccount").'<br>';
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle'); print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("ChangeBinding").'" /></div>'; print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("ChangeBinding").'"/></div>';
$moreforfilter = ''; $moreforfilter = '';
@ -329,10 +326,9 @@ if ($result) {
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="'.dol_escape_htmltag($search_tvaintra).'"></td>'; print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="'.dol_escape_htmltag($search_tvaintra).'"></td>';
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>'; print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons(); $searchpicto = $form->showFilterButtons();
print $searchpicto; print $searchpicto;
print '</td>'; print "</td></tr>\n";
print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
@ -357,14 +353,11 @@ if ($result) {
$productstatic = new ProductFournisseur($db); $productstatic = new ProductFournisseur($db);
$accountingaccountstatic = new AccountingAccount($db); $accountingaccountstatic = new AccountingAccount($db);
$i = 0;
while ($i < min($num_lines, $limit)) while ($i < min($num_lines, $limit))
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$accountingaccountstatic->account_number = $objp->account_number;
$accountingaccountstatic->label = $objp->label_account;
$accountingaccountstatic->labelshort = $objp->labelshort_account;
$facturefournisseur_static->ref = $objp->ref; $facturefournisseur_static->ref = $objp->ref;
$facturefournisseur_static->id = $objp->facid; $facturefournisseur_static->id = $objp->facid;
@ -384,6 +377,11 @@ if ($result) {
$productstatic->label = $objp->product_label; $productstatic->label = $objp->product_label;
$productstatic->type = $objp->line_type; $productstatic->type = $objp->line_type;
$accountingaccountstatic->rowid = $objp->fk_compte;
$accountingaccountstatic->label = $objp->label;
$accountingaccountstatic->labelshort = $objp->labelshort;
$accountingaccountstatic->account_number = $objp->account_number;
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Line id // Line id
@ -399,15 +397,14 @@ if ($result) {
// Date invoice // Date invoice
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day').'</td>';
// Ref product // Ref Product
print '<td class="tdoverflowmax100">'; print '<td class="tdoverflowmax100">';
if ($productstatic->id > 0) print $productstatic->getNomUrl(1); if ($productstatic->id > 0) print $productstatic->getNomUrl(1);
if ($productstatic->id > 0 && $objp->product_label) print '<br>'; if ($productstatic->id > 0 && $objp->product_label) print '<br>';
if ($objp->product_label) print '<span class="opacitymedium">'.$objp->product_label.'</span>'; if ($objp->product_label) print '<span class="opacitymedium">'.$objp->product_label.'</span>';
print '</td>'; print '</td>';
// Description print '<td class="tdoverflowonsmartphone">';
print '<td>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description);

View File

@ -573,7 +573,7 @@ if (empty($reshook))
} }
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$desc = GETPOST('np_desc','alpha'); $desc = GETPOST('np_desc', 'alpha');
$date_inter = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int')); $date_inter = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int'));
$duration = convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')); $duration = convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int'));

View File

@ -55,6 +55,7 @@ Language_fr_CM=French (Cameroun)
Language_fr_FR=French Language_fr_FR=French
Language_fr_GA=French (Gabon) Language_fr_GA=French (Gabon)
Language_fr_NC=French (New Caledonia) Language_fr_NC=French (New Caledonia)
Language_fr_SN=French (Senegal)
Language_fy_NL=Frisian Language_fy_NL=Frisian
Language_gl_ES=Galician Language_gl_ES=Galician
Language_he_IL=Hebrew Language_he_IL=Hebrew