Parcourir la source

fechas estilo excel. Reajustes de cabeceras y celdas values

Nermosis il y a 3 ans
Parent
révision
3d375ce2c0
1 fichiers modifiés avec 56 ajouts et 49 suppressions
  1. 56 49
      application/controllers/ExportXls.php

+ 56 - 49
application/controllers/ExportXls.php Voir le fichier

353
             $sheet->SetCellValue('B' . $this->filaProjectLot, $bitacora['name']);
353
             $sheet->SetCellValue('B' . $this->filaProjectLot, $bitacora['name']);
354
             $sheet->setCellValue('C' . $this->filaProjectLot, $bitacora['idProcurementLot']);
354
             $sheet->setCellValue('C' . $this->filaProjectLot, $bitacora['idProcurementLot']);
355
             $sheet->SetCellValue('D' . $this->filaProjectLot, $bitacora['taxExclusiveAmount']);
355
             $sheet->SetCellValue('D' . $this->filaProjectLot, $bitacora['taxExclusiveAmount']);
356
-            $sheet->SetCellValue('F' . $this->filaProjectLot, $bitacora['countrySubentity']);
357
-            $sheet->SetCellValue('I' . $this->filaProjectLot, $bitacora['itemClassification_attr']);
356
+            $sheet->SetCellValue('E' . $this->filaProjectLot, $bitacora['countrySubentity']);
357
+            $sheet->SetCellValue('F' . $this->filaProjectLot, $bitacora['itemClassification_attr']);
358
             $this->filaProjectLot++;
358
             $this->filaProjectLot++;
359
         }
359
         }
360
         return $spreadsheet;
360
         return $spreadsheet;
416
                 $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
416
                 $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
417
                 $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['resultCode']);
417
                 $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['resultCode']);
418
                 $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
418
                 $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
419
-                $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['awardDate']);
419
+                $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $this->formatFechas($datos['awardDate']));
420
+                $spreadsheet->getStyle('D' . $aux)
421
+                    ->getNumberFormat()
422
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
420
                 $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['receivedTenderQuantity']);
423
                 $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['receivedTenderQuantity']);
421
                 $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['lowerTenderAmount']);
424
                 $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['lowerTenderAmount']);
422
                 $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['higherTenderAmount']);
425
                 $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['higherTenderAmount']);
423
-                $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['startDate']);
424
-                $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['smeawardedIndicator']);
425
-                $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['contract_id']);
426
-                $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['contract_issueDate']);
427
-                $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $datos['partyIdentification']);
428
-                $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['partyName']);
429
-                $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $datos['TaxExclusiveAmount']);
430
-                $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['PayableAmount']);
426
+                $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['abnormallyLowTendersIndicator']);
427
+                $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $this->formatFechas($datos['startDate']));
428
+                $spreadsheet->getStyle('I' . $aux)
429
+                    ->getNumberFormat()
430
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
431
+                $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['smeawardedIndicator']);
432
+                $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['contract_id']);
433
+                $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $this->formatFechas($datos['contract_issueDate']));
434
+                $spreadsheet->getStyle('L' . $aux)
435
+                    ->getNumberFormat()
436
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
437
+                $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['partyIdentification']);
438
+                $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $datos['partyName']);
439
+                $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['TaxExclusiveAmount']);
431
 
440
 
432
                 $aux++;
441
                 $aux++;
433
             }
442
             }
456
                 $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['maximumLotPresentationQuantity']);
465
                 $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['maximumLotPresentationQuantity']);
457
                 $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['maximumTendererAwardedLotsQuantity']);
466
                 $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['maximumTendererAwardedLotsQuantity']);
458
                 $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['lotsCombinationContractingAuthorityRights']);
467
                 $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['lotsCombinationContractingAuthorityRights']);
459
-                $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['deadLineEndDate']);
460
-                $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['deadLineEndTime']);
468
+                $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $this->formatFechas($datos['deadLineEndDate']));
469
+                $spreadsheet->getStyle('J' . $aux)
470
+                    ->getNumberFormat()
471
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
472
+                $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $this->formatFechas($datos['deadLineEndTime']));
473
+                $spreadsheet->getStyle('K' . $aux)
474
+                    ->getNumberFormat()
475
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
461
                 $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $datos['deadLineDescription']);
476
                 $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $datos['deadLineDescription']);
462
                 $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['auctionTerms']);
477
                 $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['auctionTerms']);
463
-                $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $datos['documentAvailablePeriod_EndDate']);
478
+                $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $this->formatFechas($datos['documentAvailablePeriod_EndDate']));
479
+                $spreadsheet->getStyle('N' . $aux)
480
+                    ->getNumberFormat()
481
+                    ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
464
                 $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['documentAvailablePeriod_EndTime']);
482
                 $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['documentAvailablePeriod_EndTime']);
465
 
483
 
466
                 $aux++;
484
                 $aux++;
482
                 guardar_log("Excel", "Escribir tender process--" . $contador);
500
                 guardar_log("Excel", "Escribir tender process--" . $contador);
483
                 $contador++;
501
                 $contador++;
484
                 $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
502
                 $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
485
-                $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['requiredCurriculaIndicator']);
486
-                $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['variantConstraintIndicator']);
487
-                $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['fundingProgramCode']);
488
-                $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['guaranteeTypeCode']);
489
-                $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['requiredFinancialGuarantee_Amount']);
490
-                $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['language']);
491
-                $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['allowedSubcontractTerms']);
492
-                $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['description']);
493
-                $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['personalSituation']);
494
-                $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['procurementLegislationDocumentReference']);
503
+                $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['variantConstraintIndicator']);
504
+                $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['guaranteeTypeCode']);
505
+                $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['requiredFinancialGuarantee_Amount']);
506
+                $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['allowedSubcontractTerms']);
507
+                $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['description']);
508
+                $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['personalSituation']);
509
+                $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['procurementLegislationDocumentReference']);
495
                 $aux++;
510
                 $aux++;
496
             }
511
             }
497
         }
512
         }
593
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
608
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
594
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
609
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
595
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
610
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
596
-            $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoGeneral, $doc['idDoc']);
597
 
611
 
598
             $this->filaDocumentoGeneral++;
612
             $this->filaDocumentoGeneral++;
599
         }
613
         }
612
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
626
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
613
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
627
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
614
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
628
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
615
-            $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoAdd, $doc['documentHash']);
616
 
629
 
617
             $this->filaDocumentoAdd++;
630
             $this->filaDocumentoAdd++;
618
         }
631
         }
630
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
643
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
631
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
644
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
632
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
645
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
633
-            $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoTech, $doc['documentHash']);
634
 
646
 
635
             $this->filaDocumentoTech++;
647
             $this->filaDocumentoTech++;
636
         }
648
         }
648
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
660
             $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
649
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
661
             $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
650
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
662
             $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
651
-            $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoLegal, $doc['documentHash']);
652
 
663
 
653
             $this->filaDocumentoLegal++;
664
             $this->filaDocumentoLegal++;
654
         }
665
         }
713
         $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
724
         $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
714
         $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link Documento");
725
         $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link Documento");
715
         $spreadsheet->getActiveSheet()->SetCellValue('C1', "Nombre Documento");
726
         $spreadsheet->getActiveSheet()->SetCellValue('C1', "Nombre Documento");
716
-        $spreadsheet->getActiveSheet()->SetCellValue('D1', "Hash Documento");
717
 
727
 
718
         return $spreadsheet;
728
         return $spreadsheet;
719
     }
729
     }
734
         $spreadsheet->getActiveSheet()->SetCellValue('B1', "Objeto del lote");
744
         $spreadsheet->getActiveSheet()->SetCellValue('B1', "Objeto del lote");
735
         $spreadsheet->getActiveSheet()->SetCellValue('C1', "Número de lote");
745
         $spreadsheet->getActiveSheet()->SetCellValue('C1', "Número de lote");
736
         $spreadsheet->getActiveSheet()->SetCellValue('D1', "Importe sin Impuestos");
746
         $spreadsheet->getActiveSheet()->SetCellValue('D1', "Importe sin Impuestos");
737
-        $spreadsheet->getActiveSheet()->SetCellValue('E1', "Importe con Impuestos");
738
-        $spreadsheet->getActiveSheet()->SetCellValue('F1', "Lugar de ejecución del lote");
747
+        $spreadsheet->getActiveSheet()->SetCellValue('E1', "Lugar de ejecución del lote");
748
+        $spreadsheet->getActiveSheet()->SetCellValue('E1', "CPV");
739
 
749
 
740
         return $spreadsheet;
750
         return $spreadsheet;
741
     }
751
     }
795
         $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de licitadores participadores');
805
         $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de licitadores participadores');
796
         $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Importe Oferta mas baja');
806
         $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Importe Oferta mas baja');
797
         $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Importe Oferta mas alta');
807
         $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Importe Oferta mas alta');
798
-        $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Fecha de entrada en vigor');
799
-        $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Identifica si es una PYME');
800
-        $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Identificador del contrato');
801
-        $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Fecha de formalización');
802
-        $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Adjudicatario CIF');
803
-        $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Nombre Adjudicatario');
804
-        $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Importe de adjudicación sin impuestos');
805
-        $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Importe de adjudicación con impuestos');
808
+        $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Ofertas Temerarias Descartadas');
809
+        $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Fecha de entrada en vigor');
810
+        $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Identifica si es una PYME');
811
+        $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Identificador del contrato');
812
+        $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Fecha de formalización');
813
+        $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Adjudicatario CIF');
814
+        $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Nombre Adjudicatario');
815
+        $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Importe de adjudicación sin impuestos');
806
 
816
 
807
         return $spreadsheet;
817
         return $spreadsheet;
808
     }
818
     }
849
         );
859
         );
850
         $sheet->getStyle("A1:K1")->applyFromArray($styleArr);
860
         $sheet->getStyle("A1:K1")->applyFromArray($styleArr);
851
         $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
861
         $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
852
-        $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Se requiere la presentación de Curriculum Vitae de las personas que realizarán el proyecto');
853
-        $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Indica que se pueden ofertar variantes');
854
-        $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Código descriptivo del tipo de programas que financian este contrato');
855
-        $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Tipo de garantia');
856
-        $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Porcentaje de la garantíaa');
857
-        $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Idioma');
858
-        $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Porcentaje de subcontratación máximo especificado para este contrato.');
859
-        $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Descripción del objeto de la subcontratación');
860
-        $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Descripción textual de los requisitos específicos del operador económico para poder participar en la licitación');
861
-        $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Contrato sujeto a regulación armonizadaF');
862
+        $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Indica que se pueden ofertar variantes');
863
+        $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Tipo de garantia');
864
+        $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Porcentaje de la garantíaa');
865
+        $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Porcentaje de subcontratación máximo especificado para este contrato.');
866
+        $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Descripción del objeto de la subcontratación');
867
+        $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Descripción textual de los requisitos específicos del operador económico para poder participar en la licitación');
868
+        $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Contrato sujeto a regulación armonizadaF');
862
 
869
 
863
         return $spreadsheet;
870
         return $spreadsheet;
864
     }
871
     }