FIX init total amounts in margin module (#29854)

This commit is contained in:
lvessiller-opendsi 2024-06-06 15:33:35 +02:00 committed by GitHub
parent 5a2bcc47b6
commit 7249e3a4d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 3 deletions

View file

@ -226,7 +226,9 @@ if (!empty($enddateyear)) {
$param .= "&enddateyear=".urlencode($enddateyear);
}
$totalMargin = 0;
$marginRate = '';
$markRate = '';
dol_syslog('margin::agentMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result) {

View file

@ -297,6 +297,9 @@ if (is_array($listofcateg)) {
}
}
$totalMargin = 0;
$marginRate = '';
$markRate = '';
dol_syslog('margin::customerMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result) {

View file

@ -247,6 +247,9 @@ if (is_array($listofcateg)) {
}
}
$totalMargin = 0;
$marginRate = '';
$markRate = '';
dol_syslog('margin::productMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result) {

View file

@ -75,8 +75,8 @@ $invoicestatic = new Facture($db);
$form = new Form($db);
$totalMargin = 0;
$marginRate = 0;
$markRate = 0;
$marginRate = '';
$markRate = '';
if ($id > 0 || !empty($ref)) {
$result = $object->fetch($id, $ref);

View file

@ -93,6 +93,9 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $title, $help_url);
$totalMargin = 0;
$marginRate = '';
$markRate = '';
if ($socid > 0) {
$object = new Societe($db);
$object->fetch($socid);