Merge pull request #11237 from ATM-Marc/FIX_8.0_situation_discount
FIX: situation invoices: block progress percentage change for discount lines
This commit is contained in:
commit
5d6e4a444a
@ -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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user