Fix phpcs

This commit is contained in:
Laurent Destailleur 2018-12-15 18:27:38 +01:00
parent 944f9ac894
commit 8ce6f67773
3 changed files with 43 additions and 41 deletions

View File

@ -27,9 +27,8 @@
* \brief Page ajout de categories bancaires * \brief Page ajout de categories bancaires
*/ */
$res=@include("../main.inc.php"); require '../main.inc.php';
if (! $res) $res=@include("../../main.inc.php"); require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
include_once 'class/cashcontrol.class.php';
$langs->loadLangs(array("cashcontrol","install","cashdesk","admin")); $langs->loadLangs(array("cashcontrol","install","cashdesk","admin"));
@ -201,4 +200,6 @@ if ($action=="view")
print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>'; print '<center><iframe src="report.php?id='.$id.'" width="60%" height="800"></iframe></center>';
} }
// End of page
llxFooter(); llxFooter();
$db->close();

View File

@ -108,10 +108,13 @@ class CashControl // extends CommonObject
} }
} }
/**
* close
*
* @param User $user User
* @param number $notrigger No trigger
* @return int <0 if KO, >0 if OK
*/
public function close(User $user, $notrigger = 0) public function close(User $user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -154,14 +157,11 @@ class CashControl // extends CommonObject
} }
/** /**
* Load object in memory from database * Load object in memory from database
* *
* @param int $id Id object * @param int $id Id object
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function fetch($id) public function fetch($id)
{ {

View File

@ -29,8 +29,8 @@
* \brief List of bank transactions * \brief List of bank transactions
*/ */
$res=@include("../main.inc.php"); require '../main.inc.php';
if (! $res) $res=@include("../../main.inc.php"); require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$id = GETPOST('id','int'); $id = GETPOST('id','int');
@ -291,6 +291,7 @@ if ($resql)
print "</div>"; print "</div>";
print '</form>'; print '</form>';
$db->free($resql); $db->free($resql);
} }
else else