if($casopaso_id!=''){ $qF='SELECT to_char(fecha_ejec,\'YYYY-MM-DD HH12:MI PM\') fecha_ejec FROM wf_caso_66_pasos WHERE wf_caso_66_id=? AND wf_tarea_id =119 AND id < ? ORDER BY id DESC'; $parF=array($id_caso,$casopaso_id); $rsx=$con->Execute($qF,$parF); $arrF=$rsx->fetchRow();$fecha_salida=$arrF['fecha_ejec']; }else{ $fecha_salida=date('Y-m-d h:i a',strtotime(trim(' { 66_133_209_FEC_EJEC } '))) ; ; } $tit_formato='EXP - FORMATO SALIDA DE MERCANCIA'; //datos proc principal $cod=' { WFSV_72 } '; $carta_porte=' { 59_128_204_16_17_82 } '; $tipo_deposito=' { 59_128_204_16_17_86 } '; $cliente=' { 59_128_204_16_17_87 } '; $vec=explode(',',$cliente); $cliente=$vec[0].'-'.$vec[1].', '.$vec[2]; $manifiestoDIAN=' { 59_128_204_16_17_84 } '; $fecha_dian=' { 59_128_204_16_17_85 } '; $unidad_emp=' { 59_128_204_16_17_88 } '; $desc_mercancia=' { 59_128_204_16_17_91 } '; $peso=' { 59_128_204_16_17_90 } '; $bultos =' 59_128_204_16_17_89 '; //datos salida $no_orden=' { 66_133_209_17_18_95 } '; $destinatario='V37_'; $ciudad_des='V19_'; $cant_desp=' { 66_133_210_12_13_56 } '; $saldo_act=trigger::EjecutarScript('2', array( 'caso_id'=>$id_caso, 'proceso_id'=>$id_proc, 'casopaso_id'=>$casopaso_id, 'cant_enviada'=>$cant_desp, 'total'=>$bultos, 'cod_campo_cant_env'=>'56', 'cod_formulario_orden_carga'=>12, 'return'=>'s' )) ; $peso_desp=( { 66_134_211_13_14_76 } - { 66_134_211_13_14_58 } ); $no_levante=' { 66_133_209_17_18_100 } '; $fec_levante=' { 66_133_209_17_18_101 } '; $filial_veh=' { 66_133_209_17_18_99 } '; $placas_veh=' { 66_133_209_17_18_96 } '; $conductor=' { 66_133_209_17_18_97 } '; $id_conductor=' { 66_133_209_17_18_98 } '; $observaciones=' { 66_136_212_14_15_77 } '; $valida=''; $vence=' { 66_133_209_17_18_102 } '; $declaracion=' { 66_133_209_17_18_103 } '; $fec_declaracion=' { 66_133_209_17_18_104 } '; $destinatario=' { 66_133_209_17_18_105 } '; $ciu_destinatario=' { 66_133_209_17_18_106 } '; $dep__=new ADODB_Active_Record('wf_caso_59_cons_carta_porte'); $dep__->Load("no_carta like '".trim($carta_porte)."' "); $no_deposito=$dep__->consec; require_once($root.'/lib/tcpdf/config/lang/eng.php'); require_once($root.'/lib/tcpdf/tcpdf.php'); // create new PDF document $pdf = new TCPDF('p', 'mm', 'letter', true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('SITI Ltda'); $pdf->setPrintHeader(false); //set auto page breaks //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); // --------------------------------------------------------- // NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file. // set font $pdf->SetFont('helvetica', '', 9); // add a page $pdf->AddPage(); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $fils=4; $cols=3; $logo_empresa=$CONFIG['LOGO_EMPRESA']; $codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER']; $izq=10+2;$der=10;$arr=10; $abj=10; $pdf->SetMargins ( $izq,$arr,$der,true ); $pdf->SetAutoPageBreak(TRUE, $abj); $sxp=$fils*$cols; $tot=$rangoF-$rangoI+1; $pags=ceil(($tot)/$sxp); $anchoR=216-$izq-$der; $altoR=279-$arr-$abj; $anchoS=$anchoR/$cols; $margenSV=2; $margenSH=5; $altoS=$altoR/$fils; $altoImg=10; $altoText=8; $altoC=50; // set style for barcode $style = array( 'border' => 2, 'vpadding' => 'auto', 'hpadding' => 'auto', 'fgcolor' => array(0,0,0), 'bgcolor' => false, //array(255,255,255) 'module_width' => 1, // width of a single module in points 'module_height' => 1 // height of a single module in points ); $pdf->SetFont('helvetica', '', 9, '', false); $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $s=0;$p=1;$consc=$rangoI; $y=$arr; $x=$izq; $pdf->SetXY($x, $y); //$pdf->Image($root.$logo_empresa, $x, $y+$altoImg, 35, $altoImg, 'PNG', '', 'center', true, 150, '', false, false, 0, false, false, false); $pdf->SetXY($x+($anchoR-$altoC), $y); // QRCODE,H : QR-CODE Best error correction //($code,$type,$x = '',$y = '',$w = '',$h = '',$style = '',$align = '',$distort = false ) $pdf->write2DBarcode($codigo.'&sujeto='.trim($cod), 'QRCODE,Q', '', $y+15, $altoC, $altoC, $style, 'N'); //$pdf->Text($x+($anchoR-$altoC-10), $y+$altoC+$altoText,$cod ); $pdf->SetXY($x, $y); // create some HTML content ob_start(); echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']); ?>