16766 |
efrain |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace LeadersLinked\Library;
|
|
|
4 |
|
|
|
5 |
use Fpdf\Fpdf;
|
|
|
6 |
|
|
|
7 |
class PlanningPdfOne extends FPDF {
|
|
|
8 |
|
|
|
9 |
protected $titleObjective='';
|
|
|
10 |
protected $descriptionObjective='';
|
|
|
11 |
protected $swit=true;
|
|
|
12 |
protected $descriptionGoals='';
|
|
|
13 |
protected $titleGoals="";
|
|
|
14 |
protected $titleTask="";
|
|
|
15 |
public $continueTask=1;
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
function setP($p){
|
|
|
20 |
$this->continueTask=$p;
|
|
|
21 |
}
|
|
|
22 |
function getP(){
|
|
|
23 |
return $this->continueTask;
|
|
|
24 |
}
|
|
|
25 |
/**
|
|
|
26 |
* Header PDF
|
|
|
27 |
*/
|
|
|
28 |
function Header() {
|
|
|
29 |
|
|
|
30 |
if ($this->header != '') {
|
|
|
31 |
|
|
|
32 |
$this->Image($this->header, -120, 1, 450);
|
|
|
33 |
$this->SetY(55);
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
$this->SetFillColor(204, 204, 204);
|
|
|
37 |
$this->SetDrawColor(0, 0, 0);
|
|
|
38 |
$this->SetLineWidth(0);
|
|
|
39 |
$this->SetFont('Arial', 'B', 9);
|
|
|
40 |
|
|
|
41 |
$this->Ln();
|
|
|
42 |
if($this->swit==false){
|
|
|
43 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
44 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
|
|
45 |
$this->Cell(188, 6, Functions::utf8_decode('Meta: '. $this->titleGoals), 1, 1, 'C', true);
|
16766 |
efrain |
46 |
$this->Ln();
|
|
|
47 |
if($this->getP()==5){
|
|
|
48 |
$this->SetFont('Arial', '', 9);
|
16768 |
efrain |
49 |
$this->Cell(188, 6, Functions::utf8_decode('Tareas: '. $this->titleTask.' ( Continuacion )'), 1, 1, 'C', true);
|
16766 |
efrain |
50 |
|
|
|
51 |
}
|
|
|
52 |
}
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
/**
|
|
|
56 |
* Footer PDF
|
|
|
57 |
*/
|
|
|
58 |
function Footer() {
|
|
|
59 |
if ($this->footer != '') {
|
|
|
60 |
$this->SetY(-40);
|
|
|
61 |
$this->Image($this->footer, -70,$this->getY() , 350);
|
|
|
62 |
}
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
function borderTable($title, $items) {
|
|
|
66 |
$this->AddPage();
|
|
|
67 |
// Header Table
|
|
|
68 |
$this->SetFillColor(204, 204, 204);
|
|
|
69 |
$this->SetDrawColor(0, 0, 0);
|
|
|
70 |
$this->SetLineWidth(0);
|
|
|
71 |
$this->SetFont('Arial', 'B', 12);
|
16768 |
efrain |
72 |
$this->Cell(188, 12, Functions::utf8_decode($title), 0, 1, 'C', false);
|
16766 |
efrain |
73 |
$this->Ln(5);
|
|
|
74 |
// Body Table
|
|
|
75 |
$this->SetFillColor(225, 255, 255);
|
|
|
76 |
$this->SetTextColor(0);
|
|
|
77 |
|
|
|
78 |
$addPageObjective=false;
|
|
|
79 |
foreach ($items as $objective) {
|
|
|
80 |
|
|
|
81 |
$this->titleObjective=$objective['title'];
|
|
|
82 |
$this->descriptionObjective=$objective['description'];
|
|
|
83 |
|
|
|
84 |
if ($objective['status']=='a') {
|
|
|
85 |
if($addPageObjective){
|
|
|
86 |
$this->AddPage();
|
|
|
87 |
}
|
|
|
88 |
$addPageObjective=true;
|
|
|
89 |
$this->SetFont('Arial', 'B', 9);
|
|
|
90 |
$costObjective=0;
|
|
|
91 |
$timeObjective=0;
|
|
|
92 |
$contObjetive=0;
|
|
|
93 |
$indicatorObjective=0;
|
|
|
94 |
foreach($objective['goals'] as $record){
|
|
|
95 |
$indicatorGoals=0;
|
|
|
96 |
if($record->status=='a'){
|
|
|
97 |
foreach($record->task as $record2){
|
|
|
98 |
if($record2->status=='a'){
|
|
|
99 |
$costObjective=$costObjective+$record2->cost;
|
|
|
100 |
$timeObjective=$timeObjective+$record2->time;
|
|
|
101 |
$indicatorGoals= $indicatorGoals+$record2->indicator;
|
|
|
102 |
}
|
|
|
103 |
}
|
|
|
104 |
}
|
|
|
105 |
if(count($record->task)>0){
|
|
|
106 |
$indicatorObjective=$indicatorObjective+($indicatorGoals/count($record->task));
|
|
|
107 |
$contObjetive++;
|
|
|
108 |
}
|
|
|
109 |
}
|
|
|
110 |
if($contObjetive!=0){
|
|
|
111 |
$indicatorObjective=round($indicatorObjective/$contObjetive,2);
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
if(count($objective['goals'])<=0){
|
|
|
115 |
$this->SetFillColor(204, 204, 204);
|
|
|
116 |
$this->SetDrawColor(0, 0, 0);
|
|
|
117 |
$this->SetLineWidth(0);
|
|
|
118 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
119 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
|
|
120 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$this->descriptionObjective), 1, 'L', false);
|
|
|
121 |
$this->Cell(20, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
122 |
$this->Cell(25, 6, Functions::utf8_decode($objective['date']), 1, 0, 'C', false);
|
|
|
123 |
$this->Cell(30, 6, Functions::utf8_decode('Horas Totales: '), 1, 0, 'L', false);
|
|
|
124 |
$this->Cell(43, 6, Functions::utf8_decode($timeObjective), 1, 0, 'C', false);
|
|
|
125 |
$this->Cell(50, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
126 |
$this->Cell(20, 6, Functions::utf8_decode($indicatorObjective.'%'), 1, 1, 'C', false);
|
|
|
127 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
128 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costObjective), 1, 1, 'R', false);
|
16766 |
efrain |
129 |
$this->Ln();
|
|
|
130 |
$this->swit=false;
|
|
|
131 |
|
|
|
132 |
}
|
|
|
133 |
$addPageGoals=false;
|
|
|
134 |
foreach($objective['goals'] as $record){
|
|
|
135 |
if($record->status=='a'){
|
|
|
136 |
if($addPageGoals){
|
|
|
137 |
$this->AddPage();
|
|
|
138 |
}
|
|
|
139 |
$addPageGoals=true;
|
|
|
140 |
if($this->swit){
|
|
|
141 |
$this->SetFillColor(204, 204, 204);
|
|
|
142 |
$this->SetDrawColor(0, 0, 0);
|
|
|
143 |
$this->SetLineWidth(0);
|
|
|
144 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
145 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
|
|
146 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$this->descriptionObjective), 1, 'L', false);
|
|
|
147 |
$this->Cell(20, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
148 |
$this->Cell(25, 6, Functions::utf8_decode($objective['date']), 1, 0, 'C', false);
|
|
|
149 |
$this->Cell(30, 6, Functions::utf8_decode('Horas Totales: '), 1, 0, 'L', false);
|
|
|
150 |
$this->Cell(43, 6, Functions::utf8_decode($timeObjective), 1, 0, 'C', false);
|
|
|
151 |
$this->Cell(50, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
152 |
$this->Cell(20, 6, Functions::utf8_decode($indicatorObjective.'%'), 1, 1, 'C', false);
|
|
|
153 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
154 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costObjective), 1, 1, 'R', false);
|
16766 |
efrain |
155 |
$this->Ln();
|
|
|
156 |
$this->swit=false;
|
|
|
157 |
}
|
|
|
158 |
$indicatorGoals=0;
|
|
|
159 |
$timeGoals=0;
|
|
|
160 |
$costGoals=0;
|
|
|
161 |
foreach($record->task as $record2){
|
|
|
162 |
if($record2->status=='a'){
|
|
|
163 |
$costGoals=$costGoals+$record2->cost;
|
|
|
164 |
$timeGoals=$timeGoals+$record2->time;
|
|
|
165 |
$indicatorGoals= $indicatorGoals+$record2->indicator;
|
|
|
166 |
}
|
|
|
167 |
}
|
|
|
168 |
if(count($record->task)>0){
|
|
|
169 |
$indicatorGoals=round($indicatorGoals/count($record->task),2);
|
|
|
170 |
}
|
|
|
171 |
$this->titleGoals=$record->title;
|
|
|
172 |
$this->descriptionGoals=$record->description;
|
16768 |
efrain |
173 |
$this->Cell(188, 6, Functions::utf8_decode('Meta: '.$record->title), 1, 1, 'C', true);
|
|
|
174 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$record->description), 1, 'L', false);
|
|
|
175 |
$this->Cell(40, 6, Functions::utf8_decode('Horas Totalesa: '), 1, 0, 'L', false);
|
|
|
176 |
$this->Cell(54, 6, Functions::utf8_decode($timeGoals), 1, 0, 'C', false);
|
|
|
177 |
$this->Cell(54, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
178 |
$this->Cell(40, 6, Functions::utf8_decode($indicatorGoals.'%'), 1, 1, 'C', false);
|
|
|
179 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
180 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costGoals), 1, 1, 'R', false);
|
16766 |
efrain |
181 |
$this->Ln();
|
|
|
182 |
foreach ($record->task as $record2) {
|
|
|
183 |
if($record2->status=='a'){
|
|
|
184 |
$this->SetFont('Arial', '', 9);
|
|
|
185 |
$this->titleTask=$record2->title;
|
|
|
186 |
|
16768 |
efrain |
187 |
$this->Cell(188, 6, Functions::utf8_decode('Tarea: '.$record2->title), 1, 1, 'C', true);
|
16766 |
efrain |
188 |
$this->setP(5);
|
16768 |
efrain |
189 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$record2->description), 1, 'L', false);
|
|
|
190 |
$this->MultiCell(188, 6, Functions::utf8_decode('Implementacion: '.$record2->how), 1, 'L', false);
|
16766 |
efrain |
191 |
$whoUser='';
|
|
|
192 |
$toggleWho=true;
|
|
|
193 |
foreach($record2->who as $record3){
|
|
|
194 |
if($toggleWho){
|
|
|
195 |
$whoUser=$whoUser.$record3;
|
|
|
196 |
$toggleWho=false;
|
|
|
197 |
}else{
|
|
|
198 |
$whoUser=$whoUser.', '.$record3;
|
|
|
199 |
|
|
|
200 |
}
|
|
|
201 |
}
|
16768 |
efrain |
202 |
$this->MultiCell(188, 6, Functions::utf8_decode('Participantes: '.$whoUser), 1, 'L', false);
|
|
|
203 |
$this->MultiCell(188, 6, Functions::utf8_decode('Lugar: '.$record2->place), 1, 'L', false);
|
|
|
204 |
$this->Cell(16, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
205 |
$this->Cell(20, 6, Functions::utf8_decode($record2->date), 1, 0, 'C', false);
|
|
|
206 |
$this->Cell(16, 6, Functions::utf8_decode('Horas: '), 1, 0, 'L', false);
|
|
|
207 |
$this->Cell(35, 6, Functions::utf8_decode($record2->time), 1, 0, 'C', false);
|
|
|
208 |
$this->Cell(40, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
209 |
$this->Cell(16, 6, Functions::utf8_decode($record2->indicator.'%'), 1, 0, 'C', false);
|
16766 |
efrain |
210 |
|
16768 |
efrain |
211 |
$this->Cell(20, 6, Functions::utf8_decode('Prioridad: '), 1, 0, 'L', false);
|
16766 |
efrain |
212 |
if($record2->priority=='i'){
|
16768 |
efrain |
213 |
$this->Cell(25, 6, Functions::utf8_decode('Importante'), 1, 1, 'C', false);
|
16766 |
efrain |
214 |
}else if($record2->priority=='ni'){
|
16768 |
efrain |
215 |
$this->Cell(25, 6, Functions::utf8_decode('No importante'), 1, 1, 'C', false);
|
16766 |
efrain |
216 |
}else if($record2->priority=='nu'){
|
16768 |
efrain |
217 |
$this->Cell(25, 6, Functions::utf8_decode('No urgente'), 1, 1, 'C', false);
|
16766 |
efrain |
218 |
}else if($record2->priority=='u'){
|
16768 |
efrain |
219 |
$this->Cell(25, 6, Functions::utf8_decode('Urgente'), 1, 1, 'C', false);
|
16766 |
efrain |
220 |
}
|
|
|
221 |
if($record2->indicator==100){
|
16768 |
efrain |
222 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion evaluacion: '.$record2->evaluation), 1, 'L', false);
|
|
|
223 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion desvio: '.$record2->detour), 1, 'L', false);
|
16766 |
efrain |
224 |
}
|
|
|
225 |
$this->SetFont('Arial', 'B', 11);
|
|
|
226 |
|
16768 |
efrain |
227 |
$this->Cell(20, 8, Functions::utf8_decode('Costo: '), 1, 0, 'L', false);
|
16766 |
efrain |
228 |
|
16768 |
efrain |
229 |
$this->Cell(168, 8, Functions::utf8_decode('$'.$record2->cost), 1, 1, 'R', false);
|
16766 |
efrain |
230 |
$this->setP(1);
|
|
|
231 |
|
|
|
232 |
$this->Ln(7);
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
}
|
|
|
236 |
$this->swit=true;
|
|
|
237 |
|
|
|
238 |
}
|
|
|
239 |
}
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
}
|
|
|
243 |
|
|
|
244 |
}
|
|
|
245 |
|
|
|
246 |
function borderTableAll($title, $items) {
|
|
|
247 |
$this->AddPage();
|
|
|
248 |
// Header Table
|
|
|
249 |
$this->SetFillColor(204, 204, 204);
|
|
|
250 |
$this->SetDrawColor(0, 0, 0);
|
|
|
251 |
$this->SetLineWidth(0);
|
|
|
252 |
$this->SetFont('Arial', 'B', 12);
|
16768 |
efrain |
253 |
$this->Cell(188, 12, Functions::utf8_decode($title), 0, 1, 'C', false);
|
16766 |
efrain |
254 |
$this->Ln(5);
|
|
|
255 |
|
|
|
256 |
// Body Table
|
|
|
257 |
$this->SetFillColor(225, 255, 255);
|
|
|
258 |
$this->SetTextColor(0);
|
|
|
259 |
|
|
|
260 |
$addPageObjective=false;
|
|
|
261 |
foreach ($items as $objective) {
|
|
|
262 |
|
|
|
263 |
$this->titleObjective=$objective->title;
|
|
|
264 |
$this->descriptionObjective=$objective->description;
|
|
|
265 |
if ($objective->status=='a') {
|
|
|
266 |
if($addPageObjective){
|
|
|
267 |
$this->AddPage();
|
|
|
268 |
}
|
|
|
269 |
$addPageObjective=true;
|
|
|
270 |
$this->SetFont('Arial', 'B', 9);
|
|
|
271 |
$costObjective=0;
|
|
|
272 |
$timeObjective=0;
|
|
|
273 |
$contObjetive=0;
|
|
|
274 |
$indicatorObjective=0;
|
|
|
275 |
foreach($objective->goals as $record){
|
|
|
276 |
$indicatorGoals=0;
|
|
|
277 |
if($record->status=='a'){
|
|
|
278 |
foreach($record->task as $record2){
|
|
|
279 |
if($record2->status=='a'){
|
|
|
280 |
$costObjective=$costObjective+$record2->cost;
|
|
|
281 |
$timeObjective=$timeObjective+$record2->time;
|
|
|
282 |
$indicatorGoals= $indicatorGoals+$record2->indicator;
|
|
|
283 |
}
|
|
|
284 |
}
|
|
|
285 |
}
|
|
|
286 |
if(count($record->task)>0){
|
|
|
287 |
$indicatorObjective=$indicatorObjective+($indicatorGoals/count($record->task));
|
|
|
288 |
$contObjetive++;
|
|
|
289 |
}
|
|
|
290 |
$this->descriptionGoals=$record->description;
|
|
|
291 |
}
|
|
|
292 |
if($contObjetive!=0){
|
|
|
293 |
$indicatorObjective=round($indicatorObjective/$contObjetive,2);
|
|
|
294 |
}
|
|
|
295 |
|
|
|
296 |
|
|
|
297 |
if(count($objective->goals)<=0){
|
|
|
298 |
$this->SetFillColor(204, 204, 204);
|
|
|
299 |
$this->SetDrawColor(0, 0, 0);
|
|
|
300 |
$this->SetLineWidth(0);
|
|
|
301 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
302 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
|
|
303 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$this->descriptionObjective), 1, 'L', false);
|
|
|
304 |
$this->Cell(20, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
305 |
$this->Cell(25, 6, Functions::utf8_decode($objective->date), 1, 0, 'C', false);
|
|
|
306 |
$this->Cell(30, 6, Functions::utf8_decode('Horas Totales: '), 1, 0, 'L', false);
|
|
|
307 |
$this->Cell(43, 6, Functions::utf8_decode($timeObjective), 1, 0, 'C', false);
|
|
|
308 |
$this->Cell(50, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
309 |
$this->Cell(20, 6, Functions::utf8_decode($indicatorObjective.'%'), 1, 1, 'C', false);
|
|
|
310 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
311 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costObjective), 1, 1, 'R', false);
|
16766 |
efrain |
312 |
$this->Ln();
|
|
|
313 |
$this->swit=false;
|
|
|
314 |
|
|
|
315 |
}
|
|
|
316 |
$addPageGoals=false;
|
|
|
317 |
foreach($objective->goals as $record){
|
|
|
318 |
|
|
|
319 |
$this->titleGoals=$record->title;
|
|
|
320 |
if($record->status=='a'){
|
|
|
321 |
if($addPageGoals){
|
|
|
322 |
$this->AddPage();
|
|
|
323 |
}
|
|
|
324 |
$addPageGoals=true;
|
|
|
325 |
if($this->swit){
|
|
|
326 |
$this->SetFillColor(204, 204, 204);
|
|
|
327 |
$this->SetDrawColor(0, 0, 0);
|
|
|
328 |
$this->SetLineWidth(0);
|
|
|
329 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
330 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
|
|
331 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$this->descriptionObjective), 1, 'L', false);
|
|
|
332 |
$this->Cell(20, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
333 |
$this->Cell(25, 6, Functions::utf8_decode($objective->date), 1, 0, 'C', false);
|
|
|
334 |
$this->Cell(30, 6, Functions::utf8_decode('Horas Totales: '), 1, 0, 'L', false);
|
|
|
335 |
$this->Cell(43, 6, Functions::utf8_decode($timeObjective), 1, 0, 'C', false);
|
|
|
336 |
$this->Cell(50, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
337 |
$this->Cell(20, 6, Functions::utf8_decode($indicatorObjective.'%'), 1, 1, 'C', false);
|
|
|
338 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
339 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costObjective), 1, 1, 'R', false);
|
16766 |
efrain |
340 |
$this->Ln();
|
|
|
341 |
$this->swit=false;
|
|
|
342 |
}
|
|
|
343 |
$indicatorGoals=0;
|
|
|
344 |
$timeGoals=0;
|
|
|
345 |
$costGoals=0;
|
|
|
346 |
foreach($record->task as $record2){
|
|
|
347 |
if($record2->status=='a'){
|
|
|
348 |
$costGoals=$costGoals+$record2->cost;
|
|
|
349 |
$timeGoals=$timeGoals+$record2->time;
|
|
|
350 |
$indicatorGoals= $indicatorGoals+$record2->indicator;
|
|
|
351 |
}
|
|
|
352 |
}
|
|
|
353 |
if(count($record->task)>0){
|
|
|
354 |
$indicatorGoals=round($indicatorGoals/count($record->task),2);
|
|
|
355 |
}
|
16768 |
efrain |
356 |
$this->Cell(188, 6, Functions::utf8_decode('Meta: '.$record->title), 1, 1, 'C', true);
|
|
|
357 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$record->description), 1, 'L', false);
|
|
|
358 |
$this->Cell(40, 6, Functions::utf8_decode('Horas Totalesa: '), 1, 0, 'L', false);
|
|
|
359 |
$this->Cell(54, 6, Functions::utf8_decode($timeGoals), 1, 0, 'C', false);
|
|
|
360 |
$this->Cell(54, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
361 |
$this->Cell(40, 6, Functions::utf8_decode($indicatorGoals.'%'), 1, 1, 'C', false);
|
|
|
362 |
$this->Cell(30, 6, Functions::utf8_decode('Costo total: '), 1, 0, 'L', false);
|
|
|
363 |
$this->Cell(158, 6, Functions::utf8_decode('$'.$costGoals), 1, 1, 'R', false);
|
16766 |
efrain |
364 |
$this->Ln();
|
|
|
365 |
foreach ($record->task as $record2) {
|
|
|
366 |
if($record2->status=='a'){
|
|
|
367 |
$this->SetFont('Arial', '', 9);
|
|
|
368 |
$this->titleTask=$record2->title;
|
|
|
369 |
|
16768 |
efrain |
370 |
$this->Cell(188, 6, Functions::utf8_decode('Tarea: '.$record2->title), 1, 1, 'C', true);
|
16766 |
efrain |
371 |
$this->setP(5);
|
16768 |
efrain |
372 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion: '.$record2->description), 1, 'L', false);
|
|
|
373 |
$this->MultiCell(188, 6, Functions::utf8_decode('Implementacion: '.$record2->how), 1, 'L', false);
|
16766 |
efrain |
374 |
$whoUser='';
|
|
|
375 |
$toggleWho=true;
|
|
|
376 |
foreach($record2->who as $record3){
|
|
|
377 |
if($toggleWho){
|
|
|
378 |
$whoUser=$whoUser.$record3;
|
|
|
379 |
$toggleWho=false;
|
|
|
380 |
}else{
|
|
|
381 |
$whoUser=$whoUser.', '.$record3;
|
|
|
382 |
|
|
|
383 |
}
|
|
|
384 |
}
|
16768 |
efrain |
385 |
$this->MultiCell(188, 6, Functions::utf8_decode('Participantes: '.$whoUser), 1, 'L', false);
|
|
|
386 |
$this->MultiCell(188, 6, Functions::utf8_decode('Lugar: '.$record2->place), 1, 'L', false);
|
|
|
387 |
$this->Cell(16, 6, Functions::utf8_decode('Fecha: '), 1, 0, 'L', false);
|
|
|
388 |
$this->Cell(20, 6, Functions::utf8_decode($record2->date), 1, 0, 'C', false);
|
|
|
389 |
$this->Cell(16, 6, Functions::utf8_decode('Horas: '), 1, 0, 'L', false);
|
|
|
390 |
$this->Cell(35, 6, Functions::utf8_decode($record2->time), 1, 0, 'C', false);
|
|
|
391 |
$this->Cell(40, 6, Functions::utf8_decode('Indicador de progreso: '), 1, 0, 'L', false);
|
|
|
392 |
$this->Cell(16, 6, Functions::utf8_decode($record2->indicator.'%'), 1, 0, 'C', false);
|
16766 |
efrain |
393 |
|
16768 |
efrain |
394 |
$this->Cell(20, 6, Functions::utf8_decode('Prioridad: '), 1, 0, 'L', false);
|
16766 |
efrain |
395 |
if($record2->priority=='i'){
|
16768 |
efrain |
396 |
$this->Cell(25, 6, Functions::utf8_decode('Importante'), 1, 1, 'C', false);
|
16766 |
efrain |
397 |
}else if($record2->priority=='ni'){
|
16768 |
efrain |
398 |
$this->Cell(25, 6, Functions::utf8_decode('No importante'), 1, 1, 'C', false);
|
16766 |
efrain |
399 |
}else if($record2->priority=='nu'){
|
16768 |
efrain |
400 |
$this->Cell(25, 6, Functions::utf8_decode('No urgente'), 1, 1, 'C', false);
|
16766 |
efrain |
401 |
}else if($record2->priority=='u'){
|
16768 |
efrain |
402 |
$this->Cell(25, 6, Functions::utf8_decode('Urgente'), 1, 1, 'C', false);
|
16766 |
efrain |
403 |
}
|
|
|
404 |
if($record2->indicator==100){
|
16768 |
efrain |
405 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion evaluacion: '.$record2->evaluation), 1, 'L', false);
|
|
|
406 |
$this->MultiCell(188, 6, Functions::utf8_decode('Descripcion desvio: '.$record2->detour), 1, 'L', false);
|
16766 |
efrain |
407 |
}
|
|
|
408 |
$this->SetFont('Arial', 'B', 11);
|
|
|
409 |
|
16768 |
efrain |
410 |
$this->Cell(20, 8, Functions::utf8_decode('Costo: '), 1, 0, 'L', false);
|
16766 |
efrain |
411 |
|
16768 |
efrain |
412 |
$this->Cell(168, 8, Functions::utf8_decode('$'.$record2->cost), 1, 1, 'R', false);
|
16766 |
efrain |
413 |
$this->setP(1);
|
|
|
414 |
|
|
|
415 |
$this->Ln(7);
|
|
|
416 |
}
|
|
|
417 |
|
|
|
418 |
}
|
|
|
419 |
$this->swit=true;
|
|
|
420 |
|
|
|
421 |
}
|
|
|
422 |
}
|
|
|
423 |
}
|
|
|
424 |
$this->swit=true;
|
|
|
425 |
}
|
|
|
426 |
|
|
|
427 |
}
|
|
|
428 |
function borderTableMatriz($title,$items){
|
|
|
429 |
$this->AddPage();
|
|
|
430 |
// Header Table
|
|
|
431 |
$this->SetFillColor(204, 204, 204);
|
|
|
432 |
$this->SetDrawColor(0, 0, 0);
|
|
|
433 |
$this->SetLineWidth(0);
|
|
|
434 |
$this->SetFont('Arial', 'B', 12);
|
16768 |
efrain |
435 |
$this->Cell(188, 12, Functions::utf8_decode($title), 0, 1, 'C', false);
|
16766 |
efrain |
436 |
$this->Ln(5);
|
|
|
437 |
$titleswitch=true;
|
|
|
438 |
// Body Table
|
|
|
439 |
$this->SetFillColor(225, 255, 255);
|
|
|
440 |
$this->SetTextColor(0);
|
|
|
441 |
$addPageObjective=false;
|
|
|
442 |
$addPageGoals=false;
|
|
|
443 |
foreach ($items as $objective) {
|
|
|
444 |
if ($objective->status=='a'&&count($objective->goals)>0) {
|
|
|
445 |
$this->titleObjective=$objective->title;
|
|
|
446 |
$this->descriptionObjective=$objective->description;
|
|
|
447 |
/*if($addPageObjective){
|
|
|
448 |
$this->AddPage();
|
|
|
449 |
}
|
|
|
450 |
$addPageObjective=true;*/
|
|
|
451 |
|
|
|
452 |
foreach($objective->goals as $record){
|
|
|
453 |
|
|
|
454 |
if($record->status=='a'&&count($record->task)>0){
|
|
|
455 |
$this->titleGoals=$record->title;
|
|
|
456 |
if($addPageGoals){
|
|
|
457 |
$this->AddPage();
|
|
|
458 |
}
|
|
|
459 |
|
|
|
460 |
$addPageGoals=true;
|
|
|
461 |
if($this->swit){
|
|
|
462 |
$this->SetFillColor(204, 204, 204);
|
|
|
463 |
$this->SetDrawColor(0, 0, 0);
|
|
|
464 |
$this->SetLineWidth(0);
|
|
|
465 |
$this->SetFont('Arial', 'B', 9);
|
16768 |
efrain |
466 |
$this->Cell(188, 6, Functions::utf8_decode('Objectivo: '.$this->titleObjective), 1, 1, 'C', true);
|
16766 |
efrain |
467 |
$this->swit=false;
|
|
|
468 |
}
|
16768 |
efrain |
469 |
$this->Cell(188, 6, Functions::utf8_decode('Meta: '.$record->title), 1, 1, 'C', true);
|
16766 |
efrain |
470 |
$this->Ln();
|
|
|
471 |
|
|
|
472 |
$iu=[];
|
|
|
473 |
$niu=[];
|
|
|
474 |
$inu=[];
|
|
|
475 |
$ninu=[];
|
|
|
476 |
|
|
|
477 |
$matriz= array(
|
|
|
478 |
array()
|
|
|
479 |
);
|
|
|
480 |
foreach($record->task as $record2){
|
|
|
481 |
if($record2->priority=='i'&&$record2->urgent=='u'){
|
|
|
482 |
|
|
|
483 |
array_push($iu, $record2->title);
|
|
|
484 |
|
|
|
485 |
|
|
|
486 |
}
|
|
|
487 |
if($record2->priority=='i'&&$record2->urgent=='nu'){
|
|
|
488 |
|
|
|
489 |
array_push($inu, $record2->title);
|
|
|
490 |
|
|
|
491 |
}
|
|
|
492 |
if($record2->priority=='ni'&&$record2->urgent=='u'){
|
|
|
493 |
array_push($niu, $record2->title);
|
|
|
494 |
}
|
|
|
495 |
if($record2->priority=='ni'&&$record2->urgent=='nu'){
|
|
|
496 |
|
|
|
497 |
array_push($ninu, $record2->title);
|
|
|
498 |
|
|
|
499 |
}
|
|
|
500 |
|
|
|
501 |
}
|
|
|
502 |
|
|
|
503 |
foreach ($iu as $index=>$record2) {
|
|
|
504 |
$matriz[$index][0]=$record2;
|
|
|
505 |
|
|
|
506 |
}
|
|
|
507 |
foreach ($inu as $index=>$record2) {
|
|
|
508 |
$matriz[$index][1]=$record2;
|
|
|
509 |
|
|
|
510 |
}
|
|
|
511 |
foreach ($niu as $index=>$record2) {
|
|
|
512 |
$matriz[$index][2]=$record2;
|
|
|
513 |
|
|
|
514 |
}
|
|
|
515 |
foreach ($ninu as $index=>$record2) {
|
|
|
516 |
$matriz[$index][3]=$record2;
|
|
|
517 |
}
|
|
|
518 |
|
|
|
519 |
$countMatriz=count($matriz);
|
|
|
520 |
$countMatriz=ceil($countMatriz/10);
|
|
|
521 |
$pageSwitch=false;
|
|
|
522 |
for($h=1;$h<=$countMatriz;$h++){
|
|
|
523 |
if($pageSwitch){
|
|
|
524 |
$this->titleGoals=$record->title.' (Continuacion)';
|
|
|
525 |
$this->AddPage();
|
|
|
526 |
}
|
|
|
527 |
$this->SetFont('Arial', 'B', 12);
|
|
|
528 |
$this->Cell(32, 12, '', 0, 0, 'C', false);
|
16768 |
efrain |
529 |
$this->Cell(78, 12, Functions::utf8_decode('Urgente'), 1, 0, 'C', true);
|
|
|
530 |
$this->Cell(78, 12, Functions::utf8_decode('No urgente'), 1, 1, 'C', true);
|
16766 |
efrain |
531 |
|
16768 |
efrain |
532 |
$this->Cell(32, 70, Functions::utf8_decode('Importante'), 1, 0, 'C', true);
|
16766 |
efrain |
533 |
$this->Cell(156,70,'',1,1,'',false);
|
16768 |
efrain |
534 |
$this->Cell(32, 70, Functions::utf8_decode('No Importante'), 1, 0, 'C', true);
|
16766 |
efrain |
535 |
$this->Cell(156,70,'',1,1,'',false);
|
|
|
536 |
if($titleswitch){
|
|
|
537 |
$this->Line(120, 102,120,242);
|
|
|
538 |
$this->SetXY(10,108);
|
|
|
539 |
}else{
|
|
|
540 |
$this->Line(120, 89,120,231);
|
|
|
541 |
$this->SetXY(10,96);
|
|
|
542 |
}
|
|
|
543 |
$this->SetFont('Arial', '', 10);
|
|
|
544 |
|
|
|
545 |
for($i=($h-1)*10;$i<($h*10);$i++) {
|
|
|
546 |
$this->Cell(32, 12, '', 0, 0, 'C', false);
|
|
|
547 |
if(isset($matriz[$i][0])){
|
16768 |
efrain |
548 |
$this->Cell(78, 6, Functions::utf8_decode($matriz[$i][0]), 0, 0, 'C', false);
|
16766 |
efrain |
549 |
}else{
|
16768 |
efrain |
550 |
$this->Cell(78, 6, Functions::utf8_decode(''), 0, 0, 'l', false);
|
16766 |
efrain |
551 |
}
|
|
|
552 |
if(isset($matriz[$i][1])){
|
16768 |
efrain |
553 |
$this->Cell(78, 6, Functions::utf8_decode($matriz[$i][1]), 0, 1, 'C', false);
|
16766 |
efrain |
554 |
}else{
|
16768 |
efrain |
555 |
$this->Cell(78, 6, Functions::utf8_decode(''), 0, 1, 'l', false);
|
16766 |
efrain |
556 |
}
|
|
|
557 |
}
|
|
|
558 |
if($titleswitch){
|
|
|
559 |
$this->SetXY(10,178);
|
|
|
560 |
$titleswitch=false;
|
|
|
561 |
}else{
|
|
|
562 |
$this->SetXY(10,166);
|
|
|
563 |
}
|
|
|
564 |
for($i=($h-1)*10;$i<($h*10);$i++) {
|
|
|
565 |
$this->Cell(32, 12, '', 0, 0, 'C', false);
|
|
|
566 |
if(isset($matriz[$i][2])){
|
16768 |
efrain |
567 |
$this->Cell(78, 6, Functions::utf8_decode($matriz[$i][2]), 0, 0, 'C', false);
|
16766 |
efrain |
568 |
}else{
|
16768 |
efrain |
569 |
$this->Cell(78, 6, Functions::utf8_decode(''), 0, 0, 'l', false);
|
16766 |
efrain |
570 |
}
|
|
|
571 |
if(isset($matriz[$i][3])){
|
16768 |
efrain |
572 |
$this->Cell(78, 6, Functions::utf8_decode($matriz[$i][3]), 0, 1, 'C', false);
|
16766 |
efrain |
573 |
}else{
|
16768 |
efrain |
574 |
$this->Cell(78, 6, Functions::utf8_decode(''), 0, 1, 'l', false);
|
16766 |
efrain |
575 |
}
|
|
|
576 |
}
|
|
|
577 |
$pageSwitch=true;
|
|
|
578 |
}
|
|
|
579 |
$this->swit=true;
|
|
|
580 |
|
|
|
581 |
}
|
|
|
582 |
}
|
|
|
583 |
}
|
|
|
584 |
$this->swit=true;
|
|
|
585 |
|
|
|
586 |
}
|
|
|
587 |
}
|
|
|
588 |
|
|
|
589 |
}
|