Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts: htdocs/compta/facture/class/facture.class.php htdocs/core/modules/facture/doc/pdf_crabe.modules.php
This commit is contained in:
commit
89455672a2
@ -3136,7 +3136,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;
|
||||
@ -3152,7 +3158,6 @@ class Facture extends CommonInvoice
|
||||
$line->multicurrency_total_ttc = $tabprice[18];
|
||||
$line->update($user);
|
||||
$this->update_price(1);
|
||||
$this->db->commit();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4409,13 +4414,13 @@ class FactureLigne extends CommonInvoiceLine
|
||||
// From llx_product
|
||||
/**
|
||||
* @deprecated
|
||||
* @see product_ref
|
||||
* @see $product_ref
|
||||
*/
|
||||
public $ref; // Product ref (deprecated)
|
||||
public $product_ref; // Product ref
|
||||
/**
|
||||
* @deprecated
|
||||
* @see product_label
|
||||
* @see $product_label
|
||||
*/
|
||||
public $libelle; // Product label (deprecated)
|
||||
public $product_label; // Product label
|
||||
|
||||
@ -767,7 +767,7 @@ class FormFile
|
||||
$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";
|
||||
|
||||
@ -1231,23 +1231,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
|
||||
|
||||
@ -28,6 +28,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('ef.'.$tmpkey, $crit, $mode_search);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user