Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -479,14 +479,14 @@ Public Class CFDIComplementoPagos20
|
||||
|
||||
Public ReadOnly Property MontoTotalPagos As Decimal
|
||||
Get
|
||||
Return (From c In ComplementoPagos Select c.Monto * c.TipoCambioP).Sum()
|
||||
Return (From c In ComplementoPagos Select c.Monto * c.TipoCambioP).Sum().RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosBaseIVA0 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.BaseMN).Sum() * cfd.TipoCambioP.RoundSQL(4)) 'temporal redondeo a 4, 2023.07.07
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.BaseMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
|
||||
@@ -1871,6 +1871,32 @@ Public Class ClsOS
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function AddOrdenesServicioMateriales(CveOS As Integer, CvePS As Integer, Cantidad As Decimal, Serie As String, Lote As String, FechaCaducidad As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServicioMaterialesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||
.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 material.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Public Function GetCveCliente(CveVenta As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_OS_ClienteGet")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -184,6 +184,7 @@ Public Class ClsTransportes
|
||||
CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
||||
Ruta = Data.Rows(0)("Ruta").ToString
|
||||
Me.CveViaje = Data.Rows(0)("CveViaje").ToString.ToEntero
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
@@ -273,20 +274,15 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = 0, Optional Estatus As Boolean = False) As Boolean
|
||||
Public Function GetViajesPasajeros(CveViaje As Integer, Optional CveViajePasajero As Integer = -1, Optional Estatus As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Trans_ViajesPasajerosGet")
|
||||
If Estatus = True Then
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
End With
|
||||
Else
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
End With
|
||||
End If
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1449,8 +1449,10 @@ Namespace Modelos
|
||||
End Function
|
||||
|
||||
Public Function AgregarPS(CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Obs As String,
|
||||
Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "", Optional CveSubProyecto As Integer = -1,
|
||||
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional CuentaPredial As String = "") As Boolean
|
||||
Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "",
|
||||
Optional CveSubProyecto As Integer = -1,
|
||||
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
|
||||
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1) As Boolean
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -1626,7 +1628,7 @@ Namespace Modelos
|
||||
Row("EntregaDirecta") = 0
|
||||
'Contratos
|
||||
Row("CveContratoDetalle") = -1
|
||||
Row("CveVentaDetalle") = -1
|
||||
Row("CveVentaDetalle") = CveVentaDetallePadre
|
||||
Row("CveMovimientoDetallePedido") = -1
|
||||
Row("CveOrdenCompraDetalle") = -1
|
||||
Row("CveVentaDetalleRemision") = -1
|
||||
@@ -2154,7 +2156,7 @@ Namespace Modelos
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta) Then
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
|
||||
49
Ashx/SIGDesc.ashx
Normal file
49
Ashx/SIGDesc.ashx
Normal file
@@ -0,0 +1,49 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGDesc" %>
|
||||
|
||||
Option Strict Off
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
|
||||
Get
|
||||
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
If context.Request("metodo") IsNot Nothing AndAlso context.Request("metodo").ToString() = "descargarPDFVenta" Then
|
||||
Dim CveVenta As Integer = context.Request("CveVenta").ToEntero()
|
||||
DescargarPDFVenta(context, CveVenta)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DescargarPDFVenta(ByVal context As HttpContext, CveVenta As Integer)
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
If Not IsNothing(usuario) Then
|
||||
Dim ObjFactura As New Modelos.Factura(usuario, CveVenta, usuario.CveEmpresa, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
|
||||
Dim ArchivoPDF = String.Format("{0}Empresas\{1}\PDF\{2}\{3}.pdf", ModExtensiones.DirectorioBaseEmpresas, usuario.CveEmpresa, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Dim FileInfo As FileInfo = New FileInfo(ArchivoPDF)
|
||||
If FileInfo.Exists Then
|
||||
context.Response.ContentType = "application/pdf"
|
||||
context.Response.Flush()
|
||||
context.Response.WriteFile(FileInfo.FullName)
|
||||
context.Response.End()
|
||||
End If
|
||||
FileInfo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -223,6 +223,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
|
||||
Protected Sub LnkConciliarManual_Click(sender As Object, e As EventArgs)
|
||||
ModalidadConciliacion = "M"
|
||||
If DdlCriterio.Items.FindByValue("2") Is Nothing Then DdlCriterio.Items.Add(New ListItem("Importe - Tipo Movimiento", "2"))
|
||||
DdlCriterio.SelectedIndex = 0
|
||||
DivCriterio.Visible = True
|
||||
TxtFechaAplicado.Text = txtFechaI.Text
|
||||
@@ -323,7 +324,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
End Sub
|
||||
Protected Sub LnlConciliarAutomaticamente_Click(sender As Object, e As EventArgs)
|
||||
ModalidadConciliacion = "A"
|
||||
DdlCriterio.SelectedIndex = 0
|
||||
DdlCriterio.Items.Remove(DdlCriterio.Items.FindByValue("2"))
|
||||
DivCriterio.Visible = True
|
||||
TxtFechaAplicado.Text = txtFechaI.Text
|
||||
UpModalCriterio.Update()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -86,7 +86,6 @@
|
||||
border: 1px solid #999999;
|
||||
border-top: 0;
|
||||
font-family: verdana,tahoma,helvetica;
|
||||
font-size: 12px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Owin.Security.Provider
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
@@ -342,7 +341,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
InicializaValores()
|
||||
CargaParametrosAD()
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119) Then DdlAlmacen.AutoPostBack = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146, 119, 186) Then DdlAlmacen.AutoPostBack = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then
|
||||
|
||||
@@ -521,9 +520,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If DtPendientes IsNot Nothing Then
|
||||
GVPendientes.DataSource = DtPendientes
|
||||
|
||||
End If
|
||||
|
||||
LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm"))
|
||||
|
||||
GVPendientes.DataBind()
|
||||
@@ -613,8 +610,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
TipoEntrega = 1
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
|
||||
|
||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
|
||||
|
||||
If UsuarioActual.CveSubProyecto = 8804 Then
|
||||
|
||||
@@ -165,14 +165,23 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatosGvVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo Documento" DataField="TipoDocto" ItemStyle-Width="125px" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="15%" HeaderText="SerieFolio" ControlStyle-CssClass="Texto" DataTextField="SerieFolio" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-Width="55px" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="80px" HeaderText="SerieFolio" ControlStyle-CssClass="Texto" DataTextField="SerieFolio" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="~/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" HeaderText="Cliente" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Nombre" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" />
|
||||
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
|
||||
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:HyperLink ID="lnkSurtir" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm blue" Text="Surtir <i class='fa fa-arrow-right' ></i>"></asp:HyperLink>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -74,7 +74,18 @@ Partial Class RepNotasSinAlmacen
|
||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||
GvVentas.Columns(5).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(4).Visible = TienePermisoImportes
|
||||
GvCompras.Columns(5).Visible = TienePermisoDesmarcar
|
||||
GvCompras.Columns(5).Visible = TienePermisoDesmarcar
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
|
||||
GvVentas.Columns(2).HeaderText = "Fecha Cirugía"
|
||||
GvVentas.Columns(3).HeaderText = "Hospital"
|
||||
GvVentas.Columns(6).Visible = True
|
||||
GvVentas.Columns(7).Visible = True
|
||||
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
||||
CType(GvVentas.Columns(2), BoundField).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
CType(GvVentas.Columns(2), BoundField).ItemStyle.Width = Unit.Pixel(120)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
TxtFechaF.Text = NowADS().ToShortDateString
|
||||
@@ -88,18 +99,10 @@ Partial Class RepNotasSinAlmacen
|
||||
DdlProveedor.setEsWebService(True)
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedor.SelectedText = "Todos"
|
||||
DdlProveedor.SelectedValue = "-1"
|
||||
|
||||
'DdlSucursal.DataSource = GlobalDTSucursales(UsuarioActual.CveEmpresa)
|
||||
'DdlSucursal.DataBind()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.SelectedValue = Nothing
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
DdlProveedor.SelectedValue = "-1"
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
@@ -131,13 +134,8 @@ Partial Class RepNotasSinAlmacen
|
||||
GvVentas.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvVentas.DataBind()
|
||||
|
||||
'If (GvVentas.Rows.Count > 0) Then
|
||||
' GvVentas.UseAccessibleHeader = True
|
||||
' GvVentas.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGvVentas();")
|
||||
'End If
|
||||
GvVentas.DataBind()
|
||||
|
||||
Else
|
||||
'Compras
|
||||
If Not DdlProveedor.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
@@ -8,6 +8,8 @@ Imports Telerik.Web.UI
|
||||
Imports System.Data.SqlClient
|
||||
Imports Stimulsoft.Report.StiOptions.Export
|
||||
Imports Modelos
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
Imports APP_Code_CSharp
|
||||
|
||||
Partial Class OS_OrdenesServicios
|
||||
Inherits ClsPaginas
|
||||
@@ -372,8 +374,7 @@ Partial Class OS_OrdenesServicios
|
||||
'CargaEstatusOS()
|
||||
CargaDatos()
|
||||
'PermisosSegunEstatus()
|
||||
CargaDetalles()
|
||||
CargaMateriales()
|
||||
|
||||
|
||||
DivSeFactura.Visible = True
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
@@ -670,7 +671,7 @@ Partial Class OS_OrdenesServicios
|
||||
' End If
|
||||
'End If
|
||||
|
||||
ElseIf TipoEstatus = 4 Then
|
||||
ElseIf TipoEstatus = 4 AndAlso Not UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
'DisableAll()
|
||||
If SeFacturara = "True" Then
|
||||
HplFacturar.Visible = True
|
||||
@@ -704,7 +705,8 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
CargaEventoBitacora()
|
||||
CargaHistorial()
|
||||
|
||||
CargaDetalles()
|
||||
CargaMateriales()
|
||||
|
||||
If TipoEstatus.Contiene(1, 2, 3) Then
|
||||
LnkAccionesMaterialUtilizado.Visible = True
|
||||
@@ -2955,6 +2957,20 @@ Partial Class OS_OrdenesServicios
|
||||
LnkModalMaterialUtilizado.Visible = True
|
||||
DTSolicitudDev = New DataTable
|
||||
Dim Opcion As Integer = If(DdlTipoVenta.SelectedValue.Contiene("2", "3"), 2, 1)
|
||||
|
||||
|
||||
Select Case DdlTipoVenta.SelectedValue.ToEntero
|
||||
Case 2, 3
|
||||
Opcion = 2
|
||||
Exit Select
|
||||
Case 5
|
||||
Opcion = 3
|
||||
Exit Select
|
||||
Case Else
|
||||
Opcion = 1
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
Dim ObjOS As New ClsOS
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then
|
||||
DTSolicitudDev = ObjOS.DtResultados
|
||||
@@ -2996,176 +3012,228 @@ Partial Class OS_OrdenesServicios
|
||||
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||
Dim CveAlmacenDestino As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {CveSubProyectoPedido}").ToEntero
|
||||
|
||||
If Not CveAlmacenDestino > 0 Then
|
||||
Alert("No se encontró almacen de entrega por adelantado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
Dim TotalSeleccionado As Decimal = 0
|
||||
|
||||
For Each GVRow As GridViewRow In GvMU.Rows
|
||||
TotalSeleccionado = TotalSeleccionado + GVRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Next
|
||||
|
||||
If TotalSeleccionado = 0 Then
|
||||
Alert("No se selecciono ningun material", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not CveAlmacenDestino > 0 Then
|
||||
Alert("No se encontró almacen de entrega por adelantado", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim ProcesoOK As Boolean = True
|
||||
Dim ObjV As New ClsVentas
|
||||
Dim ClsOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
||||
|
||||
Dim GenrarRemisionMovimientos As Boolean = False
|
||||
If ProcesoOK Then
|
||||
Dim AplicaDevolucion As Boolean = False
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
|
||||
If CantidadDev > 0 Then
|
||||
AplicaDevolucion = True
|
||||
If Not ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
|
||||
For Each GVRow As GridViewRow In GvMU.Rows
|
||||
Dim CantidadRegistro As Decimal = GVRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Dim CvePS As Integer = GVRow.DataKey("CvePS").ToEntero
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
|
||||
Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie"))
|
||||
Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote"))
|
||||
Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate)
|
||||
If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then
|
||||
Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
GenrarRemisionMovimientos = False
|
||||
AplicaDevolucion = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal > 0 Then
|
||||
GenrarRemisionMovimientos = True
|
||||
End If
|
||||
|
||||
Next
|
||||
If AplicaDevolucion Then
|
||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then
|
||||
If ProcesoOK Then
|
||||
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
||||
If CveOSEstatusFinalizada > 0 Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo obtener el estado para finalizar la orden de servicio.")
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim DtVentaDetalle As New DataTable
|
||||
Dim CveMovimientoSalida, CveMovimientoEntrada As Integer
|
||||
Dim ImporteAlmacen As Decimal
|
||||
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
||||
|
||||
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
||||
|
||||
If Respuesta.CveVenta > 0 Then
|
||||
If ObjV.GetVentaDetalle(Respuesta.CveVenta) Then
|
||||
Dim dtClon As DataTable = ObjV.DtResultados.Copy
|
||||
dtClon.DefaultView.Sort = "CveVentaDetalle ASC"
|
||||
DtVentaDetalle = dtClon.DefaultView.ToTable()
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtil")
|
||||
Dim Folio As Integer = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida > 0 Then
|
||||
|
||||
Dim IndexMov1 As Integer = 0
|
||||
Else
|
||||
If ProcesoOK Then
|
||||
Dim AplicaDevolucion As Boolean = False
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadRegistro As Decimal = GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CveUM As Integer = GvRow.DataKey("CveUM").ToEntero
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero ' DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
|
||||
Dim Serie As String = GvRow.DataKey("Serie")
|
||||
Dim Lote As String = GvRow.DataKey("Lote")
|
||||
Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDate
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadRegistro, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||
If CantidadDev > 0 Then
|
||||
AplicaDevolucion = True
|
||||
If Not ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then
|
||||
ProcesoOK = False
|
||||
GenrarRemisionMovimientos = False
|
||||
AplicaDevolucion = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
IndexMov1 = IndexMov1 + 1
|
||||
|
||||
If GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal > 0 Then
|
||||
GenrarRemisionMovimientos = True
|
||||
End If
|
||||
|
||||
Next
|
||||
If AplicaDevolucion Then
|
||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim DtVentaDetalle As New DataTable
|
||||
Dim CveMovimientoSalida, CveMovimientoEntrada As Integer
|
||||
Dim ImporteAlmacen As Decimal
|
||||
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
||||
|
||||
If ProcesoOK Then
|
||||
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
||||
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="OS/MatUtil2")
|
||||
If Respuesta.CveVenta > 0 Then
|
||||
If ObjV.GetVentaDetalle(Respuesta.CveVenta) Then
|
||||
Dim dtClon As DataTable = ObjV.DtResultados.Copy
|
||||
dtClon.DefaultView.Sort = "CveVentaDetalle ASC"
|
||||
DtVentaDetalle = dtClon.DefaultView.ToTable()
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
ImporteAlmacen = ObjInventario.DtResultados.SUM("Total")
|
||||
Dim IndexMov2 As Integer = 0
|
||||
For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
||||
If GenrarRemisionMovimientos AndAlso ProcesoOK Then
|
||||
|
||||
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
||||
Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
||||
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="OS/MatUtil")
|
||||
Dim Folio As Integer = ObjInventario.Folio
|
||||
|
||||
Dim Lote As String = dRow("Lote").ToString
|
||||
Dim Serie As String = dRow("Serie").ToString
|
||||
Dim FechaCaducidad As DateTime = dRow("FechaCaducidad").ToString.ToDateTime
|
||||
If CveMovimientoSalida > 0 Then
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Dim IndexMov1 As Integer = 0
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadRegistro As Decimal = GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CveUM As Integer = GvRow.DataKey("CveUM").ToEntero
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
Dim CveVentaDetalle As Integer = DtVentaDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePadre = {GvRow.DataKey("CveVentaDetalle")}").ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
|
||||
Dim Serie As String = GvRow.DataKey("Serie")
|
||||
Dim Lote As String = GvRow.DataKey("Lote")
|
||||
Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDate
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadRegistro, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
IndexMov2 = IndexMov2 + 1
|
||||
Next
|
||||
If ProcesoOK Then
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoEntrada, Folio, "Material utilizado")
|
||||
End If
|
||||
IndexMov1 = IndexMov1 + 1
|
||||
Next
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Respuesta.CveVenta, CveOS:=CveOS) Then
|
||||
If ProcesoOK Then
|
||||
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="OS/MatUtil2")
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
ImporteAlmacen = ObjInventario.DtResultados.SUM("Total")
|
||||
Dim IndexMov2 As Integer = 0
|
||||
For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
||||
Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
||||
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||
|
||||
Dim Lote As String = dRow("Lote").ToString
|
||||
Dim Serie As String = dRow("Serie").ToString
|
||||
Dim FechaCaducidad As DateTime = dRow("FechaCaducidad").ToString.ToDateTime
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
IndexMov2 = IndexMov2 + 1
|
||||
Next
|
||||
If ProcesoOK Then
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoEntrada, Folio, "Material utilizado")
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Respuesta.CveVenta, CveOS:=CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
Dim Contabilizable As Boolean = False
|
||||
Dim Concepto As String = "Material utilizado"
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OS-MatUtil", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAlmacen, ImporteAlmacen, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
If Not ClsOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
Dim Contabilizable As Boolean = False
|
||||
Dim Concepto As String = "Material utilizado"
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OS-MatUtil", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAlmacen, ImporteAlmacen, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAlmacen, ImporteAlmacen, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAlmacen, ImporteAlmacen, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjV.Commit()
|
||||
|
||||
If GenrarRemisionMovimientos = False Then
|
||||
Alert("El material sera recibido en almacén.")
|
||||
ObjV.Commit()
|
||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||
Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; "
|
||||
Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
Alert("El material utilizado se guardó correctamente")
|
||||
If GenrarRemisionMovimientos = False Then
|
||||
Alert("El material sera recibido en almacén.")
|
||||
Else
|
||||
Alert("El material utilizado se guardó correctamente")
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DivModalMaterialUtilizado').modal('hide');")
|
||||
Else
|
||||
ObjV.RollBack()
|
||||
Alert("El material utilizado no se guardó correctamente", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Se presento un error al guardar el material", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjV.Dispose()
|
||||
@@ -3194,6 +3262,9 @@ Partial Class OS_OrdenesServicios
|
||||
ObjFactura.CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||
ObjFactura.CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
ObjFactura.CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero
|
||||
ObjFactura.FechaParaSurtir = TxtFechaCita.Text.ToDateTime
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.CveVentaRelacion = CveVentaPedido
|
||||
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
|
||||
@@ -3204,7 +3275,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim Obs As String = GvRow.DataKey("Observaciones")
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then
|
||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=GvRow.DataKey("CveVentaDetalle").ToEntero) Then
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
|
||||
@@ -72,7 +72,7 @@ Partial Class OS_RepOSMedicas
|
||||
End If
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().AddDays(2).ToShortDateString
|
||||
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
||||
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" >
|
||||
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall mysmallbtn" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
||||
|
||||
@@ -233,24 +233,19 @@ Partial Class RH_CatDocumentos
|
||||
TxtOrden.Text = Orden.ToString
|
||||
|
||||
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
|
||||
ChkAplicaDiasLimite.Checked = Boolean.Parse(GvRow.DataKey("AplicaDiasLimite"))
|
||||
ChkAplicaFechaVencimiento.Checked = Boolean.Parse(GvRow.DataKey("AplicaFechaVencimiento"))
|
||||
|
||||
ChkAplicaDiasLimite.Checked = CBool(GvRow.DataKey("AplicaDiasLimite"))
|
||||
ChkAplicaFechaVencimiento.Checked = CBool(GvRow.DataKey("AplicaFechaVencimiento"))
|
||||
|
||||
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
|
||||
chkEstatus.Checked = Estatus
|
||||
chkRequerido.Checked = Requerido
|
||||
|
||||
|
||||
LtlTituloModalDocumentacion.Text = "Actualizar Documento: " & Documentacion
|
||||
BtnAgregarDocumentoModal.Text = "Actualizar"
|
||||
|
||||
UpModalDocumentacion.Update()
|
||||
ActualizarDocumentacion = True
|
||||
|
||||
|
||||
|
||||
|
||||
CargaDatosParametro()
|
||||
|
||||
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
1
Scripts/PrintJS/print.min.css
vendored
Normal file
1
Scripts/PrintJS/print.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.printModal{font-family:sans-serif;display:flex;text-align:center;font-weight:300;font-size:30px;left:0;top:0;position:absolute;color:#045fb4;width:100%;height:100%;background-color:hsla(0,0%,100%,.9)}.printClose{position:absolute;right:10px;top:10px}.printClose:before{content:"\00D7";font-family:Helvetica Neue,sans-serif;font-weight:100;line-height:1px;padding-top:.5em;display:block;font-size:2em;text-indent:1px;overflow:hidden;height:1.25em;width:1.25em;text-align:center;cursor:pointer}.printSpinner{margin-top:3px;margin-left:-40px;position:absolute;display:inline-block;width:25px;height:25px;border:2px solid #045fb4;border-radius:50%;animation:spin .75s linear infinite}.printSpinner:after,.printSpinner:before{left:-2px;top:-2px;display:none;position:absolute;content:"";width:inherit;height:inherit;border:inherit;border-radius:inherit}.printSpinner,.printSpinner:after,.printSpinner:before{display:inline-block;border-color:#045fb4 transparent transparent;animation-duration:1.2s}.printSpinner:before{transform:rotate(120deg)}.printSpinner:after{transform:rotate(240deg)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
||||
1
Scripts/PrintJS/print.min.js
vendored
Normal file
1
Scripts/PrintJS/print.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -25,6 +25,7 @@
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800" rel="stylesheet"/>
|
||||
<link href="/Metronic/fontawesome6/css/all.min.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="/Scripts/PrintJS/print.min.css"/>
|
||||
<%-- <link href="/Metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/Metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />--%>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="VB" Title="Transportes V&A - Comprar Boleto" AutoEventWireup="false" MasterPageFile="~/Site.master" CodeFile="Boletos.aspx.vb"
|
||||
Inherits="Boletos" EnableEventValidation="true" %>
|
||||
Inherits="Boletos" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Comprar Boleto
|
||||
@@ -67,155 +67,146 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<%--<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<contenttemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="ListadoViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>
|
||||
</contenttemplate>
|
||||
</asp:Content>--%>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Cliente </span>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Cliente </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row " >
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtVisa.ClientID.ToString()%>">Visa:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control" runat="server" >
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Femenino" Value="0" />
|
||||
</asp:DropDownList>
|
||||
<label for="<%= RblSexo.ClientID.ToString()%>">Sexo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<label for="<%= TxtObservaciones.ClientID.ToString()%>">Observaciones:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-yellow">
|
||||
<i class=" fa fa-bus font-yellow"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Viaje</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRuta" runat="server" Width="100%" Enabled="false" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlPartida" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged"
|
||||
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>
|
||||
<label for="<%= DdlPartida.ClientID.ToString()%>">Partida:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" Width="100%" Enabled="false" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDestino" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
OnSelectedIndexChanged="DdlDestino_SelectedIndexChanged"
|
||||
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>
|
||||
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold text-center"></asp:Label>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<asp:Button ID="BtnGuardar" Visible="False" OnClick="AddBoleto" runat="server" CssClass="btn btn-success margin-top-15"
|
||||
Text="Comprar Boleto"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row " >
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtVisa.ClientID.ToString()%>">Visa:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control" runat="server" >
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Femenino" Value="0" />
|
||||
</asp:DropDownList>
|
||||
<label for="<%= RblSexo.ClientID.ToString()%>">Sexo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200" ClientIDMode="Static"></asp:TextBox>
|
||||
<label for="<%= TxtObservaciones.ClientID.ToString()%>">Observaciones:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-yellow">
|
||||
<i class=" fa fa-bus font-yellow"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Viaje</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRuta" runat="server" Width="100%" Enabled="false" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlPartida" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
OnTextChanged="CotizarTarifa"
|
||||
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>
|
||||
<label for="<%= DdlPartida.ClientID.ToString()%>">Partida:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" Width="100%" Enabled="false" CssClass="form-control" ></asp:TextBox>
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
OnTextChanged="CotizarTarifa"
|
||||
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>
|
||||
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold text-center"></asp:Label>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<asp:Button ID="BtnGuardar" Visible="False" OnClick="AddBoleto" runat="server" CssClass="btn btn-success margin-top-15"
|
||||
Text="Comprar Boleto"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UPPAsientos">
|
||||
<ContentTemplate>
|
||||
@@ -226,6 +217,7 @@
|
||||
<asp:LinkButton ID="chofer" runat="server"
|
||||
Text="<i class='fa fa-user'><br/>Chofer</i>" />
|
||||
</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -474,6 +466,9 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -59,13 +59,16 @@ Partial Class Boletos
|
||||
'Datos Viaje
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje, UsuarioActual.CveEmpresa)
|
||||
ViewState("CveRuta") = ObjViaje.CveRuta
|
||||
If retornoViaje Then
|
||||
|
||||
If retornoViaje AndAlso ObjViaje.CveViaje > 0 Then
|
||||
CveRuta = ObjViaje.CveRuta
|
||||
TxtRuta.Text = ObjViaje.Ruta
|
||||
TxtFecha.Text = ObjViaje.Fecha.ToShortDateString
|
||||
CargaDestinos()
|
||||
'Boletos Vendidos
|
||||
Dim dt As DataTable
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=True) Then 'Poner párametro para estatus y cancelado de viajes
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
|
||||
dt = ObjViaje.DtResultados
|
||||
dt = ObjViaje.DtResultados
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
@@ -75,7 +78,6 @@ Partial Class Boletos
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
@@ -85,6 +87,10 @@ Partial Class Boletos
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
'Lista Destinos''carga específicos
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDestinos()
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
|
||||
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
|
||||
@@ -102,20 +108,18 @@ Partial Class Boletos
|
||||
End If
|
||||
ObjDestinos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
|
||||
Private Sub CotizarTarifa()
|
||||
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
|
||||
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
Dim retorno As Boolean = ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero)
|
||||
Dim ImporteR As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal
|
||||
Dim ImporteR As Decimal = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
||||
ObjDestinos.Dispose()
|
||||
|
||||
If retorno Then
|
||||
If ImporteR > 0 Then
|
||||
Dim redondeado As String = CStr(Math.Round(ImporteR, 2))
|
||||
ViewState("Importe") = redondeado
|
||||
TxtCosto.Text = $"El precio de su boleto es ${Importe}"
|
||||
ViewState("Importe") = ImporteR
|
||||
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||
BtnGuardar.Visible = True
|
||||
upPanel.Visible = True
|
||||
Else
|
||||
@@ -157,16 +161,30 @@ Partial Class Boletos
|
||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If retorno > 1 Then
|
||||
Alert("Boleto generado correctamente")
|
||||
ObjTransporte.Commit()
|
||||
DdlPartida.SelectedValue = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
TxtNombre.Text = ""
|
||||
TxtVisa.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjTransporte.RollBack()
|
||||
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransporte.Dispose()
|
||||
Response.Redirect($"/Transportes/Boletos.aspx?CveViaje={CveViaje}")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CotizarTarifa()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CotizarTarifa()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<%--<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
</asp:Content>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
@@ -27,11 +27,13 @@
|
||||
</i></a>
|
||||
</div>
|
||||
<asp:Label ID="Prueba" runat="server" Text=""></asp:Label>
|
||||
<asp:UpdatePanel ID="UPPD" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe">
|
||||
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
@@ -93,10 +95,10 @@
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnToggle" runat="server" AlternateText="Activar"
|
||||
ToolTip="Activar" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="ToggleViajesPasajeros" />
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
@@ -107,6 +109,8 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Partial Class ListadoBoletos
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
Ruta = Request.QueryString("Ruta")
|
||||
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||
|
||||
Prueba.Text = Ruta
|
||||
|
||||
@@ -46,62 +46,33 @@ Partial Class ListadoBoletos
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||
|
||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ToggleViajesPasajeros(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As String = GvRow.DataKey("CveViajePasajero")
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
Try
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=True, Estatus:=cambiarEstatus) Then
|
||||
|
||||
If cambiarEstatus Then
|
||||
Alert($"El boleto ha sido cancelado correctamente.")
|
||||
Else
|
||||
Alert($"El boleto ha sido reactivado correctamente.")
|
||||
|
||||
End If
|
||||
End If
|
||||
ObjTransportes.Commit()
|
||||
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
|
||||
ObjTransportes.Dispose()
|
||||
GvBoletos.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
||||
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Ruta", Ruta),
|
||||
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
||||
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
||||
New ReportParameter("FechaSalida", "2024-01-03"),
|
||||
New ReportParameter("HoraSalida", "17:00"),
|
||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||
New ReportParameter("Importe", GvRow.DataKey("Importe")),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", "Agencia"),
|
||||
New ReportParameter("TelefonoAgencia", "Telefono Agencia")
|
||||
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
||||
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
||||
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
||||
@@ -110,4 +81,29 @@ Partial Class ListadoBoletos
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As String = GvRow.DataKey("CveViajePasajero")
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then
|
||||
If Not cambiarEstatus Then
|
||||
Alert($"El boleto ha sido cancelado correctamente.")
|
||||
Else
|
||||
Alert($"El boleto ha sido reactivado correctamente.")
|
||||
End If
|
||||
End If
|
||||
ObjTransportes.Commit()
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF ">
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Contrato">
|
||||
@@ -261,7 +261,7 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" runat="server" type="number"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtAnticipo" runat="server" type="decimal"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ Partial Class ListadoContratos
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlTransporte.SelectedValue = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
myModalLabel.InnerHtml = "Agregar Contrato"
|
||||
|
||||
@@ -77,7 +81,7 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
|
||||
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
|
||||
End If
|
||||
|
||||
If CveContratoHijo > 0 Then
|
||||
@@ -87,7 +91,7 @@ Partial Class ListadoContratos
|
||||
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1)
|
||||
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1)
|
||||
End If
|
||||
|
||||
If retorno Then
|
||||
@@ -100,8 +104,11 @@ Partial Class ListadoContratos
|
||||
TxtFechaRegreso.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedValue = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTransporte.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
@@ -129,6 +136,10 @@ Partial Class ListadoContratos
|
||||
TxtObservaciones.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
DdlTransporte.SelectedValue = GvRow.DataKey("CveTipoAF")
|
||||
TxtDolares.Text = GvRow.DataKey("Importe")
|
||||
TxtPesos.Text = GvRow.DataKey("ImporteMax")
|
||||
TxtAnticipo.Text = GvRow.DataKey("ImporteMin")
|
||||
|
||||
If DateTime.TryParse(GvRow.DataKey("FechaInicial").ToString, fechaInicial) And DateTime.TryParse(GvRow.DataKey("FechaFinal").ToString, fechaFinal) Then
|
||||
TxtFechaSalida.Text = fechaInicial.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaRegreso.Text = fechaFinal.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<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:TextBox ID="TxtProcedimiento" CssClass="form-control" runat="server" MaxLength="150"></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>
|
||||
|
||||
@@ -2137,7 +2137,17 @@ Partial Class Clientes
|
||||
Protected Sub BtnSendMail_Click(sender As Object, e As System.EventArgs) Handles BtnSendMail.Click
|
||||
Try
|
||||
|
||||
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
|
||||
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
|
||||
|
||||
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, HdnTipoDocto.Value, HdnFolioVenta.Value)
|
||||
'REGENERAR EL PDF
|
||||
If Not File.Exists(ArchivoPDF) Then
|
||||
Try
|
||||
GenerarPDFVenta(HdnCveVenta.Value.ToEntero(), AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim Ruta As String = UsuarioActual.Empresa.Ruta
|
||||
|
||||
@@ -236,7 +236,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
LnkAccionesModalSeleccionLayout.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1, 15) Then
|
||||
DVImporteDeduccionesPago.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -164,11 +164,12 @@ Partial Class Ventas_Promociones
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
DivRin.Visible = True
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||
DdlRin.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
'Dim ObjGral As New ClsGenerales
|
||||
'If ObjGral.GetRinTamanios(UsuarioActual.CveEmpresa) Then
|
||||
' DdlRin.DataSource = ObjGral.DtResultados
|
||||
'End If
|
||||
'ObjGral.Dispose()
|
||||
DdlRin.DataSource = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||
DdlRin.DataBind()
|
||||
DdlRin.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
@@ -1073,12 +1074,12 @@ Partial Class Ventas_Promociones
|
||||
ObjPS.Dispose()
|
||||
|
||||
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||
DTRines = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
|
||||
'Dim ObjGral As New ClsGenerales
|
||||
'If ObjGral.GetRinTamanios(UsuarioActual.CveEmpresa) Then
|
||||
' DTRines = ObjGral.DtResultados
|
||||
'End If
|
||||
'ObjGral.Dispose()
|
||||
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim RegistroActual As Integer = 1
|
||||
For Each dRow As DataRow In DTPlantilla.Rows
|
||||
|
||||
@@ -220,81 +220,21 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Folio" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="F. Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Cliente" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Cliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Contrato" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("TieneContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />
|
||||
<%-- <asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Facturado" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAvance" runat="server" Text='<%# String.Concat(Eval("PorcentajeAvance"), "%") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="SubTotal" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Descuento" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Cliente" />
|
||||
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}%" HtmlEncode="false" />
|
||||
<asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Descuento" HeaderText="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="IVA" HeaderText="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" >
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
|
||||
@@ -304,15 +244,8 @@
|
||||
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Inventario" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotalInventario" runat="server" Text='<%# Eval("ImporteInventario", "{0:N2}") & " MXN" %>'></asp:Literal>
|
||||
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="ImporteInventario" HeaderText="Inventario" DataFormatString="{0:N2} MXN" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
|
||||
@@ -97,10 +97,10 @@ Partial Class RepRemisiones
|
||||
End If
|
||||
|
||||
If DtVentas IsNot Nothing Then
|
||||
GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0
|
||||
GvDatos.Columns(10).Visible = DtVentas.SUMD("Descuento") > 0
|
||||
End If
|
||||
|
||||
GvDatos.Columns(10).Visible = chkInv.Checked 'solo se visualiza si está selccionada
|
||||
GvDatos.Columns(13).Visible = chkInv.Checked 'solo se visualiza si está selccionada
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
@@ -118,16 +118,12 @@ Partial Class RepRemisiones
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlFecha").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFecha").Text & "</a>"
|
||||
|
||||
Else
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||
End If
|
||||
|
||||
End If
|
||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||
|
||||
@@ -137,28 +133,28 @@ Partial Class RepRemisiones
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaCliente()
|
||||
'CargaClientes
|
||||
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
'If EsWS Then
|
||||
|
||||
DdlClientes.setEsWebService(True)
|
||||
' Else
|
||||
'DdlClientes.setEsWebService(False)
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlClientes.DataBind()
|
||||
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
divVerInv.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
|
||||
GvDatos.Columns(3).HeaderText = "Hospital"
|
||||
GvDatos.Columns(5).Visible = True
|
||||
GvDatos.Columns(6).Visible = True
|
||||
'columna de fecha
|
||||
GvDatos.Columns(1).HeaderText = "Fecha Cirugía"
|
||||
CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSucursales()
|
||||
|
||||
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaContrato()
|
||||
|
||||
@@ -200,6 +200,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HplDownPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaDirecta" runat="server" Visible="false" OnClick="LnkDescargaDirecta_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Impresión directa</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplRenerarPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Regenerar PDF</asp:HyperLink>
|
||||
</li>
|
||||
@@ -449,7 +452,7 @@
|
||||
<div class="col-md-12">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Width="100%" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td align="left">
|
||||
@@ -586,13 +589,13 @@
|
||||
<b>Requiere Técnico:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdRequiereTecnico2" visible="true">
|
||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" />
|
||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" Checked="false" />
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS1" visible="true">
|
||||
<b>Fecha de Cirugia:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS2" visible="true">
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1979,10 +1982,10 @@
|
||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
@@ -4116,8 +4119,6 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>--%>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4204,7 +4205,8 @@
|
||||
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||
|
||||
<asp:LinkButton ID="BtnAdjuntar" runat="server" Visible="false" Text="<i class='fa-upload fa' style=' color: white;'></i> Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||
<br /><asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<br />
|
||||
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" Visible="false" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
|
||||
</td>
|
||||
@@ -5366,7 +5368,7 @@
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvRemPS" runat="server" AutoGenerateColumns="false" GridLines="None" Visible="false" CssClass="table table-grid table-striped table-advance table-hover Widthall"
|
||||
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad, CveContrato,Surtido,Medico,Procedimiento" AllowPaging="False">
|
||||
DataKeyNames="CveVenta, CveVentaDetalle, PU, Total, Cantidad, CveContrato,Surtido,Medico,Procedimiento" AllowPaging="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -8420,21 +8422,21 @@
|
||||
<%--Cliente Sucursales --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlClienteSucursal_SelectedIndexChanged">
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlClienteSucursal_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlClienteSucursal" runat="server" CssClass="" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlClienteSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hospital''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlClienteSucursal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClienteSucursal">Hospital:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Hospital:</asp:Label>
|
||||
@@ -8456,7 +8458,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
@@ -8495,7 +8497,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="TxtFechaModal">Fecha de Cirugia:</asp:Label>
|
||||
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8539,45 +8541,20 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function impresionDirecta(url){
|
||||
var frame = document.createElement('iframe');
|
||||
frame.setAttribute('src', url);
|
||||
//must be in the DOM to work in Firefox/IE
|
||||
document.body.appendChild(frame);
|
||||
//since it's in the DOM we need to hide it (lest we ruin our page layout)
|
||||
//can't use 'display:none' or 'visibility:hidden' because you can't get focus (needed for IE)
|
||||
//'z-index:-1' & 'opacity:0' wont help if there is no background in the elements above it and someone clicks through to it
|
||||
frame.style.position = 'absolute';
|
||||
frame.style.left = '-9999px';
|
||||
//when it is loaded, print it
|
||||
function printFrame() {
|
||||
//have to get focus in IE
|
||||
frame.contentWindow.focus();
|
||||
//print!
|
||||
frame.contentWindow.print();
|
||||
/* cant remove the element because print() is non-blocking in FF
|
||||
* (I.e. it would remove the frame before it was printed!)
|
||||
//cleanup
|
||||
//document.body.removeChild(frame);*/
|
||||
};
|
||||
//if it was cached, it may already be done (onload wont fire, IE8)
|
||||
if (frame.contentWindow && frame.contentDocument.readyState == 'complete')
|
||||
printFrame();
|
||||
else {
|
||||
if (frame.addEventListener)
|
||||
//W3C
|
||||
frame.addEventListener('load', printFrame, false);
|
||||
else
|
||||
//IE<9
|
||||
frame.attachEvent('onload', printFrame);
|
||||
}
|
||||
function impresionDirecta(urlPDF) {
|
||||
printJS({printable:urlPDF, type:'pdf', showModal:true});
|
||||
}
|
||||
|
||||
function abrirDdlPS(){
|
||||
$(document).ready(function() {
|
||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||
});
|
||||
}
|
||||
|
||||
function pageLoad()
|
||||
|
||||
@@ -3467,14 +3467,15 @@ Partial Class Ventas
|
||||
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||
ThProyecto.Visible = False
|
||||
ThProyecto2.Visible = False
|
||||
|
||||
TxtCantidad.Text = "1"
|
||||
TxtCantidad.Focus()
|
||||
TrDescripcionVenta.Visible = False
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
TxtCantidad.Text = "1"
|
||||
TxtCantidad.Focus()
|
||||
RegistraScript("abrirDdlPS();", "A1")
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
RegistraScript("$('#TxtCantidad').focus();", "A1")
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -9538,9 +9539,12 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
LnkDescargaDirecta.Visible = True
|
||||
|
||||
HplImprimirPDFStimulsoft.Visible = True
|
||||
HplImprimirPDFStimulsoft.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=0&STIMULSOFT=1", CveVenta)))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'NO DEBE IMPRIMIR PDF DE COTIZACION
|
||||
@@ -10366,18 +10370,33 @@ Partial Class Ventas
|
||||
If File.Exists(ArchivoXML) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
End If
|
||||
|
||||
'MANDA CORREO
|
||||
Try
|
||||
'MANDA CORREO
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Hilo.Start()
|
||||
'SE SE VA UTILIZAR LA DESCARGA AUTOMATICA, NO GENERAR PDF A TRAVEZ DE UN THREAD
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, "", UsarDescargaDesdePopUpVerFactura:=False)
|
||||
Else
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Hilo.Start()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||
End Try
|
||||
Else
|
||||
'PARA PRUEBAS, GENERAR PDF AUNQUE NO ESTE TIMBRADA
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
Try
|
||||
Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, "", UsarDescargaDesdePopUpVerFactura:=False)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'DESCARGA PDF
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Ped") Then
|
||||
'If Not ImprimeAlert Then
|
||||
@@ -10578,7 +10597,7 @@ Partial Class Ventas
|
||||
End Try
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
RegistraScript($"impresionDirecta('/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}');", "Imprimir")
|
||||
ImpresionDirectaPDF()
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -15532,14 +15551,28 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region "¡ P D F R E P O R T V I E W E R !"
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "")
|
||||
''' <summary>
|
||||
''' Generación y envío de correo de factura, UsarDescargaDesdePopUpVerFactura si se va realizar a travez de un thread
|
||||
''' </summary>
|
||||
''' <param name="EnviaCorreo"></param>
|
||||
''' <param name="Factura"></param>
|
||||
''' <param name="UsuarioActual"></param>
|
||||
''' <param name="strURLHOST"></param>
|
||||
''' <param name="CorreoCRM"></param>
|
||||
''' <param name="UsarDescargaDesdePopUpVerFactura"></param>
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "", Optional UsarDescargaDesdePopUpVerFactura As Boolean = True)
|
||||
'GUARDA PDF
|
||||
Dim LocalSerieFolio As String = String.Empty
|
||||
Dim LocalTipoDocto As String = String.Empty
|
||||
|
||||
'TIMBRADO NUEVO
|
||||
Try
|
||||
DescargarFactura(Factura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True, strURLHOST:=strURLHOST)
|
||||
If UsarDescargaDesdePopUpVerFactura Then
|
||||
DescargarFactura(Factura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True, strURLHOST:=strURLHOST)
|
||||
Else
|
||||
GenerarPDFVenta(Factura.CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar el PDF", ex)
|
||||
End Try
|
||||
@@ -16766,19 +16799,18 @@ Partial Class Ventas
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(186, 189) Then
|
||||
TxtPrecio.Focus()
|
||||
End If
|
||||
|
||||
|
||||
UPPPS.Update()
|
||||
UpPS.Update()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
AgregarPS()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer, Optional CvePrecioListaSugerido As Integer = -1) As Modelos.MPrecioSugerido
|
||||
@@ -21662,7 +21694,7 @@ Partial Class Ventas
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
EditoRemision = True
|
||||
CveClienteSucursal = DdlClienteSucursal.SelectedValue.ToEntero
|
||||
CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
@@ -21849,11 +21881,12 @@ Partial Class Ventas
|
||||
'REGENERAR EL PDF
|
||||
If Not OcurrioError Then
|
||||
Try
|
||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
'Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
'Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
'Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
'RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
'
|
||||
'Dim Hilo As New System.Threading.Thread(Sub() )
|
||||
'Hilo.Start()
|
||||
@@ -21862,14 +21895,6 @@ Partial Class Ventas
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RegenerarPDF(CveVenta As Integer, CveEmpresa As Integer, CveUsuario As Integer, strURLHOST As String)
|
||||
Try
|
||||
DescargarFactura(CveVenta, CveEmpresa, CveUsuario, Regenerar:=True, strURLHOST:=strURLHOST)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al regenerar el PDF", ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtnActualizarCuentaTerminal_Click(sender As Object, e As EventArgs) Handles BtnActualizarCuentaTerminal.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
@@ -23804,7 +23829,7 @@ Partial Class Ventas
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO={2}", UsuarioActual.CveEmpresa, DateTime.UtcNow.Ticks, UsuarioActual.CveUsuario)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
@@ -30975,6 +31000,10 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
AsignaMedicoProcedimientoFacturaRemisionesModal()
|
||||
End If
|
||||
|
||||
DdlMoneda.SelectedValue = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $"Abreviatura = '{dtSeleccionadas.FiltroPrimeroValor("Abreviatura")}'")
|
||||
DdlMoneda.Enabled = False
|
||||
CambiaMoneda()
|
||||
@@ -31245,6 +31274,9 @@ Partial Class Ventas
|
||||
|
||||
RegistraScript("$('#DivRemisiones').modal('hide');", "DivRemisionesHide")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function VerificaRemisiones(ByRef dt As DataTable) As Boolean
|
||||
Dim Valido As Boolean = True
|
||||
If ChkRemProductos.Checked Then
|
||||
@@ -33426,7 +33458,6 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub TxtFecha_TextChanged(sender As Object, e As EventArgs)
|
||||
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa = 48 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
@@ -33534,7 +33565,7 @@ Partial Class Ventas
|
||||
TxtPedidoContrato.Enabled = True
|
||||
TxtObsAlmacen.Enabled = True
|
||||
RblPaqueteria.Enabled = True
|
||||
|
||||
DdlSucursalCliente.Enabled = True
|
||||
LnkUpdateLineaAdicional.Visible = True
|
||||
'Acciones
|
||||
BtnEditar.Text = "Guardar"
|
||||
@@ -33622,11 +33653,12 @@ Partial Class Ventas
|
||||
ObjVentas.Dispose()
|
||||
'REGENERAR EL PDF
|
||||
Try
|
||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
'Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
'Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
'Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
'RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
End Try
|
||||
@@ -35893,6 +35925,44 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AsignaMedicoProcedimientoFacturaRemisionesModal()
|
||||
|
||||
Dim CveVentaConsultar As Integer = -1
|
||||
If ChkRemProductos.Checked Then
|
||||
|
||||
For Each gvRow As GridViewRow In GvRemPS.Rows
|
||||
If gvRow.FCCheckBox("Chk").Checked Then
|
||||
CveVentaConsultar = gvRow.DataKey("CveVenta").ToEntero
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
For Each gvRow As GridViewRow In GvRem.Rows
|
||||
If gvRow.FCCheckBox("Chk").Checked Then
|
||||
CveVentaConsultar = gvRow.DataKey("CveVenta").ToEntero
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If CveVentaConsultar > 0 Then
|
||||
Dim objVenta As New ClsVentas
|
||||
If objVenta.GetVenta(CveVentaConsultar, UsuarioActual.CveEmpresa) Then
|
||||
Dim dRow As DataRow = objVenta.DtResultados.Rows(0)
|
||||
DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero)
|
||||
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
|
||||
SeEstaFActurandoVentaMedica = True
|
||||
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
|
||||
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
|
||||
End If
|
||||
objVenta.Dispose()
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "VENTAS MEDICAS"
|
||||
|
||||
@@ -36389,7 +36459,37 @@ Partial Class Ventas
|
||||
CargarSaldoAuxiliar(CveCliente)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescargaDirecta_Click(sender As Object, e As EventArgs)
|
||||
ImpresionDirectaPDF()
|
||||
End Sub
|
||||
|
||||
Private Sub ImpresionDirectaPDF()
|
||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual, Me.CveVenta, UsuarioActual.CveEmpresa, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
|
||||
Dim ExistePDF As Boolean = False
|
||||
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
|
||||
If File.Exists(ArchivoPDF) Then
|
||||
ExistePDF = True
|
||||
Else
|
||||
'REGENERAR EL PDF
|
||||
Try
|
||||
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
If File.Exists(ArchivoPDF) Then
|
||||
ExistePDF = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
End Try
|
||||
End If
|
||||
|
||||
If ExistePDF Then
|
||||
Dim urlPDF As String = $"/Ashx/SIGDesc.ashx?metodo=descargarPDFVenta&CveVenta={CveVenta}"
|
||||
RegistraScript($"impresionDirecta('{urlPDF}');", "Imprimir")
|
||||
Else
|
||||
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user