--Cambios en Boletos, parece que se duplicaron id's
This commit is contained in:
@@ -124,8 +124,8 @@ Partial Class AF_CatAF
|
|||||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaResponsable()
|
Private Sub CargaResponsable()
|
||||||
Dim DtPersonal = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
|
||||||
DdlResponsable.DataSource = DtPersonal
|
DdlResponsable.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||||
DdlResponsable.DataBind()
|
DdlResponsable.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
@@ -454,7 +454,7 @@ Partial Class AF_CatAF
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
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 params As New List(Of ReportParameter)
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
|
|
||||||
|
|||||||
@@ -248,11 +248,11 @@ End Class
|
|||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class CFDIComplementos
|
Public Class CFDIComplementos
|
||||||
|
|
||||||
Public Property ComercioExterior11 As CFDIComercioExterior11
|
Public Property ComercioExterior As CFDIComercioExterior
|
||||||
Public Property CartaPorte As CFDICartaPorte
|
Public Property CartaPorte As CFDICartaPorte
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
ComercioExterior11 = New CFDIComercioExterior11
|
ComercioExterior = New CFDIComercioExterior
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -732,7 +732,7 @@ End Class
|
|||||||
|
|
||||||
|
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class CFDIComercioExterior11
|
Public Class CFDIComercioExterior
|
||||||
Public Property MotivoTraslado As String
|
Public Property MotivoTraslado As String
|
||||||
Public Property TipoOperacion As String = ""
|
Public Property TipoOperacion As String = ""
|
||||||
Public Property ClavedePedimento As String = ""
|
Public Property ClavedePedimento As String = ""
|
||||||
|
|||||||
@@ -6914,6 +6914,13 @@ Public Class ClsPaginas
|
|||||||
params.Add(New ReportParameter("Tipo", TipoDocumento))
|
params.Add(New ReportParameter("Tipo", TipoDocumento))
|
||||||
params.Add(New ReportParameter("Ref", TipoDocumentoRef))
|
params.Add(New ReportParameter("Ref", TipoDocumentoRef))
|
||||||
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
|
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
|
'VSH
|
||||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
|
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
|
||||||
'DATOS CLIENTES
|
'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).")
|
GuardaLog("No se especifico el tipo de Impresion de venta (Venta, Remision, Cotización, Nota de Crédito).")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
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
|
'TERMINA REGION PARAMETROS
|
||||||
Dim lrds As New List(Of ReportDataSource)
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
'Si es ECLIPSE CREAR COLUMAS PARA FIRMAS EN DtDetalle.
|
'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
|
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))
|
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Imprime los parametros
|
'Imprime los parametros
|
||||||
'Dim ast As New StringBuilder
|
'Dim ast As New StringBuilder
|
||||||
'For Each par As ReportParameter In params
|
'For Each par As ReportParameter In params
|
||||||
@@ -7550,6 +7598,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
If Not IsNothing(Vta) Then
|
If Not IsNothing(Vta) Then
|
||||||
PdfFactura(Vta)
|
PdfFactura(Vta)
|
||||||
Vta = Nothing
|
Vta = Nothing
|
||||||
@@ -9163,7 +9212,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
If VentaActual.Fecha < tFechaUltimaFluctuacion Then TCValuacionVenta = TCValuacion
|
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
|
'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
|
||||||
End If
|
End If
|
||||||
If VentaActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares
|
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
|
tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL
|
||||||
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
||||||
ElseIf VentaActual.CveMoneda <> 1 And Pago.CveMonedaPago = 1 Then 'factura dolares, pago en pesos
|
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
|
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
||||||
End If
|
End If
|
||||||
If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta
|
If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta
|
||||||
@@ -9282,7 +9331,7 @@ Public Class ClsPaginas
|
|||||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2)
|
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
|
|||||||
@@ -2803,6 +2803,9 @@ Public Class ClsRH
|
|||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
Alert("Ya se registró la Asistencia para el empleado.", TipoMensaje.MsgAdvertencia)
|
Alert("Ya se registró la Asistencia para el empleado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
@@ -2831,6 +2834,9 @@ Public Class ClsRH
|
|||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
Alert("Ya se registró la Asistencia para el empleado.", TipoMensaje.MsgAdvertencia)
|
Alert("Ya se registró la Asistencia para el empleado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
@@ -2874,6 +2880,9 @@ Public Class ClsRH
|
|||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
Alert("Ya existe un Registro con el mismo nombre: " & CveAsistencia & ".", TipoMensaje.MsgAdvertencia)
|
Alert("Ya existe un Registro con el mismo nombre: " & CveAsistencia & ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al Guardar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al Guardar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
@@ -2899,6 +2908,15 @@ Public Class ClsRH
|
|||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
|
Alert("Ya existe un Registro con el mismo nombre: " & CveAsistencia & ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al Guardar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
@@ -2920,6 +2938,9 @@ Public Class ClsRH
|
|||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
If Ex1.Message.Contains("Número: 547;") Then
|
If Ex1.Message.Contains("Número: 547;") Then
|
||||||
Alert("El registro no se pudo eliminar porque está siendo usado.", TipoMensaje.MsgAdvertencia)
|
Alert("El registro no se pudo eliminar porque está siendo usado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al eliminar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al eliminar el registro.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
@@ -2937,6 +2958,13 @@ Public Class ClsRH
|
|||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
If Ex1.Message.Contains("x50102;") Then
|
||||||
|
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al eliminar la asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al eliminar la asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ Public Class ClsTransportes
|
|||||||
CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||||
Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
||||||
Ruta = Data.Rows(0)("Ruta").ToString
|
Ruta = Data.Rows(0)("Ruta").ToString
|
||||||
|
Me.CveViaje = Data.Rows(0)("CveViaje").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -273,20 +274,15 @@ Public Class ClsTransportes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Trans_ViajesPasajerosGet")
|
DataAdapter("PA_Trans_ViajesPasajerosGet")
|
||||||
If Estatus = True Then
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
End With
|
End With
|
||||||
Else
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
|
||||||
End With
|
|
||||||
End If
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -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 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 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 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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentasUpdate")
|
DataAdapter("PA_Vta_VentasUpdate")
|
||||||
@@ -612,6 +612,7 @@ Public Class ClsVentas
|
|||||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||||
|
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -625,7 +626,8 @@ Public Class ClsVentas
|
|||||||
End Function
|
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,
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -643,8 +645,42 @@ Public Class ClsVentas
|
|||||||
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
|
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
|
||||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
.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
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1383,7 +1419,7 @@ Public Class ClsVentas
|
|||||||
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
|
||||||
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
|
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
|
||||||
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1,
|
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1,
|
||||||
Optional NumTurnos As Decimal = 0D, Optional EstatusAlmacen As Integer = 0) As Boolean
|
Optional NumTurnos As Decimal = 0D, Optional EstatusAlmacen As Integer = 0, Optional CantidadConversion As Decimal = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_VentasDetalleAdd")
|
DataAdapter("PA_VentasDetalleAdd")
|
||||||
|
|
||||||
@@ -1417,6 +1453,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
|
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
|
||||||
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
|
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
|
||||||
|
.Add("@CantidadConversion", SqlDbType.Decimal).Value = CantidadConversion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -4016,6 +4053,7 @@ Public Class ClsVentas
|
|||||||
.Add("@TipoSaldo", SqlDbType.Int).Value = TipoSaldo
|
.Add("@TipoSaldo", SqlDbType.Int).Value = TipoSaldo
|
||||||
.Add("@EsquemaNuevo", SqlDbType.Bit).Value = EsquemaNuevo
|
.Add("@EsquemaNuevo", SqlDbType.Bit).Value = EsquemaNuevo
|
||||||
End With
|
End With
|
||||||
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|||||||
@@ -1788,7 +1788,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim AplicaComercioExteriorSubProyecto As Boolean = True
|
Dim AplicaComercioExteriorSubProyecto As Boolean = True
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = False
|
Timbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto = False
|
||||||
|
|
||||||
Me.FemsaFactura = New Modelos.FemsaFactura
|
Me.FemsaFactura = New Modelos.FemsaFactura
|
||||||
Me.Timbre = Timbre
|
Me.Timbre = Timbre
|
||||||
@@ -6221,6 +6221,17 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
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
|
End If
|
||||||
|
|
||||||
'MARCA LA VENTA PARA REALIZAR LA DEVOLUCION POSTERIORMENTE
|
'MARCA LA VENTA PARA REALIZAR LA DEVOLUCION POSTERIORMENTE
|
||||||
|
|||||||
@@ -1361,127 +1361,127 @@ Public Class Timbrado
|
|||||||
#End Region
|
#End Region
|
||||||
#Region " Comercio Exterior"
|
#Region " Comercio Exterior"
|
||||||
|
|
||||||
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
|
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
Dim ComExt As New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
Dim ComExt As New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
||||||
ComExt.Version = "1.1"
|
ComExt.Version = "1.1"
|
||||||
ComExt.MotivoTrasladoSpecified = True
|
ComExt.MotivoTrasladoSpecified = True
|
||||||
ComExt.MotivoTraslado = ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado
|
ComExt.MotivoTraslado = ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado
|
||||||
ComExt.TipoOperacion = ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion
|
ComExt.TipoOperacion = ObjCFDITimbre.Complementos.ComercioExterior.TipoOperacion
|
||||||
ComExt.ClaveDePedimentoSpecified = True
|
ComExt.ClaveDePedimentoSpecified = True
|
||||||
ComExt.ClaveDePedimento = ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento
|
ComExt.ClaveDePedimento = ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento
|
||||||
ComExt.CertificadoOrigenSpecified = True
|
ComExt.CertificadoOrigenSpecified = True
|
||||||
ComExt.CertificadoOrigen = ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen.ToEntero
|
ComExt.CertificadoOrigen = ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen.ToEntero
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen <> "" Then
|
||||||
ComExt.NumCertificadoOrigen = ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen
|
ComExt.NumCertificadoOrigen = ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable <> "" Then
|
||||||
ComExt.NumeroExportadorConfiable = ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable
|
ComExt.NumeroExportadorConfiable = ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable
|
||||||
End If
|
End If
|
||||||
ComExt.IncotermSpecified = True
|
ComExt.IncotermSpecified = True
|
||||||
ComExt.Incoterm = ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm
|
ComExt.Incoterm = ObjCFDITimbre.Complementos.ComercioExterior.Incoterm
|
||||||
ComExt.SubdivisionSpecified = True
|
ComExt.SubdivisionSpecified = True
|
||||||
ComExt.Subdivision = ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision.ToEntero
|
ComExt.Subdivision = ObjCFDITimbre.Complementos.ComercioExterior.Subdivision.ToEntero
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Observaciones <> "" Then
|
||||||
ComExt.Observaciones = ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones
|
ComExt.Observaciones = ObjCFDITimbre.Complementos.ComercioExterior.Observaciones
|
||||||
End If
|
End If
|
||||||
ComExt.TipoCambioUSDSpecified = True
|
ComExt.TipoCambioUSDSpecified = True
|
||||||
ComExt.TipoCambioUSD = ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD
|
ComExt.TipoCambioUSD = ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD
|
||||||
ComExt.TotalUSDSpecified = True
|
ComExt.TotalUSDSpecified = True
|
||||||
ComExt.TotalUSD = ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD
|
ComExt.TotalUSD = ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD
|
||||||
|
|
||||||
'EMISOR
|
'EMISOR
|
||||||
ComExt.Emisor = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorEmisor()
|
ComExt.Emisor = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorEmisor()
|
||||||
If EmisorRFC.Length < 12 Then
|
If EmisorRFC.Length < 12 Then
|
||||||
ComExt.Emisor.Curp = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP
|
ComExt.Emisor.Curp = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP
|
||||||
End If
|
End If
|
||||||
ComExt.Emisor.Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorEmisorDomicilio
|
ComExt.Emisor.Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorEmisorDomicilio
|
||||||
ComExt.Emisor.Domicilio.Calle = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle
|
ComExt.Emisor.Domicilio.Calle = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle
|
||||||
ComExt.Emisor.Domicilio.CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP
|
ComExt.Emisor.Domicilio.CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP
|
||||||
ComExt.Emisor.Domicilio.ColoniaSpecified = True
|
ComExt.Emisor.Domicilio.ColoniaSpecified = True
|
||||||
ComExt.Emisor.Domicilio.Colonia = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia
|
ComExt.Emisor.Domicilio.Colonia = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia
|
||||||
ComExt.Emisor.Domicilio.Estado = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado
|
ComExt.Emisor.Domicilio.Estado = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad <> "" Then
|
||||||
ComExt.Emisor.Domicilio.LocalidadSpecified = False
|
ComExt.Emisor.Domicilio.LocalidadSpecified = False
|
||||||
ComExt.Emisor.Domicilio.Localidad = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad
|
ComExt.Emisor.Domicilio.Localidad = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad
|
||||||
End If
|
End If
|
||||||
ComExt.Emisor.Domicilio.MunicipioSpecified = True
|
ComExt.Emisor.Domicilio.MunicipioSpecified = True
|
||||||
ComExt.Emisor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio
|
ComExt.Emisor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Municipio
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior <> "" Then ComExt.Emisor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior
|
If ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior <> "" Then ComExt.Emisor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior <> "" Then ComExt.Emisor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior
|
If ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior <> "" Then ComExt.Emisor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior
|
||||||
ComExt.Emisor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais
|
ComExt.Emisor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia <> "" Then
|
||||||
ComExt.Emisor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia
|
ComExt.Emisor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'RECEPTOR
|
'RECEPTOR
|
||||||
ComExt.Receptor = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorReceptor
|
ComExt.Receptor = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorReceptor
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib <> "" Then
|
||||||
ComExt.Receptor.NumRegIdTrib = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib
|
ComExt.Receptor.NumRegIdTrib = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib
|
||||||
End If
|
End If
|
||||||
ComExt.Receptor.Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorReceptorDomicilio
|
ComExt.Receptor.Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorReceptorDomicilio
|
||||||
ComExt.Receptor.Domicilio.Calle = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle
|
ComExt.Receptor.Domicilio.Calle = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle
|
||||||
ComExt.Receptor.Domicilio.CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP
|
ComExt.Receptor.Domicilio.CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.CP
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia <> "" Then
|
||||||
ComExt.Receptor.Domicilio.Colonia = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia
|
ComExt.Receptor.Domicilio.Colonia = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia
|
||||||
End If
|
End If
|
||||||
ComExt.Receptor.Domicilio.Estado = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado
|
ComExt.Receptor.Domicilio.Estado = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Estado
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad <> "" Then
|
||||||
ComExt.Receptor.Domicilio.Localidad = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad
|
ComExt.Receptor.Domicilio.Localidad = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio <> "" Then
|
||||||
ComExt.Receptor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio
|
ComExt.Receptor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior <> "" Then
|
||||||
ComExt.Receptor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior
|
ComExt.Receptor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior <> "" Then
|
||||||
ComExt.Receptor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior
|
ComExt.Receptor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior
|
||||||
End If
|
End If
|
||||||
ComExt.Receptor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais
|
ComExt.Receptor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Pais
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia <> "" Then
|
||||||
ComExt.Receptor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia
|
ComExt.Receptor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DESTINATARIO
|
'DESTINATARIO
|
||||||
ComExt.Destinatario = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatario(0) {}
|
ComExt.Destinatario = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatario(0) {}
|
||||||
ComExt.Destinatario(0) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatario()
|
ComExt.Destinatario(0) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatario()
|
||||||
ComExt.Destinatario(0).Nombre = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre
|
ComExt.Destinatario(0).Nombre = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Nombre
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib <> "" Then
|
||||||
ComExt.Destinatario(0).NumRegIdTrib = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib
|
ComExt.Destinatario(0).NumRegIdTrib = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib
|
||||||
End If
|
End If
|
||||||
ComExt.Destinatario(0).Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatarioDomicilio(0) {}
|
ComExt.Destinatario(0).Domicilio = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatarioDomicilio(0) {}
|
||||||
ComExt.Destinatario(0).Domicilio(0) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatarioDomicilio()
|
ComExt.Destinatario(0).Domicilio(0) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorDestinatarioDomicilio()
|
||||||
ComExt.Destinatario(0).Domicilio(0).Calle = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle
|
ComExt.Destinatario(0).Domicilio(0).Calle = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Calle
|
||||||
ComExt.Destinatario(0).Domicilio(0).CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP
|
ComExt.Destinatario(0).Domicilio(0).CodigoPostal = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.CP
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Colonia <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).Colonia = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia
|
ComExt.Destinatario(0).Domicilio(0).Colonia = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Colonia
|
||||||
End If
|
End If
|
||||||
ComExt.Destinatario(0).Domicilio(0).Estado = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado
|
ComExt.Destinatario(0).Domicilio(0).Estado = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Estado
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Localidad <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).Localidad = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad
|
ComExt.Destinatario(0).Domicilio(0).Localidad = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Localidad
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Municipio <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).Municipio = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio
|
ComExt.Destinatario(0).Domicilio(0).Municipio = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Municipio
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior
|
ComExt.Destinatario(0).Domicilio(0).NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior
|
||||||
End If
|
End If
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroInterior <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior
|
ComExt.Destinatario(0).Domicilio(0).NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroInterior
|
||||||
End If
|
End If
|
||||||
ComExt.Destinatario(0).Domicilio(0).Pais = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais
|
ComExt.Destinatario(0).Domicilio(0).Pais = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Pais
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia <> "" Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Referencia <> "" Then
|
||||||
ComExt.Destinatario(0).Domicilio(0).Referencia = ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia
|
ComExt.Destinatario(0).Domicilio(0).Referencia = ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Referencia
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'MERCANCIAS
|
'MERCANCIAS
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then
|
||||||
ComExt.Mercancias = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorMercancia(ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count - 1) {}
|
ComExt.Mercancias = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorMercancia(ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count - 1) {}
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
|
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias
|
||||||
ComExt.Mercancias(i) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorMercancia()
|
ComExt.Mercancias(i) = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExteriorMercancia()
|
||||||
ComExt.Mercancias(i).NoIdentificacion = concep.NoIdentificacion
|
ComExt.Mercancias(i).NoIdentificacion = concep.NoIdentificacion
|
||||||
ComExt.Mercancias(i).FraccionArancelariaSpecified = True
|
ComExt.Mercancias(i).FraccionArancelariaSpecified = True
|
||||||
@@ -1531,7 +1531,6 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then
|
If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then
|
||||||
|
|
||||||
|
|
||||||
If ObjCFDITimbre.ComplementoPagos20.ComplementoPagos.Count > 0 Then
|
If ObjCFDITimbre.ComplementoPagos20.ComplementoPagos.Count > 0 Then
|
||||||
|
|
||||||
Dim Totales As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosTotales() 'Totales Generales
|
Dim Totales As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosTotales() 'Totales Generales
|
||||||
@@ -2461,68 +2460,66 @@ Public Class Timbrado
|
|||||||
|
|
||||||
#Region "Comercio Exterior"
|
#Region "Comercio Exterior"
|
||||||
|
|
||||||
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then
|
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado,
|
cfdi.ComercioExterior20(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion,
|
ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento,
|
ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen,
|
ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen,
|
ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable,
|
ObjCFDITimbre.Complementos.ComercioExterior.Incoterm,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm,
|
ObjCFDITimbre.Complementos.ComercioExterior.Observaciones,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision,
|
ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones,
|
ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD)
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD,
|
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD)
|
|
||||||
'EMISOR
|
'EMISOR
|
||||||
cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP))
|
cfdi.ComercioExterior20Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP))
|
||||||
cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle,
|
cfdi.ComercioExterior20Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Municipio,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP)
|
||||||
'RECEPTOR
|
'RECEPTOR
|
||||||
cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
|
cfdi.ComercioExterior20Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib)
|
||||||
cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
cfdi.ComercioExterior20DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Estado,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Pais,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.CP)
|
||||||
|
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then
|
||||||
cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib,
|
cfdi.ComercioExterior20Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Nombre,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Calle,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroInterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Colonia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Localidad,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Referencia,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Municipio,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Estado,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Pais,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.CP)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'MERCANCIAS
|
'MERCANCIAS
|
||||||
If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then
|
If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then
|
||||||
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias
|
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias
|
||||||
cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
cfdi.ComercioExterior20Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
||||||
If concep.DescripcionesEspecificas.Marca <> "" Then
|
If concep.DescripcionesEspecificas.Marca <> "" Then
|
||||||
cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
cfdi.ComercioExterior20MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
||||||
concep.DescripcionesEspecificas.Modelo,
|
concep.DescripcionesEspecificas.Modelo,
|
||||||
concep.DescripcionesEspecificas.SubModelo,
|
concep.DescripcionesEspecificas.SubModelo,
|
||||||
concep.DescripcionesEspecificas.NumeroSerie)
|
concep.DescripcionesEspecificas.NumeroSerie)
|
||||||
@@ -2545,140 +2542,144 @@ Public Class Timbrado
|
|||||||
|
|
||||||
#Region "C O M P L E M E N T O C A R T A P O R T E"
|
#Region "C O M P L E M E N T O C A R T A P O R T E"
|
||||||
|
|
||||||
|
'If UsuarioActual.CveEmpresa = 13 Then
|
||||||
|
' If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
|
||||||
|
|
||||||
'If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
|
' Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
|
||||||
|
|
||||||
' Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
|
' ''DATOS GENERALES
|
||||||
|
' cfdi.CartaPorte(Carta.TranspInternac, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida)
|
||||||
|
' 'cfdi.CartaPorte30("", Carta.TranspInternac, Carta.RegimenAduanero, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroITSMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
|
||||||
|
|
||||||
' ''DATOS GENERALES
|
' 'UBICACIONES
|
||||||
' cfdi.CartaPorte(Carta.TranspInternac, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida)
|
' If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
|
||||||
' 'cfdi.CartaPorte30("", Carta.TranspInternac, Carta.RegimenAduanero, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroITSMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
|
' For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
||||||
|
' 'origen
|
||||||
' 'UBICACIONES
|
' cfdi.CartaPorteUbicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
|
||||||
' If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
|
' 'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
|
||||||
' For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
' cfdi.CartaPorteDomicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
|
||||||
' 'origen
|
|
||||||
' cfdi.CartaPorteUbicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
|
|
||||||
' 'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
|
|
||||||
' cfdi.CartaPorteDomicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'MERCANCIAS
|
|
||||||
' If Carta.Mercancias IsNot Nothing Then
|
|
||||||
' cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
|
||||||
' If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
|
||||||
' For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
|
||||||
' If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
|
||||||
' cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
|
||||||
' For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
|
||||||
' cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
|
||||||
' Next
|
|
||||||
' Next
|
' Next
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
' End If
|
|
||||||
' '
|
|
||||||
' If Carta.FiguraTransporte IsNot Nothing Then
|
|
||||||
|
|
||||||
' If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
' 'MERCANCIAS
|
||||||
|
' If Carta.Mercancias IsNot Nothing Then
|
||||||
' cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
' cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
||||||
|
' If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
||||||
' cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
' For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||||
|
' If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
||||||
' cfdi.CartaPorteSeguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
|
' cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||||
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
|
' For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||||
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
|
' cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||||
' Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
|
' Next
|
||||||
|
|
||||||
' If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
|
|
||||||
' For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
|
|
||||||
' cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa)
|
|
||||||
' Next
|
' Next
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
|
' '
|
||||||
|
' If Carta.FiguraTransporte IsNot Nothing Then
|
||||||
|
|
||||||
|
' If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
||||||
|
|
||||||
|
' cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
||||||
|
|
||||||
|
' cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
||||||
|
|
||||||
|
' cfdi.CartaPorteSeguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
|
||||||
|
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
|
||||||
|
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
|
||||||
|
' Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
|
||||||
|
|
||||||
|
' If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
|
||||||
|
' For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
|
||||||
|
' cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa)
|
||||||
|
' Next
|
||||||
|
|
||||||
' If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
|
|
||||||
' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
|
|
||||||
' cfdi.CartaPorteTiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
|
|
||||||
' If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
|
|
||||||
' cfdi.CartaPortePartesTransporte("PT01")
|
|
||||||
' cfdi.CartaPortePartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
|
|
||||||
' End If
|
' End If
|
||||||
' Next
|
' End If
|
||||||
|
|
||||||
|
' If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
|
||||||
|
' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
|
||||||
|
' cfdi.CartaPorteTiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
|
||||||
|
' If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
|
||||||
|
' cfdi.CartaPortePartesTransporte("PT01")
|
||||||
|
' cfdi.CartaPortePartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' End If
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
|
'Else
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
|
If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then
|
||||||
|
|
||||||
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
|
Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte
|
||||||
|
|
||||||
''DATOS GENERALES
|
''DATOS GENERALES
|
||||||
cfdi.CartaPorte30("", Carta.TranspInternac, Carta.RegimenAduanero, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroISTMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
|
cfdi.CartaPorte30("", Carta.TranspInternac, Carta.RegimenAduanero, Carta.EntradaSalidaMercancia, "", Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida, Carta.RegistroISTMO, Carta.UbicacionPoloOrigen, Carta.UbicacionPoloDestino)
|
||||||
|
|
||||||
'UBICACIONES
|
'UBICACIONES
|
||||||
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
|
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
|
||||||
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
||||||
'origen
|
'origen
|
||||||
cfdi.CartaPorte30Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
|
cfdi.CartaPorte30Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
|
||||||
'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
|
'cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida)
|
||||||
cfdi.CartaPorte30Domicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
|
cfdi.CartaPorte30Domicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
'MERCANCIAS
|
|
||||||
If Carta.Mercancias IsNot Nothing Then
|
|
||||||
cfdi.CartaPorte30Mercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion, Carta.Mercancias.LogisticaInversaRecoleccionDevolucion)
|
|
||||||
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
|
||||||
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
|
||||||
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
|
||||||
cfdi.CartaPorte30Mercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""),
|
|
||||||
concep.SectorCOFEPRIS, concep.NombreIngredienteActivo, concep.NomQuimico, concep.DenominacionGenericaProd, concep.DenominacionDistintivaProd, concep.Fabricante, concep.FechaCaducidad, concep.LoteMedicamento, concep.FormaFarmaceutica, concep.CondicionesEspTransp, concep.RegistroSanitarioFolioAutorizacion,
|
|
||||||
If(Carta.TranspInternac <> "No", concep.PermisoImportacion, ""), If(Carta.TranspInternac <> "No", concep.FolioImpoVUCEM, ""), concep.NumCAS, If(Carta.TranspInternac <> "No", concep.RazonSocialEmpImp, ""), concep.NumRegSanPlagCOFEPRIS, concep.DatosFabricante, concep.DatosFormulador, concep.DatosMaquilador, concep.UsoAutorizado,
|
|
||||||
concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
|
||||||
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
|
||||||
cfdi.CartaPorte30CantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
|
||||||
Next
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
'
|
|
||||||
If Carta.FiguraTransporte IsNot Nothing Then
|
|
||||||
|
|
||||||
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
'MERCANCIAS
|
||||||
|
If Carta.Mercancias IsNot Nothing Then
|
||||||
cfdi.CartaPorte30Autotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
cfdi.CartaPorte30Mercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion, Carta.Mercancias.LogisticaInversaRecoleccionDevolucion)
|
||||||
|
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
||||||
cfdi.CartaPorte30IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||||
|
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
||||||
cfdi.CartaPorte30Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
|
cfdi.CartaPorte30Mercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""),
|
||||||
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
|
concep.SectorCOFEPRIS, concep.NombreIngredienteActivo, concep.NomQuimico, concep.DenominacionGenericaProd, concep.DenominacionDistintivaProd, concep.Fabricante, concep.FechaCaducidad, concep.LoteMedicamento, concep.FormaFarmaceutica, concep.CondicionesEspTransp, concep.RegistroSanitarioFolioAutorizacion,
|
||||||
Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
|
If(Carta.TranspInternac <> "No", concep.PermisoImportacion, ""), If(Carta.TranspInternac <> "No", concep.FolioImpoVUCEM, ""), concep.NumCAS, If(Carta.TranspInternac <> "No", concep.RazonSocialEmpImp, ""), concep.NumRegSanPlagCOFEPRIS, concep.DatosFabricante, concep.DatosFormulador, concep.DatosMaquilador, concep.UsoAutorizado,
|
||||||
Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
|
concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||||
|
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||||
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
|
cfdi.CartaPorte30CantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||||
For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
|
Next
|
||||||
cfdi.CartaPorte30Remolque(concep.SubTipoRemolque, concep.Placa)
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
'
|
||||||
|
If Carta.FiguraTransporte IsNot Nothing Then
|
||||||
|
|
||||||
If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
|
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
||||||
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
|
|
||||||
cfdi.CartaPorte30TiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
|
cfdi.CartaPorte30Autotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
||||||
If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
|
|
||||||
cfdi.CartaPorte30PartesTransporte("PT01")
|
cfdi.CartaPorte30IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
||||||
cfdi.CartaPorte30PartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
|
|
||||||
|
cfdi.CartaPorte30Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
|
||||||
|
Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
|
||||||
|
Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
|
||||||
|
Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
|
||||||
|
|
||||||
|
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
|
||||||
|
For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
|
||||||
|
cfdi.CartaPorte30Remolque(concep.SubTipoRemolque, concep.Placa)
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
End If
|
||||||
|
|
||||||
|
If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
|
||||||
|
For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
|
||||||
|
cfdi.CartaPorte30TiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
|
||||||
|
If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
|
||||||
|
cfdi.CartaPorte30PartesTransporte("PT01")
|
||||||
|
cfdi.CartaPorte30PartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Imports System.IO
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
|
Imports System.Net.Http
|
||||||
|
|
||||||
Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
||||||
|
|
||||||
@@ -35,11 +36,47 @@ Public Class SIGDesc : Implements IHttpHandler, IRequiresSessionState
|
|||||||
context.Response.Flush()
|
context.Response.Flush()
|
||||||
context.Response.WriteFile(FileInfo.FullName)
|
context.Response.WriteFile(FileInfo.FullName)
|
||||||
context.Response.End()
|
context.Response.End()
|
||||||
|
Else
|
||||||
|
DescargarPDFVentaPeticion(context, ObjFactura)
|
||||||
End If
|
End If
|
||||||
FileInfo = Nothing
|
FileInfo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
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
|
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||||
Get
|
Get
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
|||||||
|
|
||||||
Protected Sub LnkConciliarManual_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkConciliarManual_Click(sender As Object, e As EventArgs)
|
||||||
ModalidadConciliacion = "M"
|
ModalidadConciliacion = "M"
|
||||||
|
If DdlCriterio.Items.FindByValue("2") Is Nothing Then DdlCriterio.Items.Add(New ListItem("Importe - Tipo Movimiento", "2"))
|
||||||
DdlCriterio.SelectedIndex = 0
|
DdlCriterio.SelectedIndex = 0
|
||||||
DivCriterio.Visible = True
|
DivCriterio.Visible = True
|
||||||
TxtFechaAplicado.Text = txtFechaI.Text
|
TxtFechaAplicado.Text = txtFechaI.Text
|
||||||
@@ -323,7 +324,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnlConciliarAutomaticamente_Click(sender As Object, e As EventArgs)
|
Protected Sub LnlConciliarAutomaticamente_Click(sender As Object, e As EventArgs)
|
||||||
ModalidadConciliacion = "A"
|
ModalidadConciliacion = "A"
|
||||||
DdlCriterio.SelectedIndex = 0
|
DdlCriterio.Items.Remove(DdlCriterio.Items.FindByValue("2"))
|
||||||
DivCriterio.Visible = True
|
DivCriterio.Visible = True
|
||||||
TxtFechaAplicado.Text = txtFechaI.Text
|
TxtFechaAplicado.Text = txtFechaI.Text
|
||||||
UpModalCriterio.Update()
|
UpModalCriterio.Update()
|
||||||
|
|||||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -2,11 +2,13 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.Entity.Core.Metadata.Edm
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports iText.Barcodes.Dmcode
|
Imports iText.Barcodes.Dmcode
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports Modelos
|
||||||
|
|
||||||
|
|
||||||
Partial Class PopUpVerFactura
|
Partial Class PopUpVerFactura
|
||||||
@@ -3361,13 +3363,24 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CveCliente As Integer = 0
|
Dim CveCliente As Integer = 0
|
||||||
Dim CveDireccionEnvio As Integer = 0
|
Dim CveDireccionEnvio As Integer = 0
|
||||||
Dim ClienteNombre As String = "", EnvioContacto As String = "", EnvioDireccion As String = "", EnvioColonia As String = "", EnvioCiudad As String = "", EnvioEstado As String = "", ClientePais As String = "", EnvioCP As String = "", Contrato As String = "",
|
Dim ClienteNombre As String = "", EnvioContacto As String = "", EnvioDireccion As String = "", EnvioColonia As String = "", EnvioCiudad As String = "", EnvioEstado As String = "", ClientePais As String = "", EnvioCP As String = "", Contrato As String = "",
|
||||||
Paqueteria As String = "", NumContrato As String = "", Guia As String = ""
|
Paqueteria As String = "", NumContrato As String = "", Guia As String = "", Documentacion As String = ""
|
||||||
|
|
||||||
Dim CveContrato As Integer = 0
|
Dim CveContrato As Integer = 0
|
||||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||||
CveContrato = DtMovimientos.FiltroPrimeroValor("CveContrato").ToEntero
|
CveContrato = DtMovimientos.FiltroPrimeroValor("CveContrato").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
|
||||||
|
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
|
||||||
|
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
|
||||||
|
|
||||||
|
If CveCliente = 819998 Then
|
||||||
|
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If CveContrato > 0 Then
|
If CveContrato > 0 Then
|
||||||
Contrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DescripcionContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
Contrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DescripcionContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
NumContrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NumeroContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
NumContrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NumeroContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
@@ -3387,6 +3400,8 @@ Partial Class PopUpVerFactura
|
|||||||
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("EnvioCiudad").ToString
|
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("EnvioCiudad").ToString
|
||||||
EnvioCP = ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString
|
EnvioCP = ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString
|
||||||
EnvioEstado = ObjVentas.DtResultados.Rows(0)("EnvioEstado").ToString
|
EnvioEstado = ObjVentas.DtResultados.Rows(0)("EnvioEstado").ToString
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ClienteNombre = DTCliente.FiltroPrimeroValor("Nombre")
|
ClienteNombre = DTCliente.FiltroPrimeroValor("Nombre")
|
||||||
EnvioContacto = DTCliente.FiltroPrimeroValor("Contacto")
|
EnvioContacto = DTCliente.FiltroPrimeroValor("Contacto")
|
||||||
@@ -3401,6 +3416,8 @@ Partial Class PopUpVerFactura
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
params.Add(New ReportParameter("ClienteNombre", ClienteNombre))
|
params.Add(New ReportParameter("ClienteNombre", ClienteNombre))
|
||||||
params.Add(New ReportParameter("EnvioContacto", EnvioContacto))
|
params.Add(New ReportParameter("EnvioContacto", EnvioContacto))
|
||||||
params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion))
|
params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion))
|
||||||
@@ -3524,6 +3541,16 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text
|
params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text
|
||||||
params.Add(New ReportParameter("Accion", "RECIBIÓ"))
|
params.Add(New ReportParameter("Accion", "RECIBIÓ"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
Dim CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
|
||||||
|
Dim DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
|
||||||
|
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
|
||||||
|
|
||||||
|
'If CveCliente = 819998 Then
|
||||||
|
' RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
||||||
|
'End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
|
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
|
||||||
params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString))
|
params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString))
|
||||||
|
|||||||
@@ -3371,12 +3371,9 @@ Partial Class Compras_eFacturas
|
|||||||
XMLNodosPagosModalCount = XMLNodosPagosModalCount + 1
|
XMLNodosPagosModalCount = XMLNodosPagosModalCount + 1
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim UUIDDuplicadosEnu = From row In DTDocumentosRelacionados.AsEnumerable()
|
Dim UUIDDuplicadosEnu = From row In DTDocumentosRelacionados.AsEnumerable()
|
||||||
Let IdDocumento = row.Field(Of String)("IdDocumento")
|
Let IdDocumento = row.Field(Of String)("IdDocumento")
|
||||||
Group row By IdDocumento Into IdDocumentos = Group
|
Group row By IdDocumento Into IdDocumentos = Group
|
||||||
@@ -3392,8 +3389,6 @@ Partial Class Compras_eFacturas
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MontoPago = Monto
|
MontoPago = Monto
|
||||||
|
|
||||||
Dim NodosPagosString As String = Regex.Replace(nodePagos2.InnerXml, $"{Prefijo}:", "", RegexOptions.IgnoreCase)
|
Dim NodosPagosString As String = Regex.Replace(nodePagos2.InnerXml, $"{Prefijo}:", "", RegexOptions.IgnoreCase)
|
||||||
@@ -3428,10 +3423,6 @@ Partial Class Compras_eFacturas
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
dRow2("CvePrePolizaDetalle") = 0
|
dRow2("CvePrePolizaDetalle") = 0
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
@@ -3989,9 +3980,9 @@ Partial Class Compras_eFacturas
|
|||||||
Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated
|
Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.Header Then
|
If e.Row.RowType = DataControlRowType.Header Then
|
||||||
Dim HeaderGrid = DirectCast(sender, GridView)
|
Dim HeaderGrid As GridView = DirectCast(sender, GridView)
|
||||||
Dim HeaderGridRow = New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
Dim HeaderGridRow As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert)
|
||||||
Dim HeaderCell = New TableCell
|
Dim HeaderCell As New TableCell
|
||||||
|
|
||||||
HeaderCell.Text = "Documentos Relacionados"
|
HeaderCell.Text = "Documentos Relacionados"
|
||||||
HeaderCell.ColumnSpan = 9
|
HeaderCell.ColumnSpan = 9
|
||||||
@@ -5507,7 +5498,7 @@ Public Class Compra2
|
|||||||
XMLCargaExistosa = True
|
XMLCargaExistosa = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Try
|
Try
|
||||||
Dim oReader = New StreamReader(XmlFuenteRuta, Encoding.GetEncoding("ISO-8859-1"))
|
Dim oReader As New StreamReader(XmlFuenteRuta, Encoding.GetEncoding("ISO-8859-1"))
|
||||||
XMLDoc.Load(oReader)
|
XMLDoc.Load(oReader)
|
||||||
oReader.Dispose()
|
oReader.Dispose()
|
||||||
XMLCargaExistosa = True
|
XMLCargaExistosa = True
|
||||||
@@ -5734,10 +5725,10 @@ Public Class Compra2
|
|||||||
#Region "DETALLES"
|
#Region "DETALLES"
|
||||||
|
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim AjustaUltimoConcepto = False
|
Dim AjustaUltimoConcepto As Boolean = False
|
||||||
|
|
||||||
Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces)
|
Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces)
|
||||||
Dim XML = Replace(nodeconceptos.OuterXml, "<cfdi:", "<")
|
Dim XML As String = Replace(nodeconceptos.OuterXml, "<cfdi:", "<")
|
||||||
XML = XML.Replace("</cfdi:", "</")
|
XML = XML.Replace("</cfdi:", "</")
|
||||||
XML = XML.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", "")
|
XML = XML.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", "")
|
||||||
XML = XML.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", "")
|
XML = XML.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", "")
|
||||||
@@ -6640,7 +6631,7 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'RETENCIONES
|
'RETENCIONES
|
||||||
Dim Retenciones = 0D
|
Dim Retenciones As Decimal = 0
|
||||||
Retenciones = LocalRetIVA
|
Retenciones = LocalRetIVA
|
||||||
Retenciones += LocalRetISR
|
Retenciones += LocalRetISR
|
||||||
|
|
||||||
@@ -7147,7 +7138,7 @@ Namespace ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE
|
|||||||
|
|
||||||
client.Timeout = TimeSpan.FromMinutes(15)
|
client.Timeout = TimeSpan.FromMinutes(15)
|
||||||
Dim response As HttpResponseMessage = New HttpResponseMessage()
|
Dim response As HttpResponseMessage = New HttpResponseMessage()
|
||||||
Dim strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject)
|
Dim strjsonreq As String = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject)
|
||||||
Dim content As StringContent = New StringContent(strjsonreq, Encoding.UTF8, "application/json")
|
Dim content As StringContent = New StringContent(strjsonreq, Encoding.UTF8, "application/json")
|
||||||
Dim route As String = If(isfullpath, path, GetRoute(path))
|
Dim route As String = If(isfullpath, path, GetRoute(path))
|
||||||
|
|
||||||
|
|||||||
@@ -1563,7 +1563,7 @@
|
|||||||
<Top>7.59855cm</Top>
|
<Top>7.59855cm</Top>
|
||||||
<Left>0.06623cm</Left>
|
<Left>0.06623cm</Left>
|
||||||
<Height>0.82958cm</Height>
|
<Height>0.82958cm</Height>
|
||||||
<Width>20.31433cm</Width>
|
<Width>20.31432cm</Width>
|
||||||
<ZIndex>4</ZIndex>
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -1749,9 +1749,9 @@
|
|||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||||
<Top>2.27425cm</Top>
|
<Top>2.27425cm</Top>
|
||||||
<Left>0.06623cm</Left>
|
<Left>0.15384cm</Left>
|
||||||
<Height>0.5cm</Height>
|
<Height>0.5cm</Height>
|
||||||
<Width>8.01543in</Width>
|
<Width>7.93649in</Width>
|
||||||
<ZIndex>7</ZIndex>
|
<ZIndex>7</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -4112,6 +4112,47 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<Textbox Name="Textbox59">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Carta Porte 3.0</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Right</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||||
|
<Top>2.27425cm</Top>
|
||||||
|
<Left>16.42665cm</Left>
|
||||||
|
<Height>0.5cm</Height>
|
||||||
|
<Width>1.52986in</Width>
|
||||||
|
<ZIndex>19</ZIndex>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>None</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
</ReportItems>
|
</ReportItems>
|
||||||
<Height>7.00495in</Height>
|
<Height>7.00495in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
@@ -4363,7 +4404,7 @@
|
|||||||
<PrintOnLastPage>true</PrintOnLastPage>
|
<PrintOnLastPage>true</PrintOnLastPage>
|
||||||
<ReportItems>
|
<ReportItems>
|
||||||
<Line Name="Line1">
|
<Line Name="Line1">
|
||||||
<Top>0.03519cm</Top>
|
<Top>0.03518cm</Top>
|
||||||
<Left>0.06623cm</Left>
|
<Left>0.06623cm</Left>
|
||||||
<Height>0cm</Height>
|
<Height>0cm</Height>
|
||||||
<Width>20.38566cm</Width>
|
<Width>20.38566cm</Width>
|
||||||
@@ -4393,7 +4434,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||||
<Top>0.14102cm</Top>
|
<Top>0.14101cm</Top>
|
||||||
<Left>0.71425cm</Left>
|
<Left>0.71425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>1.55632cm</Width>
|
<Width>1.55632cm</Width>
|
||||||
@@ -4427,7 +4468,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14102cm</Top>
|
<Top>0.14101cm</Top>
|
||||||
<Left>2.27057cm</Left>
|
<Left>2.27057cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.96223cm</Width>
|
<Width>4.96223cm</Width>
|
||||||
@@ -4462,7 +4503,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox13</rd:DefaultName>
|
<rd:DefaultName>Textbox13</rd:DefaultName>
|
||||||
<Top>0.14102cm</Top>
|
<Top>0.14101cm</Top>
|
||||||
<Left>7.33864cm</Left>
|
<Left>7.33864cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>2.84562cm</Width>
|
<Width>2.84562cm</Width>
|
||||||
@@ -4497,7 +4538,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14102cm</Top>
|
<Top>0.14101cm</Top>
|
||||||
<Left>10.18425cm</Left>
|
<Left>10.18425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.68641cm</Width>
|
<Width>4.68641cm</Width>
|
||||||
@@ -4531,7 +4572,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.14455cm</Top>
|
<Top>0.14454cm</Top>
|
||||||
<Left>14.99343cm</Left>
|
<Left>14.99343cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>4.04906cm</Width>
|
<Width>4.04906cm</Width>
|
||||||
@@ -4563,7 +4604,7 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||||
<Top>0.6881cm</Top>
|
<Top>0.68809cm</Top>
|
||||||
<Left>0.71425cm</Left>
|
<Left>0.71425cm</Left>
|
||||||
<Height>0.54708cm</Height>
|
<Height>0.54708cm</Height>
|
||||||
<Width>6.21751cm</Width>
|
<Width>6.21751cm</Width>
|
||||||
|
|||||||
@@ -4846,6 +4846,30 @@
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_CFDIVersion">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_CartaPorteVersion">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_PesoBrutoVehicular">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_QRCCP">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="Logo">
|
<EmbeddedImage Name="Logo">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -316,15 +316,15 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
|
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Ventas por surtir</span>
|
<span class="caption-subject bold uppercase">Ventas por surtir</span>
|
||||||
|
|
||||||
<code style="font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 10px">
|
<code style="font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 10px">
|
||||||
<asp:Literal Text="" runat="server" ID="LtActualizado" />
|
<asp:Literal Text="" runat="server" ID="LtActualizado" />
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
|
|
||||||
 
|
 
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -545,7 +545,15 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />
|
<%-- <asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />--%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Imports System.Data
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Owin.Security.Provider
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Inventarios_EntregaAlmacen
|
Partial Class Inventarios_EntregaAlmacen
|
||||||
@@ -342,7 +341,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
InicializaValores()
|
InicializaValores()
|
||||||
CargaParametrosAD()
|
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
|
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero() = 1 Then
|
||||||
|
|
||||||
@@ -435,16 +434,16 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
CveVentaAD = -1
|
CveVentaAD = -1
|
||||||
|
|
||||||
If UsuarioActual.CveUsuario <> 100 Then
|
'If UsuarioActual.CveUsuario <> 100 Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not IsNothing(Request("CveVenta")) AndAlso IsNumeric(Request("CveVenta")) Then
|
If Not IsNothing(Request("CveVenta")) AndAlso IsNumeric(Request("CveVenta")) Then
|
||||||
CveVentaAD = Request("CveVenta").ToEntero()
|
CveVentaAD = Request("CveVenta").ToEntero()
|
||||||
CargaVentaPorSurtir(Request("CveVenta").ToEntero())
|
CargaVentaPorSurtir(Request("CveVenta").ToEntero())
|
||||||
LbSurtida.Visible = True
|
'LbSurtida.Visible = True
|
||||||
LbSurtida.Text = "SOLO MODO VISUAL"
|
'LbSurtida.Text = "SOLO MODO VISUAL"
|
||||||
BtnGuardar.Visible = False
|
'BtnGuardar.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -521,9 +520,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If DtPendientes IsNot Nothing Then
|
If DtPendientes IsNot Nothing Then
|
||||||
GVPendientes.DataSource = DtPendientes
|
GVPendientes.DataSource = DtPendientes
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm"))
|
LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm"))
|
||||||
|
|
||||||
GVPendientes.DataBind()
|
GVPendientes.DataBind()
|
||||||
@@ -613,8 +610,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
TipoEntrega = 1
|
TipoEntrega = 1
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
|
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
|
||||||
|
|
||||||
If UsuarioActual.CveSubProyecto = 8804 Then
|
If UsuarioActual.CveSubProyecto = 8804 Then
|
||||||
@@ -659,6 +654,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
||||||
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
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()
|
LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString()
|
||||||
HLFolio.Text = drE("SerieFolio").ToString()
|
HLFolio.Text = drE("SerieFolio").ToString()
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
@@ -1016,9 +1015,31 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.Header Then
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
If DtDatos IsNot Nothing Then
|
||||||
|
If DtDatos.MAX("EsPaquete") = "True" Then
|
||||||
|
e.Row.FCLiteral("LtlHeaderPS").Text = "Paquete"
|
||||||
|
Else
|
||||||
|
e.Row.FCLiteral("LtlHeaderPS").Text = "Producto"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
If e.Row.DBCampo("EsPaquete") = "True" Then
|
||||||
|
e.Row.FCHyperLink("HplPS").NavigateUrl = $"/Inventarios/PaquetesArmadoDesarmado.aspx?CvePS={e.Row.DBCampo("CvePS")}&Cantidad={e.Row.DBCampo("CantidadF")}"
|
||||||
|
Else
|
||||||
|
e.Row.FCHyperLink("HplPS").NavigateUrl = $"/Ventas/ProductosServicios.aspx?CvePS={e.Row.DBCampo("CvePS")}"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCHyperLink("HplPS").NavigateUrl = $"/Ventas/ProductosServicios.aspx?CvePS={e.Row.DBCampo("CvePS")}"
|
||||||
|
End If
|
||||||
|
|
||||||
'código temporal
|
'código temporal
|
||||||
Dim AplicaSerie As Boolean = CBool(e.Row.DBCampo("AplicaSerie"))
|
Dim AplicaSerie As Boolean = CBool(e.Row.DBCampo("AplicaSerie"))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="SIG | Paquetes: Armado - Desarmado" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PaquetesArmadoDesarmado.aspx.vb" Inherits="Inventarios_PaquetesArmadoDesarmado" %>
|
<%@ Page Title="SIG | Paquetes: Armado - Desarmado" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PaquetesArmadoDesarmado.aspx.vb" Inherits="Inventarios_PaquetesArmadoDesarmado" EnableEventValidation="false" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -116,42 +116,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table width="100%">
|
<tr>
|
||||||
<tr>
|
<td>Observaciones:</td>
|
||||||
<td>Paquete:</td>
|
<td>
|
||||||
<td>
|
<asp:TextBox ID="TxtObservacionesArmado" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||||
<asp:Label Font-Bold="true" Text="" ID="LbPaqueteArmado" runat="server" />
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Cantidad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbCantidadArmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<hr />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Almacén:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbAlmacenArmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Fecha:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbFechaArmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Observaciones:</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtObservacionesArmado" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,7 +186,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover ScrollAD Widthall" BorderColor="#D3D3D3" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
@@ -225,12 +195,12 @@
|
|||||||
<asp:TemplateField HeaderText="Serie">
|
<asp:TemplateField HeaderText="Serie">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección">
|
<asp:TemplateField HeaderText="Sección">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server"/>
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Lote">
|
<asp:TemplateField HeaderText="Lote">
|
||||||
@@ -238,9 +208,19 @@
|
|||||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha Caducidad">
|
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||||
|
|
||||||
|
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -256,7 +236,7 @@
|
|||||||
<div class="col-md-12" style="text-align: center;">
|
<div class="col-md-12" style="text-align: center;">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnGuadarArmado" OnClick="BtnGuadarArmado_Click" Text="Armar" Visible="false" CssClass="btn btn-primary" Width="150px" runat="server" />
|
<asp:Button ID="BtnGuadarArmado" OnClick="BtnGuadarArmado_Click" Text="Armar" Visible="false" CssClass="btn btn-primary" Width="150px" runat="server" ValidationGroup="GrpGuardar" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -365,35 +345,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
|
||||||
<td>Paquete:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Font-Bold="true" Text="" ID="LbPaqueteDesarmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Cantidad:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbCantidadDesarmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<hr />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Almacén:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbAlmacenDesarmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Fecha:</td>
|
|
||||||
<td>
|
|
||||||
<asp:Label Text="" ID="LbFechaDesarmado" runat="server" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Observaciones:</td>
|
<td>Observaciones:</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -505,9 +456,29 @@
|
|||||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección">
|
<asp:TemplateField HeaderText="Sección">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server"/>
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Lote">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||||
|
|
||||||
|
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -130,6 +130,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
InicializaValores()
|
InicializaValores()
|
||||||
|
|
||||||
|
If Request("CvePS") IsNot Nothing Then
|
||||||
|
DdlPaqueteArmado.SelectedValueExist(Request("CvePS").ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Request("Cantidad") IsNot Nothing Then
|
||||||
|
TxtCantidadArmado.Text = Request("Cantidad").ToString()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -268,20 +277,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
UpSeriesPaqueteArmado.Update()
|
UpSeriesPaqueteArmado.Update()
|
||||||
|
|
||||||
LbPaqueteArmado.Text = DdlPaqueteArmado.SelectedItem.Text
|
|
||||||
CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero
|
CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero
|
||||||
LbCantidadArmado.Text = TxtCantidadArmado.Text
|
|
||||||
LbAlmacenArmado.Text = DdlAlmacenArmado.SelectedItem.Text
|
|
||||||
CveAlmacenArmado = DdlAlmacenArmado.SelectedValue.ToEntero
|
CveAlmacenArmado = DdlAlmacenArmado.SelectedValue.ToEntero
|
||||||
LbFechaArmado.Text = TxtFechaArmado.Text
|
|
||||||
|
|
||||||
GvDatosArmado.DataSource = DtDatos
|
GvDatosArmado.DataSource = DtDatos
|
||||||
GvDatosArmado.DataBind()
|
GvDatosArmado.DataBind()
|
||||||
|
|
||||||
GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
|
GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
|
||||||
GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
|
GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
|
||||||
GvDatosArmado.Columns(6).Visible = False 'DtDatos.MAX("Lote", "") <> ""
|
GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True"
|
||||||
GvDatosArmado.Columns(7).Visible = False 'DtDatos.MAX("FechaCaducidad", "FechaCaducidad is not null").ToDate > MinFecha
|
GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True"
|
||||||
|
|
||||||
'If ErrorExistencias Then
|
'If ErrorExistencias Then
|
||||||
' GvDatosArmado.Columns(4).Visible = False
|
' GvDatosArmado.Columns(4).Visible = False
|
||||||
@@ -364,18 +369,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
UpSeriesPaqueteDesarmado.Update()
|
UpSeriesPaqueteDesarmado.Update()
|
||||||
|
|
||||||
LbPaqueteDesarmado.Text = DdlPaqueteDesarmado.SelectedItem.Text
|
|
||||||
CvePaqueteDesarmado = DdlPaqueteDesarmado.SelectedValue.ToEntero
|
CvePaqueteDesarmado = DdlPaqueteDesarmado.SelectedValue.ToEntero
|
||||||
LbCantidadDesarmado.Text = TxtCantidadDesarmado.Text
|
|
||||||
LbAlmacenDesarmado.Text = DdlAlmacenDesarmado.SelectedItem.Text
|
|
||||||
CveAlmacenDesarmado = DdlAlmacenDesarmado.SelectedValue.ToEntero
|
CveAlmacenDesarmado = DdlAlmacenDesarmado.SelectedValue.ToEntero
|
||||||
LbFechaDesarmado.Text = TxtFechaDesarmado.Text
|
|
||||||
|
|
||||||
GvDatosDesarmado.DataSource = DtDatos
|
GvDatosDesarmado.DataSource = DtDatos
|
||||||
GvDatosDesarmado.DataBind()
|
GvDatosDesarmado.DataBind()
|
||||||
|
|
||||||
GvDatosDesarmado.Columns(4).Visible = CBool(DtDatos.MAX("AplicaSerie"))
|
GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
|
||||||
GvDatosDesarmado.Columns(5).Visible = CBool(DtDatos.MAX("AplicaSeccion"))
|
GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
|
||||||
|
GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True"
|
||||||
|
GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True"
|
||||||
|
|
||||||
BtnGuadarDesarmado.Visible = True
|
BtnGuadarDesarmado.Visible = True
|
||||||
|
|
||||||
@@ -447,7 +450,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Case 2 ' DESARMADO
|
Case 2 ' DESARMADO
|
||||||
If LbCantidadDesarmado.Text.ToEntero <> DtSeriesDesarmado.Rows.Count Then
|
If TxtCantidadDesarmado.Text.ToEntero <> DtSeriesDesarmado.Rows.Count Then
|
||||||
Alert("Es necesario indicar las series del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
Alert("Es necesario indicar las series del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -456,7 +459,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim MensajeError As String = ""
|
Dim MensajeError As String = ""
|
||||||
|
|
||||||
@@ -464,137 +468,244 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
Dim FolioSalida As Integer = 0
|
Dim FolioSalida As Integer = 0
|
||||||
Dim CveMovimientoEntrada As Integer = 0
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
Dim FolioEntrada As Integer = 0
|
Dim FolioEntrada As Integer = 0
|
||||||
Dim Fecha As Date = If(Tipo = 1, LbFechaArmado.Text.ToDate, LbFechaDesarmado.Text.ToDate)
|
Dim Fecha As Date = If(Tipo = 1, TxtFechaArmado.Text.ToDate, TxtFechaDesarmado.Text.ToDate)
|
||||||
Dim DtDetalle As New DataTable
|
Dim DtDetalle As New DataTable
|
||||||
|
|
||||||
|
Dim ConcepPrePoliza1 = "ARMPAQ1"
|
||||||
|
Dim ConcepPrePoliza2 = "ARMPAQ2"
|
||||||
|
Dim Modulo As String = "ARMPAQ1/ARMPAQ2"
|
||||||
|
|
||||||
Select Case (Tipo)
|
Try
|
||||||
Case 1 ' ARMADO
|
Select Case (Tipo)
|
||||||
|
Case 1 ' ARMADO
|
||||||
|
|
||||||
'SALIDA COMPONENTES
|
'SALIDA COMPONENTES
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenArmado, 5, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ1")
|
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenArmado, 5, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ1")
|
||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
If CveMovimientoSalida <= 0 Then
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
|
||||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
|
||||||
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
|
||||||
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
|
||||||
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
|
||||||
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
|
||||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
|
||||||
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
|
||||||
MensajeError = String.Format("El Producto <b>{0}</b> con Serie: <b>{1}</b> no tiene existencia suficiente", Dr("PS"), Dr("Serie"))
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
|
|
||||||
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If TieneError Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDecimal, Gvr.DataKey("CveUM").ToString.ToEntero,
|
|
||||||
Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
|
||||||
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'ENTRADA PAQUETE
|
|
||||||
If Not TieneError Then
|
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenArmado, 19, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ2")
|
|
||||||
FolioEntrada = ObjInventario.Folio
|
|
||||||
|
|
||||||
If CveMovimientoEntrada <= 0 Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Else
|
MensajeError = "Ocurrió un error al guardar el movimiento de salida. Por favor vuelva a intentar."
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
Exit Select
|
||||||
Dim PUTemp As Decimal = 0
|
End If
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
|
||||||
PUTemp += Dr("PU").ToString.ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
|
||||||
Next
|
|
||||||
PUTemp = PUTemp / LbCantidadArmado.Text.ToDecimal
|
|
||||||
Dim CvePSTemp = CvePaqueteArmado
|
|
||||||
Dim CveSeccionAlmacen As Integer = -1
|
|
||||||
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteArmado).FiltroPrimero("")
|
|
||||||
|
|
||||||
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
For Each Gvr As GridViewRow In GvDatosArmado.Rows
|
||||||
Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
||||||
If AplicaSeccion Then
|
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenArmado, CvePaqueteArmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||||
End If
|
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||||
|
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
||||||
|
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||||
If AplicaSerie Then
|
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||||
Dim ContadorPaquete = 1
|
MensajeError = String.Format("El Producto <b>{0}</b> con Serie: <b>{1}</b> no tiene existencia suficiente", Dr("PS"), Dr("Serie"))
|
||||||
Dim DtSeriesComponentes As New DataTable
|
|
||||||
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
|
||||||
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'INGRESA EN TABLA DE CONTROL DE PAQUETES CON SERIE
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
|
||||||
For Each Gvr2 As GridViewRow In GvDatosArmado.Rows
|
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
If CBool(Gvr2.DataKey("AplicaSerie")) Then
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
||||||
DtSeriesComponentes = New DataTable
|
TieneError = True
|
||||||
DtSeriesComponentes = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Copy
|
Exit For
|
||||||
Dim CantidadComponente = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Rows.Count / LbCantidadArmado.Text.ToEntero
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
For index As Integer = (ContadorPaquete - 1) * CantidadComponente.ToEntero To (ContadorPaquete * CantidadComponente.ToEntero) - 1
|
If TieneError Then
|
||||||
If Not ObjInventario.AddPaqueteRelacionSeries(CvePSTemp, Gvr.FCTextBox("TxtSerie").Text.Trim, DtSeriesComponentes.Rows(index)("CvePS").ToString.ToEntero, DtSeriesComponentes.Rows(index)("Serie").ToString) Then
|
Exit For
|
||||||
TieneError = True
|
End If
|
||||||
Exit For
|
|
||||||
End If
|
Else
|
||||||
Next
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDecimal, Gvr.DataKey("CveUM").ToString.ToEntero,
|
||||||
|
Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
||||||
|
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'ENTRADA PAQUETE
|
||||||
|
If Not TieneError Then
|
||||||
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenArmado, 19, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ2")
|
||||||
|
FolioEntrada = ObjInventario.Folio
|
||||||
|
|
||||||
|
If CveMovimientoEntrada <= 0 Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
||||||
|
TieneError = True
|
||||||
|
Else
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim PUTemp As Decimal = 0
|
||||||
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
PUTemp += Dr("PU").ToString.ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||||
|
Next
|
||||||
|
PUTemp = PUTemp / TxtCantidadArmado.Text.ToDecimal
|
||||||
|
Dim CvePSTemp = CvePaqueteArmado
|
||||||
|
Dim CveSeccionAlmacen As Integer = -1
|
||||||
|
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteArmado).FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
||||||
|
Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
||||||
|
If AplicaSeccion Then
|
||||||
|
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenArmado, CvePaqueteArmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If AplicaSerie Then
|
||||||
|
Dim ContadorPaquete = 1
|
||||||
|
Dim DtSeriesComponentes As New DataTable
|
||||||
|
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||||
|
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
'INGRESA EN TABLA DE CONTROL DE PAQUETES CON SERIE
|
||||||
|
For Each Gvr2 As GridViewRow In GvDatosArmado.Rows
|
||||||
|
If CBool(Gvr2.DataKey("AplicaSerie")) Then
|
||||||
|
DtSeriesComponentes = New DataTable
|
||||||
|
DtSeriesComponentes = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Copy
|
||||||
|
Dim CantidadComponente = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Rows.Count / TxtCantidadArmado.Text.ToEntero
|
||||||
|
|
||||||
|
For index As Integer = (ContadorPaquete - 1) * CantidadComponente.ToEntero To (ContadorPaquete * CantidadComponente.ToEntero) - 1
|
||||||
|
If Not ObjInventario.AddPaqueteRelacionSeries(CvePSTemp, Gvr.FCTextBox("TxtSerie").Text.Trim, DtSeriesComponentes.Rows(index)("CvePS").ToString.ToEntero, DtSeriesComponentes.Rows(index)("Serie").ToString) Then
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
ContadorPaquete = ContadorPaquete + 1
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, TxtCantidadArmado.Text.ToDecimal, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de entrada"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Case 2 'DESARMADO
|
||||||
|
|
||||||
|
|
||||||
|
'SALIDA PAQUETE
|
||||||
|
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 20, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ3")
|
||||||
|
FolioSalida = ObjInventario.Folio
|
||||||
|
|
||||||
|
If CveMovimientoSalida <= 0 Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar el movimiento de salida. Por favor vuelva a intentar."
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CvePSTemp As Integer = CvePaqueteDesarmado
|
||||||
|
Dim CveSeccionAlmacen As Integer = -1
|
||||||
|
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
||||||
|
'Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
||||||
|
'If AplicaSeccion Then
|
||||||
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
|
'End If
|
||||||
|
If AplicaSerie Then
|
||||||
|
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
|
||||||
|
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ELIMINA EN TABLA DE CONTROL DE PAQUETES CON SERIE
|
||||||
|
If Not ObjInventario.RemovePaqueteRelacionSeries(CvePSTemp, Gvr.DataKey("Serie").ToString) Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDecimal, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
|
TieneError = True
|
||||||
|
MensajeError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'ENTRADA COMPONENTES
|
||||||
|
If Not TieneError Then
|
||||||
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 4, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ4")
|
||||||
|
FolioEntrada = ObjInventario.Folio
|
||||||
|
|
||||||
|
If CveMovimientoEntrada <= 0 Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
||||||
|
TieneError = True
|
||||||
|
Else
|
||||||
|
For Each Gvr As GridViewRow In GvDatosDesarmado.Rows
|
||||||
|
|
||||||
|
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||||
|
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||||
|
If CBool(Gvr.DataKey("AplicaSeccion")) Then
|
||||||
|
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
||||||
|
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||||
|
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||||
|
MensajeError = String.Format("El Producto <b>{0}</b> con Serie: <b>{1}</b> no tiene existencia suficiente", Dr("PS"), Dr("Serie"))
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1,
|
||||||
|
CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ContadorPaquete = ContadorPaquete + 1
|
If TieneError Then
|
||||||
Next
|
Exit For
|
||||||
Else
|
End If
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, LbCantidadArmado.Text.ToDecimal, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de entrada"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Gvr.DataKey("Cantidad").ToString.ToDecimal, Gvr.DataKey("CveUM").ToString.ToEntero,
|
||||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
|
||||||
|
FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||||
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
|
TieneError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
ConcepPrePoliza1 = "ARMPAQ3"
|
||||||
|
ConcepPrePoliza2 = "ARMPAQ4"
|
||||||
|
Modulo = "ARMPAQ3/ARMPAQ4"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
'CONTABILIZAR MOVIMIENTOS
|
||||||
|
If Not TieneError Then
|
||||||
Dim ImportePrePoliza As Decimal = 0D
|
Dim ImportePrePoliza As Decimal = 0D
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||||
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim MovAlmacen As Boolean = True
|
Dim MovAlmacen As Boolean = True
|
||||||
|
|
||||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 19).ToEntero
|
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 19).ToEntero
|
||||||
@@ -605,17 +716,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
MovAlmacen = False
|
MovAlmacen = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Modulo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim Concepto As String = "ARMPAQ2"
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, ConcepPrePoliza2, ConcepPrePoliza2, CveMovimientoAlmacen:=CveMovimientoEntrada, CveSubProyecto:=-1, Contabilizable:=True) Then
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, "ARMPAQ2", "ARMPAQ2", CveMovimientoAlmacen:=CveMovimientoEntrada, CveSubProyecto:=-1, Contabilizable:=True) Then
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, "ARMPAQ1", "ARMPAQ1", CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=True) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, ConcepPrePoliza1, ConcepPrePoliza1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=True) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -625,134 +732,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Case 2 'DESARMADO
|
Catch ex As Exception
|
||||||
|
TieneError = True
|
||||||
|
OnError("Ocurrió un error al generar el movimiento", ex)
|
||||||
'SALIDA PAQUETE
|
End Try
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 20, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ3")
|
|
||||||
FolioSalida = ObjInventario.Folio
|
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
Exit Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CvePSTemp As Integer = CvePaqueteDesarmado
|
|
||||||
Dim CveSeccionAlmacen As Integer = -1
|
|
||||||
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimero("")
|
|
||||||
|
|
||||||
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
|
||||||
'Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
|
||||||
'If AplicaSeccion Then
|
|
||||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
|
||||||
'End If
|
|
||||||
If AplicaSerie Then
|
|
||||||
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
|
|
||||||
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ELIMINA EN TABLA DE CONTROL DE PAQUETES CON SERIE
|
|
||||||
If Not ObjInventario.RemovePaqueteRelacionSeries(CvePSTemp, Gvr.DataKey("Serie").ToString) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDecimal, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar los movimientos de salida"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'ENTRADA COMPONENTES
|
|
||||||
If Not TieneError Then
|
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 4, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ4")
|
|
||||||
FolioEntrada = ObjInventario.Folio
|
|
||||||
|
|
||||||
If CveMovimientoEntrada <= 0 Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Else
|
|
||||||
For Each Gvr As GridViewRow In GvDatosDesarmado.Rows
|
|
||||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
|
||||||
If CBool(Gvr.DataKey("AplicaSeccion")) Then
|
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
|
||||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Gvr.DataKey("Cantidad").ToString.ToDecimal, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de entrada. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ImportePrePoliza As Decimal = 0D
|
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
|
||||||
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim MovAlmacen As Boolean = True
|
|
||||||
|
|
||||||
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 4).ToEntero
|
|
||||||
|
|
||||||
If OrigenMov = 1 Then
|
|
||||||
MovAlmacen = True
|
|
||||||
Else
|
|
||||||
MovAlmacen = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
|
||||||
|
|
||||||
Dim Concepto As String = "ARMPAQ2"
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, "ARMPAQ4", "ARMPAQ4", CveMovimientoAlmacen:=CveMovimientoEntrada, CveSubProyecto:=-1, Contabilizable:=True) Then
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, ImportePrePoliza, 68, "ARMPAQ3", "ARMPAQ3", CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=True) Then
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
|
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
|
||||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
Msg.AppendFormat("<br/>El Movimiento de salida se registro con el Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
Msg.AppendFormat("<br/>El Movimiento de salida se registro con el Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
||||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||||
@@ -769,6 +755,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInventario.Dispose() 'elimino la instancia
|
ObjInventario.Dispose() 'elimino la instancia
|
||||||
|
ObjConta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Limpia(Tipo As Integer)
|
Private Sub Limpia(Tipo As Integer)
|
||||||
@@ -783,12 +770,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
DivSeriesPaqueteArmado.Visible = False
|
DivSeriesPaqueteArmado.Visible = False
|
||||||
GvDatosArmado.Columns(4).Visible = False
|
GvDatosArmado.Columns(4).Visible = False
|
||||||
|
|
||||||
LbPaqueteArmado.Text = ""
|
|
||||||
CvePaqueteArmado = -1
|
CvePaqueteArmado = -1
|
||||||
LbCantidadArmado.Text = ""
|
|
||||||
LbAlmacenArmado.Text = ""
|
|
||||||
CveAlmacenArmado = -1
|
CveAlmacenArmado = -1
|
||||||
LbFechaArmado.Text = ""
|
|
||||||
TxtObservacionesArmado.Text = ""
|
TxtObservacionesArmado.Text = ""
|
||||||
UpGeneralesArmado.Update()
|
UpGeneralesArmado.Update()
|
||||||
|
|
||||||
@@ -797,12 +780,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
UpSeriesPaqueteArmado.Update()
|
UpSeriesPaqueteArmado.Update()
|
||||||
'Else
|
'Else
|
||||||
|
|
||||||
LbPaqueteDesarmado.Text = ""
|
|
||||||
CvePaqueteDesarmado = -1
|
CvePaqueteDesarmado = -1
|
||||||
LbCantidadDesarmado.Text = ""
|
|
||||||
LbAlmacenDesarmado.Text = ""
|
|
||||||
CveAlmacenDesarmado = -1
|
CveAlmacenDesarmado = -1
|
||||||
LbFechaDesarmado.Text = ""
|
|
||||||
TxtObservacionesDesarmado.Text = ""
|
TxtObservacionesDesarmado.Text = ""
|
||||||
UpGeneralesDesarmado.Update()
|
UpGeneralesDesarmado.Update()
|
||||||
|
|
||||||
@@ -840,7 +819,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
'If AplicaSerie Then
|
'If AplicaSerie Then
|
||||||
e.Row.FCLinkButton("BtnSeriePaquete").Visible = True
|
e.Row.FCLinkButton("BtnSeriePaquete").Visible = True
|
||||||
e.Row.FCLinkButton("BtnSeriePaquete").Attributes.Add("data-toggle", "tooltip")
|
e.Row.FCLinkButton("BtnSeriePaquete").Attributes.Add("data-toggle", "tooltip")
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -851,10 +830,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
Else
|
Else
|
||||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenArmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenArmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
|
If e.Row.DataKey("AplicaCaducidad") = "True" Then
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||||
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||||
|
|
||||||
@@ -883,6 +875,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenDesarmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenDesarmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DataKey("AplicaCaducidad") = "True" Then
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||||
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
|
End If
|
||||||
|
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtCosto").Attributes.Add("onkeyup", "SumaValores();")
|
e.Row.FCTextBox("TxtCosto").Attributes.Add("onkeyup", "SumaValores();")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1094,7 +1103,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
Dt.Columns.Add("Serie", GetType(String))
|
Dt.Columns.Add("Serie", GetType(String))
|
||||||
|
|
||||||
For Each Row As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CType(sender, LinkButton).CommandArgument.ToEntero)).Rows
|
For Each Row As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CType(sender, LinkButton).CommandArgument.ToEntero)).Rows
|
||||||
If i > LbCantidadArmado.Text.ToEntero Then
|
If i > TxtCantidadArmado.Text.ToEntero Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1125,7 +1134,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
|
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=LbFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||||
|
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1151,7 +1160,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
TxtSerieDesarmado.Text = ""
|
TxtSerieDesarmado.Text = ""
|
||||||
|
|
||||||
If DtSeriesDesarmado.Rows.Count >= LbCantidadDesarmado.Text.ToEntero Then
|
If DtSeriesDesarmado.Rows.Count >= TxtCantidadDesarmado.Text.ToEntero Then
|
||||||
BtnAgregarSerieDesarmado.Enabled = False
|
BtnAgregarSerieDesarmado.Enabled = False
|
||||||
Else
|
Else
|
||||||
BtnAgregarSerieDesarmado.Enabled = True
|
BtnAgregarSerieDesarmado.Enabled = True
|
||||||
@@ -1177,7 +1186,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
|
|
||||||
dtTemp.Dispose()
|
dtTemp.Dispose()
|
||||||
|
|
||||||
If DtSeriesDesarmado.Rows.Count >= LbCantidadDesarmado.Text.ToEntero Then
|
If DtSeriesDesarmado.Rows.Count >= TxtCantidadDesarmado.Text.ToEntero Then
|
||||||
BtnAgregarSerieDesarmado.Enabled = False
|
BtnAgregarSerieDesarmado.Enabled = False
|
||||||
Else
|
Else
|
||||||
BtnAgregarSerieDesarmado.Enabled = True
|
BtnAgregarSerieDesarmado.Enabled = True
|
||||||
|
|||||||
@@ -165,16 +165,35 @@
|
|||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel ID="UpDatosGvVentas" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatosGvVentas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<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>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-Width="55px" />
|
<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: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: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="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" />
|
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" />
|
||||||
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
|
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
|
||||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" 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>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports Stimulsoft.Report.QuickButtons.StiWpfQuickButtonAttribute
|
||||||
Partial Class RepNotasSinAlmacen
|
Partial Class RepNotasSinAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "propiedades"
|
#Region "propiedades"
|
||||||
|
|
||||||
Private Property dt As DataTable
|
Private Property dt As DataTable
|
||||||
@@ -59,6 +60,8 @@ Partial Class RepNotasSinAlmacen
|
|||||||
ViewState("DtNotasSinAlmacenCompras") = value
|
ViewState("DtNotasSinAlmacenCompras") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -77,11 +80,15 @@ Partial Class RepNotasSinAlmacen
|
|||||||
GvCompras.Columns(5).Visible = TienePermisoDesmarcar
|
GvCompras.Columns(5).Visible = TienePermisoDesmarcar
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
|
||||||
|
GvVentas.Columns(2).HeaderText = "Fecha Cirugía"
|
||||||
GvVentas.Columns(3).HeaderText = "Hospital"
|
GvVentas.Columns(3).HeaderText = "Hospital"
|
||||||
GvVentas.Columns(6).Visible = True
|
GvVentas.Columns(6).Visible = True
|
||||||
GvVentas.Columns(7).Visible = True
|
GvVentas.Columns(7).Visible = True
|
||||||
CType(GvVentas.Columns(2), BoundField).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
||||||
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 If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -193,7 +200,6 @@ Partial Class RepNotasSinAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
UpFiltros.Update()
|
UpFiltros.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -276,6 +282,8 @@ Partial Class RepNotasSinAlmacen
|
|||||||
e.Row.Cells(4).Text = ""
|
e.Row.Cells(4).Text = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -292,7 +300,7 @@ Partial Class RepNotasSinAlmacen
|
|||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ObjEventos As New ClsOIEventos
|
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
|
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.")
|
Alert("El producto se marcó como 'no recibido' correctamente.")
|
||||||
End If
|
End If
|
||||||
@@ -306,4 +314,16 @@ Partial Class RepNotasSinAlmacen
|
|||||||
|
|
||||||
End Sub
|
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
|
End Class
|
||||||
|
|||||||
@@ -174,24 +174,25 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" >
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-2" style="margin-top: 5px" >
|
<div class="col-md-2" style="margin-top: 5px">
|
||||||
<b>Dirección:</b>
|
<b>Dirección:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="margin-top: 5px" >
|
<div class="col-md-4" style="margin-top: 5px">
|
||||||
<asp:TextBox ID="TxtDireccion" runat="server" MaxLength="300" CssClass="form-control" Height="25px" />
|
<asp:TextBox ID="TxtDireccion" runat="server" MaxLength="300" CssClass="form-control" Height="25px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-2" style="margin-top: 5px" id="DVDatosAdicionalesAcum1" runat="server" visible="false" >
|
<div class="col-md-2" style="margin-top: 5px" id="DVDatosAdicionalesAcum1" runat="server" visible="false">
|
||||||
<b>Telefono:</b>
|
<b>Telefono:</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="margin-top: 5px" id="DVDatosAdicionalesAcum3" runat="server" visible="false" >
|
<div class="col-md-4" style="margin-top: 5px" id="DVDatosAdicionalesAcum3" runat="server" visible="false">
|
||||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control" runat="server" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtTelefono" CssClass="form-control" runat="server" MaxLength="10"></asp:TextBox>
|
||||||
<ajax:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6" style="margin-top: 5px">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="DVDatosAdicionalesAcum2" runat="server" visible="false">
|
<div class="row" id="DVDatosAdicionalesAcum2" runat="server" visible="false">
|
||||||
@@ -239,20 +240,30 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="DVTipoVenta" runat="server" visible="false">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-2" style="margin-top: 5px">
|
<div class="col-md-2" style="margin-top: 5px" id="DVTipoVenta1" runat="server" visible="false" >
|
||||||
<b>Tipo de Venta:</b>
|
<b>Tipo de Venta:</b>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
<div class="col-md-4" style="margin-top: 5px; text-align: left" id="DVTipoVenta2" runat="server" visible="false" >
|
||||||
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
<asp:DropDownList ID="DdlTipoVenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
||||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6" style="margin-top: 5px">
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2" style="margin-top: 5px" id="DVUsuarioAtendio1" runat="server">
|
||||||
|
<b>Técnico:</b>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" style="margin-top: 5px" id="DVUsuarioAtendio2" runat="server">
|
||||||
|
<asp:DropDownList ID="DdlUsuarioAtendio" runat="server" CssClass="form-control select2me" DataTextField="Nombre" DataValueField="CveUsuario" Enabled="false"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="margin-top: 5px" id="DVUsuarioAtendio3" runat="server" visible="false">
|
||||||
|
<asp:LinkButton runat="server" ID="LnkActualizarUsaurioAtendio" OnClick="LnkActualizarUsaurioAtendio_Click" data-toggle="confirmation" data-popout="true"
|
||||||
|
data-original-title="¿Está seguro que desea actualizar el Técnico de la factura?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>"
|
||||||
|
CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Técnico" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,20 @@ Partial Class OS_OrdenesServicios
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CvePedido As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CvePedido") Is Nothing Then
|
||||||
|
ViewState("CvePedido") = -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return ViewState("CvePedido").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CvePedido") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Property CveOsDetalle As Integer
|
Private Property CveOsDetalle As Integer
|
||||||
Get
|
Get
|
||||||
@@ -446,8 +460,10 @@ Partial Class OS_OrdenesServicios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
|
||||||
DVAMedicoProcedimiento.Visible = True
|
DVAMedicoProcedimiento.Visible = True
|
||||||
DVTipoVenta.Visible = True
|
DVTipoVenta1.Visible = True
|
||||||
|
DVTipoVenta2.Visible = True
|
||||||
|
|
||||||
DvFechaRecivido1.Visible = False
|
DvFechaRecivido1.Visible = False
|
||||||
DvFechaRecivido2.Visible = False
|
DvFechaRecivido2.Visible = False
|
||||||
@@ -457,6 +473,11 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
DVEpisodioPaciente.Visible = True
|
DVEpisodioPaciente.Visible = True
|
||||||
|
|
||||||
|
If CveOS > 0 And TipoEstatus >= 3 Then
|
||||||
|
DdlUsuarioAtendio.Enabled = True
|
||||||
|
DVUsuarioAtendio3.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -639,8 +660,13 @@ Partial Class OS_OrdenesServicios
|
|||||||
TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero
|
TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero
|
||||||
SeFacturara = GlobalDTTipoOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("SeFacturara", String.Format("CveOrdenServicioTipo = {0}", ObjOS.CveOSTipo))
|
SeFacturara = GlobalDTTipoOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("SeFacturara", String.Format("CveOrdenServicioTipo = {0}", ObjOS.CveOSTipo))
|
||||||
CveTecnico = ObjOS.CveUsuarioAtendio
|
CveTecnico = ObjOS.CveUsuarioAtendio
|
||||||
|
DdlUsuarioAtendio.SelectedValueExist(CveTecnico)
|
||||||
CargarEstatusDelUsuario(TipoEstatus)
|
CargarEstatusDelUsuario(TipoEstatus)
|
||||||
CveVenta = ObjOS.CveVenta
|
CveVenta = ObjOS.CveVenta
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
CvePedido = ObjOS.CveCotizacion
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count
|
'Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count
|
||||||
|
|
||||||
@@ -656,7 +682,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
DdlEstatusOS.SelectedValue = ObjOS.CveEstatusOrdenServicio.ToString
|
DdlEstatusOS.SelectedValue = ObjOS.CveEstatusOrdenServicio.ToString
|
||||||
|
|
||||||
'If TipoEstatus = 2 Then
|
'If TipoEstatus = 2 Then
|
||||||
' LnkTecnico.Visible = True
|
LnkTecnico.Visible = True
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If TipoEstatus = 3 Then
|
If TipoEstatus = 3 Then
|
||||||
@@ -2879,6 +2905,12 @@ Partial Class OS_OrdenesServicios
|
|||||||
DdlTecnico.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
DdlTecnico.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||||
DdlTecnico.DataBind()
|
DdlTecnico.DataBind()
|
||||||
DdlTecnico.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTecnico.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
DdlUsuarioAtendio.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||||
|
DdlUsuarioAtendio.DataBind()
|
||||||
|
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
|
Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
|
||||||
@@ -2972,7 +3004,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim ObjOS As New ClsOS
|
Dim ObjOS As New ClsOS
|
||||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then
|
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, If(UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1, CvePedido, CveVenta), Opcion, UsuarioActual.CveEmpresa) Then
|
||||||
DTSolicitudDev = ObjOS.DtResultados
|
DTSolicitudDev = ObjOS.DtResultados
|
||||||
GvMU.DataSource = DTSolicitudDev
|
GvMU.DataSource = DTSolicitudDev
|
||||||
GvMU.Columns(3).Visible = DTSolicitudDev.MIN("Serie") <> ""
|
GvMU.Columns(3).Visible = DTSolicitudDev.MIN("Serie") <> ""
|
||||||
@@ -3093,7 +3125,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
If AplicaDevolucion Then
|
If AplicaDevolucion Then
|
||||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then
|
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVentaPedido) Then
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3213,6 +3245,16 @@ Partial Class OS_OrdenesServicios
|
|||||||
Else
|
Else
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ProcesoOK Then
|
||||||
|
|
||||||
|
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then
|
||||||
|
ProcesoOK = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3249,7 +3291,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim CveSubProyectoPedido As Integer = -1
|
Dim CveSubProyectoPedido As Integer = -1
|
||||||
Dim CveMoneda As Integer = -1
|
Dim CveMoneda As Integer = -1
|
||||||
|
|
||||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
If ObjVentas.GetVenta(CvePedido, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Copy().Rows(0)
|
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Copy().Rows(0)
|
||||||
CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
||||||
CveSubProyectoPedido = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
CveSubProyectoPedido = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||||
@@ -3313,4 +3355,31 @@ Partial Class OS_OrdenesServicios
|
|||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ObjOs As New ClsOS
|
||||||
|
Dim ProcesoOk As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then
|
||||||
|
For Each GvRow As GridViewRow In GvPS.Rows
|
||||||
|
If Not ObjOs.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa) Then
|
||||||
|
ProcesoOk = False
|
||||||
|
Alert($"Se presento un error al actualizar el técnico.")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If ProcesoOk Then
|
||||||
|
Alert($"Técnico actualizado correctamenrte a {DdlUsuarioAtendio.SelectedItem.Text}.")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ObjOs.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -106,11 +106,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" style="display: none">
|
<div class="portlet-body" style="display: none">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label class="col-md-1 ">Técnico:</label>
|
<label class="col-md-1 ">Técnico:</label>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px" ></asp:DropDownList>
|
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px" ></asp:DropDownList>
|
||||||
@@ -163,29 +158,32 @@
|
|||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"
|
||||||
ToolTip="Listado de ordenes de servicio" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
|
ToolTip="Listado de ordenes de servicio" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%--0--%>
|
<%--0--%>
|
||||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOS" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataTextField="Folio" Target="_blank" />
|
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOS" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataTextField="Folio" Target="_blank" />
|
||||||
<%--<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Left" />--%>
|
<%--<asp:BoundField HeaderText="Folio" DataField="Folio" />--%>
|
||||||
<%--1--%>
|
<%--1--%>
|
||||||
<asp:BoundField DataField="FechaCita" HeaderText="Fecha Cirugía" ItemStyle-Width="100px" DataFormatString="{0:dd/MM/yyyy HH:mm}" HtmlEncode="False" />
|
<asp:BoundField DataField="FechaCita" HeaderText="Fecha Cirugía" ItemStyle-Width="100px" DataFormatString="{0:dd/MM/yyyy HH:mm}" HtmlEncode="False" />
|
||||||
<%--2--%>
|
<%--2--%>
|
||||||
<asp:BoundField HeaderText="Hospital" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Hospital" DataField="Nombre" />
|
||||||
<%--3--%>
|
<%--3--%>
|
||||||
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Tipo" DataField="TipoVenta" />
|
||||||
|
<asp:BoundField HeaderText="Médico" DataField="Medico" />
|
||||||
<%--4--%>
|
<%--4--%>
|
||||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" />
|
||||||
<%--5--%>
|
<%--5--%>
|
||||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||||
<%--6--%>
|
<%--6--%>
|
||||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusOrdenServicio" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Estatus" DataField="EstatusOrdenServicio" />
|
||||||
<%--7--%>
|
<%--7--%>
|
||||||
<asp:BoundField HeaderText="Técnico" DataField="NombreUsuario" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Técnico" DataField="NombreUsuario" />
|
||||||
<%--8--%>
|
<%--8--%>
|
||||||
<asp:BoundField HeaderText="Paciente" DataField="Paciente" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Paciente" DataField="Paciente" />
|
||||||
<%--9--%>
|
<%--9--%>
|
||||||
<asp:BoundField HeaderText="Episodio" DataField="IdentificadorCliente" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Episodio" DataField="IdentificadorCliente" />
|
||||||
|
<asp:HyperLinkField HeaderText="Pedido" DataTextField="SerieFolioPedido" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaPedido" Target="_blank" />
|
||||||
|
<asp:HyperLinkField HeaderText="Remisión" DataTextField="SerieFolioRemision" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaRemision" Target="_blank" />
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Partial Class OS_RepOSMedicas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
txtFechaF.Text = NowADS().ToShortDateString
|
txtFechaF.Text = NowADS().AddDays(2).ToShortDateString
|
||||||
|
|
||||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
DdlMedico.DataBind()
|
DdlMedico.DataBind()
|
||||||
@@ -138,7 +138,7 @@ Partial Class OS_RepOSMedicas
|
|||||||
#Region " GV DATOS - ROW DATABOUND "
|
#Region " GV DATOS - ROW DATABOUND "
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
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 If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDocumentos" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
|
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>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Documento">
|
||||||
|
|||||||
@@ -233,24 +233,19 @@ Partial Class RH_CatDocumentos
|
|||||||
TxtOrden.Text = Orden.ToString
|
TxtOrden.Text = Orden.ToString
|
||||||
|
|
||||||
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
|
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
|
||||||
ChkAplicaDiasLimite.Checked = Boolean.Parse(GvRow.DataKey("AplicaDiasLimite"))
|
ChkAplicaDiasLimite.Checked = CBool(GvRow.DataKey("AplicaDiasLimite"))
|
||||||
ChkAplicaFechaVencimiento.Checked = Boolean.Parse(GvRow.DataKey("AplicaFechaVencimiento"))
|
ChkAplicaFechaVencimiento.Checked = CBool(GvRow.DataKey("AplicaFechaVencimiento"))
|
||||||
|
|
||||||
|
|
||||||
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
|
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
|
||||||
chkEstatus.Checked = Estatus
|
chkEstatus.Checked = Estatus
|
||||||
chkRequerido.Checked = Requerido
|
chkRequerido.Checked = Requerido
|
||||||
|
|
||||||
|
|
||||||
LtlTituloModalDocumentacion.Text = "Actualizar Documento: " & Documentacion
|
LtlTituloModalDocumentacion.Text = "Actualizar Documento: " & Documentacion
|
||||||
BtnAgregarDocumentoModal.Text = "Actualizar"
|
BtnAgregarDocumentoModal.Text = "Actualizar"
|
||||||
|
|
||||||
UpModalDocumentacion.Update()
|
UpModalDocumentacion.Update()
|
||||||
ActualizarDocumentacion = True
|
ActualizarDocumentacion = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CargaDatosParametro()
|
CargaDatosParametro()
|
||||||
|
|
||||||
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#divAgregarDocumentacion').modal({ backdrop: 'static', keyboard: false});")
|
||||||
|
|||||||
@@ -1667,6 +1667,22 @@ function loadsortadscroll() {
|
|||||||
var index = tthis.index();
|
var index = tthis.index();
|
||||||
var multiplicador = -1;
|
var multiplicador = -1;
|
||||||
var tipodato = tthis.closest('tr').find('th').data('tipodato')
|
var tipodato = tthis.closest('tr').find('th').data('tipodato')
|
||||||
|
if(1==1){
|
||||||
|
|
||||||
|
var table = $(tthis.closest('.ADScroller').find('.ADScroller-body > table ')[0]);
|
||||||
|
var tabletr = table.find('> tr:not(.trnopadding.ADtr),> tbody > tr:not(.trnopadding.ADtr),> thead > tr:not(.trnopadding.ADtr)');
|
||||||
|
if (tabletr.length > 0) {
|
||||||
|
|
||||||
|
el = $(tabletr[0]);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
texto = $(tdtexto[index]).data('order');
|
||||||
|
if (texto) {
|
||||||
|
tipodato = 'dataorder';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//console.log({ tipodato })
|
||||||
tthis.closest('tr').addClass('tsorterblock');
|
tthis.closest('tr').addClass('tsorterblock');
|
||||||
setTimeout(
|
setTimeout(
|
||||||
function () {
|
function () {
|
||||||
@@ -1867,6 +1883,35 @@ function loadsortadscroll() {
|
|||||||
table.append(this.obj);
|
table.append(this.obj);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reordenarcinco() {
|
||||||
|
var re = new RegExp(",", 'g');
|
||||||
|
var table = $(tthis.closest('.ADScroller').find('.ADScroller-body > table ')[0]);
|
||||||
|
var tabletr = table.find('> tr:not(.trnopadding.ADtr),> tbody > tr:not(.trnopadding.ADtr),> thead > tr:not(.trnopadding.ADtr)');
|
||||||
|
tipostring = 0;
|
||||||
|
tiponumeric = 0;
|
||||||
|
tipodate = 0;
|
||||||
|
var mapped = tabletr.map(function (i, el) {
|
||||||
|
el = $(el);
|
||||||
|
var tdtexto = el.find("> td");
|
||||||
|
var texto = null;
|
||||||
|
var texton = 0;
|
||||||
|
if (tdtexto && tdtexto.length > index) {
|
||||||
|
texton = Number($(tdtexto[index]).data('order'));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
texto = null;
|
||||||
|
}
|
||||||
|
return { index: i, value: texton, obj: el };
|
||||||
|
});
|
||||||
|
//console.log(mapped)
|
||||||
|
mapped.sort(function (a, b) {
|
||||||
|
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
|
||||||
|
});
|
||||||
|
mapped.each(function (i, el) {
|
||||||
|
table.append(this.obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
switch (tipodato) {
|
switch (tipodato) {
|
||||||
case 'string':
|
case 'string':
|
||||||
reordenardos();
|
reordenardos();
|
||||||
@@ -1877,6 +1922,9 @@ function loadsortadscroll() {
|
|||||||
case 'numeric':
|
case 'numeric':
|
||||||
reordenarcuatro();
|
reordenarcuatro();
|
||||||
break;
|
break;
|
||||||
|
case 'dataorder':
|
||||||
|
reordenarcinco();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reordenaruno();
|
reordenaruno();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ Partial Class Boletos
|
|||||||
ViewState("Importe") = value
|
ViewState("Importe") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveViaje As Integer
|
Private Property CveViaje As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveViaje").ToString().ToEntero
|
Return ViewState("CveViaje").ToString().ToEntero
|
||||||
@@ -59,13 +58,15 @@ Partial Class Boletos
|
|||||||
'Datos Viaje
|
'Datos Viaje
|
||||||
Dim ObjViaje As New ClsTransportes
|
Dim ObjViaje As New ClsTransportes
|
||||||
Dim retornoViaje As Boolean = ObjViaje.GetViajes(CveViaje, UsuarioActual.CveEmpresa)
|
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
|
TxtRuta.Text = ObjViaje.Ruta
|
||||||
TxtFecha.Text = ObjViaje.Fecha.ToShortDateString
|
TxtFecha.Text = ObjViaje.Fecha.ToShortDateString
|
||||||
|
CargaDestinos()
|
||||||
'Boletos Vendidos
|
'Boletos Vendidos
|
||||||
Dim dt As DataTable
|
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)
|
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||||
For Each dr As DataRow In dt.Rows
|
For Each dr As DataRow In dt.Rows
|
||||||
@@ -75,7 +76,6 @@ Partial Class Boletos
|
|||||||
lnk.CssClass = "nodisponible"
|
lnk.CssClass = "nodisponible"
|
||||||
lnk.ToolTip = dr("Nombre").ToString
|
lnk.ToolTip = dr("Nombre").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -85,6 +85,10 @@ Partial Class Boletos
|
|||||||
|
|
||||||
Protected Sub InicializaCombos()
|
Protected Sub InicializaCombos()
|
||||||
'Lista Destinos''carga específicos
|
'Lista Destinos''carga específicos
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub CargaDestinos()
|
||||||
Dim ObjDestinos As New ClsTransportes()
|
Dim ObjDestinos As New ClsTransportes()
|
||||||
|
|
||||||
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
|
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
|
||||||
@@ -102,20 +106,18 @@ Partial Class Boletos
|
|||||||
End If
|
End If
|
||||||
ObjDestinos.Dispose()
|
ObjDestinos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
|
Protected Sub CotizarTarifa(sender As Object, e As EventArgs)
|
||||||
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
|
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
|
||||||
|
|
||||||
Dim ObjDestinos As New ClsTransportes()
|
Dim ObjDestinos As New ClsTransportes()
|
||||||
Dim retorno As Boolean = ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero)
|
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()
|
ObjDestinos.Dispose()
|
||||||
|
|
||||||
If retorno Then
|
If retorno Then
|
||||||
If ImporteR > 0 Then
|
If ImporteR > 0 Then
|
||||||
Dim redondeado As String = CStr(Math.Round(ImporteR, 2))
|
ViewState("Importe") = ImporteR
|
||||||
ViewState("Importe") = redondeado
|
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||||
TxtCosto.Text = $"El precio de su boleto es ${Importe}"
|
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
upPanel.Visible = True
|
upPanel.Visible = True
|
||||||
Else
|
Else
|
||||||
@@ -177,4 +179,12 @@ Partial Class Boletos
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CotizarTarifa(sender, e)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CotizarTarifa(sender, e)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</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">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||||
@@ -27,11 +27,13 @@
|
|||||||
</i></a>
|
</i></a>
|
||||||
</div>
|
</div>
|
||||||
<asp:Label ID="Prueba" runat="server" Text=""></asp:Label>
|
<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"
|
<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"
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||||
data-sort="true" DataKeyNames="Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="No. Asiento">
|
<asp:TemplateField HeaderText="No. Asiento">
|
||||||
@@ -93,10 +95,10 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="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"
|
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
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-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"
|
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||||
OnClick="ImprimirBoleto" />
|
OnClick="ImprimirBoleto" />
|
||||||
@@ -107,6 +109,8 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Partial Class ListadoBoletos
|
|||||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||||
End If
|
End If
|
||||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||||
Ruta = Request.QueryString("Ruta")
|
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||||
|
|
||||||
Prueba.Text = Ruta
|
Prueba.Text = Ruta
|
||||||
|
|
||||||
@@ -46,43 +46,11 @@ Partial Class ListadoBoletos
|
|||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjTransportes As New ClsTransportes
|
Dim ObjTransportes As New ClsTransportes
|
||||||
|
|
||||||
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
If ObjTransportes.GetViajesPasajeros(CveViaje) Then
|
||||||
|
|
||||||
GvBoletos.DataSource = ObjTransportes.DtResultados
|
GvBoletos.DataSource = ObjTransportes.DtResultados
|
||||||
ObjTransportes.Dispose()
|
|
||||||
GvBoletos.DataBind()
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
ObjTransportes.Dispose()
|
||||||
|
GvBoletos.DataBind()
|
||||||
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
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||||
@@ -113,4 +81,29 @@ Partial Class ListadoBoletos
|
|||||||
|
|
||||||
End Sub
|
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
|
End Class
|
||||||
@@ -1169,7 +1169,7 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlFormaPago33.ClientID.ToString()%>">Forma Pago:</label>
|
<label for="<%= DdlFormaPago33.ClientID.ToString()%>">Forma Pago:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row" id="divDesgloseImpuestos" runat="server" visible="false">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||||
El cliente desglosa IEPS:
|
El cliente desglosa IEPS:
|
||||||
|
|||||||
@@ -6071,6 +6071,10 @@ Partial Class Clientes
|
|||||||
DdlSATPais.Items.Add(New ListItem("Guatemala", "GTM"))
|
DdlSATPais.Items.Add(New ListItem("Guatemala", "GTM"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then 'si la empresa deduce ieps
|
||||||
|
divDesgloseImpuestos.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
CargaDdlAlmacen()
|
CargaDdlAlmacen()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -164,11 +164,12 @@ Partial Class Ventas_Promociones
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
GvDatos.Columns(8).Visible = True
|
GvDatos.Columns(8).Visible = True
|
||||||
DivRin.Visible = True
|
DivRin.Visible = True
|
||||||
Dim ObjGral As New ClsGenerales
|
'Dim ObjGral As New ClsGenerales
|
||||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
'If ObjGral.GetRinTamanios(UsuarioActual.CveEmpresa) Then
|
||||||
DdlRin.DataSource = ObjGral.DtResultados
|
' DdlRin.DataSource = ObjGral.DtResultados
|
||||||
End If
|
'End If
|
||||||
ObjGral.Dispose()
|
'ObjGral.Dispose()
|
||||||
|
DdlRin.DataSource = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||||
DdlRin.DataBind()
|
DdlRin.DataBind()
|
||||||
DdlRin.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlRin.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
@@ -1073,12 +1074,12 @@ Partial Class Ventas_Promociones
|
|||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
|
|
||||||
Dim ObjGral As New ClsGenerales
|
'Dim ObjGral As New ClsGenerales
|
||||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
'If ObjGral.GetRinTamanios(UsuarioActual.CveEmpresa) Then
|
||||||
DTRines = ObjGral.DtResultados
|
' DTRines = ObjGral.DtResultados
|
||||||
End If
|
'End If
|
||||||
ObjGral.Dispose()
|
'ObjGral.Dispose()
|
||||||
|
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim RegistroActual As Integer = 1
|
Dim RegistroActual As Integer = 1
|
||||||
For Each dRow As DataRow In DTPlantilla.Rows
|
For Each dRow As DataRow In DTPlantilla.Rows
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
.v-center {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-xs {
|
.btn-xs {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
}
|
}
|
||||||
@@ -2568,35 +2573,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="rowpadding">
|
<div class="rowpadding">
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpComercioExterior" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpComercioExterior" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 form-group form-md-line-input">Tipo Operación:</label>
|
<label class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">Tipo Operación:</label>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
||||||
<asp:Label ID="LblTipoOperacion" runat="server"></asp:Label>
|
<asp:Label ID="LblTipoOperacion" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-2 form-group form-md-line-input">Clave Pedimento:</label>
|
<label class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">Clave Pedimento:</label>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
||||||
<asp:Label ID="LblClavePedimento" runat="server"></asp:Label>
|
<asp:Label ID="LblClavePedimento" runat="server"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2 form-group form-md-line-input col-md-offset-3">
|
<div class="col-md-2 form-group form-md-line-input v-venter">
|
||||||
<label>Incoterm:</label>
|
<label>Incoterm:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 form-group form-md-line-input col-md-offset-3">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:DropDownList ID="DdlIncoterm" CssClass="form-control select2me" AppendDataBoundItems="true" Width="100%" runat="server" DataTextField="ClaveSATIncotermDescripcion" DataValueField="CveIncoterm">
|
<asp:DropDownList ID="DdlIncoterm" CssClass="form-control select2me" AppendDataBoundItems="true" Width="100%" runat="server" DataTextField="ClaveSATIncotermDescripcion" DataValueField="CveIncoterm">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<label class="col-md-2 form-group form-md-line-input v-venter">Num Reg IdTrib:</label>
|
||||||
<div class="row">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<%-- <label class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">Motivo Traslado:</label>
|
|
||||||
<div class="col-md-4 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
|
||||||
<asp:DropDownList ID="DdlSATMotivoTraslado" Width="100%" runat="server" CssClass="select2me" DataTextField="ClaveSATMotivoTrasladoDescripcion" DataValueField="CveMotivoTraslado"></asp:DropDownList>
|
|
||||||
</div>--%>
|
|
||||||
<label class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">Num Reg IdTrib:</label>
|
|
||||||
<div class="col-md-4 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
|
||||||
<asp:TextBox ID="TxtNumRegIdTrib" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
<asp:TextBox ID="TxtNumRegIdTrib" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2605,63 +2603,60 @@
|
|||||||
<asp:UpdatePanel ID="UPPDestina" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPDestina" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Nombre:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Nombre:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-10 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:TextBox ID="TxtDestinatarioNombre" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
<asp:TextBox ID="TxtDestinatarioNombre" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;"><span>Calle:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Calle:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:TextBox ID="TxtComExtCalle" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtCalle" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;"><span>Núm.</span></div>
|
<div class="col-md-1 form-group form-md-line-input v-venter"><span>Núm.</span></div>
|
||||||
<div class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
<div class="col-md-2 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:TextBox ID="TxtComExtNumero" CssClass="form-control input-sm" runat="server" Width="55px"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtNumero" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;"><span>CP.</span></div>
|
<div class="col-md-1 form-group form-md-line-input v-venter"><span>CP.</span></div>
|
||||||
<div class="col-md-2 form-group form-md-line-input" style="margin-top: 0px; padding-top: 0px; display: inline-block;">
|
<div class="col-md-2 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:TextBox ID="TxtComExtCP" CssClass="form-control input-sm" runat="server" Width="65px"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtCP" CssClass="form-control input-sm" runat="server" Width="100%"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Pais:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Pais:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:DropDownList ID="DdlComExtPais" AutoPostBack="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais"></asp:DropDownList>
|
<asp:DropDownList ID="DdlComExtPais" AutoPostBack="true" OnSelectedIndexChanged="DdlPais_SelectedIndexChanged" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATPaisDescripcion" DataValueField="CvePais"></asp:DropDownList>
|
||||||
<asp:TextBox ID="TxtComExtPais" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtPais" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Estado:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Estado:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:DropDownList ID="DdlComExtEstado" AutoPostBack="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" Visible="false" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado"></asp:DropDownList>
|
<asp:DropDownList ID="DdlComExtEstado" AutoPostBack="true" OnSelectedIndexChanged="DdlEstado_SelectedIndexChanged" Visible="false" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATEstadoNombreEstado" DataValueField="CveEstado"></asp:DropDownList>
|
||||||
<asp:TextBox ID="TxtComExtEstado" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtEstado" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Municipio:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Municipio:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:DropDownList ID="DdlComExtMunicipio" AutoPostBack="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" Visible="false" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio"></asp:DropDownList>
|
<asp:DropDownList ID="DdlComExtMunicipio" AutoPostBack="true" OnSelectedIndexChanged="DdlMunicipio_SelectedIndexChanged" Visible="false" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATMunicipioDescripcion" DataValueField="CveMunicipio"></asp:DropDownList>
|
||||||
<asp:TextBox ID="TxtComExtMunicipio" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtMunicipio" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Colonia:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Colonia:</span></div>
|
||||||
<div class="col-md-4 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input v-venter" style="margin-top: 0px; padding-top: 0px;">
|
||||||
<asp:DropDownList ID="DdlComExtColonia" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" Visible="false" runat="server" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia"></asp:DropDownList>
|
<asp:DropDownList ID="DdlComExtColonia" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" Visible="false" runat="server" DataTextField="ClaveSATColoniaNombreAsentamiento" DataValueField="CveColonia"></asp:DropDownList>
|
||||||
<asp:TextBox ID="TxtComExtColonia" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtComExtColonia" CssClass="form-control input-sm" runat="server" Width="100%" Visible="false"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<div class="col-md-2 form-group form-md-line-input"><span>Aplica Destinatario:</span></div>
|
<div class="col-md-2 form-group form-md-line-input v-venter"><span>Aplica Destinatario:</span></div>
|
||||||
<div class="col-md-2 form-group form-md-line-input">
|
<div class="col-md-4 form-group form-md-line-input v-venter">
|
||||||
<asp:CheckBox ID="ChkAplicaDestinatario" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkAplicaDestinatario_CheckedChanged" AutoPostBack="true" Checked="false" />
|
<asp:CheckBox ID="ChkAplicaDestinatario" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkAplicaDestinatario_CheckedChanged" AutoPostBack="true" Checked="false" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-2 form-group form-md-line-input v-venter" id="DivLblDestino" runat="server" visible="false"><span>Destino:</span></div>
|
||||||
<div class="row rowpadding">
|
<div class="col-md-4 form-group form-md-line-input v-venter" id="DivDdlDestino" runat="server" visible="false">
|
||||||
<div class="col-md-2 form-group form-md-line-input" id="DivLblDestino" runat="server" visible="false"><span>Destino:</span></div>
|
|
||||||
<div class="col-md-4 form-group form-md-line-input" id="DivDdlDestino" runat="server" visible="false">
|
|
||||||
<asp:DropDownList ID="DdlDirecionDestinatario" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="DireccionEnvioContacto" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
<asp:DropDownList ID="DdlDirecionDestinatario" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="DireccionEnvioContacto" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2674,20 +2669,20 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,##0.##}") %>' Width="50px"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadConversion", "{0:#,##0.##}") %>' Width="50px"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto ó Servicio" />
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto ó Servicio" />
|
||||||
<asp:TemplateField HeaderText="Valor Unitario">
|
<asp:TemplateField HeaderText="Valor Unitario">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtValorUnitario" runat="server" Text='<%# Eval("PU") %>' Width="60px"></asp:TextBox>
|
<asp:TextBox ID="TxtValorUnitario" runat="server" Width="60px"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="ClaveSATFraccionArancelariaDescripcion" HeaderText="Fracción Arancelaria" />
|
<asp:BoundField DataField="ClaveSATFraccionArancelariaDescripcion" HeaderText="Fracción Arancelaria" />
|
||||||
<asp:BoundField DataField="ClaveSATUnidadAduanaDescripcion" HeaderText="Unidad Aduana" />
|
<asp:BoundField DataField="ClaveSATUnidadAduanaDescripcion" HeaderText="Unidad Aduana" />
|
||||||
<asp:TemplateField HeaderText="Total USD">
|
<asp:TemplateField HeaderText="Total USD">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblTotalUSD" Text='<%# (CDbl(Eval("Cantidad").ToString) * CDbl(Eval("PU").ToString)).ToString("N2") %>' runat="server"></asp:Label>
|
<asp:Label ID="LblTotalUSD" runat="server"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Marca">
|
<asp:TemplateField HeaderText="Marca">
|
||||||
@@ -4306,10 +4301,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog">
|
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
@@ -4370,7 +4365,7 @@
|
|||||||
<label class="col-md-2">Fecha:</label></b>
|
<label class="col-md-2">Fecha:</label></b>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10" AutoPostBack="true" OnTextChanged="TxtFechaAnticipoCliente_TextChanged"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="ImgFechaAnticipoCliente" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaAnticipoCliente" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -4435,14 +4430,11 @@
|
|||||||
<asp:TemplateField HeaderText="T.C." Visible="false">
|
<asp:TemplateField HeaderText="T.C." Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtTC" runat="server" Width="50px" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtTC" runat="server" Width="50px" Enabled="false"></asp:TextBox>
|
||||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtTC" FilterType="Custom, Numbers" ValidChars="." />--%>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@@ -5368,7 +5360,7 @@
|
|||||||
</asp:GridView>
|
</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"
|
<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>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -2448,8 +2448,6 @@ Partial Class Ventas
|
|||||||
CveAlmacenDevolucion = 0
|
CveAlmacenDevolucion = 0
|
||||||
Me.CveEstadoCancelacion = 0
|
Me.CveEstadoCancelacion = 0
|
||||||
|
|
||||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
|
||||||
|
|
||||||
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||||
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||||
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||||
@@ -2722,15 +2720,15 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||||
Using ObjVentas As New ClsCGame()
|
Using ObjCGame As New ClsCGame()
|
||||||
|
|
||||||
If ObjVentas.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
|
If ObjCGame.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
|
||||||
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
DdlSubProyectoDatos.SelectedValueExist(ObjCGame.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
|
If ObjCGame.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
|
||||||
GvPS.DataSource = ObjVentas.DtResultados
|
GvPS.DataSource = ObjCGame.DtResultados
|
||||||
TmpDT = ObjVentas.DtResultados
|
TmpDT = ObjCGame.DtResultados
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2831,6 +2829,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
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
|
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
||||||
ViewState("CveOS") = Request("CveOS")
|
ViewState("CveOS") = Request("CveOS")
|
||||||
CargaOS(CveOS)
|
CargaOS(CveOS)
|
||||||
@@ -3452,6 +3452,9 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TxtPrecio.Enabled = False
|
TxtPrecio.Enabled = False
|
||||||
|
If UsuarioActual.CveUsuario = 3986 Then
|
||||||
|
TxtPrecio.Enabled = True
|
||||||
|
End If
|
||||||
'ocultar la columna de subproyecto
|
'ocultar la columna de subproyecto
|
||||||
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
GvPS.Columns(ColumnaSubProyecto).Visible = False
|
||||||
ThProyecto.Visible = False
|
ThProyecto.Visible = False
|
||||||
@@ -5869,21 +5872,28 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
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
|
TrVentasMedicas1.Visible = True
|
||||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||||
|
|
||||||
|
|
||||||
DdlMedico.Enabled = False
|
DdlMedico.Enabled = False
|
||||||
DdlProcedimiento.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
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
@@ -10117,6 +10127,40 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Try
|
||||||
|
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||||
|
|
||||||
|
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||||
|
|
||||||
|
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||||
|
|
||||||
|
If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||||
|
ErrorList.Add("Ocurrió un error al actualizar el embarque")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||||
|
|
||||||
|
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||||
|
|
||||||
|
If ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveOrdenProduccion").ToEntero()) Then
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar la orden de producción", ex)
|
||||||
|
ErrorList.Add("Ocurrió un error al actualizar la orden de producción")
|
||||||
|
End Try
|
||||||
|
|
||||||
'ContPAQ El movimiento 1 es el de Venta
|
'ContPAQ El movimiento 1 es el de Venta
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
AutoConta = AutocontaMatriz(AutoConta)
|
AutoConta = AutocontaMatriz(AutoConta)
|
||||||
@@ -10174,36 +10218,7 @@ Partial Class Ventas
|
|||||||
' OnError("Ocurrió un error al mandar las notificaciones de autorización", ex)
|
' OnError("Ocurrió un error al mandar las notificaciones de autorización", ex)
|
||||||
'End Try
|
'End Try
|
||||||
|
|
||||||
Try
|
|
||||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
|
||||||
|
|
||||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
|
||||||
|
|
||||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
|
||||||
|
|
||||||
If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
|
||||||
End Try
|
|
||||||
Try
|
|
||||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
|
||||||
|
|
||||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
|
||||||
|
|
||||||
If ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveOrdenProduccion").ToEntero()) Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al actualizar la orden de producción", ex)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||||
@@ -12684,25 +12699,25 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If ChkEmitirComercioExterior.Checked Then
|
If ChkEmitirComercioExterior.Checked Then
|
||||||
'AplicaComercioExteriorSubProyecto = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa)(0)("AplicaComercioExterior").ToString() = "True", True, False)
|
'AplicaComercioExteriorSubProyecto = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa)(0)("AplicaComercioExterior").ToString() = "True", True, False)
|
||||||
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
|
Timbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
|
||||||
|
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
|
|
||||||
Timbre.Comprobante.Exportacion = "02"
|
Timbre.Comprobante.Exportacion = "02"
|
||||||
Timbre.Complementos.ComercioExterior11.TipoOperacion = GlobalDTTipoOperacion().FiltraParametros($"CveTipoOperacion={CveTipoOperacion}")(0)("ClaveSATTipoOperacion").ToString()
|
Timbre.Complementos.ComercioExterior.TipoOperacion = GlobalDTTipoOperacion().FiltraParametros($"CveTipoOperacion={CveTipoOperacion}")(0)("ClaveSATTipoOperacion").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.ClavedePedimento = GlobalDTClavePedimento().FiltraParametros($"CvePedimento={CvePedimento}")(0)("ClaveSATPedimento").ToString()
|
Timbre.Complementos.ComercioExterior.ClavedePedimento = GlobalDTClavePedimento().FiltraParametros($"CvePedimento={CvePedimento}")(0)("ClaveSATPedimento").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.CertificadoOrigen = "0"
|
Timbre.Complementos.ComercioExterior.CertificadoOrigen = "0"
|
||||||
Timbre.Complementos.ComercioExterior11.Incoterm = GlobalDTIncoterm.FiltroPrimeroValor("ClaveSATIncoterm", $"CveIncoterm={DdlIncoterm.SelectedValue}")
|
Timbre.Complementos.ComercioExterior.Incoterm = GlobalDTIncoterm.FiltroPrimeroValor("ClaveSATIncoterm", $"CveIncoterm={DdlIncoterm.SelectedValue}")
|
||||||
Timbre.Complementos.ComercioExterior11.Subdivision = "0"
|
Timbre.Complementos.ComercioExterior.Subdivision = "0"
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.TipoCambioUSD = If(Obj.CveMoneda = 1, 1, Obj.TipoCambio)
|
Timbre.Complementos.ComercioExterior.TipoCambioUSD = If(Obj.CveMoneda = 1, 1, Obj.TipoCambio)
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.MotivoTraslado = ""
|
Timbre.Complementos.ComercioExterior.MotivoTraslado = ""
|
||||||
|
|
||||||
'If Timbre.Comprobante.TipoComprobante = "T" Then
|
'If Timbre.Comprobante.TipoComprobante = "T" Then
|
||||||
' Timbre.Complementos.ComercioExterior11.MotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("ClaveSATMotivoTraslado", $"CveMotivoTraslado={DdlSATMotivoTraslado.SelectedValue}")
|
' Timbre.Complementos.ComercioExterior.MotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("ClaveSATMotivoTraslado", $"CveMotivoTraslado={DdlSATMotivoTraslado.SelectedValue}")
|
||||||
'Else
|
'Else
|
||||||
' Timbre.Complementos.ComercioExterior11.MotivoTraslado = ""
|
' Timbre.Complementos.ComercioExterior.MotivoTraslado = ""
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'EMISOR
|
'EMISOR
|
||||||
@@ -12711,16 +12726,16 @@ Partial Class Ventas
|
|||||||
If GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
If GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||||
Dr = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa)(0)
|
Dr = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa)(0)
|
||||||
End If
|
End If
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.CURP = UsuarioActual.Empresa.CURP
|
Timbre.Complementos.ComercioExterior.Emisor.CURP = UsuarioActual.Empresa.CURP
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Calle = Dr("Calle").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.Calle = Dr("Calle").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.NumeroExterior = Dr("NoExt").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.NumeroExterior = Dr("NoExt").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.NumeroInterior = Dr("NoInt").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.NumeroInterior = Dr("NoInt").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Colonia = Dr("ClaveSATColonia").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.Colonia = Dr("ClaveSATColonia").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Localidad = ""
|
Timbre.Complementos.ComercioExterior.Emisor.Localidad = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Municipio = Dr("ClaveSATMunicipio").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.Municipio = Dr("ClaveSATMunicipio").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Estado = Dr("ClaveSATEstado").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.Estado = Dr("ClaveSATEstado").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.Pais = Dr("ClaveSATPais").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.Pais = Dr("ClaveSATPais").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Emisor.CP = Dr("ClaveSATCP").ToString()
|
Timbre.Complementos.ComercioExterior.Emisor.CP = Dr("ClaveSATCP").ToString()
|
||||||
|
|
||||||
Dim ComExtPais, ComExtEstado, ComExtMunicipio, ComExtColonia, ComExtCalle, ComExtNumero, ComExtCP As String
|
Dim ComExtPais, ComExtEstado, ComExtMunicipio, ComExtColonia, ComExtCalle, ComExtNumero, ComExtCP As String
|
||||||
ComExtColonia = "" : ComExtMunicipio = ""
|
ComExtColonia = "" : ComExtMunicipio = ""
|
||||||
@@ -12744,17 +12759,17 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'RECEPTOR
|
'RECEPTOR
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib = If(Timbre.Comprobante.Version = "4.0", Obj.Cliente.NumRegIdTrib, "") ' EN LA VERSION 3.3 NO DEBE DE REGISTRARSE ESTE VALOR
|
Timbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib = If(Timbre.Comprobante.Version = "4.0", Obj.Cliente.NumRegIdTrib, "") ' EN LA VERSION 3.3 NO DEBE DE REGISTRARSE ESTE VALOR
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Calle = ComExtCalle
|
Timbre.Complementos.ComercioExterior.Receptor.Calle = ComExtCalle
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumeroExterior = ComExtNumero
|
Timbre.Complementos.ComercioExterior.Receptor.NumeroExterior = ComExtNumero
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.NumeroInterior = ""
|
Timbre.Complementos.ComercioExterior.Receptor.NumeroInterior = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Colonia = ComExtColonia
|
Timbre.Complementos.ComercioExterior.Receptor.Colonia = ComExtColonia
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Localidad = ""
|
Timbre.Complementos.ComercioExterior.Receptor.Localidad = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Referencia = Obj.Cliente.ReferenciaFiscal
|
Timbre.Complementos.ComercioExterior.Receptor.Referencia = Obj.Cliente.ReferenciaFiscal
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Municipio = ComExtMunicipio
|
Timbre.Complementos.ComercioExterior.Receptor.Municipio = ComExtMunicipio
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.CP = ComExtCP
|
Timbre.Complementos.ComercioExterior.Receptor.CP = ComExtCP
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Estado = ComExtEstado
|
Timbre.Complementos.ComercioExterior.Receptor.Estado = ComExtEstado
|
||||||
Timbre.Complementos.ComercioExterior11.Receptor.Pais = ComExtPais
|
Timbre.Complementos.ComercioExterior.Receptor.Pais = ComExtPais
|
||||||
Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
|
Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
|
||||||
Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
|
Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
|
||||||
|
|
||||||
@@ -12771,23 +12786,23 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If RowDireccion IsNot Nothing Then
|
If RowDireccion IsNot Nothing Then
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Nombre = RowDireccion("EnvioContacto").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Nombre = RowDireccion("EnvioContacto").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Calle = RowDireccion("EnvioDireccion").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Calle = RowDireccion("EnvioDireccion").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior = RowDireccion("EnvioNoExt").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.NumeroExterior = RowDireccion("EnvioNoExt").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior = ""
|
Timbre.Complementos.ComercioExterior.Destinatario.NumeroInterior = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Colonia = ""
|
Timbre.Complementos.ComercioExterior.Destinatario.Colonia = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Localidad = RowDireccion("NombreLocalidad").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Localidad = RowDireccion("NombreLocalidad").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Referencia = ""
|
Timbre.Complementos.ComercioExterior.Destinatario.Referencia = ""
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Municipio = RowDireccion("NombreMunicipio").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Municipio = RowDireccion("NombreMunicipio").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.CP = RowDireccion("EnvioCP").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.CP = RowDireccion("EnvioCP").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Estado = RowDireccion("NombreEstado").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Estado = RowDireccion("NombreEstado").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.Pais = RowDireccion("ClaveSATPais").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.Pais = RowDireccion("ClaveSATPais").ToString()
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib = RowDireccion("COM_NumRegIdTrib").ToString()
|
Timbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib = RowDireccion("COM_NumRegIdTrib").ToString()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Timbre.Complementos.ComercioExterior11.Destinatario = Nothing
|
Timbre.Complementos.ComercioExterior.Destinatario = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'MERCANCIAS
|
'MERCANCIAS
|
||||||
@@ -12802,12 +12817,12 @@ Partial Class Ventas
|
|||||||
mercancia.DescripcionesEspecificas.Marca = Gvr.FCTextBox("TxtMarca").Text
|
mercancia.DescripcionesEspecificas.Marca = Gvr.FCTextBox("TxtMarca").Text
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Timbre.Complementos.ComercioExterior11.Mercancias.Add(mercancia)
|
Timbre.Complementos.ComercioExterior.Mercancias.Add(mercancia)
|
||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = False
|
Timbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Timbre
|
Return Timbre
|
||||||
@@ -13410,7 +13425,7 @@ Partial Class Ventas
|
|||||||
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
|
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
|
||||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal,
|
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal,
|
||||||
PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(),
|
PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(),
|
||||||
CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal(), EstatusAlmacen:=EsatusAlmacen) Then
|
CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal(), EstatusAlmacen:=EsatusAlmacen, CantidadConversion:=Row("CantidadConversion").ToString().ToDecimal()) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -13637,19 +13652,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio)
|
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio)
|
||||||
|
|
||||||
If ErrorList.Count = 0 Then
|
|
||||||
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then
|
|
||||||
ErrorList.Add("Ocurrió un error al guardar la venta en Ordenes de Servicio")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento")
|
ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Si viene de OS, Se guarda CveVenta en OS
|
'Si viene de OS, Se guarda CveVenta en OS
|
||||||
If CveOS > 0 Then
|
If CveOS > 0 Then
|
||||||
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then
|
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then
|
||||||
@@ -15836,22 +15844,23 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DBCampo("Tipo").ToString() = "NC" And e.Row.DataKey("CveVenta").ToString().ToEntero() > 0 OrElse (e.Row.DBCampo("Tipo").ToString() = "Ant" And e.Row.DataKey("CveMoneda").ToString().ToEntero() = 1 AndAlso DdlMoneda.SelectedValue.ToEntero() = 2) Then
|
If e.Row.DBCampo("Tipo").ToString() = "NC" And e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse (e.Row.DBCampo("Tipo").Contiene("Ant", "IxC") And e.Row.DataKey("CveMoneda").ToEntero() = 1 AndAlso DdlMoneda.SelectedValue.ToEntero() = 2) Then
|
||||||
'If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then
|
'If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then
|
||||||
' tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
|
' tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
|
||||||
'Else
|
'Else
|
||||||
' tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString().ToDate).ToDecimal
|
' tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString().ToDate).ToDecimal
|
||||||
'End If
|
'End If
|
||||||
tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
|
If TxtFechaAnticipoCliente.Text = "" Then TxtFechaAnticipoCliente.Text = Now.ToShortDateString
|
||||||
|
tipoCambio = GlobalTipoCambio(TxtFechaAnticipoCliente.Text.ToDate).ToDecimal 'e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Text = tipoCambio.FormatoNumero(4)
|
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Text = tipoCambio.FormatoNumero(4)
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 Then
|
If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 Then
|
||||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 And tipoCambio > 0 Then
|
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 And tipoCambio > 0 Then
|
||||||
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio)
|
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio).TruncateDecimal
|
||||||
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then
|
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 2 Then
|
||||||
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio)
|
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio).TruncateDecimal
|
||||||
Else
|
Else
|
||||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||||
End If
|
End If
|
||||||
@@ -16047,12 +16056,12 @@ Partial Class Ventas
|
|||||||
importeMN = importeMovimiento * gvr.DataKey("TipoCambio").ToString().ToDecimal
|
importeMN = importeMovimiento * gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
ElseIf CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||||
TC = TipoCambioFluctuacion
|
TC = TipoCambioFluctuacion
|
||||||
ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
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
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
importeMN = importeMovimiento
|
importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||||
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
End If
|
End If
|
||||||
importeMovimiento = importeMovimiento.RoundSQL
|
importeMovimiento = importeMovimiento.RoundSQL
|
||||||
@@ -16064,7 +16073,7 @@ Partial Class Ventas
|
|||||||
Pago.Fecha = TxtFechaAnticipoCliente.Text.ToDate
|
Pago.Fecha = TxtFechaAnticipoCliente.Text.ToDate
|
||||||
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
||||||
Pago.ImportePagoVenta = importeMovimiento
|
Pago.ImportePagoVenta = importeMovimiento
|
||||||
Pago.ImportePago = importeMovimiento
|
Pago.ImportePago = importeMN
|
||||||
Pago.CveIE = CveIEAnticipo
|
Pago.CveIE = CveIEAnticipo
|
||||||
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
||||||
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
@@ -16072,7 +16081,6 @@ Partial Class Ventas
|
|||||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||||
Pago.Referencia = gvr.DataKey("Folio")
|
Pago.Referencia = gvr.DataKey("Folio")
|
||||||
'Pago.CveConceptoPago = 251
|
|
||||||
|
|
||||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
End If
|
End If
|
||||||
@@ -16080,19 +16088,38 @@ Partial Class Ventas
|
|||||||
Case "66"
|
Case "66"
|
||||||
If gvr.DataKey("CveIE").ToEntero() > 0 Then
|
If gvr.DataKey("CveIE").ToEntero() > 0 Then
|
||||||
|
|
||||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
|
If CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
|
importeMN = importeMovimiento
|
||||||
|
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
|
ElseIf CveMonedaVenta = 2 And gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||||
|
importeMN = importeMovimiento * gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
|
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
|
ElseIf CveMonedaVenta = 1 And gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||||
|
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
|
||||||
|
importeMN = importeMovimiento * gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||||
|
TC = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||||
|
End If
|
||||||
|
importeMovimiento = importeMovimiento.RoundSQL
|
||||||
|
importeMN = importeMN.RoundSQL
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
Dim Pago As New VentaPago
|
Dim Pago As New VentaPago
|
||||||
Pago.ImportePagoVenta = importeMovimiento
|
Pago.ImportePagoVenta = importeMovimiento
|
||||||
Pago.ImportePago = importeMovimiento
|
Pago.ImportePago = importeMN
|
||||||
Pago.CveIE = CveIEAnticipo
|
Pago.CveIE = CveIEAnticipo
|
||||||
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
||||||
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
Pago.TipoPago = "I"
|
Pago.TipoPago = "I"
|
||||||
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
||||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
Pago.AplicaTraslado = True
|
||||||
Pago.Referencia = gvr.DataKey("Folio")
|
Pago.Referencia = gvr.DataKey("Folio")
|
||||||
Pago.CveClientePago = gvr.DataKey("CveCliente").ToEntero()
|
Pago.CveClientePago = gvr.DataKey("CveCliente").ToEntero()
|
||||||
|
|
||||||
@@ -16734,6 +16761,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If EsVentaMedica Then
|
If EsVentaMedica Then
|
||||||
TxtPrecio.Enabled = False
|
TxtPrecio.Enabled = False
|
||||||
|
If UsuarioActual.CveUsuario = 3986 Then
|
||||||
|
TxtPrecio.Enabled = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio
|
If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera
|
If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera
|
||||||
@@ -17591,7 +17621,7 @@ Partial Class Ventas
|
|||||||
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then
|
If Not UsuarioActual.TienePermisoProceso(169) Then
|
||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") OrElse ((DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ped") And UsuarioActual.CveEmpresa.Contiene(186)))) Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
@@ -18174,7 +18204,7 @@ Partial Class Ventas
|
|||||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
||||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D) As Boolean
|
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Try
|
Try
|
||||||
@@ -18433,6 +18463,16 @@ Partial Class Ventas
|
|||||||
Row("CodigoAlterno") = DrPS("CodigoAlterno")
|
Row("CodigoAlterno") = DrPS("CodigoAlterno")
|
||||||
Row("PSAlterno") = DrPS("PSAlterno")
|
Row("PSAlterno") = DrPS("PSAlterno")
|
||||||
|
|
||||||
|
'SI NO SE UTILIZA LA CONVERSION, UTILIZA LA CANTIDAD
|
||||||
|
If CantidadConversion = 0 Then
|
||||||
|
If DrPS("PesoKg").ToString().ToDecimal() > 0 Then
|
||||||
|
CantidadConversion = DrPS("PesoKg").ToString().ToDecimal()
|
||||||
|
Else
|
||||||
|
CantidadConversion = Cantidad
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Row("CantidadConversion") = CantidadConversion
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then
|
||||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||||
|
|
||||||
@@ -18679,7 +18719,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
TmpDT.Columns.Add("CodigoAlterno", GetType(String))
|
TmpDT.Columns.Add("CodigoAlterno", GetType(String))
|
||||||
TmpDT.Columns.Add("PSAlterno", GetType(String))
|
TmpDT.Columns.Add("PSAlterno", GetType(String))
|
||||||
|
'USO PARA COMERCIO EXTERIOR
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
DTmpC = New DataTable
|
DTmpC = New DataTable
|
||||||
@@ -19737,7 +19779,7 @@ Partial Class Ventas
|
|||||||
If DtMovimientos.Rows.Count > 0 Then
|
If DtMovimientos.Rows.Count > 0 Then
|
||||||
Dim GeneroMovimientoAlmacen As Boolean = False
|
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
|
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
|
||||||
|
|
||||||
@@ -19766,7 +19808,7 @@ Partial Class Ventas
|
|||||||
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
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 MovDetalle As New DataTable
|
||||||
Dim AplicaMovimientoDetalleEntrada As Boolean = False
|
Dim AplicaMovimientoDetalleEntrada As Boolean = True
|
||||||
|
|
||||||
If RemisionesLista.Count > 0 Then
|
If RemisionesLista.Count > 0 Then
|
||||||
AplicaMovimientoDetalleEntrada = True
|
AplicaMovimientoDetalleEntrada = True
|
||||||
@@ -19786,35 +19828,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||||
Dim CveConceptoSalidaAlmacen As Integer = 3
|
Dim CveConceptoSalidaAlmacen As Integer = 40 'SALIDA DEFINITIVA DEL SISTEMA
|
||||||
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
|
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
|
'Le damos salida normal
|
||||||
If ConSalida AndAlso Not OcurrioError Then
|
If ConSalida AndAlso Not OcurrioError Then
|
||||||
|
|
||||||
@@ -19976,7 +19992,7 @@ Partial Class Ventas
|
|||||||
If DtMovimientos.Rows.Count > 0 Then
|
If DtMovimientos.Rows.Count > 0 Then
|
||||||
Dim GeneroMovimientoAlmacen As Boolean = False
|
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
|
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
|
||||||
|
|
||||||
@@ -21661,6 +21677,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If EsVentaMedica Then
|
If EsVentaMedica Then
|
||||||
TxtPrecio.Enabled = False
|
TxtPrecio.Enabled = False
|
||||||
|
If UsuarioActual.CveUsuario = 3986 Then
|
||||||
|
TxtPrecio.Enabled = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
TxtPrecio.Enabled = True
|
TxtPrecio.Enabled = True
|
||||||
End If
|
End If
|
||||||
@@ -21676,6 +21695,12 @@ Partial Class Ventas
|
|||||||
DdlMetodoPago33.Enabled = True
|
DdlMetodoPago33.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||||
|
TxtFechaOS.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
UPPVentas.Update()
|
UPPVentas.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
@@ -21769,16 +21794,29 @@ Partial Class Ventas
|
|||||||
Moneda = 1
|
Moneda = 1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim FechaParaSurtir As DateTime = MinFecha
|
||||||
|
If TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||||
|
FechaParaSurtir = TxtFechaOS.Text.Replace(",", "").ToDateTime()
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||||
UsuarioActual.CveEmpresa, CveVenta,
|
UsuarioActual.CveEmpresa, CveVenta,
|
||||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
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(),
|
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:=FechaParaSurtir) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not OcurrioError Then
|
||||||
|
If DdlMedico.SelectedValue.ToEntero() > 0 AndAlso TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||||
|
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, FechaParaSurtir, UsuarioActual.CveEmpresa) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
Dim index As Integer = 0
|
Dim index As Integer = 0
|
||||||
@@ -29650,6 +29688,24 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Protected Sub GvComercioExterior_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvComercioExterior_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Dim CantidadConversion = CDbl(e.Row.DBCampo("CantidadConversion"))
|
||||||
|
Dim CantidadBase = CDbl(e.Row.DBCampo("Cantidad"))
|
||||||
|
Dim PUBase = CDbl(e.Row.DBCampo("PU"))
|
||||||
|
|
||||||
|
Dim TotalUSD = (CantidadBase * PUBase)
|
||||||
|
|
||||||
|
e.Row.FCLabel("LblTotalUSD").Text = TotalUSD.ToString("N2")
|
||||||
|
|
||||||
|
If CantidadConversion <> CantidadBase Then
|
||||||
|
If CantidadConversion > 0 Then
|
||||||
|
e.Row.FCTextBox("TxtValorUnitario").Text = (TotalUSD / CantidadConversion).ToString("N6")
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtValorUnitario").Text = PUBase.ToString("N2")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtValorUnitario").Text = PUBase.ToString("N2")
|
||||||
|
End If
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtValorUnitario").Attributes.Add("onkeyup", $"CalculaTotalUSD({e.Row.FCLabel("LblTotalUSD").ClientID}, this,{e.Row.FCTextBox("TxtCantidad").ClientID});")
|
e.Row.FCTextBox("TxtValorUnitario").Attributes.Add("onkeyup", $"CalculaTotalUSD({e.Row.FCLabel("LblTotalUSD").ClientID}, this,{e.Row.FCTextBox("TxtCantidad").ClientID});")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -33603,6 +33659,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
TxtDescripcionVenta.Enabled = True
|
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()
|
UpCliente.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
UPObservaciones.Update()
|
UPObservaciones.Update()
|
||||||
@@ -33624,12 +33686,25 @@ Partial Class Ventas
|
|||||||
'DdlMedicoObservaciones.Enabled = True
|
'DdlMedicoObservaciones.Enabled = True
|
||||||
'DdlProcedimientoObservaciones.Enabled = True
|
'DdlProcedimientoObservaciones.Enabled = True
|
||||||
|
|
||||||
|
Dim FechaParaSurtir As DateTime = MinFecha
|
||||||
|
If TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||||
|
FechaParaSurtir = TxtFechaOS.Text.Replace(",", "").ToDateTime()
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
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,
|
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:=FechaParaSurtir) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
If DdlMedico.SelectedValue.ToEntero() > 0 AndAlso FechaParaSurtir > MinFecha Then
|
||||||
|
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, FechaParaSurtir, UsuarioActual.CveEmpresa) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not TieneError AndAlso AplicaUpdateTC Then
|
If Not TieneError AndAlso AplicaUpdateTC Then
|
||||||
If Not ObjVentas.UpdateVentaTC(Me.CveVenta, UsuarioActual.CveEmpresa, TxtTipoCambio.Text.ToDecimal()) Then
|
If Not ObjVentas.UpdateVentaTC(Me.CveVenta, UsuarioActual.CveEmpresa, TxtTipoCambio.Text.ToDecimal()) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -36373,7 +36448,7 @@ Partial Class Ventas
|
|||||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
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,
|
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,
|
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
||||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||||
@@ -36393,10 +36468,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:="")
|
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
|
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(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)))
|
' 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
|
'Else
|
||||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||||
Errores = True
|
Errores = True
|
||||||
End If
|
End If
|
||||||
@@ -36491,5 +36566,9 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaAnticipos(CveCliente)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user