Completed
Pull Request — master (#42)
by
unknown
02:13
created
lib/Sii/ConsumoFolio.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $fecha = date('Y-m-d');
127 127
         foreach ($this->detalles as &$d) {
128
-            if ($d['FchDoc'] < $fecha)
128
+            if ($d['FchDoc']<$fecha)
129 129
                 $fecha = $d['FchDoc'];
130 130
         }
131 131
         return $fecha;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $fecha = date('Y-m-d');
143 143
         foreach ($this->detalles as &$d) {
144
-            if ($d['FchDoc'] > $fecha)
144
+            if ($d['FchDoc']>$fecha)
145 145
                 $fecha = $d['FchDoc'];
146 146
         }
147 147
         return $fecha;
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         // ajustes post agregar detalles
222 222
         foreach ($this->resumen as &$r) {
223 223
             // obtener folios utilizados = emitidos + anulados
224
-            $r['FoliosUtilizados'] = $r['FoliosEmitidos'] + $r['FoliosAnulados'];
224
+            $r['FoliosUtilizados'] = $r['FoliosEmitidos']+$r['FoliosAnulados'];
225 225
             $r['RangoUtilizados'] = $this->getRangos($RangoUtilizados[$r['TipoDocumento']]);
226 226
         }
227 227
         // completar con los resumenes que no se colocaron
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         $aux = [];
254 254
         $inicial = $folios[0];
255 255
         $i = $inicial;
256
-        foreach($folios as $f) {
256
+        foreach ($folios as $f) {
257 257
             if ($i!=$f) {
258 258
                 $inicial = $f;
259 259
                 $i = $inicial;
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,8 +90,9 @@  discard block
 block discarded – undo
90 90
     public function generar()
91 91
     {
92 92
         // si ya se había generado se entrega directamente
93
-        if ($this->xml_data)
94
-            return $this->xml_data;
93
+        if ($this->xml_data) {
94
+                    return $this->xml_data;
95
+        }
95 96
         // generar XML del envío
96 97
         $xmlEnvio = (new \sasco\LibreDTE\XML())->generate([
97 98
             'ConsumoFolios' => [
@@ -125,8 +126,9 @@  discard block
 block discarded – undo
125 126
     {
126 127
         $fecha = date('Y-m-d');
127 128
         foreach ($this->detalles as &$d) {
128
-            if ($d['FchDoc'] < $fecha)
129
-                $fecha = $d['FchDoc'];
129
+            if ($d['FchDoc'] < $fecha) {
130
+                            $fecha = $d['FchDoc'];
131
+            }
130 132
         }
131 133
         return $fecha;
132 134
     }
@@ -141,8 +143,9 @@  discard block
 block discarded – undo
141 143
     {
142 144
         $fecha = date('Y-m-d');
143 145
         foreach ($this->detalles as &$d) {
144
-            if ($d['FchDoc'] > $fecha)
145
-                $fecha = $d['FchDoc'];
146
+            if ($d['FchDoc'] > $fecha) {
147
+                            $fecha = $d['FchDoc'];
148
+            }
146 149
         }
147 150
         return $fecha;
148 151
     }
Please login to merge, or discard this patch.