diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 2c54be51e..3a0ec3593 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -32,6 +32,7 @@ Public Class ClsClientes Public Property CveCliente As Integer Public Property Nombre As String + Public Property TipoPersona As Boolean Public Property RegimenSociedad As String Public Property NombreComercial As String Public Property Direccion As String @@ -290,6 +291,7 @@ Public Class ClsClientes If Data.Rows.Count > 0 Then _CveCliente = Data.Rows(0)("CveCliente").ToString.ToEntero _Nombre = Data.Rows(0)("Nombre").ToString + _TipoPersona = Boolean.Parse(Data.Rows(0)("TipoPersona").ToString) _RegimenSociedad = Data.Rows(0)("RegimenSociedad").ToString _NombreComercial = Data.Rows(0)("NombreComercial").ToString _Codigo = Data.Rows(0)("Codigo").ToString @@ -578,7 +580,7 @@ Public Class ClsClientes Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1") As Boolean + Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -722,6 +724,9 @@ Public Class ClsClientes .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad + .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona + + End With @@ -771,7 +776,7 @@ Public Class ClsClientes Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", - Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1") As Boolean + Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -931,6 +936,10 @@ Public Class ClsClientes .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad + .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona + + + End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 34ede2134..156eaff82 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4515,11 +4515,7 @@ Public Class ClsPaginas PaginaDict.Add("/AF/CatCombustibles.aspx".ToUpper(), -1) PaginaDict.Add("/AF/CatCargasCombustible.aspx".ToUpper(), -1) PaginaDict.Add("/AF/RepFlotillas.aspx".ToUpper(), -1) - PaginaDict.Add("/AF/RepPlacas.aspx".ToUpper(), -1) - PaginaDict.Add("/AF/RepIncidentes.aspx".ToUpper(), -1) - PaginaDict.Add("/AF/RepPolizaSeguro.aspx".ToUpper(), -1) - PaginaDict.Add("/AF/RepLicencias.aspx".ToUpper(), -1) - PaginaDict.Add("/AF/RepServicios.aspx".ToUpper(), -1) + PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1) PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656) PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251) diff --git a/Bin/ADSNetLibrary.dll b/Bin/ADSNetLibrary.dll index bffa74fee..8adb6bab4 100644 Binary files a/Bin/ADSNetLibrary.dll and b/Bin/ADSNetLibrary.dll differ diff --git a/Documentacion/140/CatAPSAGM-HT-LTH-CR 2021.pdf b/Documentacion/140/CatAPSAGM-HT-LTH-CR 2021.pdf new file mode 100644 index 000000000..06238e44d Binary files /dev/null and b/Documentacion/140/CatAPSAGM-HT-LTH-CR 2021.pdf differ diff --git a/Inicio.aspx b/Inicio.aspx index f3c3b8738..976b76bfc 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -591,12 +591,23 @@
- LTHAGM + OPTIMA
+ + +
+
+
+ Cat APS AGM-HT-LTH-CR 2021 +
+
+
+ + diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index e73faca4b..43b2d9b89 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1428,7 +1428,7 @@ Cant Producto Sección almacén - Serie + Serie Lote Caducidad @@ -1440,7 +1440,7 @@
- +
@@ -1449,7 +1449,7 @@ - + diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 51be4121d..9d29b4915 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -288,6 +288,18 @@ Partial Class Inventarios_EntradasSalidas End Set End Property + Public Property AplicaVigenciaCambioVigencia() As Boolean + Get + If ViewState("CveAFEdit") Is Nothing Then + ViewState("CveAFEdit") = False + End If + Return Boolean.Parse(ViewState("CveAFEdit").ToString) + End Get + Set(value As Boolean) + ViewState("CveAFEdit") = value + End Set + End Property + #End Region @@ -3777,6 +3789,35 @@ Partial Class Inventarios_EntradasSalidas Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambiarVigencias")) + + TxtCantCambio.Text = "" + TxtSerieCambio.Text = "" + TxtFechaCambio.Text = Now.ToString("dd/MM/yyyy") + TxtObsCambioVigencia.Text = "" + + Th5.Visible = False + Th6.Visible = False + Th7.Visible = False + Th8.Visible = False + + + Td5.Visible = False + Td6.Visible = False + Td7.Visible = False + Td8.Visible = False + + DdlPSCambioSalida.txtText.Value = "" + DdlPSCambioSalida.txtValue.Value = "" + + DdlSeccionCambio.SelectedValueExist(-1) + DdlAlmacenCambioVigencias.SelectedValueExist(-1) + + + AplicaVigenciaCambioVigencia = False + + UpCambioSalida.Update() + UpModalCambiarVigencias.Update() + End Sub #Region "ENTRADAS" @@ -4009,15 +4050,47 @@ Partial Class Inventarios_EntradasSalidas #Region "CAMBIO VIGENCIA" Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click + If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia) Exit Sub End If + + If AplicaVigenciaCambioVigencia And TxtSerieCambio.Text.Trim.Length = 0 Then + Alert("Es necesario especificar la serie del producto.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + AddPSCambioSalida(DdlPSCambioSalida.SelectedValue.ToEntero, TxtCantCambio.Text.ToDouble) End Sub + Protected Sub DdlPSCambioSalida_selectedindexchange(sender As Object, e As EventArgs) + + Td6.Visible = False + Th6.Visible = False + + If DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then + + Using ObjPS As New ClsProductosServicios() + If ObjPS.GetPS(DdlPSCambioSalida.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then + + AplicaVigenciaCambioVigencia = If(ObjPS.DtResultados.Rows(0)("AplicaSerie").ToString = "", False, Boolean.Parse(ObjPS.DtResultados.Rows(0)("AplicaSerie").ToString)) + + Td6.Visible = AplicaVigenciaCambioVigencia + Th6.Visible = AplicaVigenciaCambioVigencia + + End If + End Using + + + End If + + UpCambioSalida.Update() + + End Sub + Protected Sub AddPSCambioSalida(CvePS As Integer, Cantidad As Double) If DdlAlmacenCambioVigencias.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPSCambioSalida.SelectedText = "" : Exit Sub @@ -4029,10 +4102,10 @@ Partial Class Inventarios_EntradasSalidas Dim CodigoPS As String = "" Dim PS As String = "" - Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacenSalida.SelectedValue.ToEntero - Dim Serie As String = If(TxtSerieSalida.Text = "", "", TxtSerieSalida.Text) - Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text) - Dim Caducidad As String = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text) + Dim CveSeccionAlmacen As Integer = DdlAlmacenCambioVigencias.SelectedValue.ToEntero + Dim Serie As String = If(TxtSerieCambio.Text = "", "", TxtSerieCambio.Text) + Dim Lote As String = If(TxtLoteCambio.Text = "", "", TxtLoteCambio.Text) + Dim Caducidad As String = If(TxtCaducidadCambio.Text = "", MinFecha.ToShortDateString, TxtCaducidadCambio.Text) Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS") If dr IsNot Nothing Then @@ -4353,6 +4426,8 @@ Partial Class Inventarios_EntradasSalidas End Sub Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click + + If GvSalidasCambioVigencia.Rows.Count = 0 Then Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") @@ -5346,4 +5421,5 @@ Partial Class Inventarios_EntradasSalidas Public Property FolioVirtual As String Public Property TieneError As Boolean End Class + End Class diff --git a/PortalCliente/PortalCliente.aspx b/PortalCliente/PortalCliente.aspx index 979c91a51..076c11c0d 100644 --- a/PortalCliente/PortalCliente.aspx +++ b/PortalCliente/PortalCliente.aspx @@ -511,12 +511,8 @@ -
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
- -
+ +
@@ -528,8 +524,16 @@
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" + class="btn btn-circle btn-sm label-info"> +
+
- + @@ -552,14 +556,12 @@

-
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
+ -
+
+ Anticipo del Cliente Historial
@@ -569,8 +571,16 @@
+ +
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
- + @@ -582,8 +592,8 @@ - - + +
@@ -1348,7 +1358,7 @@ - + diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb index e045fe0f5..aa2950fd4 100644 --- a/PortalCliente/PortalCliente.aspx.vb +++ b/PortalCliente/PortalCliente.aspx.vb @@ -271,6 +271,7 @@ Partial Class Ventas_PortalCliente #Region "TAB HISTORIAL DE VENTAS" Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) + Dim ObjClientes As New ClsClientes() If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then If ObjClientes.DtResultados.Rows.Count > 0 Then @@ -291,6 +292,9 @@ Partial Class Ventas_PortalCliente End If ObjClientes.Dispose() GVHistorial.DataBind() + + RblTipo_SelectedIndexChanged(Nothing, Nothing) + End Sub Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound @@ -1233,29 +1237,39 @@ Partial Class Ventas_PortalCliente GVAnticiposHistorial.DataBind() End Sub - Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound, GVAnticiposHistorial.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.RowIndex = 0 Then - e.Row.Cells(0).ColumnSpan = 2 - e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right - e.Row.FCLiteral("LtlFactura").Text = "Total" & " " - e.Row.BackColor = Drawing.Color.LightGray - e.Row.Cells(1).Visible = False - End If + Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound, GVAnticiposHistorial.RowDataBound + + If e.Row.RowType = DataControlRowType.DataRow Then + + 'If e.Row.RowIndex = 0 Then + ' e.Row.Cells(0).ColumnSpan = 2 + ' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right + ' e.Row.FCLiteral("LtlFactura").Text = "Total" & " " + ' e.Row.BackColor = Drawing.Color.LightGray + ' e.Row.Cells(1).Visible = False + 'End If If e.Row.RowIndex = 1 Then e.Row.Cells(0).Width = Unit.Pixel(60) e.Row.Cells(1).Width = Unit.Pixel(100) e.Row.Cells(2).Width = Unit.Pixel(80) + End If + + + If e.Row.DBCampo("CveVenta").ToString.ToEntero = 0 Then + e.Row.Cells(0).ColumnSpan = 2 + e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right + e.Row.BackColor = Drawing.Color.LightGray + e.Row.Cells(1).Visible = False End If - e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right - - 'If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(2).ForeColor = Drawing.Color.Red - 'If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAnticipos"), Literal).Text = "" - - If e.Row.RowIndex > 0 Then - e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio") - End If + e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right + + 'If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(2).ForeColor = Drawing.Color.Red + 'If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAnticipos"), Literal).Text = "" + + 'If e.Row.RowIndex > 0 Then + e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio") + 'End If If CType(sender, GridView).ID = "GVAnticipos" Then e.Row.Cells(2).Font.Bold = True diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 849ed271b..c386c6ea7 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -347,9 +347,25 @@
+
+
+ +
+ + + Física + Moral + + + + +
+ +
+
-
+
@@ -357,8 +373,8 @@
-
-
+
+
<%----%> @@ -396,6 +412,14 @@ +
+
+ + + + + +
@@ -495,14 +519,7 @@
-
- - - - - - -
+
@@ -826,7 +843,7 @@
@@ -5259,17 +5276,22 @@
+
+
+
+ + +
+
+
+
+ + +
+
-
- -
- <%--
- - -
--%> - - +
@@ -6994,7 +7016,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