-- cambios Estados.
This commit is contained in:
@@ -2049,7 +2049,7 @@ Partial Class Ventas
|
||||
DdlSubProyectoDatos.Enabled = False
|
||||
BtnEmitirImprimir.Visible = False
|
||||
BtnCrearApartirDe.Visible = True
|
||||
BtnEditar.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(302) Then BtnEditar.Visible = True
|
||||
'DdlEstatus.Enabled = True
|
||||
|
||||
DivFechaAnticipoCliente.Visible = True
|
||||
@@ -2107,8 +2107,7 @@ Partial Class Ventas
|
||||
DivDevAlm.Visible = True
|
||||
End If
|
||||
|
||||
'CARGA GV DE OC RELACIONADAS
|
||||
CargarOCRelacionadas()
|
||||
|
||||
End If
|
||||
Else
|
||||
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
||||
@@ -3564,6 +3563,19 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX")
|
||||
|
||||
DdlEstadoSAT.Items.Clear()
|
||||
DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais)
|
||||
|
||||
DdlEstadoSAT.DataBind()
|
||||
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaEstados(DdlSATPais.SelectedValue)
|
||||
End Sub
|
||||
|
||||
Private Function CargaVenta() As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -4477,12 +4489,22 @@ Partial Class Ventas
|
||||
|
||||
DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
|
||||
|
||||
CargaPS(-1, DdlPS)
|
||||
CargaPS(-1, DdlPS)
|
||||
|
||||
UpPS.Update()
|
||||
UpContado.Update()
|
||||
UpEstatus.Update()
|
||||
Retorno = True
|
||||
'CARGA GV DE OC RELACIONADAS
|
||||
If CveVenta > 0 AndAlso ObjVentas.GetOCRelacionadas(CveVenta) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DivOCRelacionadas.Visible = True
|
||||
GvOCRelacionadas.DataSource = ObjVentas.DtResultados
|
||||
|
||||
End If
|
||||
End If
|
||||
GvOCRelacionadas.DataBind()
|
||||
|
||||
UpPS.Update()
|
||||
UpContado.Update()
|
||||
UpEstatus.Update()
|
||||
Retorno = True
|
||||
|
||||
Else
|
||||
ViewState("CveVenta") = -1
|
||||
@@ -18456,6 +18478,7 @@ Partial Class Ventas
|
||||
DivBotonesAgregarCliente.Visible = False
|
||||
DivFormaCliente.Visible = False
|
||||
UpAgregarCliente.Update()
|
||||
CargaEstados()
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
@@ -18478,8 +18501,8 @@ Partial Class Ventas
|
||||
RFVColoniaC.Visible = False
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RFVEstadoC.Visible = False
|
||||
RFVPaisC.Visible = False
|
||||
RfvDdlEstadoSAT.Visible = False
|
||||
RFVSATPais.Visible = False
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(1)
|
||||
DdlFormaCliente.SelectedValueExist(1)
|
||||
@@ -18511,8 +18534,8 @@ Partial Class Ventas
|
||||
RFVColoniaC.Visible = True
|
||||
RFVCiudadC.Visible = True
|
||||
RFVLocalidadC.Visible = True
|
||||
RFVEstadoC.Visible = True
|
||||
RFVPaisC.Visible = True
|
||||
RfvDdlEstadoSAT.Visible = True
|
||||
RFVSATPais.Visible = True
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(-1)
|
||||
DdlFormaCliente.SelectedValueExist(-1)
|
||||
@@ -18535,8 +18558,8 @@ Partial Class Ventas
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim,
|
||||
TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.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) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
@@ -21273,6 +21296,11 @@ Partial Class Ventas
|
||||
Dim TempCliente As Integer = If(CveVenta <= 0, CveCliente, -1)
|
||||
Dim TipoDocumento As Integer = If(CveVenta <= 0, 14, -1)
|
||||
|
||||
If CveVenta <= 0 AndAlso TempCliente <= 0 Then
|
||||
Dim a As String = "carga de docuemntacion del cleinte, masivo, corregir"
|
||||
a.GuardaLog()
|
||||
End If
|
||||
|
||||
If objRH.DocumentacionElectronicaGet(-1, TempCliente, -1, UsuarioActual.CveEmpresa, TipoDocumento, CveVenta) Then
|
||||
DtDocumentacionCliente = objRH.DtResultados.FiltraParametros("CveDocumentacionElectronica > 0")
|
||||
DtDocumentacionCliente.Columns.Add("Accion", Type.GetType("System.String"))
|
||||
@@ -25952,26 +25980,6 @@ Partial Class Ventas
|
||||
'MailCls = Nothing
|
||||
End Sub
|
||||
|
||||
Private Sub CargarOCRelacionadas()
|
||||
Dim GridViewPSAux As GridView = GvPS
|
||||
Dim CveVentasDetalle As New StringBuilder()
|
||||
For Each vd As GridViewRow In GridViewPSAux.Rows
|
||||
Dim CveVentaDetalle As String = vd.DataKey("CveVentaDetalle")
|
||||
CveVentasDetalle.AppendFormat("{0},", CveVentaDetalle)
|
||||
Next
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetOCRelacionadas(CveVentasDetalle.ToString) Then
|
||||
Dim OC As DataTable = ObjVentas.DtResultados
|
||||
If OC.Rows.Count > 0 Then
|
||||
trOCRelacionadasLabel.Visible = True
|
||||
trOCRelacionadas.Visible = True
|
||||
GvOCRelacionadas.DataSource = OC
|
||||
GvOCRelacionadas.DataBind()
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnEditar_Click() Handles BtnEditar.Click
|
||||
Dim Opcion As String = BtnEditar.Text
|
||||
If Opcion = "Editar" Then
|
||||
|
||||
Reference in New Issue
Block a user