-
This commit is contained in:
@@ -9372,6 +9372,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617)
|
||||
PaginaDict.Add("/Ventas/CatMedicos.aspx".ToUpper(), 1343)
|
||||
PaginaDict.Add("/Ventas/CatProcedimientos.aspx".ToUpper(), 1344)
|
||||
PaginaDict.Add("/Ventas/CatProcedimientoDetalle.aspx".ToUpper(), 1344)
|
||||
PaginaDict.Add("/Ventas/VentasMedicas.aspx".ToUpper(), 1345)
|
||||
|
||||
|
||||
|
||||
@@ -1976,8 +1976,8 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Vta_PrecioListaAdd")
|
||||
|
||||
@@ -1986,19 +1986,20 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista
|
||||
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrecioLista").Value.ToString.ToEntero
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe una Lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Ya existe una lista con el mismo Nombre: " & PrecioLista & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar la Lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Me.OnError("Ocurrió un error al guardar la lista.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al la Lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
OnError("Ocurrió un error al la lista", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -6100,22 +6101,25 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Vta_ProcedimientosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CveProcedimiento").Value.ToString.ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
@@ -6149,9 +6153,17 @@ Public Class ClsVentas
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
'SqlAdapter.SelectCommand.ExecuteNonQuery()
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 547;") Then
|
||||
Alert("El procedimiento no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al eliminar el Procedimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
@@ -6159,6 +6171,135 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddProcedimientoProducto(CveProcedimiento As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Autogenerado", SqlDbType.Bit).Value = Autogenerado
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateProcedimientoProducto(CveProcedimientoProducto As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveProcedimientoProducto", SqlDbType.Int).Value = CveProcedimientoProducto
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Autogenerado", SqlDbType.Bit).Value = Autogenerado
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SincronizacionProcedimientoProducto(CveProcedimiento As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosSincronizacion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al sincronizar los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProcedimientoProducto(CveProcedimiento As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProcedimientoProducto", SqlDbType.Int).Value = CveProcedimientoProducto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetProcedimientoVentas(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosVentasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las ventas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono,CveIE" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
|
||||
@@ -553,17 +553,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||
|
||||
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 323, 324, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
If e.Row.DBCampo("Modificado") = "True" Then
|
||||
e.Row.FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("Modificado") = "True" Then
|
||||
e.Row.FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").DataBind()
|
||||
'e.Row.FCDropDownList("DdlSubProyectoFiltro").Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
@@ -5522,9 +5522,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorMovInv = True
|
||||
End Try
|
||||
|
||||
@@ -771,7 +771,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim Filtro As String '= If(ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString().Contiene({"Ing", "Dev", "Ped"}), "CveConcepto = 3", "CveConcepto = 9")
|
||||
Dim FiltroPS As String = ""
|
||||
Select Case ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString()
|
||||
Case "Ing", "Ped"
|
||||
Case "Ing"
|
||||
Filtro = "CveConcepto IN (3,40)"
|
||||
Case "Dev"
|
||||
'cuand es devolucionventa=1, es cancelación de la devolución
|
||||
|
||||
@@ -1,156 +1,159 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpExistenciasAlmacen.aspx.vb" Inherits="Inventarios_Default" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Búsqueda de Existencias"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:HiddenField ID="hdnEsThickbox" runat="server" ClientIDMode="Static" />
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 750px;">
|
||||
<tr>
|
||||
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Producto/Servicio:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ADS:Dropdownlost ID="DDlPS" AutoPostBack="false" runat="server" IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:400px;"></ADS:Dropdownlost>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton runat="server" ID="LnkBsucarSerie" CssClass="Texto" Text="Buscar por Serie" OnClick="LnkBsucarSerie_Click" Visible="false"></asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivMed" visible="false">
|
||||
<td class="text-right">Medida: </td>
|
||||
<td >
|
||||
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:70px" runat="server" visible="False">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%#String.Concat(Eval("MedidaEquivalente"), " ", Eval("RinTamañoEquivalente")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivRin" visible="false">
|
||||
<td class="text-right">Rin: </td>
|
||||
<td >
|
||||
<asp:DropDownList runat="server" ID="DdlRin" CssClass="form-control input-sm select2me" Width="150px" DataTextField="RinTamaño" DataValueField="CveRinTamaño"></asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<td class="text-right"><b>C. Barras:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" runat="server" id="DivSucursal" visible="false">
|
||||
<td class="text-right"><b>Sucursal:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="400px"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="TblBusqueda" style="width: 100%" runat="server" border="0" visible="false">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpExistenciasAlmacen.aspx.vb" Inherits="Inventarios_Default" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Búsqueda de Existencias"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:HiddenField ID="hdnEsThickbox" runat="server" ClientIDMode="Static" />
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="width: 750px;">
|
||||
<tr>
|
||||
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Producto/Servicio:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<ADS:Dropdownlost ID="DDlPS" AutoPostBack="false" runat="server" IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width:400px;"></ADS:Dropdownlost>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:LinkButton runat="server" ID="LnkBsucarSerie" CssClass="Texto" Text="Buscar por Serie" OnClick="LnkBsucarSerie_Click" Visible="false"></asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivMed" visible="false">
|
||||
<td class="text-right">Medida: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x: hidden; width: 150px; height: 70px" runat="server" visible="False">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%#String.Concat(Eval("MedidaEquivalente"), " ", Eval("RinTamañoEquivalente")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivRin" visible="false">
|
||||
<td class="text-right">Rin: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlRin" CssClass="form-control input-sm select2me" Width="150px" DataTextField="RinTamaño" DataValueField="CveRinTamaño"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivListasPrecios" visible="false">
|
||||
<td class="text-right">Lista de precio: </td>
|
||||
<td>
|
||||
<asp:DropDownList runat="server" ID="DdlPrecioLista" CssClass="form-control input-sm select2me" Width="150px" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<td class="text-right"><b>C. Barras:</b></td>
|
||||
<td>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" runat="server" id="DivSucursal" visible="false">
|
||||
<td class="text-right"><b>Sucursal:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="400px"></asp:DropDownList>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="TblBusqueda" style="width: 100%" runat="server" border="0" visible="false">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Literal ID="LtPs" Text="" runat="server" />    
|
||||
<asp:Literal ID="LtPrecioPS" Text="" runat="server" Visible="false"/>
|
||||
|
||||
<asp:Literal ID="LtPrecioPS" Text="" runat="server" Visible="false" />
|
||||
    
|
||||
<asp:Literal ID="LtlIEPS" Text="IEPS:" runat="server" Visible="false"/>
|
||||
|
||||
<asp:Literal ID="LtlIEPS" Text="IEPS:" runat="server" Visible="false" />
|
||||
  
|
||||
<asp:Literal ID="LtlIEPSPorcentaje" Text="" runat="server" Visible="false"/>
|
||||
    
|
||||
<asp:Literal ID="LtlIVA" Text="IVA:" runat="server" Visible="false"/>
|
||||
|
||||
<asp:Literal ID="LtlIEPSPorcentaje" Text="" runat="server" Visible="false" />
|
||||
    
|
||||
|
||||
<asp:Literal ID="LtlIVA" Text="IVA:" runat="server" Visible="false" />
|
||||
 
|
||||
<asp:Literal ID="LtlIVAPorcentaje" Text="" runat="server" Visible="false"/>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3" style="text-align: right;"">
|
||||
<asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;" runat="server">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad Medida" />
|
||||
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pte. Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||
<asp:BoundField DataField="Compuesto" HeaderText="Compuesto" Visible="false"/>
|
||||
<%-- <asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
|
||||
<asp:BoundField DataField="ImportePromocion" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Promoción" DataFormatString="{0:N2}"/>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 325px;" runat="server" visible="False">
|
||||
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<%--<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad" />--%>
|
||||
|
||||
<asp:Literal ID="LtlIVAPorcentaje" Text="" runat="server" Visible="false" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-3" style="text-align: right;">
|
||||
<asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;" runat="server">
|
||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad Medida" />
|
||||
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pte. Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Recibir" DataFormatString="{0:#,###.######}" Visible="false" />
|
||||
<asp:BoundField DataField="Compuesto" HeaderText="Compuesto" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 325px;" runat="server" visible="False">
|
||||
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblUMH" runat="server" ToolTip="Unidad de Medida" Text="U.M"></asp:Label>
|
||||
@@ -158,13 +161,10 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblUM" runat="server" Text='<%# Eval("UnidadMedida") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />--%>
|
||||
<%--<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" /> --%>
|
||||
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Center" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
|
||||
<%--<asp:BoundField DataField="ImportePromocion" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Promoción" DataFormatString="{0:N2}"/>--%>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Center" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblPH" runat="server" ToolTip="Precio Promoción" Text="Precio <br/> Promoción"></asp:Label>
|
||||
@@ -172,7 +172,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblP" runat="server" Text='<%# String.Format("{0:N2}", Eval("ImportePromocion")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblCMPH" runat="server" ToolTip="Cantidad Mínima Promoción" Text="Cant. Min. <br/> Promoción"></asp:Label>
|
||||
@@ -180,111 +180,88 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCMP" runat="server" Text='<%# String.Format("{0:N0}", Eval("CantidadMinimaPromo")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Transito" ItemStyle-HorizontalAlign="Right" HeaderText="En Tránsito" DataFormatString="{0:#,###.######}" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Transito" ItemStyle-HorizontalAlign="Right" HeaderText="En Tránsito" DataFormatString="{0:#,###.######}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblCMPH2" runat="server" Text="Por Recibir <br/> Fecha"></asp:Label>
|
||||
<asp:Label ID="LblCMPH2" runat="server" Text="Por Recibir <br/> Fecha"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPR" runat="server" Text='<%# String.Format("{0:#,###}", Eval("PorRecibir")) %>'></asp:Label><br />
|
||||
<asp:Label Font-Size="10px" Font-Italic="true" ID="Label1" runat="server" Text='<%# String.Format("{0:dd MMMM}", Eval("FechaPorRecibir")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalBuscarPorSerie" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
Buscar Por Serie
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body rowpadding ">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpModalBuscarPorSerie" UpdateMode="Conditional" RenderMode="Block">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<b>Buscar Por Serie:</b>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtBuscarPorSerie" runat="server" CssClass="form-control" Width="100%" CausesValidation="true" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBuscarPorSerie" runat="server" ControlToValidate="TxtBuscarPorSerie" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscarPorSerie"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center!important">
|
||||
<asp:Button ID="BtnBuscarPorSerie" runat="server" OnClick="BtnBuscarPorSerie_Click" ClientIDMode="Static" Text="Buscar" CssClass="btn btn-primary" ValidationGroup="GrpBuscarPorSerie" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
|
||||
<asp:GridView ID="GvPSSerie" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip=""
|
||||
CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
|
||||
<asp:BoundField DataField="Serie" HeaderText="Serie" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalBuscarPorSerie" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Buscar Por Serie
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body rowpadding ">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalBuscarPorSerie" UpdateMode="Conditional" RenderMode="Block">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<b>Buscar Por Serie:</b>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtBuscarPorSerie" runat="server" CssClass="form-control" Width="100%" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtBuscarPorSerie" runat="server" ControlToValidate="TxtBuscarPorSerie" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscarPorSerie"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center!important">
|
||||
<asp:Button ID="BtnBuscarPorSerie" runat="server" OnClick="BtnBuscarPorSerie_Click" ClientIDMode="Static" Text="Buscar" CssClass="btn btn-primary" ValidationGroup="GrpBuscarPorSerie" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvPSSerie" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip=""
|
||||
CssClass="table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
|
||||
<asp:BoundField DataField="Serie" HeaderText="Serie" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function Focus() {
|
||||
$('#TxtCodigoPS').focus()
|
||||
function Focus() {
|
||||
$('#TxtCodigoPS').focus()
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -44,6 +44,17 @@ Partial Class Inventarios_Default
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
LtPrecioPS.Visible = True
|
||||
DivSucursal.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
LtPrecioPS.Visible = True
|
||||
DivSucursal.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(186) Then
|
||||
LtPrecioPS.Visible = True
|
||||
DivListasPrecios.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
@@ -83,6 +94,10 @@ Partial Class Inventarios_Default
|
||||
Dim Txt As String = IfNull(Request("Txt"), "").ToString
|
||||
If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
CargaListasPrecios()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
@@ -94,6 +109,13 @@ Partial Class Inventarios_Default
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaListasPrecios()
|
||||
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
CargarDatosMedRin()
|
||||
@@ -150,6 +172,14 @@ Partial Class Inventarios_Default
|
||||
CvePrecioLista = -2
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
If DdlPrecioLista.SelectedValue.ToEntero() > 0 Then
|
||||
CvePrecioLista = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
Else
|
||||
CvePrecioLista = -2
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
Dim objPS As New ClsProductosServicios
|
||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||
|
||||
124
Transportes/CrearViaje.aspx
Normal file
124
Transportes/CrearViaje.aspx
Normal file
@@ -0,0 +1,124 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="CrearViaje.aspx.vb"
|
||||
Inherits="CrearViaje" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Crear Viaje
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row margin-bottom-5" id="TrAF" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
DataValueField="CveActivoFijo" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px" BehaviorID="_content_VCETransporte">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrRutas" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Seleccione Ruta:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveEmpresa" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Rutas''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERutas" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVRutas" Width="400px" BehaviorID="_content_VCERutas">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-bottom-5" id="TrDestino" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Partida:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveEmpresa" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Destino''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDestino" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDestino" Width="400px" BehaviorID="_content_VCEDestino">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-bottom-5" id="TrPartida" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Destino:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlPartida" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveEmpresa" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPartida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVPartida" Width="400px" BehaviorID="_content_VCEPartida">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-bottom-5" id="TrChofer" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CveChofer"
|
||||
DataTextField="Chofer" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Fecha Viaje:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaViaje" runat="server" CssClass="form-control text-center" Width="200px"
|
||||
CausesValidation="True"
|
||||
type="date"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaViaje" runat="server" ControlToValidate="TxtFechaViaje"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Viaje''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaViaje" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button CssClass="btn btn-success rounded-4 " Text="Guardar" ID="BtnGuardar"
|
||||
runat="server" OnClick="AddViaje" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:Content>
|
||||
65
Transportes/CrearViaje.aspx.vb
Normal file
65
Transportes/CrearViaje.aspx.vb
Normal file
@@ -0,0 +1,65 @@
|
||||
Partial Class CrearViaje
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
'Lista Activos Fijos'
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DdlTransporte.DataSource = ObjAF.DtResultados
|
||||
DdlTransporte.DataBind()
|
||||
|
||||
DdlTransporte.Items.Insert(0, New ListItem("<--Seleccione Transporte-->", ""))
|
||||
End If
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
'Lista Rutas'
|
||||
Dim ObjRutas As New ClsRH()
|
||||
If ObjRutas.GetRutas(7) Then
|
||||
Page.Response.Write("<script>console.log('El resultado de tu variable" + ObjRutas.DtResultados.Rows.ToString + "')</script>")
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
DdlRutas.DataBind()
|
||||
DdlRutas.Items.Insert(0, New ListItem("<--Seleccione Ruta-->", ""))
|
||||
|
||||
DdlPartida.DataSource = ObjRutas.DtResultados
|
||||
DdlPartida.DataBind()
|
||||
DdlPartida.Items.Insert(0, New ListItem("<--Seleccione Partida-->", ""))
|
||||
|
||||
DdlDestino.DataSource = ObjRutas.DtResultados
|
||||
DdlDestino.DataBind()
|
||||
DdlDestino.Items.Insert(0, New ListItem("<--Seleccione Destino-->", ""))
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjRutas.Dispose()
|
||||
|
||||
'Lista Chofer'
|
||||
'GlobalDTRHPersonal()'
|
||||
'CvePersonal - Text Nombre COmpleto'
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) Then
|
||||
DdlChofer.DataSource = ObjAcar.DtResultados
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("<--Seleccione Chofer-->", ""))
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub AddViaje(sender As Object, e As EventArgs)
|
||||
'Dónde están los PA para agregar viajes?'
|
||||
'Dónde están los PA para consultar Destinos y rutas viajes?'
|
||||
'Por qué siempre cambia el aside de Transportes V&A?'
|
||||
Page.Response.Write("<script>console.log('clits')</script>")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -45,10 +45,8 @@ Partial Class Ventas_CatPreciosLista
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub imgE_Click(sender As Object, e As EventArgs)
|
||||
@@ -69,7 +67,7 @@ Partial Class Ventas_CatPreciosLista
|
||||
Dim ObjVta As New ClsVentas
|
||||
|
||||
If EsEditar = 0 Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0) Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0) > 0 Then
|
||||
Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError)
|
||||
@@ -84,6 +82,8 @@ Partial Class Ventas_CatPreciosLista
|
||||
dvEstatus.Visible = False
|
||||
BtnAgregarCatalogo.Text = "Agregar"
|
||||
End If
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
RegistraScript("$('#divAgregar').modal('hide')")
|
||||
ObjVta.Dispose()
|
||||
TxtPrecioLista.Text = ""
|
||||
|
||||
260
Ventas/CatProcedimientoDetalle.aspx
Normal file
260
Ventas/CatProcedimientoDetalle.aspx
Normal file
@@ -0,0 +1,260 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProcedimientoDetalle.aspx.vb" Inherits="Ventas_CatProcedimientoDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label runat="server" Text="Procedimiento" ID="LblProcedimiento"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarProducto" CssClass="" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Producto" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpDatos">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer runat="server" ID="TabsRoles">
|
||||
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Procedimiento">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpTabGeneral" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">General</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtProcedimiento" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRol" runat="server" ControlToValidate="TxtProcedimiento" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblFechaAlta" runat="server">
|
||||
<label for="<%= LblFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
<asp:Label ID="LblFecha" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblUsuarioAlta" runat="server">
|
||||
<label for="<%= LblUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
<asp:Label ID="LblUsuario" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabProductos" runat="server" HeaderText="Productos Relacionados" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpTabProductos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" align="right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvProductos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvProductos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvProductos" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%"
|
||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="EstatusStr" HeaderText="Estatus">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="AutogeneradoStr" HeaderText="Autogenerado">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ing." ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="SerieFolioVenta" HeaderText="Serie Folio">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField DataField="FechaVenta" HeaderText="Fecha Venta" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarProducto" runat="server" AlternateText="Editar" OnClick="LnkEditarProducto_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminarProducto" OnClick="LnkEliminarProducto_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabVentas" runat="server" HeaderText="Ventas Relacionadas" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpTabVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" align="right" style="max-width:50%">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvVentas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvVentas.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="row" style="max-width:50%">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvVentas" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||
data-sort="true" AutoGenerateColumns="False" Width="100%" DataKeyNames="" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField DataField="SerieFolio" HeaderText="SerieFolio">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<ItemStyle Width="120px" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="TipoDocto" HeaderText="TipoDocto">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-Width="80px" DataFormatString="{0:dd/MM/yyyy}">
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Hospital" HeaderText="Cliente">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Medico" HeaderText="Médico">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
<br />
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<asp:Button runat="server" ID="BtnGuardar" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" Text="Eliminar" CssClass="btn btn-danger" OnClick="LnkEliminar_Click"
|
||||
AlternateText="Eliminar" CausesValidation="False" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"/>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpAgregar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloAgregar" Text="" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto" CssClass="form-control input-sm select2me" CssStyle="width: 90%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="" />
|
||||
<label style="line-height: 0.8" for="<%= DdlProducto.ClientID.ToString()%>">Producto: </label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVProdcutoEstatus" visible="false" style="margin-top:15px!important">
|
||||
<asp:CheckBox runat="server" ID="ChkEstatusProducto" CssClass="form-control" />
|
||||
<label style="line-height: 0.8" for="<%= ChkEstatusProducto.ClientID.ToString()%>">Estatus: </label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LkAgregarProducto" runat="server" CssClass="btn btn-primary" Text="Guardar" OnClick="LkAgregarProducto_Click"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
299
Ventas/CatProcedimientoDetalle.aspx.vb
Normal file
299
Ventas/CatProcedimientoDetalle.aspx.vb
Normal file
@@ -0,0 +1,299 @@
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Owin.Security.Provider
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Ventas_CatProcedimientoDetalle
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property CveProcedimiento As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveProcedimiento") Is Nothing Then
|
||||
ViewState("CveProcedimiento") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CveProcedimiento").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProcedimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveProcedimientoProducto As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveProcedimientoProducto") Is Nothing Then
|
||||
ViewState("CveProcedimientoProducto") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CveProcedimientoProducto").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProcedimientoProducto") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CveProcedimiento = If(Request("CveProcedimiento") <> "", Request("CveProcedimiento").ToString.ToEntero, "-1".ToEntero)
|
||||
|
||||
If CveProcedimiento > 0 Then
|
||||
|
||||
CargaDatos()
|
||||
CargaProductos()
|
||||
CargaVentas()
|
||||
TabProductos.Visible = True
|
||||
TabVentas.Visible = True
|
||||
LnkAgregarProducto.Visible = True
|
||||
Else
|
||||
ChkEstatus.Checked = True
|
||||
End If
|
||||
|
||||
DdlProducto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If Not DdlProducto.UsaWebService AndAlso CType(DdlProducto.DataSource, DataTable) Is Nothing Then
|
||||
DdlProducto.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||
DdlProducto.DataBind()
|
||||
DdlProducto.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaVentas()
|
||||
|
||||
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoVentas(CveProcedimiento, UsuarioActual.CveEmpresa) Then
|
||||
GvVentas.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
objVenta.Dispose()
|
||||
|
||||
GvVentas.DataBind()
|
||||
|
||||
UpTabVentas.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If CveProcedimiento > 0 Then
|
||||
|
||||
Dim DTProcedimiento As New DataTable
|
||||
Dim Objeto As New ClsVentas
|
||||
If Objeto.GetProcedimientos(CveProcedimiento, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
DTProcedimiento = Objeto.DtResultados
|
||||
|
||||
If DTProcedimiento.Rows.Count > 0 Then
|
||||
LblProcedimiento.Text = DTProcedimiento.FiltroPrimeroValor("Procedimiento")
|
||||
TxtProcedimiento.Text = DTProcedimiento.FiltroPrimeroValor("Procedimiento")
|
||||
|
||||
ChkEstatus.Checked = Boolean.Parse(DTProcedimiento.FiltroPrimeroValor("Estatus"))
|
||||
|
||||
LblFecha.Text = DTProcedimiento.FiltroPrimeroValor("FechaIng").ToDate.ToShortDateString
|
||||
LblUsuario.Text = DTProcedimiento.FiltroPrimeroValor("Usuario")
|
||||
Else
|
||||
Dim Liga As String = $"document.location.href=""/Ventas/CatProcedimientos.aspx"";"
|
||||
Alert("El Procedimiento solicitado no existe.", TipoMensaje.MsgAdvertencia, Liga)
|
||||
End If
|
||||
|
||||
Objeto.Dispose()
|
||||
End If
|
||||
Else
|
||||
|
||||
LblFechaAlta.Visible = False
|
||||
LblUsuarioAlta.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
|
||||
If CveProcedimiento > 0 Then
|
||||
If ObjVentas.UpdateProcedimiento(CveProcedimiento, TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert($"Procedimiento Actualizado Correctamente.")
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveProcedimiento = ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveProcedimiento > 0 Then
|
||||
ProcesoOK = True
|
||||
TabProductos.Visible = True
|
||||
TabVentas.Visible = True
|
||||
LnkAgregarProducto.Visible = True
|
||||
UpDatos.Update()
|
||||
Alert($"Procedimiento Guardado Correctamente.")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
'RegistraScript("$('#DVAgregarProcedimiento').modal('hide');")
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'CveProcedimiento = GvRow.DataKey("CveProcedimiento").ToEntero
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ProcesoOK = False
|
||||
|
||||
If ObjVentas.RemoveProcedimiento(CveProcedimiento, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
CargaGlobal()
|
||||
Dim Liga As String = $"document.location.href=""/Ventas/CatProcedimientos.aspx"";"
|
||||
Alert("Procedimiento eliminando correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaGlobal()
|
||||
GlobalDTProcedimientos(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarProducto_Click() Handles LnkAgregarProducto.Click
|
||||
|
||||
limpiarModal()
|
||||
UpAgregar.Update()
|
||||
RegistraScript("$('#ModalAgregar').modal()")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub limpiarModal()
|
||||
|
||||
LtlTituloAgregar.Text = "Agregar Producto"
|
||||
CveProcedimientoProducto = -1
|
||||
DdlProducto.SelectedValue = "-1"
|
||||
DdlProducto.SelectedText = ""
|
||||
DVProdcutoEstatus.Visible = False
|
||||
UpAgregar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LkAgregarProducto_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ProcesoOK As Boolean = False
|
||||
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If CveProcedimientoProducto > 0 Then
|
||||
|
||||
If objVenta.UpdateProcedimientoProducto(CveProcedimientoProducto, DdlProducto.SelectedValue.ToEntero, False, True, UsuarioActual.CveUsuario) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If objVenta.AddProcedimientoProducto(CveProcedimiento, DdlProducto.SelectedValue.ToEntero, False, True, UsuarioActual.CveUsuario) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
objVenta.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
RegistraScript("$('#ModalAgregar').modal('hide')")
|
||||
|
||||
Alert($"Producto {If(CveProcedimientoProducto > 0, "actualizado", "agregado")} correctamente.")
|
||||
|
||||
CargaProductos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProductos()
|
||||
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvProductos.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
objVenta.Dispose()
|
||||
|
||||
GvProductos.DataBind()
|
||||
|
||||
UpTabProductos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditarProducto_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveProcedimientoProducto = GvRow.DataKey("CveProcedimientoProducto").ToEntero
|
||||
Dim CvePS As String = GvRow.DataKey("CvePS")
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
Dim Estatus As Boolean = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
DdlProducto.ddl.SelectedValueExist(CvePS)
|
||||
DdlProducto.txtText.Value = CodigoPS
|
||||
DdlProducto.txtValue.Value = CvePS
|
||||
ChkEstatusProducto.Checked = Estatus
|
||||
LtlTituloAgregar.Text = "Actualizar producto"
|
||||
|
||||
DVProdcutoEstatus.Visible = True
|
||||
UpAgregar.Update()
|
||||
|
||||
RegistraScript("$('#ModalAgregar').modal()")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminarProducto_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveProcedimientoProductoEliminar = GvRow.DataKey("CveProcedimientoProducto").ToEntero
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ProcesoOK = False
|
||||
|
||||
If ObjVentas.RemoveProcedimientoProducto(CveProcedimientoProductoEliminar, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
Alert("Producto eliminando correctamente.")
|
||||
CargaProductos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -17,7 +17,8 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarProcedimiento" OnClick="LnkAgregarProcedimiento_Click" data-toggle="tooltip" data-placement="left" title="Agregar Procedimiento" Text="<i class='fa fa-plus'></i> Agregar Procedimiento"></asp:LinkButton>
|
||||
<a runat="server" href="~/Ventas/CatProcedimientoDetalle.aspx?CveProcedimiento=-1" target="_blank"
|
||||
data-toggle="tooltip" data-placement="left" title="Agregar Procedimiento" ><i class='fa fa-plus'></i> Agregar Procedimiento</a>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -34,44 +35,47 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div style="max-width:800px">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveProcedimiento, Procedimiento, Estatus, FechaIng, CveUsuario, CveEmpresa, Usuario, EstatusStr"
|
||||
EmptyDataText="No se encontraron Procedimientos Registrados" ToolTip="Listado de Procedimientos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" >
|
||||
<div style="max-width: 800px">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveProcedimiento, Procedimiento, Estatus, FechaIng, CveUsuario, CveEmpresa, Usuario, EstatusStr"
|
||||
EmptyDataText="No se encontraron Procedimientos Registrados" ToolTip="Listado de Procedimientos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Procedimiento" DataNavigateUrlFields="CveProcedimiento" DataNavigateUrlFormatString="CatProcedimientoDetalle.aspx?CveProcedimiento={0}" DataTextField="Procedimiento" Target="_blank" />
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProcedimiento" runat="server" Text='<%# Eval("Procedimiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Partial Class Ventas_CatProcedimientos
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7,6 +7,43 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet" />
|
||||
<style>
|
||||
div.chksino, span.chksino {
|
||||
border: 1px solid #B8B8B8;
|
||||
max-width: 77px;
|
||||
overflow: hidden;
|
||||
max-height: 28px;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.chksino label::after {
|
||||
content: 'No';
|
||||
padding: 1px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
margin-left: 45px;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #ececec;
|
||||
color: #666;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.chksino label::before {
|
||||
content: 'Si ';
|
||||
padding: 1px;
|
||||
padding-left: 15px !important;
|
||||
padding-right: 14px !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #428bca;
|
||||
color: #FFF;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.v-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -392,7 +429,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DivPersonaFisica" visible="false">
|
||||
<div class="col-md-4 form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtApellidoPaterno" CssClass="form-control " runat="server" MaxLength="150"></asp:TextBox>
|
||||
@@ -412,7 +449,7 @@
|
||||
<label style="width: 90%" for="<%= TxtNombres.ClientID.ToString()%>">Nombres:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombreComercial" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<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>
|
||||
@@ -427,21 +464,21 @@
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 ">
|
||||
<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>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
<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>
|
||||
<label for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtNombreCorto" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<label for="<%= TxtNombreCorto.ClientID.ToString()%>">Nombre Corto: </label>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtNombreCorto" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<label for="<%= TxtNombreCorto.ClientID.ToString()%>">Nombre Corto: </label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDireccion" runat="server" CssClass="form-control" MaxLength="90"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDireccion" runat="server" ControlToValidate="TxtDireccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Dirección''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -532,7 +569,7 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" AutoPostBack ="true" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" AutoPostBack="true" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRegimenFiscal" runat="server" InitialValue="-1" ControlToValidate="DdlRegimenFiscal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen Fiscal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -543,8 +580,8 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-md-4" runat="server" visible ="false" id="DvGenero">
|
||||
<asp:DropDownList ID="DdlGeneroCliente" runat="server" CssClass="form-control input-sm select2me">
|
||||
<div class="form-group form-md-line-input input-iconright col-md-4" runat="server" visible="false" id="DvGenero">
|
||||
<asp:DropDownList ID="DdlGeneroCliente" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Hombre" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mujer" Value="0"></asp:ListItem>
|
||||
@@ -555,7 +592,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -578,7 +615,7 @@
|
||||
<label for="<%= TxtContacto.ClientID.ToString()%>">Contacto Compras: </label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control" runat="server" MaxLength="10" ValidationGroup="GrpGuardar"></asp:TextBox>
|
||||
@@ -593,21 +630,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtTelefonoOtro" CssClass="form-control" runat="server" MaxLength="150"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtTelefonoOtro" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtTelefonoOtro.ClientID.ToString()%>">Teléfono Otro: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtExtOtro" CssClass="form-control" runat="server" MaxLength="10" ValidationGroup="GrpGuardar"></asp:TextBox>
|
||||
<label for="<%= TxtExtOtro.ClientID.ToString()%>">Ext: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
@@ -665,22 +702,6 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-md-6" id="DivPrecioLista" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
@@ -700,6 +721,38 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div id="DivTxtCrearPrecioLista" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecioLista" CssClass="form-control" runat="server" MaxLength="300"></asp:TextBox>
|
||||
<label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div id="DivPrecioLista" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div id="DivCrearPrecioLista" runat="server" visible="false" class="form-group">
|
||||
<label>¿Crear lista?</label>
|
||||
<asp:CheckBox ID="ChkCrearPrecioLista" runat="server" CssClass="chksino" Text=" " Checked="false" OnCheckedChanged="ChkCrearPrecioLista_CheckedChanged" AutoPostBack="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div2" runat="server">
|
||||
<asp:DropDownList ID="DdlCorporativo" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Descripcion" DataValueField="CveClienteCorporativo"></asp:DropDownList>
|
||||
<label for="<%= DdlCorporativo.ClientID.ToString()%>">Corporativo:</label>
|
||||
@@ -1049,11 +1102,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
<div id="DivRetenciones" runat="server">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="DivRetIVA" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRetIVA" CssClass="form-control" runat="server" MaxLength="9" Text="0"></asp:TextBox>
|
||||
@@ -1096,12 +1149,12 @@
|
||||
¿El Cliente nos retiene IVA por Fletes y Acarreos?:
|
||||
<asp:CheckBox ID="ChkRetIVAFletesAcarreos" CssClass="make-switchsd" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input" style="display:none;">
|
||||
<div class="form-group form-md-line-input" style="display: none;">
|
||||
<asp:TextBox ID="TxtReferenciaFiscal" CssClass="form-control" runat="server" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtReferenciaFiscal.ClientID.ToString()%>">Referencia:</label>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<div class="caption font-blue">
|
||||
<i class="icon-pin font-blue"></i>
|
||||
<span class="caption-subject bold uppercase">CFDI Versión</span>
|
||||
@@ -1129,21 +1182,21 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlFormaPago33.ClientID.ToString()%>">Forma Pago:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
|
||||
<asp:CheckBox ID="ChkDesglosarIEPS" Checked="true" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
|
||||
El cliente No desglosa IVA:
|
||||
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
|
||||
El cliente No desglosa IVA:
|
||||
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1438,13 +1491,13 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# If(CDbl(Eval("SubTotal")) = 0, "", Eval("SubTotal", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descuento" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Descuento" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# If(CDbl(Eval("Descuento")) = 0, "", Eval("Descuento", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -1686,7 +1739,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>" style="color: #888888;">F. Limite Crédito: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaLimiteCredito" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1893,7 +1946,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaInicioCxP.ClientID.ToString()%>">Fecha Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1906,7 +1959,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaFinCxP.ClientID.ToString()%>">Fecha Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
@@ -1921,7 +1974,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1934,7 +1987,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top:-10px !important;">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaVFCxP.ClientID.ToString()%>">Fecha V. Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
@@ -1975,7 +2028,7 @@
|
||||
<asp:CheckBox ID="ChkCobranzaEnviarCorreo" runat="server" Text="Enviar Correo Cobranza" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<asp:RadioButtonList ID="RBLGenerarReporteCxC" RepeatDirection="Horizontal" runat="server" Style="margin: 0 auto;">
|
||||
<asp:ListItem Text="PDF" Value="PDF" Selected="True" />
|
||||
@@ -4854,13 +4907,13 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer " ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server"
|
||||
Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar" ><i class='fa fa-calendar-plus-o font-green' ></i>Agendar</asp:HyperLink><br />
|
||||
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server"
|
||||
Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' ></i>Agendar</asp:HyperLink><br />
|
||||
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>
|
||||
|
||||
@@ -1212,6 +1212,10 @@ Partial Class Clientes
|
||||
DivPrecioLista.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
DivCrearPrecioLista.Visible = True
|
||||
End If
|
||||
|
||||
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
@@ -1350,7 +1354,14 @@ Partial Class Clientes
|
||||
Private Function CargaDatos() As Boolean
|
||||
Dim watch As New Diagnostics.Stopwatch()
|
||||
watch.Start()
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
watch.Stop()
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1, TipoCliente:=-1) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
@@ -1427,6 +1438,9 @@ Partial Class Clientes
|
||||
TxtPagina.Text = ObjClientes.Pagina
|
||||
'TxtGiro.Text = ObjClientes.Giro
|
||||
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString()
|
||||
ChkCrearPrecioLista.Checked = False
|
||||
ChkCrearPrecioLista_CheckedChanged(ChkCrearPrecioLista, EventArgs.Empty)
|
||||
|
||||
TxtCC.Text = ObjClientes.NotificarA
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString())
|
||||
@@ -2413,358 +2427,262 @@ Partial Class Clientes
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim ObjVentas As New ClsVentas(ObjClientes.IniciaTransacSQL())
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim CveClienteNuevo As Integer = -1
|
||||
Dim CvePrecioListaNuevo As Integer = -1
|
||||
|
||||
'Dias de pago
|
||||
Dim SBDiasPago As New StringBuilder()
|
||||
Dim DiasPago As String = ""
|
||||
If ChkLunes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMartes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMiercoles.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkJueves.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkViernes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkSabado.Checked Then SBDiasPago.AppendFormat("1") Else SBDiasPago.AppendFormat("0")
|
||||
DiasPago = SBDiasPago.ToString()
|
||||
|
||||
'Dias de Revision
|
||||
Dim SBDiasRevision As New StringBuilder()
|
||||
Dim DiasRevision As String = ""
|
||||
If ChkRevLunes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMartes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMiercoles.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevJueves.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevViernes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevSabado.Checked Then SBDiasRevision.AppendFormat("1") Else SBDiasRevision.AppendFormat("0")
|
||||
DiasRevision = SBDiasRevision.ToString()
|
||||
|
||||
|
||||
Dim errorContPaq As Boolean = False
|
||||
Dim IdContPaqi As Integer = 0
|
||||
Dim CodigoPersona As Integer = 0
|
||||
|
||||
|
||||
#Region "comentado"
|
||||
'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
|
||||
|
||||
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
|
||||
' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
|
||||
' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
|
||||
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
|
||||
|
||||
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
|
||||
|
||||
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
|
||||
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' Dim IdContPaqiCliente As Integer
|
||||
|
||||
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
|
||||
|
||||
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
|
||||
|
||||
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' Else
|
||||
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
|
||||
' errorContPaq = False
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' errorContPaq = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
' If Not errorContPaq Then
|
||||
' ObjContPaqi.Commit()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Else
|
||||
' ObjContPaqi.RollBack()
|
||||
' ObjContPaqi.Dispose()
|
||||
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
|
||||
'End If
|
||||
#End Region
|
||||
|
||||
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)
|
||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
If CveCliente = -1 Then
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
|
||||
|
||||
' si tiene la funcionalidad de la cuenta contable padre
|
||||
'If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then
|
||||
|
||||
' Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
' ObjContaAC.IniciaTransacSQL()
|
||||
' 'se registra la cuenta contable automaticamente
|
||||
|
||||
' CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2)
|
||||
|
||||
' If CtaCliente > 0 Then
|
||||
' ObjContaAC.Commit()
|
||||
' DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString()))
|
||||
' DdlCtaContableClientes.SelectedValue = CtaCliente.ToString()
|
||||
' 'MsgCuentaContable = String.Format("<br />Con la cuenta contable: {0}", NewCuenta)
|
||||
|
||||
' Else
|
||||
|
||||
' ObjContaAC.RollBack()
|
||||
' ObjContaAC.Dispose()
|
||||
' Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError)
|
||||
' ObjClientes.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' ObjContaAC.Dispose()
|
||||
'End If
|
||||
|
||||
'Dim CodigoCuentaAltaCompaq As String = ""
|
||||
'Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
'Dim IdCuentaAltaCompaq As Integer = -1
|
||||
'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente
|
||||
'If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then
|
||||
' If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Dim MetodoPago = DdlMetodoPago.SelectedValue.Toentero()
|
||||
'If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
' MetodoPago = 1
|
||||
'End If
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
|
||||
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
||||
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(),
|
||||
DiasPago, DdlTipoPago.SelectedValue, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
|
||||
TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim,
|
||||
TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(),
|
||||
CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
|
||||
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, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente) Then
|
||||
|
||||
ViewState("CveCliente") = ObjClientes.CveCliente
|
||||
|
||||
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' If gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
|
||||
' End If
|
||||
|
||||
'Next
|
||||
GuardarDocumentosClientes()
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each Row As DataRow In TempDTSucursales.Rows
|
||||
If Not CveCliente > 0 Then
|
||||
If ObjClientes.AddSucursal(ObjClientes.CveCliente, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
||||
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
|
||||
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
|
||||
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso Not ErrorProceso Then
|
||||
Dim GPS As New ClsGPS
|
||||
GPS.IniciaTransacSQL()
|
||||
For Each GvRow As GridViewRow In GvDatosGPS.Rows
|
||||
If Not GPS.DispositivosClienteUpdate(GvRow.DataKey("CveDispositivo").ToString().ToEntero(), ObjClientes.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Next
|
||||
If ErrorProceso Then
|
||||
GPS.RollBack()
|
||||
Else
|
||||
GPS.Commit()
|
||||
End If
|
||||
End If
|
||||
|
||||
'If IdCuentaAltaCompaq > 0 Then
|
||||
' If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
If CveEmpresaCRM > 0 Then
|
||||
If VincularEmpresaCRM() Then
|
||||
MensajeCRM = "<br><br>Se vinculo el cliente a la Empresa CRM"
|
||||
Else
|
||||
MensajeCRM = "<br><br>Ocurrio un error al vincular la Empresa CRM, intente unificar el Cliente."
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("El Cliente se guardó correctamente." & MsgCuentaContable & MensajeCRM, TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatClientes.aspx""")
|
||||
End If
|
||||
Try
|
||||
'Dias de pago
|
||||
Dim SBDiasPago As New StringBuilder()
|
||||
Dim DiasPago As String = ""
|
||||
If ChkLunes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMartes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkMiercoles.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkJueves.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkViernes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-")
|
||||
If ChkSabado.Checked Then SBDiasPago.AppendFormat("1") Else SBDiasPago.AppendFormat("0")
|
||||
DiasPago = SBDiasPago.ToString()
|
||||
|
||||
'Dias de Revision
|
||||
Dim SBDiasRevision As New StringBuilder()
|
||||
Dim DiasRevision As String = ""
|
||||
If ChkRevLunes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMartes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevMiercoles.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevJueves.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevViernes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-")
|
||||
If ChkRevSabado.Checked Then SBDiasRevision.AppendFormat("1") Else SBDiasRevision.AppendFormat("0")
|
||||
DiasRevision = SBDiasRevision.ToString()
|
||||
|
||||
Dim errorContPaq As Boolean = False
|
||||
Dim IdContPaqi As Integer = 0
|
||||
Dim CodigoPersona As Integer = 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 TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
|
||||
If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
|
||||
CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
CvePrecioLista = CvePrecioListaNuevo
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
'VERIFICA SI ES CLIENTE NUEVO O ACTUALIZACION
|
||||
If Me.CveCliente = -1 Then
|
||||
Dim ErrorAC As Boolean = False
|
||||
Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero()
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, CvePrecioLista, ChkMail.Checked, TxtRetIVA.Text.ToDouble,
|
||||
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(),
|
||||
DiasPago, DdlTipoPago.SelectedValue, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
|
||||
TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim,
|
||||
TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(),
|
||||
CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||
CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
|
||||
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, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente) Then
|
||||
|
||||
CveClienteNuevo = ObjClientes.CveCliente
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
If Not ObjClientes.AddClienteImpuestosLocales(CveClienteNuevo, GVR.DataKey("CveImpuestoLocal").ToEntero()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each Row As DataRow In TempDTSucursales.Rows
|
||||
If Not CveCliente > 0 Then
|
||||
If Not ObjClientes.AddSucursal(CveClienteNuevo, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
|
||||
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
|
||||
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
|
||||
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, CveClienteNuevo) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim NombreCliente As String = ""
|
||||
|
||||
If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then
|
||||
NombreCliente = ($"{TxtNombres.Text} {TxtApellidoPaterno.Text} {TxtApellidoMaterno.Text}").Trim()
|
||||
Else
|
||||
NombreCliente = TxtNombre.Text.Trim()
|
||||
End If
|
||||
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
|
||||
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
||||
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, CvePrecioLista, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
||||
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), DiasPago, DdlTipoPago.SelectedValue,
|
||||
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
|
||||
ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario,
|
||||
CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text,
|
||||
CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked,
|
||||
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), 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(),
|
||||
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, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||
Genero:=GeneroCliente) Then
|
||||
|
||||
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
If Not ObjClientes.AddClienteImpuestosLocales(Me.CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
Dim NombreCliente As String = ""
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
OnError("Ocurrió un error al guardar", ex)
|
||||
End Try
|
||||
|
||||
If TxtRFC.Text.Length = 13 AndAlso TxtApellidoPaterno.Text <> "" AndAlso TxtApellidoMaterno.Text <> "" AndAlso TxtNombres.Text <> "" Then
|
||||
NombreCliente = ($"{TxtNombres.Text} {TxtApellidoPaterno.Text} {TxtApellidoMaterno.Text}").Trim()
|
||||
Else
|
||||
NombreCliente = TxtNombre.Text.Trim()
|
||||
End If
|
||||
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
|
||||
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
|
||||
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
|
||||
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), DiasPago, DdlTipoPago.SelectedValue,
|
||||
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
|
||||
ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario,
|
||||
CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(),
|
||||
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text,
|
||||
CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text,
|
||||
DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked,
|
||||
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), 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(),
|
||||
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, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||
Genero:=GeneroCliente) Then
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Alert("Ocurrió un error al guardar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
If CveClienteNuevo > 0 Then
|
||||
ViewState("CveCliente") = CveClienteNuevo
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
objDoc.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
End If
|
||||
Next
|
||||
GuardarDocumentosClientes()
|
||||
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' 'sino está registrada y se selecciona, se va a insertar
|
||||
' If gvr.DataKey("CveDocumentacionElectronica").Toentero() <= 0 Then
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' Else
|
||||
' ', Observacion2:=gvr.FCTextBox("TxtObs2").Text
|
||||
' objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").Toentero(), gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' End If
|
||||
|
||||
' 'si ya estaba registrada y no se selecciona, se va a insertar
|
||||
' If gvr.DataKey("CveDocumentacionElectronica").Toentero() > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
' objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").Toentero(), -1)
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
ObjClientes.Commit()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue)
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString()
|
||||
Dim _CorreoAsistente As String = ""
|
||||
Dim _CorreoCoordinador As String = ""
|
||||
|
||||
Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString().ToEntero()
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
_CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero())
|
||||
_CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
|
||||
End If
|
||||
|
||||
If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero() > 0 Then
|
||||
|
||||
Dim Asunto As String = ""
|
||||
Dim Para As String = If(_CorreoVendedor.Length > 0, _CorreoVendedor & ";", "") & If(_CorreoAsistente.Length > 0, _CorreoAsistente & ";", "") & _CorreoCoordinador
|
||||
Dim SBBody As New StringBuilder
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
Asunto = "Activación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
|
||||
Else
|
||||
Asunto = "Desactivación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
End If
|
||||
If Not ErrorProceso Then
|
||||
RecargaGlobal()
|
||||
|
||||
'RECARGA GLOBAL DE LISTA DE PRECIOS SI SE GENERO UNO NUEVO
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
End If
|
||||
|
||||
'NUEVO CLIENTE
|
||||
If CveClienteNuevo > 0 Then
|
||||
'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
|
||||
Dim MensajeCRM As String = ""
|
||||
If CveEmpresaCRM > 0 Then
|
||||
If VincularEmpresaCRM() Then
|
||||
MensajeCRM = "<br><br>Se vinculo el cliente a la Empresa CRM"
|
||||
Else
|
||||
MensajeCRM = "<br><br>Ocurrio un error al vincular la Empresa CRM, intente unificar el Cliente."
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("El cliente se guardó correctamente." & MsgCuentaContable & MensajeCRM, TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/CatClientes.aspx""")
|
||||
|
||||
Else
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
If EstatusAnteriorCliente <> ChkEstado.Checked Then
|
||||
|
||||
Dim DTVendedor As New DataTable
|
||||
DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue)
|
||||
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
Dim DtVendedores As DataTable = Nothing
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
DtVendedores = ObjVendedores.DtResultados
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString()
|
||||
Dim _CorreoAsistente As String = ""
|
||||
Dim _CorreoCoordinador As String = ""
|
||||
|
||||
Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString().ToEntero()
|
||||
If DTVendedor.Rows.Count > 0 Then
|
||||
_CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero())
|
||||
_CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
|
||||
End If
|
||||
|
||||
If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero() > 0 Then
|
||||
|
||||
Dim Asunto As String = ""
|
||||
Dim Para As String = If(_CorreoVendedor.Length > 0, _CorreoVendedor & ";", "") & If(_CorreoAsistente.Length > 0, _CorreoAsistente & ";", "") & _CorreoCoordinador
|
||||
Dim SBBody As New StringBuilder
|
||||
|
||||
If ChkEstado.Checked Then
|
||||
Asunto = "Activación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido activado.", TxtNombre.Text))
|
||||
Else
|
||||
Asunto = "Desactivación de cliente " & TxtNombre.Text
|
||||
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
|
||||
End If
|
||||
MandaCorreo(Asunto, Para + "", SBBody.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
objDoc.Dispose()
|
||||
RecargaGlobal()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -7109,10 +7027,9 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1)
|
||||
Private Function GuardarDocumentosClientes(ByRef objDocumentos As ClsEdocumentacion, CveCliente As Integer, Optional _CveDocumentacionExcluir As Integer = -1) As Boolean
|
||||
|
||||
Dim hasError As Boolean = True
|
||||
Dim objDocumentos As New ClsEdocumentacion
|
||||
Dim hasError As Boolean = False
|
||||
|
||||
For Each dRow As GridViewRow In GvDocumentosCliente.Rows
|
||||
|
||||
@@ -7169,9 +7086,6 @@ Partial Class Clientes
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
hasError = False
|
||||
Catch ex As Exception
|
||||
hasError = True
|
||||
Exit For
|
||||
@@ -7181,14 +7095,21 @@ Partial Class Clientes
|
||||
|
||||
'refrescar grid datos investigacion
|
||||
CargaDocumentacionCliente()
|
||||
End Sub
|
||||
|
||||
Return Not hasError
|
||||
End Function
|
||||
|
||||
Protected Sub chkEstatus_CheckedChanged(sender As Object, e As EventArgs)
|
||||
GuardarDocumentosClientes()
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente)
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub TxtObservaciones_TextChanged(sender As Object, e As EventArgs)
|
||||
GuardarDocumentosClientes()
|
||||
Protected Sub TxtObservaciones_TextChanged(sender As Object, e As EventArgs)
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente)
|
||||
End Using
|
||||
End Sub
|
||||
Protected Sub BtnModalFirmaContratoDocumentoUpload_Click(sender As Object, e As EventArgs) Handles BtnModalFirmaContratoDocumentoUpload.Click
|
||||
|
||||
@@ -7235,8 +7156,10 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
GuardarDocumentosClientes(CveDocumentacion)
|
||||
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente, CveDocumentacion)
|
||||
End Using
|
||||
CargaDocumentacionCliente()
|
||||
|
||||
|
||||
@@ -10353,6 +10276,15 @@ Partial Class Clientes
|
||||
|
||||
Private Sub DdlRegimenFiscal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRegimenFiscal.SelectedIndexChanged
|
||||
CargaComboCFDI()
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub ChkCrearPrecioLista_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
DivPrecioLista.Visible = Not ChkCrearPrecioLista.Checked
|
||||
DivTxtCrearPrecioLista.Visible = ChkCrearPrecioLista.Checked
|
||||
|
||||
UpDatos.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -8428,7 +8428,7 @@
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
<div class="col-md-4" style="text-align:left!important" >
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged">
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged" Style="margin-top:10px!important">
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
@@ -8449,23 +8449,26 @@
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
|
||||
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlMedicoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlMedicoModal" runat="server" CssClass="help-block errorimput" Display="None" InitialValue="-1"
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlMedicoModal" runat="server" CssClass="" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlMedicoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Medico''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlMedicoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMedicoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" >
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
|
||||
OnSelectedIndexChanged="DdlProcedimientoModal_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlProcedimientoModal" runat="server" CssClass="help-block errorimput" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlProcedimientoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlProcedimientoModal" runat="server" CssClass="" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlProcedimientoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Procedimiento''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlProcedimientoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlProcedimientoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8487,6 +8490,53 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<asp:GridView ID="GvProductosProcedimiento" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%"
|
||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" ></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="30px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="1" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<%--<asp:BoundField DataField="Precio" HeaderText="Precio">
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:BoundField> --%>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="P.U." ItemStyle-Width="30px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio") %>' Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13498,6 +13498,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then
|
||||
|
||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList)
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
@@ -13506,6 +13507,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -35613,6 +35618,9 @@ Partial Class Ventas
|
||||
DdlMedicoModal.SelectedValueExist(-1)
|
||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
GvProductosProcedimiento.DataBind()
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
@@ -35671,6 +35679,44 @@ Partial Class Ventas
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
|
||||
|
||||
|
||||
Dim CountPsAgregados As Integer = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
|
||||
If Chk.Checked AndAlso Cantidad > 0 Then
|
||||
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
|
||||
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
||||
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then
|
||||
CountPsAgregados = CountPsAgregados + 1
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If CountPsAgregados > 0 Then
|
||||
CalculaTotalesVenta()
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
@@ -35682,6 +35728,27 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoProducto(DdlProcedimientoModal.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then
|
||||
GvProductosProcedimiento.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
objVenta.Dispose()
|
||||
|
||||
Else
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvProductosProcedimiento.DataBind()
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||
|
||||
@@ -35767,5 +35834,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user