Merge branch '8.0' of https://github.com/Dolibarr/dolibarr into 8.0
This commit is contained in:
commit
4863ddcb00
@ -3031,6 +3031,12 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
global $mysoc,$user;
|
global $mysoc,$user;
|
||||||
|
|
||||||
|
// Progress should never be changed for discounts
|
||||||
|
if(($line->info_bits & 2) == 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
|
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
|
||||||
|
|
||||||
// Cap percentages to 100
|
// Cap percentages to 100
|
||||||
@ -3047,7 +3053,6 @@ class Facture extends CommonInvoice
|
|||||||
$line->multicurrency_total_ttc = $tabprice[18];
|
$line->multicurrency_total_ttc = $tabprice[18];
|
||||||
$line->update($user);
|
$line->update($user);
|
||||||
$this->update_price(1);
|
$this->update_price(1);
|
||||||
$this->db->commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1211,24 +1211,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
// VAT
|
// 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)
|
foreach($this->tva as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user