Skip to content

Instantly share code, notes, and snippets.

View makamo's full-sized avatar

Maxime Lavoie makamo

View GitHub Profile
Testing started at 13:08 ...
Uploading test files to timesheets.dev...
Executing tests
Http request failed: HTTP/1.1 404 Not Found
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Error: Missing Controller </title>
---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.
Time: 15-03-17 21:33
Description: Ticking block entity
java.lang.NullPointerException: Ticking block entity
at
cofh.thermalexpansion.block.machine.TileTransposer.updateContainerFill
2015-03-18 14:06:24 Notice (8): Undefined index: contrat_id in [/var/www/timesheets/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php, line 330]
Trace: Cake\Error\BaseErrorHandler::handleError()
- CORE/src/Error/BaseErrorHandler.php, line 138 Cake\ORM\Association\BelongsToMany::_buildResultMap()
- CORE/src/ORM/Association/BelongsToMany.php, line 330 Cake\ORM\Association\BelongsToMany::eagerLoader()
- CORE/src/ORM/Association/SelectableAssociationTrait.php, line 57 Cake\ORM\EagerLoader::loadExternal()
- CORE/src/ORM/EagerLoader.php, line 538 Cake\ORM\Query::_execute()
- CORE/src/ORM/Query.php, line 644 Cake\ORM\Query::_all()
- CORE/src/Datasource/QueryTrait.php, line 218 Cake\ORM\Query::all()
- CORE/src/ORM/Query.php, line 595 Cake\ORM\Query::first()
- CORE/src/Datasource/QueryTrait.php, line 340 Cake\ORM\Query::firstOrFail()
<?php
namespace App\Model\Entity;
use Cake\Database\Expression\QueryExpression;
use Cake\ORM\Entity;
use Cake\ORM\TableRegistry;
use Carbon\Carbon;
use Versadrill\Periode;
/**
public function generate()
{
//Generation des paies
if ($this->request->is(array('post', 'put'))) {
$paies = $this->request->data;
foreach ($paies as $key => $paie) {
$paie = $this->Paies->get($paie['id']);
$periodeDate = Periode::getStartAndEndDate($paie->week, $paie->year);
// Trouver les rapports journaliers pour le contrat choisi, la foreuse choisie et entre les dates sélectionnées
$employee_rjs = TableRegistry::get('employees_rjs');
/src/Controller/PaiesController.php (line 87)
[
'paie_heures' => [
(int) 0 => [
'date' => '2014-07-05',
'equipement_id' => (int) 43,
'qte ' => '4.5',
'type ' => (int) 0,
$paie = $this->Paies->get($id, [
'contain' => [
'Contrats.Entreprises.Pays',
'Contrats.Entreprises.Provinces',
'PaieHeures'=> function (Query $q) {
debug($q->select(['date', "h_payable"=>$q->func()->sum('h_payable'), 'fonction_id', 'task_id','taux_reg'])->order(['date']));
die();
},
'PaieHeures.Fonctions',
'PaieHeures.Equipements',
Router::scope('/', function (RouteBuilder $routes) {
$routes->extensions(['json', 'pdf']);
$routes->resources('Clients', function (RouteBuilder $routes) {
$routes->resources('Localisations');
});
$routes->resources('Contrats');
$routes->resources('Holes');
$routes->resources('ContratsProduits');
$routes->resources('ContratsEmployees');
$routes->resources('ContratsEquipements', [
<?php
namespace App\Controller;
use Cake\ORM\TableRegistry;
use Cake\I18n\Time;
use iio\libmergepdf\Merger;
/**
* Factures Controller
*
<?php
/**
* Routes configuration
*
* In this file, you set up routes to your controllers and their actions.
* Routes are very important mechanism that allows you to freely connect
* different URLs to chosen controllers and their actions (functions).
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)