<?php

/*
 * PuzzleApp
 * Webemyos
 * Jérôme Oliva
 * GNU Licence
 */

namespace Apps\Asso\Helper;


class AssoHelper{

    public static function GetMountAvailable($core){

        $request = "select sum(Mount) as sumReceipt from AssoReceipt";
        $resultReceipt = $core->Db->GetLine($request);
     
        $request = "select sum(Mount) as sumExpense from AssoExpense";
        $resultExpense = $core->Db->GetLine($request);

        return $resultReceipt["sumReceipt"] - $resultExpense["sumExpense"];
        
    }

}