--%>
-
-
+
@@ -6994,7 +7013,14 @@
let strNombre = $('#TxtNombre').val();
let strRegimenSociedad = $('#TxtRegimenSociedad').val();
- $get('TxtNombreComercial').value = strNombre + " " + strRegimenSociedad;
+
+ if(strRegimenSociedad !== undefined ){
+ $get('TxtNombreComercial').value = strNombre + " " + strRegimenSociedad;
+ }else{
+ $get('TxtNombreComercial').value = strNombre ;
+ }
+
+
}
function cargaddls() {
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 806318317..71868e376 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -1091,6 +1091,18 @@ Partial Class Clientes
ObjClientes.Dispose()
GvRetenciones.DataBind()
End Sub
+
+
+ Private Sub CargaSubProyectosSuscursales()
+
+
+ CargarCentrosDeCosto(Nothing, DdlSubProyectoClienteSucursal, Nothing, LblSubProyectoClienteSucursal)
+
+
+
+ End Sub
+
+
Private Sub CargaCuentasEquipos()
Dim Objeto As New ClsGenerales
If Objeto.GetCuentasEquipos(CveCliente, -1) Then
@@ -1450,13 +1462,14 @@ Partial Class Clientes
' CargaDocs()
CargaCombos()
CargaDocumentacionCliente()
- 'CargaMetodosPago33()
- 'CargaFormaPago33()
- 'CargaComboCFDI()
- 'CargarPagosNoBancarios()
-
-
-
+ CargaSubProyectosSuscursales()
+ 'CargaMetodosPago33()
+ 'CargaFormaPago33()
+ 'CargaComboCFDI()
+ 'CargarPagosNoBancarios()
+
+
+
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LnkPorcentajeMarcas.Visible = True
LnkPorcentajePrecios.Visible = True
@@ -1863,7 +1876,9 @@ Partial Class Clientes
End If
+ RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0")
+ RdTipoPersona_SelectedIndexChanged(Nothing, Nothing)
End If
UpActivacionPortal.Update()
@@ -2588,6 +2603,8 @@ Partial Class Clientes
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
+ Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
+
If CveCliente = -1 Then
Dim ErrorAC As Boolean = False
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
@@ -2651,7 +2668,7 @@ Partial Class Clientes
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
- CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text) Then
+ CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2748,7 +2765,7 @@ Partial Class Clientes
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
- NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text) Then
+ NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -4524,8 +4541,22 @@ Partial Class Clientes
DdlDirClienteColonia.SelectedValueExist(GvRow.DataKey("CveColonia"))
- ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString() = "True", True, False)
- If GvRow.DataKey("CveClienteSucursal").ToEntero() > 0 Then DdlClienteSucursalEnvio.SelectedValueExist(GvRow.DataKey("CveClienteSucursal")) Else DdlClienteSucursalEnvio.SelectedValueExist("-1")
+ ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString() = "True", True, False)
+
+ If GvRow.DataKey("CveClienteSucursal").ToEntero() > 0 Then
+ DdlClienteSucursalEnvio.SelectedValueExist(GvRow.DataKey("CveClienteSucursal"))
+ Else
+ DdlClienteSucursalEnvio.SelectedValueExist("-1")
+ End If
+
+
+ Dim CveSubProyectoClienteSucursal As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
+
+ DdlSubProyectoClienteSucursal.SelectedValueExist("-1")
+ If CveSubProyectoClienteSucursal > 0 Then
+ DdlSubProyectoClienteSucursal.SelectedValueExist(CveSubProyectoClienteSucursal)
+ End If
+
UpAddDireccion.Update()
RegistraScript("$('#divAddDireccionEnvio').modal();")
End Sub
@@ -4536,7 +4567,7 @@ Partial Class Clientes
If CveDireccionEnvio < 0 Then
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
- CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero)
+ CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero)
If CveDireccionEnvio < 0 Then
TieneError = True
@@ -4544,7 +4575,7 @@ Partial Class Clientes
Else
If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
- CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero) Then
+ CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero) Then
TieneError = True
End If
@@ -4571,7 +4602,8 @@ Partial Class Clientes
TxtEnvioTel.Text = ""
DdlClienteSucursalEnvio.SelectedValue = "-1"
- CargaCombosDirecionesClientesSAT()
+ CargaCombosDirecionesClientesSAT()
+ DdlSubProyectoClienteSucursal.SelectedValueExist("-1")
'DdlDirClientePais.SelectedValueExist(-1)
'DdlDirClienteEstado.SelectedValueExist(-1)
@@ -10166,7 +10198,21 @@ Partial Class Clientes
Alert("Los cambios se guardaron satisfactoriamente.")
End Using
- End Sub
-
+ End Sub
+
+ Protected Sub RdTipoPersona_SelectedIndexChanged(sender As Object, e As EventArgs)
+
+ DVRegimenSociedad.Visible = False
+ DivRazonSocial2.Attributes.Add("class", "col-md-12")
+
+ If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+
+ DivRazonSocial2.Attributes.Add("class", "col-md-8")
+ DVRegimenSociedad.Visible = True
+
+ End If
+
+ UpDatos.Update()
+ End Sub
End Class