Skip to content

Commit

Permalink
Merge pull request #9751 from frederic34/patch-17
Browse files Browse the repository at this point in the history
Update bookkeeping.class.php
  • Loading branch information
eldy committed Oct 16, 2018
2 parents 594d856 + 425e26e commit ae76891
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions htdocs/accountancy/class/bookkeeping.class.php
@@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2014-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015-2017 Florian Henry <florian.henry@open-concept.pro>
/* Copyright (C) 2014-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
Expand Down Expand Up @@ -1640,9 +1641,9 @@ function export_bookkeping($model = 'ebp')
/**
* Transform transaction
*
* @param number $direction If 0 tmp => real, if 1 real => tmp
* @param string $piece_num Piece num
* @return void
* @param number $direction If 0 tmp => real, if 1 real => tmp
* @param string $piece_num Piece num
* @return int int <0 if KO, >0 if OK
*/
public function transformTransaction($direction=0,$piece_num='')
{
Expand Down Expand Up @@ -1678,8 +1679,7 @@ public function transformTransaction($direction=0,$piece_num='')
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
}
if ($direction==1) {
} elseif ($direction==1) {
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
$resql = $this->db->query($sql);
if (! $resql) {
Expand Down

0 comments on commit ae76891

Please sign in to comment.