-
@@ -303,7 +316,7 @@
-
+
@@ -312,17 +325,17 @@
-
+
Venci.
-
-
+
+
-
-
+
+
Original
@@ -330,9 +343,9 @@
-
+
-
+
Abonado
@@ -349,7 +362,7 @@
-
+
@@ -358,7 +371,7 @@
-
+
@@ -367,7 +380,7 @@
-
+
@@ -376,20 +389,19 @@
-
+
Abonar
<%----%>
-
+
-
+
<%--
--%>
-
diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb
index 335c19e47..f6b4d7def 100644
--- a/Bancos/RepProveedoresPagos.aspx.vb
+++ b/Bancos/RepProveedoresPagos.aspx.vb
@@ -31,6 +31,11 @@ Partial Class Bancos_RepProveedoresPagos
GvCxP.Columns(10).Visible = True
End If
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
+ chkexpand.Checked = True
+ DivVerPesos.Visible = True
+ End If
+
End If
End Sub
@@ -103,7 +108,7 @@ Partial Class Bancos_RepProveedoresPagos
GvCxP.Columns(7).Visible = ChkProgramadas.Checked 'AndAlso DdlUsuarioProgramo.SelectedValue.ToEntero > 0
- If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero) Then
+ If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero, VerEnPesos:=ChkVerEnPesos.Checked) Then
GvCxP.DataSource = Mov.DtResultados
If Mov.DtResultados IsNot Nothing AndAlso Mov.DtResultados.Rows.Count > 0 Then
@@ -162,7 +167,13 @@ Partial Class Bancos_RepProveedoresPagos
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
End If
- e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue)
+ Dim FiltrarCuentas As Integer = 1
+
+ If ChkVerEnPesos.Checked Then
+ FiltrarCuentas = 0
+ End If
+
+ e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}&FiltrarCuentas={14}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue, FiltrarCuentas)
End If
End Sub
diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx
index 43d8496b1..141f85fc6 100644
--- a/Ventas/CatAutorizacionLimites.aspx
+++ b/Ventas/CatAutorizacionLimites.aspx
@@ -123,7 +123,7 @@
-
-
-
-
- Anticipos, notas de crédito e ingresos por comprobar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb
index fa753e9fe..944b72d84 100644
--- a/Ventas/CatAutorizacionLimites.aspx.vb
+++ b/Ventas/CatAutorizacionLimites.aspx.vb
@@ -62,10 +62,6 @@ Partial Class Ventas_CatAutorizacionLimites
DdlEstatus.SelectedValue = "0"
- If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
- DivAntNCIxC.Visible = True
- End If
-
UpModal.Update()
End Sub
Private Sub CargaDatos()
@@ -87,10 +83,6 @@ Partial Class Ventas_CatAutorizacionLimites
ObjGral.Dispose()
GvDatos.DataBind()
- If DivAntNCIxC.Visible Then
- CargaAnticipos(CveCliente, FechaI, FechaF)
- End If
-
UpDatos.Update()
End Sub
@@ -225,6 +217,10 @@ Partial Class Ventas_CatAutorizacionLimites
'cuando es la modalidad 3, es autorización directa sobre la venta ya asociada a la solicitud.
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then CveEstatusAutorizacion = 2
+ If gvRow.DataKey("TipoDocumento") = "Anticipo" Then
+ CveEstatusAutorizacion = 1
+ End If
+
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
'AUTORIZACION DE IMPORTE,
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
@@ -376,130 +372,4 @@ Partial Class Ventas_CatAutorizacionLimites
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
#End Region
-
- Private Sub CargaAnticipos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime)
-
- Dim ObjMovtos As New ClsMovimientos()
- If ObjMovtos.GetAnticiposNCIxCAutorizaciones(CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
- GVAnticipos.DataSource = ObjMovtos.DtResultados
- End If
- ObjMovtos.Dispose()
-
- GVAnticipos.DataBind()
-
- End Sub
-
- Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
- Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
- Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
- Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
- Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
-
- If CveVenta > 0 OrElse CveIE > 0 Then
- Dim Actualizo As Boolean = False
-
- Using ObjVentas As New ClsVentas
- If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
- If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
- Alert("El anticipo se autorizó correctamente")
- Actualizo = True
- End If
- ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
- If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
- Alert("El anticipo se autorizó correctamente")
- Actualizo = True
- End If
- End If
- End Using
-
- If Actualizo Then
- Dim ObjEventoBitacora As New ClsOIEventos
- ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
- ObjEventoBitacora.Dispose()
- End If
-
- CargaDatos()
-
- End If
-
- UpDatos.Update()
- End Sub
-
- Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
-
- Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
- Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
- Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
- Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
-
- If CveVenta > 0 OrElse CveIE > 0 Then
- Dim Actualizo As Boolean = False
- Using ObjVentas As New ClsVentas
- If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
- If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
- Alert("El anticipo se desautorizó correctamente")
- Actualizo = True
- End If
- ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
- If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
- Alert("El anticipo se desautorizó correctamente")
- Actualizo = True
- End If
- End If
- End Using
-
- If Actualizo Then
- Dim ObjEventoBitacora As New ClsOIEventos
- ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
- ObjEventoBitacora.Dispose()
- End If
-
- CargaDatos()
-
- End If
-
- UpDatos.Update()
- End Sub
-
- Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
-
- Dim AnticipoAutorizado = CBool(e.Row.DBCampo("AnticipoAutorizado"))
-
- If AnticipoAutorizado Then
- e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
- Else
- e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
- End If
-
- If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
- e.Row.FCLiteral("LtlFactura").Text = String.Format("
{1}", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
- Else
- e.Row.FCLiteral("LtlFactura").Text = String.Format("
{1}", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
- End If
-
- If UsuarioActual.TienePermisoProceso(379) Then
- If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
- If Not AnticipoAutorizado Then
- e.Row.FCLinkButton("LnkAutorizar").Visible = True
- e.Row.FCLinkButton("LnkCancelar").Visible = False
- Else
- e.Row.FCLinkButton("LnkAutorizar").Visible = False
- e.Row.FCLinkButton("LnkCancelar").Visible = True
- End If
- End If
-
- If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
- If Not AnticipoAutorizado Then
- e.Row.FCLinkButton("LnkAutorizar").Visible = True
- e.Row.FCLinkButton("LnkCancelar").Visible = False
- Else
- e.Row.FCLinkButton("LnkAutorizar").Visible = False
- e.Row.FCLinkButton("LnkCancelar").Visible = True
- End If
- End If
- End If
-
- End If
- End Sub
End Class
diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx
index f18c8db96..be1803d7e 100644
--- a/Ventas/Clientes.aspx
+++ b/Ventas/Clientes.aspx
@@ -2342,12 +2342,12 @@
-
+ <%--
-
+ --%>
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index a61492bfd..9bc9f135d 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -1946,9 +1946,9 @@ Partial Class Clientes
End If
ObjMovtos.Dispose()
- If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
- GVAnticipos.Columns(7).Visible = True
- End If
+ 'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
+ ' GVAnticipos.Columns(7).Visible = True
+ 'End If
GVAnticipos.DataBind()
GVAnticiposHistorial.DataBind()
@@ -10753,82 +10753,82 @@ Partial Class Clientes
End Function
- Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
- Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
- Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
- Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
+ 'Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
+ ' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ ' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
+ ' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
- If CveVenta > 0 OrElse CveIE > 0 Then
- Dim Actualizo As Boolean = False
+ ' If CveVenta > 0 OrElse CveIE > 0 Then
+ ' Dim Actualizo As Boolean = False
- Using ObjVentas As New ClsVentas
- If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
- If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
- Alert("El anticipo se autorizó correctamente")
- Actualizo = True
- End If
- ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
- If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
- Alert("El anticipo se autorizó correctamente")
- Actualizo = True
- End If
- End If
- End Using
+ ' Using ObjVentas As New ClsVentas
+ ' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
+ ' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
+ ' Alert("El anticipo se autorizó correctamente")
+ ' Actualizo = True
+ ' End If
+ ' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
+ ' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
+ ' Alert("El anticipo se autorizó correctamente")
+ ' Actualizo = True
+ ' End If
+ ' End If
+ ' End Using
- If Actualizo Then
- Dim ObjEventoBitacora As New ClsOIEventos
- If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
- GvEB.DataSource = ObjEventoBitacora.DtResultados
- End If
- ObjEventoBitacora.Dispose()
- GvEB.DataBind()
+ ' If Actualizo Then
+ ' Dim ObjEventoBitacora As New ClsOIEventos
+ ' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
+ ' GvEB.DataSource = ObjEventoBitacora.DtResultados
+ ' End If
+ ' ObjEventoBitacora.Dispose()
+ ' GvEB.DataBind()
- UPEventoBitacora.Update()
- CargaEventoBitacora()
- End If
+ ' UPEventoBitacora.Update()
+ ' CargaEventoBitacora()
+ ' End If
- End If
+ ' End If
- CargaAnticipos()
- End Sub
+ ' CargaAnticipos()
+ 'End Sub
- Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
- Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
- Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
- Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
+ 'Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
+ ' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ ' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
+ ' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
- If CveVenta > 0 OrElse CveIE > 0 Then
- Dim Actualizo As Boolean = False
- Using ObjVentas As New ClsVentas
- If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
- If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
- Alert("El anticipo se desautorizó correctamente")
- Actualizo = True
- End If
- ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
- If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
- Alert("El anticipo se desautorizó correctamente")
- Actualizo = True
- End If
- End If
- End Using
- CargaAnticipos()
+ ' If CveVenta > 0 OrElse CveIE > 0 Then
+ ' Dim Actualizo As Boolean = False
+ ' Using ObjVentas As New ClsVentas
+ ' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
+ ' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
+ ' Alert("El anticipo se desautorizó correctamente")
+ ' Actualizo = True
+ ' End If
+ ' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
+ ' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
+ ' Alert("El anticipo se desautorizó correctamente")
+ ' Actualizo = True
+ ' End If
+ ' End If
+ ' End Using
+ ' CargaAnticipos()
- If Actualizo Then
- Dim ObjEventoBitacora As New ClsOIEventos
- If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
- GvEB.DataSource = ObjEventoBitacora.DtResultados
- End If
- ObjEventoBitacora.Dispose()
- GvEB.DataBind()
+ ' If Actualizo Then
+ ' Dim ObjEventoBitacora As New ClsOIEventos
+ ' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio:
{GvRow.DataKey("Folio")}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
+ ' GvEB.DataSource = ObjEventoBitacora.DtResultados
+ ' End If
+ ' ObjEventoBitacora.Dispose()
+ ' GvEB.DataBind()
- UPEventoBitacora.Update()
- CargaEventoBitacora()
- End If
+ ' UPEventoBitacora.Update()
+ ' CargaEventoBitacora()
+ ' End If
- End If
- End Sub
+ ' End If
+ 'End Sub
End Class
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index a1fd84ddd..c2834f001 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -6624,7 +6624,7 @@ Partial Class PV
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
- DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
+ DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero(), DdlFormaCliente.SelectedValue.ToEntero(), CvePrecioLista:=CvePrecioLista,
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, Genero:=GeneroCliente) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index 7bef6a62b..b870252cf 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -26,6 +26,18 @@ Partial Class Ventas_PVCobranza
End Set
End Property
+ Private Property CveVendedor As Integer
+ Get
+ If ViewState("CveVendedor") Is Nothing Then
+ ViewState("CveVendedor") = -1
+ End If
+ Return ViewState("CveVendedor").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveVendedor") = value
+ End Set
+ End Property
+
Private Property CveVentaCancelacion As Integer
Get
If ViewState("CveVentaCancelacion") Is Nothing Then
@@ -999,6 +1011,8 @@ Partial Class Ventas_PVCobranza
LtlTipoAnticipo.Text = ""
HdnTipoAmortizacion.Value = ""
CveCliente = -1
+ CveVendedor = -1
+
If TmpDTAnticiposNCIxCCliente IsNot Nothing Then
TmpDTAnticiposNCIxCCliente.Clear()
@@ -1988,17 +2002,16 @@ Partial Class Ventas_PVCobranza
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
End If
- If CveCliente <= 0 Then
- Dim DbRowVenta As DataRow = Nothing
- Dim ObjVentas As New ClsVentas
- If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
- DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
- End If
- ObjVentas.Dispose()
+ Dim DbRowVenta As DataRow = Nothing
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
+ DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
+ End If
+ ObjVentas.Dispose()
- If DbRowVenta IsNot Nothing Then
- CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
- End If
+ If DbRowVenta IsNot Nothing Then
+ CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
+ CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
End If
If CveCliente > 0 Then
@@ -2154,6 +2167,19 @@ Partial Class Ventas_PVCobranza
End If
End If
+ Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
+ Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
+
+ Dim ObjVta As New ClsVentas
+ If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Importe, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
+ Dim msgAlert = "La autorización se agregó correctamente."
+ If EnvioMsg Then
+ msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
+ End If
+ Alert(msgAlert, TipoMensaje.MsgInformacion)
+ End If
+ ObjVta.Dispose()
+
UpAnticipos.Update()
End Sub
@@ -2320,20 +2346,19 @@ Partial Class Ventas_PVCobranza
DivConceptoNC.Visible = False
End If
- If CveCliente <= 0 Then
- Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
- Dim DbRowVenta As DataRow = Nothing
- Dim ObjVentas As New ClsVentas
- If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
- DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
- End If
- ObjVentas.Dispose()
-
- If DbRowVenta IsNot Nothing Then
- CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
- End If
-
+ Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
+ Dim DbRowVenta As DataRow = Nothing
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
+ DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
End If
+ ObjVentas.Dispose()
+
+ If DbRowVenta IsNot Nothing Then
+ CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
+ CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
+ End If
+
If CveCliente > 0 Then
CargaAnticipos(CveCliente)
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index ef9fb171d..cdeeaa7fb 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -12072,6 +12072,10 @@ Partial Class Ventas
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
+ 'CLIENTE
+ ObjFacturaBonificacion.CveCliente = CveCliente
+ ObjFacturaBonificacion.SetCliente()
+
ObjFacturaBonificacion.CveMetodoPago = 1
ObjFacturaBonificacion.MetodoPago = "Pago en una sola exhibición"
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
@@ -12217,10 +12221,6 @@ Partial Class Ventas
ObjFacturaBonificacion.DtFirmas = DTmpF
- 'CLIENTE
- ObjFacturaBonificacion.CveCliente = CveCliente
- ObjFacturaBonificacion.SetCliente()
-
''SUCURSAL
'ObjFacturaBonificacion.CveSucursal = DdlSucursal.SelectedValue.ToEntero()
'ObjFacturaBonificacion.SetSucursalMatriz(Me)
@@ -12550,6 +12550,15 @@ Partial Class Ventas
ObjFactura.CvePrePoliza = -1
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
+ 'CLIENTE
+ ObjFactura.CveCliente = CveCliente
+ ObjFactura.SetCliente()
+ ObjFactura.CveEmpresaCRM = CveEmpresaCRM
+ If CveCliente = -1 And CveEmpresaCRM > 0 Then
+ ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
+ ObjFactura.Cliente.RFC = LblRFCCRM.Text
+ End If
+
ObjFactura.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
ObjFactura.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
@@ -12996,15 +13005,6 @@ Partial Class Ventas
ObjFactura.DtDetalle = TmpDT.Copy
ObjFactura.DtFirmas = DTmpF.Copy
- 'CLIENTE
- ObjFactura.CveCliente = CveCliente
- ObjFactura.SetCliente()
- ObjFactura.CveEmpresaCRM = CveEmpresaCRM
- If CveCliente = -1 And CveEmpresaCRM > 0 Then
- ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
- ObjFactura.Cliente.RFC = LblRFCCRM.Text
- End If
-
'SUCURSAL
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
ObjFactura.SetSubProyectoMatriz(Me)
@@ -13289,6 +13289,10 @@ Partial Class Ventas
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
+ 'CLIENTE
+ ObjFacturaDevolucion.CveCliente = CveCliente
+ ObjFacturaDevolucion.SetCliente()
+
ObjFacturaDevolucion.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
ObjFacturaDevolucion.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
@@ -13479,10 +13483,6 @@ Partial Class Ventas
ObjFacturaDevolucion.DtDetalle = TmpDT
ObjFacturaDevolucion.DtFirmas = DTmpF
- 'CLIENTE
- ObjFacturaDevolucion.CveCliente = CveCliente
- ObjFacturaDevolucion.SetCliente()
-
'SUCURSAL
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
@@ -40681,14 +40681,9 @@ Partial Class Ventas
'GvExist.Columns(0).ItemStyle.Width = New Unit(200, UnitType.Pixel)
'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE
- For index As Integer = 0 To DtExistencias.Columns.Count - 1
+ For index As Integer = 1 To DtExistencias.Columns.Count - 1
For Each gvr As GridViewRow In GvExist.Rows
- If index = 0 Then
- gvr.Cells(index).CssClass = "titulops"
- Else
- gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
- End If
-
+ gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
Next
Next
End If
@@ -40696,5 +40691,12 @@ Partial Class Ventas
RegistraScript("$('#DivModalExistenciaTotal').modal('show');")
UPExist.Update()
End Sub
+
+ Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound
+ If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then
+ e.Row.Cells(0).Attributes.Add("colspan", "3")
+ End If
+ End Sub
+
End Class