Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -124,8 +124,8 @@ Partial Class AF_CatAF
|
||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaResponsable()
|
||||
Dim DtPersonal = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlResponsable.DataSource = DtPersonal
|
||||
|
||||
DdlResponsable.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlResponsable.DataBind()
|
||||
End Sub
|
||||
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -454,7 +454,7 @@ Partial Class AF_CatAF
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtActivosFijos.Rows.Count > 0 Then
|
||||
If DtActivosFijos IsNot Nothing AndAlso DtActivosFijos.Rows.Count > 0 Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
|
||||
@@ -6914,6 +6914,13 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("Tipo", TipoDocumento))
|
||||
params.Add(New ReportParameter("Ref", TipoDocumentoRef))
|
||||
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
params.Add(New ReportParameter("Documentacion", Vta.Cliente.Documentacion))
|
||||
params.Add(New ReportParameter("Medico", Vta.Medico))
|
||||
params.Add(New ReportParameter("Procedimiento", Vta.Procedimiento))
|
||||
params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy HH:mm")))
|
||||
End If
|
||||
'VSH
|
||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
|
||||
'DATOS CLIENTES
|
||||
@@ -7197,6 +7204,46 @@ Public Class ClsPaginas
|
||||
GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
If NombreArchivo = "FacturaUSA" Then
|
||||
Dim DtBaseTotales = Vta.DtDeduccion.Clone()
|
||||
|
||||
If Vta.DtDeduccion IsNot Nothing Then
|
||||
Dim RowTotal_USA = DtBaseTotales.NewRow()
|
||||
Dim RowPAYMENTS_USA = DtBaseTotales.NewRow()
|
||||
Dim RowBALANCE_USA = DtBaseTotales.NewRow()
|
||||
|
||||
Dim TOTAL_USA As Decimal = 0
|
||||
Dim PAYMENTS_USA As Decimal = 0
|
||||
Dim BALANCE_USA As Decimal = 0
|
||||
|
||||
For Each Row As DataRow In Vta.DtDeduccion.Rows
|
||||
If Row("ImpuestoLocal").ToString() = "Total" Then
|
||||
TOTAL_USA += Row("Importe").ToString().ToDecimal()
|
||||
End If
|
||||
Next
|
||||
|
||||
RowTotal_USA("ImpuestoLocal") = "TOTAL"
|
||||
RowTotal_USA("Importe") = TOTAL_USA
|
||||
RowTotal_USA("Orden") = 1
|
||||
DtBaseTotales.Rows.Add(RowTotal_USA)
|
||||
|
||||
RowPAYMENTS_USA("ImpuestoLocal") = "PAYMENTS/CREDITS"
|
||||
RowPAYMENTS_USA("Importe") = PAYMENTS_USA
|
||||
RowPAYMENTS_USA("Orden") = 2
|
||||
DtBaseTotales.Rows.Add(RowPAYMENTS_USA)
|
||||
|
||||
BALANCE_USA = TOTAL_USA - PAYMENTS_USA
|
||||
|
||||
RowBALANCE_USA("ImpuestoLocal") = "BALANCE DUE"
|
||||
RowBALANCE_USA("Importe") = BALANCE_USA
|
||||
RowBALANCE_USA("Orden") = 3
|
||||
DtBaseTotales.Rows.Add(RowBALANCE_USA)
|
||||
|
||||
Vta.DtDeduccion = DtBaseTotales
|
||||
End If
|
||||
End If
|
||||
|
||||
'TERMINA REGION PARAMETROS
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
|
||||
@@ -7273,6 +7320,7 @@ Public Class ClsPaginas
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
||||
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
||||
End If
|
||||
|
||||
'Imprime los parametros
|
||||
'Dim ast As New StringBuilder
|
||||
'For Each par As ReportParameter In params
|
||||
@@ -7550,6 +7598,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not IsNothing(Vta) Then
|
||||
PdfFactura(Vta)
|
||||
Vta = Nothing
|
||||
@@ -9163,7 +9212,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
If VentaActual.Fecha < tFechaUltimaFluctuacion Then TCValuacionVenta = TCValuacion
|
||||
'si tiene fecha de documento, debe de evaluarse para su tc. y no la fecha de la prepóliza
|
||||
If IIf(Pago.FechaDocumentoRelacionado > MinFecha, Pago.FechaDocumentoRelacionado, Pago.Fecha).ToString.ToDate < tFechaUltimaFluctuacion Then TCValuacionPago = TCValuacion
|
||||
If IIf(Pago.FechaDocumentoRelacionado > MinFecha, Pago.FechaDocumentoRelacionado, Pago.Fecha).ToString.ToDate < tFechaUltimaFluctuacion AndAlso Pago.CveMonedaPago > 1 Then TCValuacionPago = TCValuacion
|
||||
End If
|
||||
End If
|
||||
If VentaActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares
|
||||
@@ -9173,7 +9222,7 @@ Public Class ClsPaginas
|
||||
tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL
|
||||
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
||||
ElseIf VentaActual.CveMoneda <> 1 And Pago.CveMonedaPago = 1 Then 'factura dolares, pago en pesos
|
||||
tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL
|
||||
tImporteVenta = (Pago.ImportePagoVenta * TCValuacionVenta).RoundSQL
|
||||
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
||||
End If
|
||||
If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta
|
||||
|
||||
@@ -576,7 +576,7 @@ Public Class ClsVentas
|
||||
Optional AtencionA As String = "", Optional PedidoContrato As String = "", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Decimal = -1,
|
||||
Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
@@ -612,6 +612,7 @@ Public Class ClsVentas
|
||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -625,7 +626,8 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String,
|
||||
Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean
|
||||
Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -643,8 +645,42 @@ Public Class ClsVentas
|
||||
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateEstatusOCRelacionada(CveVenta As Integer, CveEstatusOrdenServicio As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasOSEstatusUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateFechaOSVenta(CveVenta As Integer, FechaCita As DateTime, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasOSFechaCitaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -6221,6 +6221,17 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'CANCELAR ORDEN DE SERVICIO
|
||||
If Not ErrorCancelar Then
|
||||
If ObjFactura.CveMedico > 0 Then
|
||||
Dim CveEstatusCancelacion As Integer = ClsPaginas.GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 5", "Orden ASC").ToString().ToEntero()
|
||||
If Not ObjVentas.UpdateEstatusOCRelacionada(ObjFactura.CveVenta, CveEstatusCancelacion, ObjFactura.CveEmpresa) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar la orden de servicio"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'MARCA LA VENTA PARA REALIZAR LA DEVOLUCION POSTERIORMENTE
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Net.Http
|
||||
|
||||
Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
@@ -35,11 +36,47 @@ Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Flush()
|
||||
context.Response.WriteFile(FileInfo.FullName)
|
||||
context.Response.End()
|
||||
Else
|
||||
DescargarPDFVentaPeticion(context, ObjFactura)
|
||||
End If
|
||||
FileInfo = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DescargarPDFVentaPeticion(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
If Not IsNothing(usuario) Then
|
||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
|
||||
Dim Url As New Uri(String.Format("{0}/Compras/PopUpVerFactura.aspx?P={1}", strURLHOST, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1®ENERAR={1}", ObjFactura.CveVenta, "1"))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient As New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
||||
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario={2}", ObjFactura.CveEmpresa, DateTime.UtcNow.Ticks, ObjFactura.CveUsuario)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
File = response.Content.ReadAsByteArrayAsync().Result
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
File = Nothing
|
||||
OnError("Ocurrió un error al descargar la factura", ex)
|
||||
End Try
|
||||
|
||||
context.Response.Buffer = True
|
||||
context.Response.Clear()
|
||||
context.Response.ContentType = "application/pdf"
|
||||
context.Response.ClearHeaders()
|
||||
context.Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", "attachment", ObjFactura.SerieFolio, "pdf"))
|
||||
context.Response.BinaryWrite(File) ' create the file
|
||||
context.Response.End()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
|
||||
@@ -724,7 +724,7 @@
|
||||
<Width>8.06981in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>4.8037cm</Height>
|
||||
<Height>5.67302cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -824,7 +824,7 @@ CIUDAD DE MEXICO</Value>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "AVISO", "ENTRADA") & " DE TRASLADO "</Value>
|
||||
<Value>=Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "PRE-REMISIÓN", "ENTRADA DE TRASLADO")</Value>
|
||||
<Style>
|
||||
<FontSize>12pt</FontSize>
|
||||
</Style>
|
||||
@@ -982,7 +982,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Top>2.21518cm</Top>
|
||||
<Top>2.85018cm</Top>
|
||||
<Left>16.09549cm</Left>
|
||||
<Height>0.44478cm</Height>
|
||||
<Width>4.32987cm</Width>
|
||||
@@ -1187,7 +1187,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>2.70907cm</Top>
|
||||
<Top>3.66157cm</Top>
|
||||
<Height>2.01145cm</Height>
|
||||
<Width>20.32792cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
@@ -1229,6 +1229,39 @@ CIUDAD DE MEXICO</Value>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox36">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Observaciones.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox31</rd:DefaultName>
|
||||
<Top>2.27107cm</Top>
|
||||
<Left>0.13678cm</Left>
|
||||
<Height>1.37286cm</Height>
|
||||
<Width>13.15003cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -654,6 +654,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
||||
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso TipoDocto.Contiene("Ped", "Ing") Then
|
||||
TxtObservaciones.Text = $"Dr. {drE("Medico").ToString}{vbCrLf}Cx. {drE("Procedimiento").ToString}{vbCrLf}F. Cirugía {drE("FechaEjecucion").ToString.ToDateTime.ToString("dd/MM/yyyy HH:mm")}{vbCrLf}H. {drE("Sucursal").ToString}{vbCrLf}"
|
||||
End If
|
||||
|
||||
LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString()
|
||||
HLFolio.Text = drE("SerieFolio").ToString()
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
|
||||
@@ -165,11 +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-advance 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-hover Widthall ScrollAD" OnRowDataBound="GvVentas_RowDataBound"
|
||||
data-sort="true" EmptyDataText="No se encontraron resultados." AutoGenerateColumns="False" >
|
||||
<Columns>
|
||||
<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:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlFechaFactura" runat="server" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<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" ItemStyle-Width="100px" />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class RepNotasSinAlmacen
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Stimulsoft.Report.QuickButtons.StiWpfQuickButtonAttribute
|
||||
Partial Class RepNotasSinAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "propiedades"
|
||||
|
||||
Private Property dt As DataTable
|
||||
@@ -57,10 +58,12 @@ Partial Class RepNotasSinAlmacen
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtNotasSinAlmacenCompras") = value
|
||||
End Set
|
||||
End Property
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -82,8 +85,10 @@ Partial Class RepNotasSinAlmacen
|
||||
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)
|
||||
|
||||
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
|
||||
'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -194,16 +199,15 @@ Partial Class RepNotasSinAlmacen
|
||||
|
||||
End If
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
UpFiltros.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " EXPORTAR - PDF - EXCEL "
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
ImprimirPDFExcel("Excel")
|
||||
End Sub
|
||||
|
||||
ImprimirPDFExcel("Excel")
|
||||
End Sub
|
||||
|
||||
#Region "P D F"
|
||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
|
||||
ImprimirPDFExcel()
|
||||
@@ -276,8 +280,10 @@ Partial Class RepNotasSinAlmacen
|
||||
e.Row.FCLinkButton("lnkAccion").Visible = False
|
||||
If GvCompras.Columns(4).Visible Then
|
||||
e.Row.Cells(4).Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -294,7 +300,7 @@ Partial Class RepNotasSinAlmacen
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1, Usuarioactual.CveUsuario) Then
|
||||
If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1, UsuarioActual.CveUsuario) Then
|
||||
If ObjEventos.AddEventoBitacora(String.Format("El producto: {0} se marcó como no recibido", PS), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
Alert("El producto se marcó como 'no recibido' correctamente.")
|
||||
End If
|
||||
@@ -308,4 +314,16 @@ Partial Class RepNotasSinAlmacen
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvVentas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
|
||||
e.Row.Cells(2).Text = $"<div style='display:none'>{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}</div> {e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy HH:mm")}"
|
||||
Else
|
||||
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="Reporte de Ordenes de Servicio Médicas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOSMedicas.aspx.vb" Inherits="OS_RepOSMedicas" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ Partial Class OS_RepOSMedicas
|
||||
#Region " GV DATOS - ROW DATABOUND "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaCita").ToDateTime.ToString("yyyyMMddHHmm"))
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -1169,7 +1169,7 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlFormaPago33.ClientID.ToString()%>">Forma Pago:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" id="divDesgloseImpuestos" runat="server" visible="false">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
|
||||
@@ -6071,6 +6071,10 @@ Partial Class Clientes
|
||||
DdlSATPais.Items.Add(New ListItem("Guatemala", "GTM"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then 'si la empresa deduce ieps
|
||||
divDesgloseImpuestos.Visible = True
|
||||
End If
|
||||
|
||||
CargaDdlAlmacen()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -2448,8 +2448,6 @@ Partial Class Ventas
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
@@ -2831,6 +2829,8 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
Else
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
|
||||
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
||||
ViewState("CveOS") = Request("CveOS")
|
||||
CargaOS(CveOS)
|
||||
@@ -5869,21 +5869,28 @@ Partial Class Ventas
|
||||
|
||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
|
||||
|
||||
DdlMedico.Enabled = False
|
||||
DdlProcedimiento.Enabled = False
|
||||
|
||||
If DbRowVenta("FechaParaSurtir").ToString().ToDate() > DateTime.MinValue Then
|
||||
TrVentasMedicas2.Visible = True
|
||||
ChkRequiereTecnico.Enabled = False
|
||||
TxtFechaOS.Enabled = False
|
||||
|
||||
TxtFechaOS.Text = DbRowVenta("FechaParaSurtir").ToString().ToDateTime().ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -16051,8 +16058,8 @@ Partial Class Ventas
|
||||
importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
TC = TipoCambioFluctuacion
|
||||
ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
importeMN = importeMovimiento
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||
End If
|
||||
importeMovimiento = importeMovimiento.RoundSQL
|
||||
@@ -16064,7 +16071,7 @@ Partial Class Ventas
|
||||
Pago.Fecha = TxtFechaAnticipoCliente.Text.ToDate
|
||||
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
||||
Pago.ImportePagoVenta = importeMovimiento
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.ImportePago = importeMN
|
||||
Pago.CveIE = CveIEAnticipo
|
||||
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
||||
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
||||
@@ -16072,7 +16079,6 @@ Partial Class Ventas
|
||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||
Pago.Referencia = gvr.DataKey("Folio")
|
||||
'Pago.CveConceptoPago = 251
|
||||
|
||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||
End If
|
||||
@@ -19737,7 +19743,7 @@ Partial Class Ventas
|
||||
If DtMovimientos.Rows.Count > 0 Then
|
||||
Dim GeneroMovimientoAlmacen As Boolean = False
|
||||
|
||||
TieneMovimientosServicioDomicilio = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=29") > 0
|
||||
TieneMovimientosServicioDomicilio = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (29,4)") > 0
|
||||
|
||||
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
|
||||
|
||||
@@ -19766,7 +19772,7 @@ Partial Class Ventas
|
||||
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
||||
|
||||
Dim MovDetalle As New DataTable
|
||||
Dim AplicaMovimientoDetalleEntrada As Boolean = False
|
||||
Dim AplicaMovimientoDetalleEntrada As Boolean = True
|
||||
|
||||
If RemisionesLista.Count > 0 Then
|
||||
AplicaMovimientoDetalleEntrada = True
|
||||
@@ -19786,35 +19792,9 @@ Partial Class Ventas
|
||||
|
||||
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||
Dim CveConceptoSalidaAlmacen As Integer = 3
|
||||
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
|
||||
Dim CveConceptoSalidaAlmacen As Integer = 40 'SALIDA DEFINITIVA DEL SISTEMA
|
||||
Dim CveAlmacenParaSalida As Integer = CveAlmacenSalida
|
||||
|
||||
'SALIDA DEFINITIVA DEL SISTEMA
|
||||
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
|
||||
CveConceptoSalidaAlmacen = 40
|
||||
CveAlmacenParaSalida = CveAlmacenSalida
|
||||
AplicaMovimientoDetalleEntrada = True
|
||||
Else
|
||||
'Le damos salida de apartado por traspaso
|
||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, ObjConta:=ObjConta)
|
||||
|
||||
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Le damos entrada al general por traspaso
|
||||
If Not OcurrioError Then
|
||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, 9, CveMoneda, CveRemision, CveMovimientoRelacionado:=CveMovimientoSalidaPorTraspaso, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, ObjConta:=ObjConta) > 0
|
||||
|
||||
If Not GeneroMovimientoAlmacen Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
'Le damos salida normal
|
||||
If ConSalida AndAlso Not OcurrioError Then
|
||||
|
||||
@@ -19976,7 +19956,7 @@ Partial Class Ventas
|
||||
If DtMovimientos.Rows.Count > 0 Then
|
||||
Dim GeneroMovimientoAlmacen As Boolean = False
|
||||
|
||||
TieneMovimientosServicioDomicilio = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=29") > 0
|
||||
TieneMovimientosServicioDomicilio = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (29,4)") > 0
|
||||
|
||||
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
|
||||
|
||||
@@ -21676,6 +21656,12 @@ Partial Class Ventas
|
||||
DdlMetodoPago33.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
TxtFechaOS.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
UPPVentas.Update()
|
||||
UpPS.Update()
|
||||
UpCliente.Update()
|
||||
@@ -21775,10 +21761,18 @@ Partial Class Ventas
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, TxtFechaOS.Text.Replace(",", "").ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||
If Not OcurrioError Then
|
||||
Dim index As Integer = 0
|
||||
@@ -33603,6 +33597,12 @@ Partial Class Ventas
|
||||
|
||||
TxtDescripcionVenta.Enabled = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
TxtFechaOS.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
UPObservaciones.Update()
|
||||
@@ -33626,10 +33626,18 @@ Partial Class Ventas
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, TxtFechaOS.Text.Replace(",", "").ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso AplicaUpdateTC Then
|
||||
If Not ObjVentas.UpdateVentaTC(Me.CveVenta, UsuarioActual.CveEmpresa, TxtTipoCambio.Text.ToDecimal()) Then
|
||||
TieneError = True
|
||||
@@ -36373,7 +36381,7 @@ Partial Class Ventas
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||
@@ -36393,10 +36401,10 @@ Partial Class Ventas
|
||||
|
||||
Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
|
||||
|
||||
If CveOsDetalle > 0 Then
|
||||
MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/>", ObjOrdenServicio.Folio))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
Else
|
||||
If Not CveOsDetalle > 0 Then
|
||||
' MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/>", ObjOrdenServicio.Folio))
|
||||
' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
'Else
|
||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||
Errores = True
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user