Skip to content
Snippets Groups Projects
Commit fb1ff48f authored by Esteban Sassone's avatar Esteban Sassone
Browse files

Merge branch 'release/1.3.16' into support/1.3.x

parents 9c33634c acd2b401
No related branches found
Tags 1.3.16
No related merge requests found
......@@ -142,7 +142,6 @@ class proceso_generar_facturas_afip extends proceso
// Generar CAE's, PDF's y grabar comprobantes
$total_errores_afip = 0;
$total_errores_creacion_comprobante = 0;
foreach ($this->cobranzas as $cobranza) {
try{
......@@ -168,7 +167,6 @@ class proceso_generar_facturas_afip extends proceso
} catch (\Exception $ex) {
$this->set_estado(self::ESTADO_ERROR);
$total_errores_creacion_comprobante++;
$msg = "Error al generar comprobante de la cobranza ID: " . $cobranza['id'] . ". Mensaje: " . $ex->getMessage();
$this->agregar_notificacion($msg, 'error');
}
......@@ -186,7 +184,6 @@ class proceso_generar_facturas_afip extends proceso
if(count($this->cobranzas)) {
$this->agregar_notificacion("Cantidad de errores al generar CAE: " . $total_errores_afip, 'info');
$this->agregar_notificacion("Cantidad de errores al generar comprobantes: " . $total_errores_creacion_comprobante, 'info');
}
}
......@@ -274,9 +271,11 @@ class proceso_generar_facturas_afip extends proceso
$cliente['numero_documento'] = $cobranza['responsable_pago']['identificacion_fiscal'];
}
if (!isset($cobranza['responsable_pago']['tipo_documento_afip']))
throw new error_negocio(__METHOD__ . ': No se encuentra definido el tipo de documento afip.');
if (!isset($cobranza['responsable_pago']['tipo_documento_afip']) or empty($cobranza['responsable_pago']['tipo_documento_afip'])){
$msg = "No se pudo procesar el comprobante para el cliente con el número de documento: " . $cobranza['responsable_pago']['numero_documento'] . ". No se encuentra definido en SQ el tipo de documento AFIP correspondiente al tipo de documento: '" . $cobranza['responsable_pago']['tipo_documento'] . "'.";
lib::entorno()->log()->error(__METHOD__ . ': ' . $msg );
throw new error_negocio($msg );
}
$cliente['tipo_documento'] = $cobranza['responsable_pago']['tipo_documento_afip'];
return $cliente;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment