private function ApunteDetalleCobro($nAsiento, $fecha, array $cabecera) { $filtro = "IDCliente='{$cabecera['IDCliente']}' and Vencimiento='{$cabecera['Vencimiento']}' and IDRemesa='{$cabecera['IDRemesa']}' and IDEstado='{$cabecera['IDEstado']}'"; $recibo = new RecibosClientes(); $recibos = $recibo->cargaCondicion("*", $filtro); unset($recibo); $cliente = new Clientes($cabecera['IDCliente']); foreach ($recibos as $recibo) { $recibo = new RecibosClientes($recibo['IDRecibo']); $apunte = new ContaPlusDiario($nAsiento, $fecha); $apunte->setSubCta($cliente->getCContable()); $apunte->setContra($recibo->getCContable()); $apunte->setConcepto("Cob Ftra Cliente " . $cliente->getRazonSocial()); $apunte->setDocumento($recibo->getIDFactura()->getNumeroFactura()); $apunte->setEuroHaber($recibo->getImporte()); $apuntes[] = $apunte; } unset($apunte); unset($recibo); return $apuntes; }