Skip to content

Commit

Permalink
FIX #25853 Thirdparty Massaction (#25868)
Browse files Browse the repository at this point in the history
* FIX #25853 Thirdparty Massaction

* FIX #25704 Taxes Deleted from Vendor Invoices

* FIX #25704 Taxes Deleted from Vendor Invoices

* FIX #25704 Taxes Deleted from Vendor Invoices

* Update fournisseur.facture.class.php

---------

Co-authored-by: Juanjo Menent <jmenent@2byte.es>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent bbf83c7 commit 5eb5033
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 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 (empty($this->total_localtax1)) {
$this->total_localtax1 = 0;
}
if (empty($this->total_localtax2)) {
$this->total_localtax2 = 0;
}
if (isset($this->total_ttc)) {
$this->total_ttc = trim($this->total_ttc);
$this->total_ttc = (float) $this->total_ttc;
}
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

0 comments on commit 5eb5033

Please sign in to comment.