diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 43fcacc8483fd..e269d9c7c3e9d 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -46,6 +47,9 @@ class PaymentExpenseReport extends CommonObject var $fk_bank; var $fk_user_creat; var $fk_user_modif; + //Unknow field + var $chid; + var $total; /** * Constructor @@ -104,6 +108,9 @@ function create($user) $this->db->begin(); + //Fix me fields + $this->chid = $this->fk_expensereport; + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_expensereport (fk_expensereport, datec, datep, amount,"; @@ -505,7 +512,10 @@ function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_ $acc = new Account($this->db); $acc->fetch($accountid); - $total=$this->total; + //Fix me field + $this->total = $this->amount; + $total = $this->total; + if ($mode == 'payment_expensereport') $amount=$total; // Insert payment into llx_bank