@@ -71,10 +71,10 @@ |
||
| 71 | 71 | protected function getSQLFrom(): string |
| 72 | 72 | { |
| 73 | 73 | return static::MAIN_TABLE |
| 74 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
| 75 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
| 76 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
| 77 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
| 74 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
| 75 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
| 76 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
| 77 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -69,16 +69,16 @@ discard block |
||
| 69 | 69 | protected function getGroupFields(): string |
| 70 | 70 | { |
| 71 | 71 | //return parent::getGroupFields(); // TODO: Change the autogenerated stub |
| 72 | - return static::MAIN_TABLE.'.idempresa, ' . |
|
| 73 | - static::MAIN_TABLE.'.codalmacen, ' . |
|
| 74 | - static::MAIN_TABLE.'.cifnif, ' . |
|
| 75 | - static::MAIN_TABLE.'.ncftipomovimiento, ' . |
|
| 76 | - static::MAIN_TABLE.'.numproveedor, ' . |
|
| 77 | - static::SECONDARY_TABLE_ALIAS.'.numproveedor, ' . |
|
| 78 | - static::MAIN_TABLE.'.fecha, ' . |
|
| 79 | - static::ESTADOSDOC_TABLE.'.nombre, ' . |
|
| 80 | - static::MAIN_TABLE.'.neto, ' . |
|
| 81 | - static::MAIN_TABLE.'.totaliva' . |
|
| 72 | + return static::MAIN_TABLE.'.idempresa, '. |
|
| 73 | + static::MAIN_TABLE.'.codalmacen, '. |
|
| 74 | + static::MAIN_TABLE.'.cifnif, '. |
|
| 75 | + static::MAIN_TABLE.'.ncftipomovimiento, '. |
|
| 76 | + static::MAIN_TABLE.'.numproveedor, '. |
|
| 77 | + static::SECONDARY_TABLE_ALIAS.'.numproveedor, '. |
|
| 78 | + static::MAIN_TABLE.'.fecha, '. |
|
| 79 | + static::ESTADOSDOC_TABLE.'.nombre, '. |
|
| 80 | + static::MAIN_TABLE.'.neto, '. |
|
| 81 | + static::MAIN_TABLE.'.totaliva'. |
|
| 82 | 82 | ' '; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | protected function getSQLFrom(): string |
| 90 | 90 | { |
| 91 | 91 | return static::MAIN_TABLE |
| 92 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
| 93 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
| 94 | - . ' LEFT JOIN '. static::LINES_TABLE . ' ON (' |
|
| 95 | - . static::MAIN_TABLE . '.idfactura = ' . static::LINES_TABLE . '.idfactura)' |
|
| 96 | - . ' LEFT JOIN '. static::PRODS_TABLE . ' ON (' |
|
| 97 | - . static::LINES_TABLE . '.referencia = ' . static::PRODS_TABLE . '.referencia)' |
|
| 98 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
| 99 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
| 92 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
| 93 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
| 94 | + . ' LEFT JOIN '.static::LINES_TABLE.' ON (' |
|
| 95 | + . static::MAIN_TABLE.'.idfactura = '.static::LINES_TABLE.'.idfactura)' |
|
| 96 | + . ' LEFT JOIN '.static::PRODS_TABLE.' ON (' |
|
| 97 | + . static::LINES_TABLE.'.referencia = '.static::PRODS_TABLE.'.referencia)' |
|
| 98 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
| 99 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -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 | /** |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | * along with fsRepublicaDominicana. If not, see <http://www.gnu.org/licenses/>. |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | - namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model; |
|
| 19 | + namespace FacturaScripts\Plugins\fsRepublicaDominicana\Extension\Model; |
|
| 20 | 20 | |
| 21 | - class Producto |
|
| 22 | - { |
|
| 21 | + class Producto |
|
| 22 | + { |
|
| 23 | 23 | /** |
| 24 | 24 | * This field is to determinate if the product is a service or a good |
| 25 | 25 | * @var boolean |
| 26 | 26 | */ |
| 27 | 27 | public $esservicio; |
| 28 | - } |
|
| 28 | + } |
|
@@ -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; |