@@ -94,22 +94,22 @@ |
||
| 94 | 94 | protected function getSQLFrom(): string |
| 95 | 95 | { |
| 96 | 96 | return static::MAIN_TABLE |
| 97 | - . ' LEFT JOIN ' . static::LINES_TABLE . ' ON (' |
|
| 98 | - . static::MAIN_TABLE . '.idfactura = ' . static::LINES_TABLE . '.idfactura)' |
|
| 99 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
| 100 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
| 101 | - . ' LEFT JOIN '. static::ALMACENES_TABLE . ' ON (' |
|
| 102 | - . static::MAIN_TABLE . '.codalmacen = ' . static::ALMACENES_TABLE . '.codalmacen)' |
|
| 103 | - . ' LEFT JOIN '. static::NCFTIPO_TABLE . ' ON (' |
|
| 104 | - . static::MAIN_TABLE . '.tipocomprobante = ' . static::NCFTIPO_TABLE . '.tipocomprobante)' |
|
| 105 | - . ' LEFT JOIN ' . static::NCFTIPOPAGO_TABLE . ' ON (' |
|
| 106 | - . static::MAIN_TABLE . '.ncftipopago = ' . static::NCFTIPOPAGO_TABLE . '.codigo)' |
|
| 107 | - . ' LEFT JOIN ' . static::NCFTIPOMOV_TABLE . ' ON (' |
|
| 108 | - . static::MAIN_TABLE . '.ncftipomovimiento = ' . static::NCFTIPOMOV_TABLE . '.codigo)' |
|
| 109 | - . ' LEFT JOIN ' . static::NCFTIPOANUL_TABLE . ' ON (' |
|
| 110 | - . static::MAIN_TABLE . '.ncftipoanulacion = ' . static::NCFTIPOANUL_TABLE . '.codigo)' |
|
| 111 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
| 112 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
| 97 | + . ' LEFT JOIN '.static::LINES_TABLE.' ON (' |
|
| 98 | + . static::MAIN_TABLE.'.idfactura = '.static::LINES_TABLE.'.idfactura)' |
|
| 99 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
| 100 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
| 101 | + . ' LEFT JOIN '.static::ALMACENES_TABLE.' ON (' |
|
| 102 | + . static::MAIN_TABLE.'.codalmacen = '.static::ALMACENES_TABLE.'.codalmacen)' |
|
| 103 | + . ' LEFT JOIN '.static::NCFTIPO_TABLE.' ON (' |
|
| 104 | + . static::MAIN_TABLE.'.tipocomprobante = '.static::NCFTIPO_TABLE.'.tipocomprobante)' |
|
| 105 | + . ' LEFT JOIN '.static::NCFTIPOPAGO_TABLE.' ON (' |
|
| 106 | + . static::MAIN_TABLE.'.ncftipopago = '.static::NCFTIPOPAGO_TABLE.'.codigo)' |
|
| 107 | + . ' LEFT JOIN '.static::NCFTIPOMOV_TABLE.' ON (' |
|
| 108 | + . static::MAIN_TABLE.'.ncftipomovimiento = '.static::NCFTIPOMOV_TABLE.'.codigo)' |
|
| 109 | + . ' LEFT JOIN '.static::NCFTIPOANUL_TABLE.' ON (' |
|
| 110 | + . static::MAIN_TABLE.'.ncftipoanulacion = '.static::NCFTIPOANUL_TABLE.'.codigo)' |
|
| 111 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
| 112 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function saveInsert() |
| 49 | 49 | { |
| 50 | - return function () { |
|
| 51 | - $ArrayTipoNCFCompras = ['11','12','16','17']; |
|
| 50 | + return function() { |
|
| 51 | + $ArrayTipoNCFCompras = ['11', '12', '16', '17']; |
|
| 52 | 52 | $ncfrango = new NCFRango(); |
| 53 | 53 | $cliente = new Proveedor(); |
| 54 | 54 | $appSettings = new AppSettings; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $tipocomprobante = $this->tipocomprobante; |
| 58 | 58 | $ncfRangoToUse = $ncfrango->getByTipoComprobante($actualProveedor->idempresa, $tipocomprobante); |
| 59 | 59 | |
| 60 | - if(in_array($tipocomprobante, $ArrayTipoNCFCompras, true)) { |
|
| 60 | + if (in_array($tipocomprobante, $ArrayTipoNCFCompras, true)) { |
|
| 61 | 61 | $ncf = $ncfRangoToUse->generateNCF(); |
| 62 | 62 | $this->numproveedor = $ncf; |
| 63 | 63 | $this->ncffechavencimiento = $ncfRangoToUse->fechavencimiento; |