Fix updateline method for INVOICE_USE_SITUATION = 2
If there is no progress on a line, percent must not be 100%
This commit is contained in:
parent
2843597329
commit
146bd33e90
1 changed files with 6 additions and 1 deletions
|
|
@ -4140,7 +4140,12 @@ class Facture extends CommonInvoice
|
|||
$special_code = 0;
|
||||
}
|
||||
if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '' || $situation_percent == null) {
|
||||
$situation_percent = 100;
|
||||
// INVOICE_USE_SITUATION = 2 - If there is no progress on a line, percent must not be 100% (No cumulative)
|
||||
if ($this->type == Facture::TYPE_SITUATION && getDolGlobalInt('INVOICE_USE_SITUATION') == 2 && (int) $situation_percent < 100) {
|
||||
$situation_percent = 0;
|
||||
} else {
|
||||
$situation_percent = 100;
|
||||
}
|
||||
}
|
||||
if (empty($ref_ext)) {
|
||||
$ref_ext = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue