Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/html.formfile.class.php
This commit is contained in:
commit
ccfb4f575b
@ -3133,7 +3133,13 @@ class Facture extends CommonInvoice
|
||||
// phpcs:enable
|
||||
global $mysoc,$user;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php';
|
||||
// Progress should never be changed for discount lines
|
||||
if (($line->info_bits & 2) == 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
|
||||
|
||||
// Cap percentages to 100
|
||||
if ($percent > 100) $percent = 100;
|
||||
@ -3149,7 +3155,6 @@ class Facture extends CommonInvoice
|
||||
$line->multicurrency_total_ttc = $tabprice[18];
|
||||
$line->update($user);
|
||||
$this->update_price(1);
|
||||
$this->db->commit();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -801,9 +801,10 @@ class FormFile
|
||||
// Show file name with link to download
|
||||
$out.= '<td class="minwidth200">';
|
||||
$out.= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param?'&'.$param:'').'"';
|
||||
|
||||
$mime=dol_mimetype($relativepath, '', 0);
|
||||
if (preg_match('/text/', $mime)) $out.= ' target="_blank"';
|
||||
$out.= ' target="_blank">';
|
||||
$out.= '>';
|
||||
$out.= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
|
||||
$out.= dol_trunc($file["name"], 150);
|
||||
$out.= '</a>'."\n";
|
||||
|
||||
@ -1238,23 +1238,6 @@ class pdf_crabe extends ModelePDFFactures
|
||||
//}
|
||||
|
||||
// VAT
|
||||
// Situations totals migth be wrong on huge amounts
|
||||
if ($object->situation_cycle_ref && $object->situation_counter > 1) {
|
||||
|
||||
$sum_pdf_tva = 0;
|
||||
foreach($this->tva as $tvakey => $tvaval){
|
||||
$sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object
|
||||
}
|
||||
|
||||
if($sum_pdf_tva!=$object->total_tva) { // apply coef to recover the VAT object amount (the good one)
|
||||
$coef_fix_tva = $object->total_tva / $sum_pdf_tva;
|
||||
|
||||
foreach($this->tva as $tvakey => $tvaval) {
|
||||
$this->tva[$tvakey]=$tvaval * $coef_fix_tva;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->tva as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
||||
@ -31,6 +31,7 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array
|
||||
if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric
|
||||
if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int
|
||||
if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text
|
||||
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
|
||||
|
||||
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user