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

This commit is contained in:
Laurent Destailleur 2022-11-17 10:50:38 +01:00
commit 2216d48230
3 changed files with 116 additions and 102 deletions

View File

@ -334,7 +334,7 @@ class FormTicket
print '</td></tr>';
// Severity => Priority
print '<tr><td><span class="none"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
$this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 1);
print '</td></tr>';

View File

@ -1338,49 +1338,54 @@ while ($i < min($num, $limit)) {
}
}
}
$parameters = array('staticdata' => $obj);
// Note that $action and $object may have been modified by hook
// do product_static fetch in hook if wanted or anything else
$reshook = $hookmanager->executeHooks('loadStaticObject', $parameters, $product_static, $action);
if (empty($reshook)) {
$product_static->id = $obj->rowid;
$product_static->ref = $obj->ref;
$product_static->ref_fourn = empty($obj->ref_supplier) ? '' : $obj->ref_supplier; // deprecated
$product_static->ref_supplier = empty($obj->ref_supplier) ? '' : $obj->ref_supplier;
$product_static->label = $obj->label;
$product_static->finished = $obj->finished;
$product_static->type = $obj->fk_product_type;
$product_static->status_buy = $obj->tobuy;
$product_static->status = $obj->tosell;
$product_static->status_batch = $obj->tobatch;
$product_static->entity = $obj->entity;
$product_static->pmp = $obj->pmp;
$product_static->accountancy_code_sell = $obj->accountancy_code_sell;
$product_static->accountancy_code_sell_export = $obj->accountancy_code_sell_export;
$product_static->accountancy_code_sell_intra = $obj->accountancy_code_sell_intra;
$product_static->accountancy_code_buy = $obj->accountancy_code_buy;
$product_static->accountancy_code_buy_intra = $obj->accountancy_code_buy_intra;
$product_static->accountancy_code_buy_export = $obj->accountancy_code_buy_export;
$product_static->length = $obj->length;
$product_static->length_units = $obj->length_units;
$product_static->width = $obj->width;
$product_static->width_units = $obj->width_units;
$product_static->height = $obj->height;
$product_static->height_units = $obj->height_units;
$product_static->weight = $obj->weight;
$product_static->weight_units = $obj->weight_units;
$product_static->volume = $obj->volume;
$product_static->volume_units = $obj->volume_units;
$product_static->surface = $obj->surface;
$product_static->surface_units = $obj->surface_units;
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$product_static->fk_unit = $obj->fk_unit;
}
$product_static->id = $obj->rowid;
$product_static->ref = $obj->ref;
$product_static->ref_fourn = empty($obj->ref_supplier) ? '' : $obj->ref_supplier; // deprecated
$product_static->ref_supplier = empty($obj->ref_supplier) ? '' : $obj->ref_supplier;
$product_static->label = $obj->label;
$product_static->finished = $obj->finished;
$product_static->type = $obj->fk_product_type;
$product_static->status_buy = $obj->tobuy;
$product_static->status = $obj->tosell;
$product_static->status_batch = $obj->tobatch;
$product_static->entity = $obj->entity;
$product_static->pmp = $obj->pmp;
$product_static->accountancy_code_sell = $obj->accountancy_code_sell;
$product_static->accountancy_code_sell_export = $obj->accountancy_code_sell_export;
$product_static->accountancy_code_sell_intra = $obj->accountancy_code_sell_intra;
$product_static->accountancy_code_buy = $obj->accountancy_code_buy;
$product_static->accountancy_code_buy_intra = $obj->accountancy_code_buy_intra;
$product_static->accountancy_code_buy_export = $obj->accountancy_code_buy_export;
$product_static->length = $obj->length;
$product_static->length_units = $obj->length_units;
$product_static->width = $obj->width;
$product_static->width_units = $obj->width_units;
$product_static->height = $obj->height;
$product_static->height_units = $obj->height_units;
$product_static->weight = $obj->weight;
$product_static->weight_units = $obj->weight_units;
$product_static->volume = $obj->volume;
$product_static->volume_units = $obj->volume_units;
$product_static->surface = $obj->surface;
$product_static->surface_units = $obj->surface_units;
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$product_static->fk_unit = $obj->fk_unit;
}
// STOCK_DISABLE_OPTIM_LOAD can be set to force load_stock whatever is permissions on stock.
if ((isModEnabled('stock') && $user->rights->stock->lire && $search_type != 1) || !empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) { // To optimize call of load_stock
if ($obj->fk_product_type != 1 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Not a service
$option = 'nobatch';
if (empty($arrayfields['stock_virtual']['checked'])) {
$option .= ',novirtual';
// STOCK_DISABLE_OPTIM_LOAD can be set to force load_stock whatever is permissions on stock.
if ((isModEnabled('stock') && $user->rights->stock->lire && $search_type != 1) || !empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) { // To optimize call of load_stock
if ($product_static->type != 1 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Not a service
$option = 'nobatch';
if (empty($arrayfields['stock_virtual']['checked'])) {
$option .= ',novirtual';
}
$product_static->load_stock($option); // Load stock_reel + stock_warehouse. This can also call load_virtual_stock()
}
$product_static->load_stock($option); // Load stock_reel + stock_warehouse. This can also call load_virtual_stock()
}
}
@ -1454,7 +1459,7 @@ while ($i < min($num, $limit)) {
// Label
if (!empty($arrayfields['p.label']['checked'])) {
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->label).'">'.$obj->label.'</td>';
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($product_static->label).'">'.$product_static->label.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
@ -1464,7 +1469,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['p.fk_product_type']['checked'])) {
print '<td class="center">';
$s = '';
if ($obj->fk_product_type == 0) {
if ($product_static->type == 0) {
$s .= img_picto($langs->trans("Product"), 'product', 'class="paddingleftonly paddingrightonly colorgrey"');
} else {
$s .= img_picto($langs->trans("Service"), 'service', 'class="paddingleftonly paddingrightonly colorgrey"');
@ -1478,7 +1483,7 @@ while ($i < min($num, $limit)) {
// Barcode
if (!empty($arrayfields['p.barcode']['checked'])) {
print '<td>'.$obj->barcode.'</td>';
print '<td>'.$product_static->barcode.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
@ -1522,7 +1527,7 @@ while ($i < min($num, $limit)) {
// Weight
if (!empty($arrayfields['p.weight']['checked'])) {
print '<td class="center">';
print $obj->weight;
print $product_static->weight;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1542,7 +1547,7 @@ while ($i < min($num, $limit)) {
// Length
if (!empty($arrayfields['p.length']['checked'])) {
print '<td class="center">';
print $obj->length;
print $product_static->length;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1562,7 +1567,7 @@ while ($i < min($num, $limit)) {
// Width
if (!empty($arrayfields['p.width']['checked'])) {
print '<td align="center">';
print $obj->width;
print $product_static->width;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1582,7 +1587,7 @@ while ($i < min($num, $limit)) {
// Height
if (!empty($arrayfields['p.height']['checked'])) {
print '<td align="center">';
print $obj->height;
print $product_static->height;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1602,7 +1607,7 @@ while ($i < min($num, $limit)) {
// Surface
if (!empty($arrayfields['p.surface']['checked'])) {
print '<td class="center">';
print $obj->surface;
print $product_static->surface;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1622,7 +1627,7 @@ while ($i < min($num, $limit)) {
// Volume
if (!empty($arrayfields['p.volume']['checked'])) {
print '<td class="center">';
print $obj->volume;
print $product_static->volume;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1654,7 +1659,7 @@ while ($i < min($num, $limit)) {
// Sell price
if (!empty($arrayfields['p.sellprice']['checked'])) {
print '<td class="right nowraponall">';
if ($obj->tosell && $usercancreadprice) {
if ($product_static->status && $usercancreadprice) {
if ($obj->price_base_type == 'TTC') {
print '<span class="amount">'.price($obj->price_ttc).' '.$langs->trans("TTC").'</span>';
} else {
@ -1677,7 +1682,7 @@ while ($i < min($num, $limit)) {
$productpricescache[$obj->rowid] = array();
}
if ($obj->tosell && $usercancreadprice) {
if ($product_static->status && $usercancreadprice) {
// Make 1 request for all price levels (without filter on price_level) and saved result into an cache array
// then reuse the cache array if we need prices for other price levels
$sqlp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price, p.price_base_type";
@ -1727,7 +1732,7 @@ while ($i < min($num, $limit)) {
// Better buy price
if (!empty($arrayfields['p.minbuyprice']['checked'])) {
print '<td class="right nowraponall">';
if ($obj->tobuy && $obj->bestpurchaseprice != '' && $usercancreadprice) {
if ($product_static->status_buy && $obj->bestpurchaseprice != '' && $usercancreadprice) {
if ($product_fourn->find_min_price_product_fournisseur($obj->rowid) > 0) {
if ($product_fourn->product_fourn_price_id > 0) {
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) {
@ -1748,7 +1753,7 @@ while ($i < min($num, $limit)) {
// Number of buy prices
if (!empty($arrayfields['p.numbuyprice']['checked'])) {
print '<td class="right">';
if ($obj->tobuy && $usercancreadprice) {
if ($product_static->status_buy && $usercancreadprice) {
if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) {
$htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1, $productFournList);
print $form->textwithpicto(count($productFournList), $htmltext);
@ -1788,7 +1793,7 @@ while ($i < min($num, $limit)) {
// Limit alert
if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) {
print '<td class="right">';
if ($obj->fk_product_type != 1) {
if ($product_static->type != 1) {
print $obj->seuil_stock_alerte;
}
print '</td>';
@ -1799,7 +1804,7 @@ while ($i < min($num, $limit)) {
// Desired stock
if (!empty($arrayfields['p.desiredstock']['checked'])) {
print '<td class="right">';
if ($obj->fk_product_type != 1) {
if ($product_static->type != 1) {
print $obj->desiredstock;
}
print '</td>';
@ -1810,7 +1815,7 @@ while ($i < min($num, $limit)) {
// Stock real
if (!empty($arrayfields['p.stock']['checked'])) {
print '<td class="right">';
if ($obj->fk_product_type != 1) {
if ($product_static->type != 1) {
if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) {
print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
}
@ -1826,7 +1831,7 @@ while ($i < min($num, $limit)) {
// Stock virtual
if (!empty($arrayfields['stock_virtual']['checked'])) {
print '<td class="right">';
if ($obj->fk_product_type != 1) {
if ($product_static->type != 1) {
if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) {
print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
}
@ -1868,38 +1873,38 @@ while ($i < min($num, $limit)) {
}
// Accountancy code sell
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
print '<td>'.$obj->accountancy_code_sell.'</td>';
print '<td>'.$product_static->accountancy_code_sell.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
print '<td>'.$obj->accountancy_code_sell_intra.'</td>';
print '<td>'.$product_static->accountancy_code_sell_intra.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
print '<td>'.$obj->accountancy_code_sell_export.'</td>';
print '<td>'.$product_static->accountancy_code_sell_export.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Accountancy code buy
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
print '<td>'.$obj->accountancy_code_buy.'</td>';
print '<td>'.$product_static->accountancy_code_buy.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
print '<td>'.$obj->accountancy_code_buy_intra.'</td>';
print '<td>'.$product_static->accountancy_code_buy_intra.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
print '<td>'.$obj->accountancy_code_buy_export.'</td>';
print '<td>'.$product_static->accountancy_code_buy_export.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
@ -1935,7 +1940,7 @@ while ($i < min($num, $limit)) {
if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
} else {
print $product_static->LibStatut($obj->tosell, 5, 0);
print $product_static->LibStatut($product_static->status, 5, 0);
}
print '</td>';
if (!$i) {
@ -1948,7 +1953,7 @@ while ($i < min($num, $limit)) {
if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
} else {
print $product_static->LibStatut($obj->tobuy, 5, 1);
print $product_static->LibStatut($product_static->status_buy, 5, 1);
}
print '</td>';
if (!$i) {

View File

@ -767,7 +767,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && (
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) {
if ($obj->client > 0) {
if ($companystatic->client > 0) {
header("Location: ".DOL_URL_ROOT.'/comm/card.php?socid='.$id);
exit;
}
@ -1447,27 +1447,36 @@ $totalarray = array();
$totalarray['nbfield'] = 0;
while ($i < min($num, $limit)) {
$obj = $db->fetch_object($resql);
$parameters = array('staticdata' => $obj);
// Note that $action and $object may have been modified by hook
// do companystatic fetch in hook if wanted or anything else
$reshook = $hookmanager->executeHooks('loadStaticObject', $parameters, $companystatic, $action);
if (empty($reshook)) {
$companystatic->id = $obj->rowid;
$companystatic->name = $obj->name;
$companystatic->name_alias = $obj->name_alias;
$companystatic->logo = $obj->logo;
$companystatic->barcode = $obj->barcode;
$companystatic->canvas = $obj->canvas;
$companystatic->client = $obj->client;
$companystatic->status = $obj->status;
$companystatic->email = $obj->email;
$companystatic->address = $obj->address;
$companystatic->zip = $obj->zip;
$companystatic->town = $obj->town;
$companystatic->fournisseur = $obj->fournisseur;
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->tva_intra = $obj->tva_intra;
$companystatic->country_code = $obj->country_code;
$companystatic->id = $obj->rowid;
$companystatic->name = $obj->name;
$companystatic->name_alias = $obj->name_alias;
$companystatic->logo = $obj->logo;
$companystatic->canvas = $obj->canvas;
$companystatic->client = $obj->client;
$companystatic->status = $obj->status;
$companystatic->email = $obj->email;
$companystatic->fournisseur = $obj->fournisseur;
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->tva_intra = $obj->tva_intra;
$companystatic->country_code = $obj->country_code;
$companystatic->code_compta_client = $obj->code_compta;
$companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
$companystatic->code_compta_client = $obj->code_compta;
$companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
$companystatic->fk_prospectlevel = $obj->fk_prospectlevel;
$companystatic->fk_parent = $obj->fk_parent;
$companystatic->entity = $obj->entity;
$companystatic->fk_prospectlevel = $obj->fk_prospectlevel;
$companystatic->fk_parent = $obj->fk_parent;
$companystatic->entity = $obj->entity;
}
print '<tr class="oddeven"';
if ($contextpage == 'poslist') {
@ -1501,7 +1510,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['s.nom']['checked'])) {
print '<td'.(empty($conf->global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">';
if ($contextpage == 'poslist') {
print dol_escape_htmltag($obj->name);
print dol_escape_htmltag($companystatic->name);
} else {
print $companystatic->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
}
@ -1520,56 +1529,56 @@ while ($i < min($num, $limit)) {
}
// Barcode
if (!empty($arrayfields['s.barcode']['checked'])) {
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->barcode).'">'.dol_escape_htmltag($obj->barcode).'</td>';
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companystatic->barcode).'">'.dol_escape_htmltag($companystatic->barcode).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Customer code
if (!empty($arrayfields['s.code_client']['checked'])) {
print '<td class="nowraponall">'.dol_escape_htmltag($obj->code_client).'</td>';
print '<td class="nowraponall">'.dol_escape_htmltag($companystatic->code_client).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Supplier code
if (!empty($arrayfields['s.code_fournisseur']['checked'])) {
print '<td class="nowraponall">'.dol_escape_htmltag($obj->code_fournisseur).'</td>';
print '<td class="nowraponall">'.dol_escape_htmltag($companystatic->code_fournisseur).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Account customer code
if (!empty($arrayfields['s.code_compta']['checked'])) {
print '<td>'.dol_escape_htmltag($obj->code_compta).'</td>';
print '<td>'.dol_escape_htmltag($companystatic->code_compta_client).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Account supplier code
if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) {
print '<td>'.dol_escape_htmltag($obj->code_compta_fournisseur).'</td>';
print '<td>'.dol_escape_htmltag($companystatic->code_compta_fournisseur).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Address
if (!empty($arrayfields['s.address']['checked'])) {
print '<td class="tdoverflowmax250" title="'.dol_escape_htmltag($obj->address).'">'.dol_escape_htmltag($obj->address).'</td>';
print '<td class="tdoverflowmax250" title="'.dol_escape_htmltag($companystatic->address).'">'.dol_escape_htmltag($companystatic->address).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Zip
if (!empty($arrayfields['s.zip']['checked'])) {
print "<td>".dol_escape_htmltag($obj->zip)."</td>\n";
print "<td>".dol_escape_htmltag($companystatic->zip)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Town
if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->town).'">'.dol_escape_htmltag($obj->town)."</td>\n";
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companystatic->town).'">'.dol_escape_htmltag($companystatic->town)."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
@ -1591,7 +1600,7 @@ while ($i < min($num, $limit)) {
// Country
if (!empty($arrayfields['country.code_iso']['checked'])) {
print '<td class="center tdoverflowmax100">';
$labelcountry = ($obj->country_code && ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)) ? $langs->trans("Country".$obj->country_code) : $obj->country_label;
$labelcountry = ($companystatic->country_code && ($langs->trans("Country".$companystatic->country_code) != "Country".$companystatic->country_code)) ? $langs->trans("Country".$companystatic->country_code) : $obj->country_label;
print $labelcountry;
print '</td>';
if (!$i) {
@ -1638,13 +1647,13 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['s.phone']['checked'])) {
print '<td class="nowraponall">'.dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n";
print '<td class="nowraponall">'.dol_print_phone($obj->phone, $companystatic->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['s.fax']['checked'])) {
print '<td class="nowraponall">'.dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."</td>\n";
print '<td class="nowraponall">'.dol_print_phone($obj->fax, $companystatic->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
@ -1693,11 +1702,11 @@ while ($i < min($num, $limit)) {
}
// VAT
if (!empty($arrayfields['s.tva_intra']['checked'])) {
print '<td class="tdoverflowmax125" title="'.dol_escape_htmltag($obj->tva_intra).'">';
if ($obj->tva_intra && !isValidVATID($companystatic)) {
print '<td class="tdoverflowmax125" title="'.dol_escape_htmltag($companystatic->tva_intra).'">';
if ($companystatic->tva_intra && !isValidVATID($companystatic)) {
print img_warning("BadVATNumber", '', 'pictofixedwidth');
}
print $obj->tva_intra;
print $companystatic->tva_intra;
print "</td>\n";
if (!$i) {
$totalarray['nbfield']++;