Projekt

Obecné

Profil

« Předchozí | Další » 

Revize c478920d

Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)

Undo my stupid mistake (I have pushed issue-957 to master instead of develop). Do I have copied files from GitHub master and push them back..

Zobrazit rozdíly:

application/models/transfer.php
LIMIT ".intval($limit_from).", ".intval($limit_results)."
");
}
/**
* Function gets all money transfers of double-entry account.
* @param $account_id
* @param $limit_from
* @param $limit_results
* @param $order_by
* @param $order_by_direction
* @return Mysql_Result
*/
public function sum_transfers_to_id($account_id = null, $toid)
{
$account_id = intval($account_id);
// query
return $this->db->query("
SELECT
SUM(IF(t.destination_id = $account_id, t.amount, 0)) -
SUM(IF(t.origin_id = $account_id, t.amount, 0)) AS amount
FROM transfers t
WHERE t.id <= ?
", $toid, $toid)->current()->amount;
}
/**
* Function gets all money transfers of double-entry account.
......
* @param $transfer_id
* @return Mysql_Result
*/
public function get_dependent_transfers($transfer_id = NULL)
public function get_dependent_transfers($transfer_id)
{
if ($transfer_id === NULL)
{
$transfer_id = $this->id;
}
return $this->db->query("
SELECT dt.*
FROM transfers t

Také k dispozici: Unified diff