@@ -432,10 +432,12 @@ discard block |
||
432 | 432 | } |
433 | 433 | $contacto = []; |
434 | 434 | if (!empty($emisor['Telefono'])) { |
435 | - if (!is_array($emisor['Telefono'])) |
|
436 | - $emisor['Telefono'] = [$emisor['Telefono']]; |
|
437 | - foreach ($emisor['Telefono'] as $t) |
|
438 | - $contacto[] = $t; |
|
435 | + if (!is_array($emisor['Telefono'])) { |
|
436 | + $emisor['Telefono'] = [$emisor['Telefono']]; |
|
437 | + } |
|
438 | + foreach ($emisor['Telefono'] as $t) { |
|
439 | + $contacto[] = $t; |
|
440 | + } |
|
439 | 441 | } |
440 | 442 | if (!empty($emisor['CorreoEmisor'])) { |
441 | 443 | $contacto[] = $emisor['CorreoEmisor']; |
@@ -639,10 +641,12 @@ discard block |
||
639 | 641 | $this->MultiTexto($receptor['Extranjero']['NumId'], $x+$offset+2); |
640 | 642 | } |
641 | 643 | $contacto = []; |
642 | - if (!empty($receptor['Contacto'])) |
|
643 | - $contacto[] = $receptor['Contacto']; |
|
644 | - if (!empty($receptor['CorreoRecep'])) |
|
645 | - $contacto[] = $receptor['CorreoRecep']; |
|
644 | + if (!empty($receptor['Contacto'])) { |
|
645 | + $contacto[] = $receptor['Contacto']; |
|
646 | + } |
|
647 | + if (!empty($receptor['CorreoRecep'])) { |
|
648 | + $contacto[] = $receptor['CorreoRecep']; |
|
649 | + } |
|
646 | 650 | if (!empty($contacto)) { |
647 | 651 | $this->setFont('', 'B', null); |
648 | 652 | $this->Texto('Contacto', $x); |
@@ -692,10 +696,12 @@ discard block |
||
692 | 696 | if (!empty($Transporte['DirDest']) and !empty($Transporte['CmnaDest'])) { |
693 | 697 | $transporte .= 'a '.$Transporte['DirDest'].', '.$Transporte['CmnaDest']; |
694 | 698 | } |
695 | - if (!empty($Transporte['RUTTrans'])) |
|
696 | - $transporte .= ' por '.$Transporte['RUTTrans']; |
|
697 | - if (!empty($Transporte['Patente'])) |
|
698 | - $transporte .= ' en vehículo '.$Transporte['Patente']; |
|
699 | + if (!empty($Transporte['RUTTrans'])) { |
|
700 | + $transporte .= ' por '.$Transporte['RUTTrans']; |
|
701 | + } |
|
702 | + if (!empty($Transporte['Patente'])) { |
|
703 | + $transporte .= ' en vehículo '.$Transporte['Patente']; |
|
704 | + } |
|
699 | 705 | if (isset($Transporte['Chofer']) and is_array($Transporte['Chofer'])) { |
700 | 706 | if (!empty($Transporte['Chofer']['NombreChofer'])) { |
701 | 707 | $transporte .= ' con chofer '.$Transporte['Chofer']['NombreChofer']; |
@@ -758,8 +764,9 @@ discard block |
||
758 | 764 | */ |
759 | 765 | protected function agregarReferencia($referencias, $x = 10, $offset = 22) |
760 | 766 | { |
761 | - if (!isset($referencias[0])) |
|
762 | - $referencias = [$referencias]; |
|
767 | + if (!isset($referencias[0])) { |
|
768 | + $referencias = [$referencias]; |
|
769 | + } |
|
763 | 770 | foreach($referencias as $r) { |
764 | 771 | $texto = $r['NroLinRef'].' - '; |
765 | 772 | if (!empty($r['TpoDocRef'])) { |
@@ -909,8 +916,9 @@ discard block |
||
909 | 916 | $this->Texto($this->detalle_cols['QtyItem']['title'], $x+35, $this->y, ucfirst($this->detalle_cols['QtyItem']['align'][0]), $this->detalle_cols['QtyItem']['width']); |
910 | 917 | $this->Texto($this->detalle_cols['MontoItem']['title'], $x+45, $this->y, ucfirst($this->detalle_cols['MontoItem']['align'][0]), $this->detalle_cols['MontoItem']['width']); |
911 | 918 | $this->Line($p1x, $p1y+4, $p2x, $p2y+4, $style); |
912 | - if (!isset($detalle[0])) |
|
913 | - $detalle = [$detalle]; |
|
919 | + if (!isset($detalle[0])) { |
|
920 | + $detalle = [$detalle]; |
|
921 | + } |
|
914 | 922 | $this->SetY($this->getY()+2); |
915 | 923 | foreach($detalle as &$d) { |
916 | 924 | $this->MultiTexto($d['NmbItem'], $x+1, $this->y+4, ucfirst($this->detalle_cols['NmbItem']['align'][0]), $this->detalle_cols['NmbItem']['width']); |
@@ -985,8 +993,9 @@ discard block |
||
985 | 993 | */ |
986 | 994 | protected function agregarPagos(array $pagos, $x = 10) |
987 | 995 | { |
988 | - if (!isset($pagos[0])) |
|
989 | - $pagos = [$pagos]; |
|
996 | + if (!isset($pagos[0])) { |
|
997 | + $pagos = [$pagos]; |
|
998 | + } |
|
990 | 999 | $this->Texto('Pago(s) programado(s):', $x); |
991 | 1000 | $this->Ln(); |
992 | 1001 | foreach($pagos as $p) { |