private double calcularTotal() { total = 0; for (DetalleComprobante detalle : detalles) { total = total + detalle.getTotal(); } return total; }
@Override public String reporteComprobante() { String mensaje = ""; mensaje += "FACTURA" + '\n'; mensaje += "Razon Social: " + razonSocial + '\n'; mensaje += "RUC: " + ruc + '\n'; mensaje += "IGV: " + igv + '\n'; mensaje += "-------------DETALLE----------------" + '\n'; for (DetalleComprobante detalle : detalles) { mensaje += detalle.reporteDescripcion() + '\n'; } mensaje += "--------------CIERRE DETALLE-----------" + '\n'; mensaje += "TOTAL: " + total; return mensaje; }