Skip to content

Commit

Permalink
Fix unknow field
Browse files Browse the repository at this point in the history
  • Loading branch information
inoveaconseil committed Mar 10, 2018
1 parent d2dff92 commit 87b797b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion htdocs/expensereport/class/paymentexpensereport.class.php
@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
*
* 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 87b797b

Please sign in to comment.