Skip to content

Commit

Permalink
Fix method to delete a bookkeeping record
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 4, 2017
1 parent 4c8945e commit c15454e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions htdocs/accountancy/class/bookkeeping.class.php
Expand Up @@ -1224,18 +1224,17 @@ function deleteByYearAndJournal($delyear='', $journal='', $mode='') {
/**
* Delete bookkepping by piece number
*
* @param int $piecenum peicenum to delete
* @param string $mode Mode
* @return int Result
* @param int $piecenum Piecenum to delete
* @return int Result
*/
function deleteMvtNum($piecenum, $mode) {
function deleteMvtNum($piecenum) {
global $conf;

$this->db->begin();

// first check if line not yet in bookkeeping
$sql = "DELETE";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element. $mode;
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE piece_num = " . $piecenum;
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";

Expand Down

0 comments on commit c15454e

Please sign in to comment.