NEW : add real payments on vat objects

This commit is contained in:
Gauthier PC portable 024
2021-01-18 17:08:17 +01:00
parent 788ef257a9
commit 2cfaf5fbd6
17 changed files with 2607 additions and 132 deletions

View File

@@ -14,6 +14,7 @@
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
*
* 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
@@ -2042,6 +2043,7 @@ abstract class CommonObject
$fieldname = 'fk_mode_reglement';
if ($this->element == 'societe') $fieldname = 'mode_reglement';
if (get_class($this) == 'Fournisseur') $fieldname = 'mode_reglement_supplier';
if (get_class($this) == 'Tva') $fieldname = 'fk_typepayment';
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
$sql .= ' SET '.$fieldname.' = '.(($id > 0 || $id == '0') ? $id : 'NULL');