-
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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
<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">
|
||||
@@ -63,9 +61,14 @@
|
||||
<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>
|
||||
@@ -79,8 +82,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr align="left" runat="server" id="DivSucursal" visible="false">
|
||||
@@ -108,25 +110,29 @@
|
||||
</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="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="LtlIVAPorcentaje" Text="" runat="server" Visible="false" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-3" style="text-align: right;"">
|
||||
<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>
|
||||
@@ -141,8 +147,6 @@
|
||||
<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>
|
||||
@@ -150,7 +154,6 @@
|
||||
<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:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblUMH" runat="server" ToolTip="Unidad de Medida" Text="U.M"></asp:Label>
|
||||
@@ -159,12 +162,9 @@
|
||||
<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 ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblPH" runat="server" ToolTip="Precio Promoción" Text="Precio <br/> Promoción"></asp:Label>
|
||||
@@ -199,26 +199,18 @@
|
||||
</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 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>
|
||||
@@ -228,16 +220,13 @@
|
||||
<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>
|
||||
@@ -245,26 +234,19 @@
|
||||
<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>
|
||||
@@ -272,11 +254,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -46,6 +46,17 @@ Partial Class Inventarios_Default
|
||||
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
|
||||
LnkBsucarSerie.Visible = True
|
||||
End If
|
||||
@@ -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
|
||||
@@ -47,8 +47,6 @@ Partial Class Ventas_CatPreciosLista
|
||||
ObjVta.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
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>
|
||||
@@ -39,11 +40,14 @@
|
||||
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" >
|
||||
|
||||
<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>--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
@@ -63,7 +67,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
||||
<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" />
|
||||
|
||||
@@ -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;
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
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,9 +2427,13 @@ 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
|
||||
|
||||
Try
|
||||
'Dias de pago
|
||||
Dim SBDiasPago As New StringBuilder()
|
||||
Dim DiasPago As String = ""
|
||||
@@ -2438,88 +2456,10 @@ Partial Class Clientes
|
||||
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")
|
||||
|
||||
@@ -2527,57 +2467,27 @@ Partial Class Clientes
|
||||
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 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()
|
||||
|
||||
' 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,
|
||||
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,
|
||||
@@ -2592,74 +2502,41 @@ Partial Class Clientes
|
||||
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()
|
||||
CveClienteNuevo = ObjClientes.CveCliente
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
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 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(),
|
||||
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
|
||||
|
||||
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
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Next
|
||||
If ErrorProceso Then
|
||||
GPS.RollBack()
|
||||
Else
|
||||
GPS.Commit()
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, CveClienteNuevo) Then
|
||||
ErrorProceso = True
|
||||
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
|
||||
End If
|
||||
Else
|
||||
Dim NombreCliente As String = ""
|
||||
|
||||
@@ -2668,9 +2545,11 @@ Partial Class Clientes
|
||||
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,
|
||||
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,
|
||||
@@ -2687,35 +2566,80 @@ Partial Class Clientes
|
||||
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
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
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
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
If Not ObjClientes.AddClienteImpuestosLocales(Me.CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
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
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
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
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
'Next
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
OnError("Ocurrió un error al guardar", ex)
|
||||
End Try
|
||||
|
||||
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()
|
||||
|
||||
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
|
||||
@@ -2756,15 +2680,9 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CargaHistorial()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
UpnHistorial.Update()
|
||||
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()
|
||||
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
|
||||
|
||||
@@ -7236,7 +7157,9 @@ Partial Class Clientes
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
GuardarDocumentosClientes(CveDocumentacion)
|
||||
Using objDocumentos As New ClsEdocumentacion()
|
||||
GuardarDocumentosClientes(objDocumentos, Me.CveCliente, CveDocumentacion)
|
||||
End Using
|
||||
CargaDocumentacionCliente()
|
||||
|
||||
|
||||
@@ -10354,5 +10277,14 @@ Partial Class Clientes
|
||||
Private Sub DdlRegimenFiscal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRegimenFiscal.SelectedIndexChanged
|
||||
CargaComboCFDI()
|
||||
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>
|
||||
<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: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" >
|
||||
<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>
|
||||
|
||||
@@ -8488,6 +8491,53 @@
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</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