| @@ 2355-2462 (lines=108) @@ | ||
| 2352 | * @param number $y Posição vertical canto superior |
|
| 2353 | * @return number Posição vertical final |
|
| 2354 | */ |
|
| 2355 | protected function zDocOrigContinuacao($x = 0, $y = 0) |
|
| 2356 | { |
|
| 2357 | $this->pdf->AddPage($this->orientacao, $this->papel); |
|
| 2358 | $r = $this->zCabecalho(1, 1, '2', '2'); |
|
| 2359 | $oldX = $x; |
|
| 2360 | $oldY = $y; |
|
| 2361 | if ($this->orientacao == 'P') { |
|
| 2362 | $maxW = $this->wPrint; |
|
| 2363 | } else { |
|
| 2364 | $maxW = $this->wPrint - $this->wCanhoto; |
|
| 2365 | } |
|
| 2366 | $w = $maxW; |
|
| 2367 | ||
| 2368 | //$h = 6; // de sub-titulo |
|
| 2369 | //$h = 6 + 3; // de altura do texto (primeira linha |
|
| 2370 | //$h = 9 + 3.5 ;// segunda linha |
|
| 2371 | //$h = 9 + 3.5+ 3.5 ;// segunda linha |
|
| 2372 | $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9; |
|
| 2373 | if (count($this->arrayNFe)%2 !=0) { |
|
| 2374 | $h = $h+3.5; |
|
| 2375 | } // Caso tenha apenas 1 registro na ultima linha |
|
| 2376 | ||
| 2377 | $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO'; |
|
| 2378 | $aFont = $this->formatPadrao; |
|
| 2379 | $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'C', 1, ''); |
|
| 2380 | $descr1 = 'TIPO DOC'; |
|
| 2381 | $descr2 = 'CNPJ/CHAVE/OBS'; |
|
| 2382 | $descr3 = 'SÉRIE/NRO. DOCUMENTO'; |
|
| 2383 | ||
| 2384 | $y += 3.4; |
|
| 2385 | $this->pdf->Line($x, $y, $w + 1, $y); |
|
| 2386 | $texto = $descr1; |
|
| 2387 | $aFont = $this->formatPadrao; |
|
| 2388 | $this->pTextBox($x, $y, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2389 | $yIniDados = $y; |
|
| 2390 | ||
| 2391 | $x += $w * 0.07; // COLUNA CNPJ/CHAVE/OBS |
|
| 2392 | $texto = $descr2; |
|
| 2393 | $aFont = $this->formatPadrao; |
|
| 2394 | $this->pTextBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2395 | ||
| 2396 | $x += $w * 0.28; |
|
| 2397 | $texto = $descr3; |
|
| 2398 | $aFont = $this->formatPadrao; |
|
| 2399 | $this->pTextBox($x, $y, $w * 0.13, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2400 | ||
| 2401 | $x += $w * 0.14; |
|
| 2402 | if ($this->modal == '1') { |
|
| 2403 | if ($this->lota == 1) { |
|
| 2404 | $this->pdf->Line($x, $y, $x, $y + 31.5); |
|
| 2405 | } else { |
|
| 2406 | $this->pdf->Line($x, $y, $x, $y + 49.5); |
|
| 2407 | } |
|
| 2408 | } elseif ($this->modal == '3') { |
|
| 2409 | $this->pdf->Line($x, $y, $x, $y + 34.1); |
|
| 2410 | } else { |
|
| 2411 | $this->pdf->Line($x, $y, $x, $y + 21.5); |
|
| 2412 | } |
|
| 2413 | $texto = $descr1; |
|
| 2414 | $aFont = $this->formatPadrao; |
|
| 2415 | $this->pTextBox($x, $y, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2416 | ||
| 2417 | $x += $w * 0.08; |
|
| 2418 | $texto = $descr2; |
|
| 2419 | $aFont = $this->formatPadrao; |
|
| 2420 | $this->pTextBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2421 | ||
| 2422 | $x += $w * 0.28; // COLUNA SÉRIE/NRO.DOCUMENTO DA DIREITA |
|
| 2423 | $texto = $descr3; |
|
| 2424 | $aFont = $this->formatPadrao; |
|
| 2425 | $this->pTextBox($x, $y, $w * 0.13, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2426 | $auxX = $oldX; |
|
| 2427 | $yIniDados += 3; |
|
| 2428 | ||
| 2429 | $contador = 16; |
|
| 2430 | for ($contador = 16; $contador < count($this->arrayNFe); $contador++) { |
|
| 2431 | $tp = 'NF-e'; |
|
| 2432 | $chaveNFe = $this->arrayNFe[$contador]; |
|
| 2433 | $numNFe = substr($chaveNFe, 25, 9); |
|
| 2434 | $serieNFe = substr($chaveNFe, 22, 3); |
|
| 2435 | $doc = $serieNFe . '/' . $numNFe; |
|
| 2436 | if ($auxX > $w * 0.90) { |
|
| 2437 | $yIniDados = $yIniDados + 3.5; |
|
| 2438 | $auxX = $oldX; |
|
| 2439 | } |
|
| 2440 | $texto = $tp; |
|
| 2441 | $aFont = array( |
|
| 2442 | 'font' => $this->fontePadrao, |
|
| 2443 | 'size' => 7, |
|
| 2444 | 'style' => ''); |
|
| 2445 | $this->pTextBox($auxX, $yIniDados, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2446 | $auxX += $w * 0.07; |
|
| 2447 | $texto = $chaveNFe; |
|
| 2448 | $aFont = array( |
|
| 2449 | 'font' => $this->fontePadrao, |
|
| 2450 | 'size' => 7, |
|
| 2451 | 'style' => ''); |
|
| 2452 | $this->pTextBox($auxX, $yIniDados, $w * 0.27, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2453 | $auxX += $w * 0.28; |
|
| 2454 | $texto = $doc; |
|
| 2455 | $aFont = array( |
|
| 2456 | 'font' => $this->fontePadrao, |
|
| 2457 | 'size' => 7, |
|
| 2458 | 'style' => ''); |
|
| 2459 | $this->pTextBox($auxX, $yIniDados, $w * 0.30, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2460 | $auxX += $w * 0.15; |
|
| 2461 | } |
|
| 2462 | } //fim da função zDocOrigContinuacao |
|
| 2463 | ||
| 2464 | /** |
|
| 2465 | * zDocCompl |
|
| @@ 2327-2434 (lines=108) @@ | ||
| 2324 | * @param number $y Posição vertical canto superior |
|
| 2325 | * @return number Posição vertical final |
|
| 2326 | */ |
|
| 2327 | protected function zDocOrigContinuacao($x = 0, $y = 0) |
|
| 2328 | { |
|
| 2329 | $this->pdf->AddPage($this->orientacao, $this->papel); |
|
| 2330 | $r = $this->zCabecalho(1, 1, '2', '2'); |
|
| 2331 | $oldX = $x; |
|
| 2332 | $oldY = $y; |
|
| 2333 | if ($this->orientacao == 'P') { |
|
| 2334 | $maxW = $this->wPrint; |
|
| 2335 | } else { |
|
| 2336 | $maxW = $this->wPrint - $this->wCanhoto; |
|
| 2337 | } |
|
| 2338 | $w = $maxW; |
|
| 2339 | ||
| 2340 | //$h = 6; // de sub-titulo |
|
| 2341 | //$h = 6 + 3; // de altura do texto (primeira linha |
|
| 2342 | //$h = 9 + 3.5 ;// segunda linha |
|
| 2343 | //$h = 9 + 3.5+ 3.5 ;// segunda linha |
|
| 2344 | $h = (( ( count($this->arrayNFe)/2 ) - 9) * 3.5)+9; |
|
| 2345 | if (count($this->arrayNFe)%2 !=0) { |
|
| 2346 | $h = $h+3.5; |
|
| 2347 | } // Caso tenha apenas 1 registro na ultima linha |
|
| 2348 | ||
| 2349 | $texto = 'DOCUMENTOS ORIGINÁRIOS - CONTINUACÃO'; |
|
| 2350 | $aFont = $this->formatPadrao; |
|
| 2351 | $this->pTextBox($x, $y, $w, $h, $texto, $aFont, 'T', 'C', 1, ''); |
|
| 2352 | $descr1 = 'TIPO DOC'; |
|
| 2353 | $descr2 = 'CNPJ/CHAVE/OBS'; |
|
| 2354 | $descr3 = 'SÉRIE/NRO. DOCUMENTO'; |
|
| 2355 | ||
| 2356 | $y += 3.4; |
|
| 2357 | $this->pdf->Line($x, $y, $w + 1, $y); |
|
| 2358 | $texto = $descr1; |
|
| 2359 | $aFont = $this->formatPadrao; |
|
| 2360 | $this->pTextBox($x, $y, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2361 | $yIniDados = $y; |
|
| 2362 | ||
| 2363 | $x += $w * 0.07; // COLUNA CNPJ/CHAVE/OBS |
|
| 2364 | $texto = $descr2; |
|
| 2365 | $aFont = $this->formatPadrao; |
|
| 2366 | $this->pTextBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2367 | ||
| 2368 | $x += $w * 0.28; |
|
| 2369 | $texto = $descr3; |
|
| 2370 | $aFont = $this->formatPadrao; |
|
| 2371 | $this->pTextBox($x, $y, $w * 0.13, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2372 | ||
| 2373 | $x += $w * 0.14; |
|
| 2374 | if ($this->modal == '1') { |
|
| 2375 | if ($this->lota == 1) { |
|
| 2376 | $this->pdf->Line($x, $y, $x, $y + 31.5); |
|
| 2377 | } else { |
|
| 2378 | $this->pdf->Line($x, $y, $x, $y + 49.5); |
|
| 2379 | } |
|
| 2380 | } elseif ($this->modal == '3') { |
|
| 2381 | $this->pdf->Line($x, $y, $x, $y + 34.1); |
|
| 2382 | } else { |
|
| 2383 | $this->pdf->Line($x, $y, $x, $y + 21.5); |
|
| 2384 | } |
|
| 2385 | $texto = $descr1; |
|
| 2386 | $aFont = $this->formatPadrao; |
|
| 2387 | $this->pTextBox($x, $y, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2388 | ||
| 2389 | $x += $w * 0.08; |
|
| 2390 | $texto = $descr2; |
|
| 2391 | $aFont = $this->formatPadrao; |
|
| 2392 | $this->pTextBox($x, $y, $w * 0.23, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2393 | ||
| 2394 | $x += $w * 0.28; // COLUNA SÉRIE/NRO.DOCUMENTO DA DIREITA |
|
| 2395 | $texto = $descr3; |
|
| 2396 | $aFont = $this->formatPadrao; |
|
| 2397 | $this->pTextBox($x, $y, $w * 0.13, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2398 | $auxX = $oldX; |
|
| 2399 | $yIniDados += 3; |
|
| 2400 | ||
| 2401 | $contador = 16; |
|
| 2402 | for ($contador = 16; $contador < count($this->arrayNFe); $contador++) { |
|
| 2403 | $tp = 'NF-e'; |
|
| 2404 | $chaveNFe = $this->arrayNFe[$contador]; |
|
| 2405 | $numNFe = substr($chaveNFe, 25, 9); |
|
| 2406 | $serieNFe = substr($chaveNFe, 22, 3); |
|
| 2407 | $doc = $serieNFe . '/' . $numNFe; |
|
| 2408 | if ($auxX > $w * 0.90) { |
|
| 2409 | $yIniDados = $yIniDados + 3.5; |
|
| 2410 | $auxX = $oldX; |
|
| 2411 | } |
|
| 2412 | $texto = $tp; |
|
| 2413 | $aFont = array( |
|
| 2414 | 'font' => $this->fontePadrao, |
|
| 2415 | 'size' => 7, |
|
| 2416 | 'style' => ''); |
|
| 2417 | $this->pTextBox($auxX, $yIniDados, $w * 0.10, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2418 | $auxX += $w * 0.07; |
|
| 2419 | $texto = $chaveNFe; |
|
| 2420 | $aFont = array( |
|
| 2421 | 'font' => $this->fontePadrao, |
|
| 2422 | 'size' => 7, |
|
| 2423 | 'style' => ''); |
|
| 2424 | $this->pTextBox($auxX, $yIniDados, $w * 0.27, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2425 | $auxX += $w * 0.28; |
|
| 2426 | $texto = $doc; |
|
| 2427 | $aFont = array( |
|
| 2428 | 'font' => $this->fontePadrao, |
|
| 2429 | 'size' => 7, |
|
| 2430 | 'style' => ''); |
|
| 2431 | $this->pTextBox($auxX, $yIniDados, $w * 0.30, $h, $texto, $aFont, 'T', 'L', 0, ''); |
|
| 2432 | $auxX += $w * 0.15; |
|
| 2433 | } |
|
| 2434 | } //fim da função zDocOrigContinuacao |
|
| 2435 | ||
| 2436 | /** |
|
| 2437 | * zDocCompl |
|