diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 8535b6756..3771565c1 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -1250,7 +1250,7 @@ + DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos,CveFormaPago"> diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index ddad5f0c7..81e465ba8 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -1316,6 +1316,7 @@ Partial Class Ventas_PVCobranza Dim DtPagos As DataTable = New DataTable("DtPagosFactura") DtPagos.Columns.Add(New DataColumn("CveFormaPago", GetType(Integer))) DtPagos.Columns.Add(New DataColumn("Importe", GetType(Decimal))) + Dim PagadoSinEfectivo As Decimal = 0 If VentaConta Then If TxtImporteCredito.Text.ToDecimal > 0 Then DtPagos.Rows.Add({4, TxtImporteCredito.Text.ToDecimal}) : PagadoSinEfectivo += TxtImporteCredito.Text.ToDecimal @@ -1326,7 +1327,19 @@ Partial Class Ventas_PVCobranza If TxtImporteTransferencia.Text.ToDecimal > 0 Then DtPagos.Rows.Add({3, TxtImporteTransferencia.Text.ToDecimal}) : PagadoSinEfectivo += TxtImporteTransferencia.Text.ToDecimal - If TxtNCDev.Text.ToDecimal > 0 Then DtPagos.Rows.Add({21, TxtNCDev.Text.ToDecimal}) : PagadoSinEfectivo += TxtNCDev.Text.ToDecimal + 'If TxtNCDev.Text.ToDecimal > 0 Then DtPagos.Rows.Add({21, TxtNCDev.Text.ToDecimal}) : PagadoSinEfectivo += TxtNCDev.Text.ToDecimal + + If TxtNCDev.Text.ToDecimal > 0 Then + For Each GvRow As GridViewRow In GVAnticipos.Rows + If GvRow.DataKey("Tipo").Contiene("NC", "IxC", "Ant") AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then + + Dim CveFormaPagoAnt = GvRow.DataKey("CveFormaPago").ToEntero() + Dim Importe = GvRow.FCTextBox(String.Format("TxtAnticipo{0}", GvRow.RowIndex)).Text.ToDecimal() + + DtPagos.Rows.Add({CveFormaPagoAnt, Importe}) + End If + Next + End If If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then PagadoSinEfectivo += TxtImporteOtrosContado.Text.ToDecimal