This commit is contained in:
2022-03-26 07:24:06 -07:00
11 changed files with 277 additions and 86 deletions

View File

@@ -32,6 +32,7 @@ Public Class ClsClientes
Public Property CveCliente As Integer Public Property CveCliente As Integer
Public Property Nombre As String Public Property Nombre As String
Public Property TipoPersona As Boolean
Public Property RegimenSociedad As String Public Property RegimenSociedad As String
Public Property NombreComercial As String Public Property NombreComercial As String
Public Property Direccion As String Public Property Direccion As String
@@ -290,6 +291,7 @@ Public Class ClsClientes
If Data.Rows.Count > 0 Then If Data.Rows.Count > 0 Then
_CveCliente = Data.Rows(0)("CveCliente").ToString.ToEntero _CveCliente = Data.Rows(0)("CveCliente").ToString.ToEntero
_Nombre = Data.Rows(0)("Nombre").ToString _Nombre = Data.Rows(0)("Nombre").ToString
_TipoPersona = Boolean.Parse(Data.Rows(0)("TipoPersona").ToString)
_RegimenSociedad = Data.Rows(0)("RegimenSociedad").ToString _RegimenSociedad = Data.Rows(0)("RegimenSociedad").ToString
_NombreComercial = Data.Rows(0)("NombreComercial").ToString _NombreComercial = Data.Rows(0)("NombreComercial").ToString
_Codigo = Data.Rows(0)("Codigo").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 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 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 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 Dim Retorno As Boolean = False
@@ -722,6 +724,9 @@ Public Class ClsClientes
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
.Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad
.Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona
End With 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 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 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 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 Dim Retorno As Boolean = False
@@ -931,6 +936,10 @@ Public Class ClsClientes
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
.Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad
.Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona
End With End With
Try Try

View File

@@ -4515,11 +4515,7 @@ Public Class ClsPaginas
PaginaDict.Add("/AF/CatCombustibles.aspx".ToUpper(), -1) PaginaDict.Add("/AF/CatCombustibles.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/CatCargasCombustible.aspx".ToUpper(), -1) PaginaDict.Add("/AF/CatCargasCombustible.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/RepFlotillas.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/RepDepreciacion.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656) PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251) PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251)

Binary file not shown.

Binary file not shown.

View File

@@ -591,12 +591,23 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="well well-sm"> <div class="well well-sm">
<asp:HyperLink ID="LnkDoc12" NavigateUrl="~/Documentacion/140/LTHAGM.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> LTHAGM</asp:HyperLink> <asp:HyperLink ID="LnkDoc12" NavigateUrl="~/Documentacion/140/OPTIMA.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> OPTIMA</asp:HyperLink>
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc13" NavigateUrl="~/Documentacion/140/CatAPSAGM-HT-LTH-CR 2021.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> Cat APS AGM-HT-LTH-CR 2021</asp:HyperLink>
</div>
</div>
</div>
</ContentTemplate> </ContentTemplate>

View File

@@ -1428,7 +1428,7 @@
<th style="width: 63px">Cant</th> <th style="width: 63px">Cant</th>
<th style="width: 200px">Producto</th> <th style="width: 200px">Producto</th>
<th style="width: 10%" runat="server" id="Th5" visible="false">Sección almacén</th> <th style="width: 10%" runat="server" id="Th5" visible="false">Sección almacén</th>
<th style="width: 10%" runat="server" id="Th6" visible="false">Serie</th> <th style="width: 100px" runat="server" id="Th6" visible="false">Serie</th>
<th style="width: 10%" runat="server" id="Th7" visible="false">Lote</th> <th style="width: 10%" runat="server" id="Th7" visible="false">Lote</th>
<th style="width: 10%" runat="server" id="Th8" visible="false">Caducidad</th> <th style="width: 10%" runat="server" id="Th8" visible="false">Caducidad</th>
<th style="width: 73px;"></th> <th style="width: 73px;"></th>
@@ -1440,7 +1440,7 @@
</td> </td>
<td> <td>
<div class="psagregar"> <div class="psagregar">
<ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" /> <ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSCambioSalida_selectedindexchange" />
</div> </div>
</td> </td>
<td runat="server" id="Td5" visible="false"> <td runat="server" id="Td5" visible="false">
@@ -1449,7 +1449,7 @@
</asp:DropDownList> </asp:DropDownList>
</td> </td>
<td runat="server" id="Td6" visible="false"> <td runat="server" id="Td6" visible="false">
<asp:TextBox ID="TxtSerieCambio" runat="server" Width="50px"></asp:TextBox> <asp:TextBox ID="TxtSerieCambio" runat="server" Width="100px"></asp:TextBox>
</td> </td>
<td runat="server" id="Td7" visible="false"> <td runat="server" id="Td7" visible="false">
<asp:TextBox ID="TxtLoteCambio" runat="server" Width="50px"></asp:TextBox> <asp:TextBox ID="TxtLoteCambio" runat="server" Width="50px"></asp:TextBox>

View File

@@ -288,6 +288,18 @@ Partial Class Inventarios_EntradasSalidas
End Set End Set
End Property 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 #End Region
@@ -3777,6 +3789,35 @@ Partial Class Inventarios_EntradasSalidas
Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs) Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambiarVigencias")) 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 End Sub
#Region "ENTRADAS" #Region "ENTRADAS"
@@ -4009,15 +4050,47 @@ Partial Class Inventarios_EntradasSalidas
#Region "CAMBIO VIGENCIA" #Region "CAMBIO VIGENCIA"
Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click
If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia) Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If 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) AddPSCambioSalida(DdlPSCambioSalida.SelectedValue.ToEntero, TxtCantCambio.Text.ToDouble)
End Sub 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) 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 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 CodigoPS As String = ""
Dim PS As String = "" Dim PS As String = ""
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacenSalida.SelectedValue.ToEntero Dim CveSeccionAlmacen As Integer = DdlAlmacenCambioVigencias.SelectedValue.ToEntero
Dim Serie As String = If(TxtSerieSalida.Text = "", "", TxtSerieSalida.Text) Dim Serie As String = If(TxtSerieCambio.Text = "", "", TxtSerieCambio.Text)
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text) Dim Lote As String = If(TxtLoteCambio.Text = "", "", TxtLoteCambio.Text)
Dim Caducidad As String = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text) Dim Caducidad As String = If(TxtCaducidadCambio.Text = "", MinFecha.ToShortDateString, TxtCaducidadCambio.Text)
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS") Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
If dr IsNot Nothing Then If dr IsNot Nothing Then
@@ -4353,6 +4426,8 @@ Partial Class Inventarios_EntradasSalidas
End Sub End Sub
Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click
If GvSalidasCambioVigencia.Rows.Count = 0 Then If GvSalidasCambioVigencia.Rows.Count = 0 Then
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError) 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')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -5346,4 +5421,5 @@ Partial Class Inventarios_EntradasSalidas
Public Property FolioVirtual As String Public Property FolioVirtual As String
Public Property TieneError As Boolean Public Property TieneError As Boolean
End Class End Class
End Class End Class

View File

@@ -511,12 +511,8 @@
<asp:UpdatePanel ID="UpAnticipos" runat="server"> <asp:UpdatePanel ID="UpAnticipos" runat="server">
<ContentTemplate> <ContentTemplate>
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="portlet light bordered"> <div class="portlet light xspadding bordered">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
@@ -528,8 +524,16 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;"
class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="table-scrollable"> <div class="table-scrollable">
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" GridLines="None" DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable"> <asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente"
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover " GridLines="None" Width="800px"
DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable">
<Columns> <Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
@@ -552,14 +556,12 @@
</div> </div>
<br /> <br />
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaAnticiposHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="portlet light bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Anticipo del Cliente Historial</span> <span class="caption-subject bold uppercase">Anticipo del Cliente Historial</span>
</div> </div>
@@ -569,8 +571,16 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaAnticiposHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="table-scrollable"> <div class="table-scrollable">
<asp:GridView ID="GVAnticiposHistorial" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente Historial" ToolTip="Listado de Anticipos Historial" CssClass="GVAnticipos table table-striped table-hover Widthall" Style="text-align: center;" GridLines="None" DataKeyNames="ISTotal,Saldo,CveIE,Folio,Total,Tipo,CveVenta,CveConceptoContable"> <asp:GridView ID="GVAnticiposHistorial" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente Historial"
ToolTip="Listado de Anticipos Historial" CssClass="GVAnticipos table table-striped table-hover" Style="text-align: center;" Width="800px"
GridLines="None" DataKeyNames="ISTotal,Saldo,CveIE,Folio,Total,Tipo,CveVenta,CveConceptoContable">
<Columns> <Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
@@ -582,8 +592,8 @@
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal> <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Original" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Original" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="Saldo" DataField="SaldoSubtotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Saldo" DataField="SaldoSubtotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="25%" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
@@ -1348,7 +1358,7 @@
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="<i class='fa fa-book'></i> Pedidos"> <ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="<i class='fa fa-book'></i> Pedidos" Visible="false">
<ContentTemplate> <ContentTemplate>
<asp:UpdatePanel ID="UpTabPedidos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpTabPedidos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>

View File

@@ -271,6 +271,7 @@ Partial Class Ventas_PortalCliente
#Region "TAB HISTORIAL DE VENTAS" #Region "TAB HISTORIAL DE VENTAS"
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then If ObjClientes.DtResultados.Rows.Count > 0 Then
@@ -291,6 +292,9 @@ Partial Class Ventas_PortalCliente
End If End If
ObjClientes.Dispose() ObjClientes.Dispose()
GVHistorial.DataBind() GVHistorial.DataBind()
RblTipo_SelectedIndexChanged(Nothing, Nothing)
End Sub End Sub
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
@@ -1234,28 +1238,38 @@ Partial Class Ventas_PortalCliente
End Sub End Sub
Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound, GVAnticiposHistorial.RowDataBound 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.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).ColumnSpan = 2 'If e.Row.RowIndex = 0 Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right ' e.Row.Cells(0).ColumnSpan = 2
e.Row.FCLiteral("LtlFactura").Text = "Total" & "&nbsp;" ' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
e.Row.BackColor = Drawing.Color.LightGray ' e.Row.FCLiteral("LtlFactura").Text = "Total" & "&nbsp;"
e.Row.Cells(1).Visible = False ' e.Row.BackColor = Drawing.Color.LightGray
End If ' e.Row.Cells(1).Visible = False
'End If
If e.Row.RowIndex = 1 Then If e.Row.RowIndex = 1 Then
e.Row.Cells(0).Width = Unit.Pixel(60) e.Row.Cells(0).Width = Unit.Pixel(60)
e.Row.Cells(1).Width = Unit.Pixel(100) e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(80) e.Row.Cells(2).Width = Unit.Pixel(80)
End If 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 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 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.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAnticipos"), Literal).Text = ""
If e.Row.RowIndex > 0 Then 'If e.Row.RowIndex > 0 Then
e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio") e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio")
End If 'End If
If CType(sender, GridView).ID = "GVAnticipos" Then If CType(sender, GridView).ID = "GVAnticipos" Then
e.Row.Cells(2).Font.Bold = True e.Row.Cells(2).Font.Bold = True

View File

@@ -347,9 +347,25 @@
</div> </div>
<div id="bodydatosclientes" class="portlet-body form"> <div id="bodydatosclientes" class="portlet-body form">
<div class="row">
<div class="col-md-12">
<div runat="server" id="Div3" class="form-group form-md-line-input input-iconright">
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
<asp:ListItem Value="0">Física</asp:ListItem>
<asp:ListItem Value="1">Moral</asp:ListItem>
</asp:RadioButtonList>
<label for="<%= RdTipoPersona.ClientID.ToString()%>">Tipo Persona:</label>
<i></i>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-12" runat="server" id="DivRazonSocial2">
<div runat="server" id="DivRazonSocial" class="form-group form-md-line-input input-iconright"> <div runat="server" id="DivRazonSocial" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombre" CssClass="form-control " runat="server" MaxLength="150" onkeyup="fncTxt()" ClientIDMode="Static" ></asp:TextBox> <asp:TextBox ID="TxtNombre" CssClass="form-control " runat="server" MaxLength="150" onkeyup="fncTxt()" ClientIDMode="Static" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
@@ -357,8 +373,8 @@
<i></i> <i></i>
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4" id="DVRegimenSociedad" runat="server" visible ="false">
<div runat="server" id="DVRegimenSociedad" class="form-group form-md-line-input input-iconright"> <div runat="server" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="50" onkeyup="fncTxt()" ClientIDMode="Static" ></asp:TextBox> <asp:TextBox ID="TxtRegimenSociedad" CssClass="form-control " runat="server" MaxLength="50" onkeyup="fncTxt()" ClientIDMode="Static" ></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Cliente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label> <label for="<%= TxtRegimenSociedad.ClientID.ToString()%>">Regimen Sociedad:</label>
@@ -396,6 +412,14 @@
<asp:RequiredFieldValidator ID="RFVNombreComercial" runat="server" ControlToValidate="TxtNombreComercial" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre Comercial''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNombreComercial" runat="server" ControlToValidate="TxtNombreComercial" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre Comercial''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtNombreComercial.ClientID.ToString()%>">Nombre Comercial:</label> <label for="<%= TxtNombreComercial.ClientID.ToString()%>">Nombre Comercial:</label>
<i></i> <i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRFC" Style="text-transform: uppercase;" runat="server" CssClass="form-control" MaxLength="13"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpGuardar" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" TargetControlID="TxtRFC" FilterType="UppercaseLetters, Numbers,LowercaseLetters, Custom" runat="server" ValidChars="&Ñ" InvalidChars="-" />
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
<i></i>
</div> </div>
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtCodigo" runat="server" OnTextChanged="TxtCodigo_TextChanged" AutoPostBack="true" CssClass="form-control" MaxLength="25"></asp:TextBox> <asp:TextBox ID="TxtCodigo" runat="server" OnTextChanged="TxtCodigo_TextChanged" AutoPostBack="true" CssClass="form-control" MaxLength="25"></asp:TextBox>
@@ -495,14 +519,7 @@
<label for="<%= DdlZonaHoraria.ClientID.ToString()%>">Zona Horaria:</label> <label for="<%= DdlZonaHoraria.ClientID.ToString()%>">Zona Horaria:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRFC" Style="text-transform: uppercase;" runat="server" CssClass="form-control" MaxLength="13"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpGuardar" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" TargetControlID="TxtRFC" FilterType="UppercaseLetters, Numbers,LowercaseLetters, Custom" runat="server" ValidChars="&Ñ" InvalidChars="-" />
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
<i></i>
</div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -826,7 +843,7 @@
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<asp:GridView ID="GvDireccionesEnvio" runat="server" Width="100%" GridLines="None" <asp:GridView ID="GvDireccionesEnvio" runat="server" Width="100%" GridLines="None"
DataKeyNames="CveDireccionEnvio,CveCliente,CveClienteSucursal,EnvioDireccion,EnvioColonia,EnvioCiudad,EnvioEstado,EnvioCP,CveUsuario,Estatus,EnvioNoExt,EnvioNoInt,EnvioContacto,EnvioDepartamento,EnvioTel,CvePais,CveEstado,CveMunicipio,CveLocalidad,CveColonia" DataKeyNames="CveDireccionEnvio,CveCliente,CveClienteSucursal,EnvioDireccion,EnvioColonia,EnvioCiudad,EnvioEstado,EnvioCP,CveUsuario,Estatus,EnvioNoExt,EnvioNoInt,EnvioContacto,EnvioDepartamento,EnvioTel,CvePais,CveEstado,CveMunicipio,CveLocalidad,CveColonia,CveSubProyecto"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de direcciones de envio"> CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de direcciones de envio">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
@@ -5259,16 +5276,21 @@
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label> <label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClienteSucursalEnvio" runat="server" CssClass="form-control select2me" DataValueField="CveClienteSucursal" DataTextField="SucursalCliente" Width="100%"></asp:DropDownList>
<label for="<%= DdlClienteSucursalEnvio.ClientID.ToString()%>">Sucursal Cliente:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoClienteSucursal" ClientIDMode="Static" runat="server" CssClass="form-control select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Width="100%"></asp:DropDownList>
<label for="<%= DdlClienteSucursalEnvio.ClientID.ToString()%>"><asp:Label runat="server" ID="LblSubProyectoClienteSucursal"></asp:Label>:</label>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClienteSucursalEnvio" runat="server" CssClass="form-control select2me" DataValueField="CveClienteSucursal" DataTextField="SucursalCliente"></asp:DropDownList>
<label for="<%= DdlClienteSucursalEnvio.ClientID.ToString()%>">Sucursal:</label>
</div> </div>
<%--<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDepartamento" runat="server" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtDepartamento.ClientID.ToString()%>">Departamento:</label>
</div>--%>
<div style="display: none"> <div style="display: none">
@@ -6994,7 +7016,14 @@
let strNombre = $('#TxtNombre').val(); let strNombre = $('#TxtNombre').val();
let strRegimenSociedad = $('#TxtRegimenSociedad').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() { function cargaddls() {

View File

@@ -1091,6 +1091,18 @@ Partial Class Clientes
ObjClientes.Dispose() ObjClientes.Dispose()
GvRetenciones.DataBind() GvRetenciones.DataBind()
End Sub End Sub
Private Sub CargaSubProyectosSuscursales()
CargarCentrosDeCosto(Nothing, DdlSubProyectoClienteSucursal, Nothing, LblSubProyectoClienteSucursal)
End Sub
Private Sub CargaCuentasEquipos() Private Sub CargaCuentasEquipos()
Dim Objeto As New ClsGenerales Dim Objeto As New ClsGenerales
If Objeto.GetCuentasEquipos(CveCliente, -1) Then If Objeto.GetCuentasEquipos(CveCliente, -1) Then
@@ -1450,6 +1462,7 @@ Partial Class Clientes
' CargaDocs() ' CargaDocs()
CargaCombos() CargaCombos()
CargaDocumentacionCliente() CargaDocumentacionCliente()
CargaSubProyectosSuscursales()
'CargaMetodosPago33() 'CargaMetodosPago33()
'CargaFormaPago33() 'CargaFormaPago33()
'CargaComboCFDI() 'CargaComboCFDI()
@@ -1863,7 +1876,9 @@ Partial Class Clientes
End If End If
RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0")
RdTipoPersona_SelectedIndexChanged(Nothing, Nothing)
End If End If
UpActivacionPortal.Update() UpActivacionPortal.Update()
@@ -2588,6 +2603,8 @@ Partial Class Clientes
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0") 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 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 If CveCliente = -1 Then
Dim ErrorAC As Boolean = False Dim ErrorAC As Boolean = False
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero() 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(), 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, 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()), 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 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(), 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(), 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()), 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) ObjClientes.LimpiaImpuestosLocales(CveCliente)
@@ -4525,7 +4542,21 @@ Partial Class Clientes
DdlDirClienteColonia.SelectedValueExist(GvRow.DataKey("CveColonia")) DdlDirClienteColonia.SelectedValueExist(GvRow.DataKey("CveColonia"))
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString() = "True", True, False) 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")
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() UpAddDireccion.Update()
RegistraScript("$('#divAddDireccionEnvio').modal();") RegistraScript("$('#divAddDireccionEnvio').modal();")
End Sub End Sub
@@ -4536,7 +4567,7 @@ Partial Class Clientes
If CveDireccionEnvio < 0 Then 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("_", ""), 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 If CveDireccionEnvio < 0 Then
TieneError = True TieneError = True
@@ -4544,7 +4575,7 @@ Partial Class Clientes
Else 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("_", ""), 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 TieneError = True
End If End If
@@ -4572,6 +4603,7 @@ Partial Class Clientes
DdlClienteSucursalEnvio.SelectedValue = "-1" DdlClienteSucursalEnvio.SelectedValue = "-1"
CargaCombosDirecionesClientesSAT() CargaCombosDirecionesClientesSAT()
DdlSubProyectoClienteSucursal.SelectedValueExist("-1")
'DdlDirClientePais.SelectedValueExist(-1) 'DdlDirClientePais.SelectedValueExist(-1)
'DdlDirClienteEstado.SelectedValueExist(-1) 'DdlDirClienteEstado.SelectedValueExist(-1)
@@ -10168,5 +10200,19 @@ Partial Class Clientes
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 End Class