Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX #25853 Thirdparty Massaction #25868

Merged
merged 10 commits into from
Nov 7, 2024
18 changes: 11 additions & 7 deletions htdocs/fourn/class/fournisseur.facture.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2023 Juanjo Menent <jmenent@simnandez.es>
* Copyright (C) 2013-2019 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
Expand Down Expand Up @@ -1201,10 +1201,14 @@ public function update($user = null, $notrigger = 0)
if (empty($this->total_tva)) {
$this->total_tva = 0;
}
// if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1);
// if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2);
if (isset($this->total_ttc)) {
$this->total_ttc = trim($this->total_ttc);
if (empty($this->total_localtax1)) {
$this->total_localtax1 = 0;
}
if (empty($this->total_localtax2)) {
$this->total_localtax2 = 0;
}
if (empty($this->total_ttc)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eldy @simnandez
On develop you have "if (isset($this->total_ttc)) {" and maybe it not needeed for yout fix (can occur conflicts with develop branch)

Copy link
Member

@eldy eldy Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, solution is to edit the suggestion to restore code for this line as it is done in v20 so this should avoid any conflict and has same effect than the suggested code.
So we can validate the PR just after.
Done.

$this->total_ttc = 0;
}
if (isset($this->statut)) {
$this->statut = (int) $this->statut;
Expand Down Expand Up @@ -1262,8 +1266,8 @@ public function update($user = null, $notrigger = 0)
$sql .= " paye=".(isset($this->paye) ? ((int) $this->paye) : "0").",";
$sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").",";
$sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").",";
$sql .= " localtax1=".(isset($this->localtax1) ? ((float) $this->localtax1) : "null").",";
$sql .= " localtax2=".(isset($this->localtax2) ? ((float) $this->localtax2) : "null").",";
$sql .= " localtax1=".(isset($this->total_localtax1) ? ((float) $this->total_localtax1) : "null").",";
$sql .= " localtax2=".(isset($this->total_localtax2) ? ((float) $this->total_localtax2) : "null").",";
$sql .= " total_ht=".(isset($this->total_ht) ? ((float) $this->total_ht) : "null").",";
$sql .= " total_tva=".(isset($this->total_tva) ? ((float) $this->total_tva) : "null").",";
$sql .= " total_ttc=".(isset($this->total_ttc) ? ((float) $this->total_ttc) : "null").",";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/facture/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2023 Juanjo Menent <jmenent@simnandez.es>
* Copyright (C) 2013-2022 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
Expand Down
Loading