forked from Wavyzz/dolibarr
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (c) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (c) 2015-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -100,7 +100,7 @@ class FormMargin
|
|||||||
|
|
||||||
$pv = $line->total_ht;
|
$pv = $line->total_ht;
|
||||||
$pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
|
$pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
|
||||||
if ($object->element == 'facture' && $object->type == Facture::TYPE_SITUATION) {
|
if ($object->element == 'facture' && $object->type == $object::TYPE_SITUATION) {
|
||||||
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
|
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
|
||||||
} else {
|
} else {
|
||||||
$pa = $line->qty * $pa_ht;
|
$pa = $line->qty * $pa_ht;
|
||||||
|
|||||||
Reference in New Issue
Block a user