<?php
/*******************************************************************************
 *                    _ _ _ _
 *                   / _ _  /
 *            _ _   / /__/ /_ _   ____ _ _   _ _ _    __
 *           / _ ` /   _ _// _ ` / __// _ ` / _ \\ \ / /
 *          / _ _// /\ \  / _ _/ \_ \/ _ _// / \/ \ ` /
 *          \_ , /_/  \_\ \_ ,  /__ /\_ , /_/      \_/
 *
 *******************************************************************************
 *    Application:  eReserv
 *    Version:      6
 *    Author:       David Di Certo
 *    Website:      http://www.cogites.com
 *    Email:        contact@cogites.com
 *    Copyright:    2013 - David Di Certo
 *******************************************************************************
 *    == FR ==      La revente et la redistribution de l'application sont
 *                  strictement interdites.
 *
 *                  Vous êtes tenu d'avoir pris connaissance des
 *                  Conditions Générales de Vente disponibles sur Cogites.com
 *                  (y compris pour la version Free).
 *
 *    == EN ==      Resale and redistribution of the application are
 *                  Strictly prohibited.
 *
 *                  You are required to have read the Terms and Conditions
 *                  available on Cogites.com (including the Free version).
 *
 *******************************************************************************
*/

require_once('dao/PaymentDao.php');

class PaymentMgr {

	function addPayment ($data){
		$res = PaymentDao::addPayment($data);
		Logger::debug(' [PaymentMgr]: Payment added: '. $res);
		return $res;
	}
	function delete ($id){
		return PaymentDao::delete ($id);
	}
	function update ($id){
		return PaymentDao::update ($id);
	}
	function deletePaymentFromReservation ($id){
		return PaymentDao::deletePaymentFromReservation ($id);
	}
	function getPaymentByReservation ($id){
		return PaymentDao::getPaymentByReservation ($id);
	}
	function getPaymentByTenant ($id){
		return PaymentDao::getPaymentByTenant ($id);
	}
	function getPaymentByTenancy ($id){
		return PaymentDao::getPaymentByTenancy ($id);
	}
	function getPayments (){
		return PaymentDao::getPayments ();
	}
	function getPayment ($id){
		return PaymentDao::getPayment ($id);
	}
	// this avoid to have mixed content of "COMMENT" columns
	function getPaymentOnly ($id){
		return PaymentDao::getPaymentOnly ($id);
	}
}
