Fix load of margin infos
This commit is contained in:
parent
a06a5d0f65
commit
5217ae28f8
@ -1199,6 +1199,18 @@ if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
|
||||
$with_margin_info = false;
|
||||
if (!empty($conf->margin->enabled) && (
|
||||
!empty($arrayfields['total_pa']['checked'])
|
||||
|| !empty($arrayfields['total_margin']['checked'])
|
||||
|| !empty($arrayfields['total_margin_rate']['checked'])
|
||||
|| !empty($arrayfields['total_mark_rate']['checked'])
|
||||
)
|
||||
) {
|
||||
$with_margin_info = true;
|
||||
}
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -1281,7 +1293,7 @@ if ($resql)
|
||||
$facturestatic->alreadypaid = $paiement;
|
||||
|
||||
$marginInfo = array();
|
||||
if (!empty($conf->margin->enabled)) {
|
||||
if ($with_margin_info === true) {
|
||||
$facturestatic->fetch_lines();
|
||||
$marginInfo = $formmargin->getMarginInfosArray($facturestatic);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user