diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 6ed007114..8d4cb3db8 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1286,6 +1286,7 @@ Partial Class PV If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem")) DdlTipoComprobante.SelectedValueExist("Rem") + DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty) End If DdlTipoDefecto.Width = New Unit(260%) @@ -5964,7 +5965,7 @@ Partial Class PV Case 1 'CREDITO TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString Case 2 'CONTADO - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then DivContado.Visible = True TxtImporteContado.Text = TxtTotal.Text End If @@ -6165,6 +6166,11 @@ Partial Class PV Retorno = True End If + If DtPagos IsNot Nothing AndAlso DtPagos.SUM("Importe").ToString.ToDecimal() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then + Alert("Los pagos no deben ser aplicados a una remisión.", TipoMensaje.MsgAdvertencia) + Retorno = True + End If + Return Retorno End Function @@ -7315,12 +7321,10 @@ Partial Class PV TxtPrecio.Text = TxtPrecio.Text TxtObsPS.Text = "Descuento por garantía" Else - 'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows - ' If Gvr.RowType = DataControlRowType.DataRow Then - ' Gvr.FCTextBox("TxtCantidad").Text = "" - ' Gvr.FCTextBox("TxtCantidad").Enabled = True - ' End If - 'Next + If TmpDTAjustes IsNot Nothing Then + TmpDTAjustes.Clear() + End If + TxtObsPS.Text = TxtObsPS.Text.Replace("Descuento por garantía", "") DdlRecepcionUsados.SelectedValueExist("-1") DdlRecepcionUsados.Enabled = True