-- simplificación de valores
-- parametro de tipodocto
This commit is contained in:
@@ -2675,7 +2675,7 @@ Public Class ClsRH
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddAsistencia(CvePersonal As Integer, CveCliente As Integer, CveSubProyecto As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double,
|
Public Function AddAsistencia(CvePersonal As Integer, CveCliente As Integer, CveSubProyecto As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double,
|
||||||
HorasDobles As Double, HorasTriples As Double, CveMotivoHoraExtra As Integer, Observacion As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
HorasDobles As Double, HorasTriples As Double, CveMotivoHoraExtra As Integer, Observacion As String, CveUsuario As Integer, CveEmpresa As Integer, Modulo As String) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
@@ -2693,6 +2693,7 @@ Public Class ClsRH
|
|||||||
.Add("@HorasTriples", SqlDbType.Float).Value = HorasTriples
|
.Add("@HorasTriples", SqlDbType.Float).Value = HorasTriples
|
||||||
.Add("@CveMotivoHoraExtra", SqlDbType.Int).Value = CveMotivoHoraExtra
|
.Add("@CveMotivoHoraExtra", SqlDbType.Int).Value = CveMotivoHoraExtra
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||||
|
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
|
|||||||
@@ -1277,7 +1277,7 @@ Namespace Modelos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CrearVentaNueva(UsuarioActual As Usuario, CveSubProyecto As Integer, CveCliente As Integer, CveMoneda As Integer) As Modelos.Factura
|
Public Shared Function CrearVentaNueva(UsuarioActual As Usuario, CveSubProyecto As Integer, CveCliente As Integer, CveMoneda As Integer, Optional TipoDocto As String = "Ing") As Modelos.Factura
|
||||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual)
|
Dim ObjFactura As New Modelos.Factura(UsuarioActual)
|
||||||
Try
|
Try
|
||||||
ObjFactura.DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
ObjFactura.DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
||||||
@@ -1289,41 +1289,26 @@ Namespace Modelos
|
|||||||
ObjFactura.Version = "4.0"
|
ObjFactura.Version = "4.0"
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
ObjFactura.ConvertirPesos = False
|
|
||||||
ObjFactura.CveMoneda = CveMoneda
|
ObjFactura.CveMoneda = CveMoneda
|
||||||
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||||
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||||
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal())
|
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal())
|
||||||
ObjFactura.TipoDocto = "Ing"
|
ObjFactura.TipoDocto = TipoDocto
|
||||||
ObjFactura.RefDocto = ""
|
|
||||||
ObjFactura.Folio = -1
|
ObjFactura.Folio = -1
|
||||||
ObjFactura.Serie = "-1"
|
ObjFactura.Serie = "-1"
|
||||||
ObjFactura.Fecha = ClsPaginas.NowADS()
|
ObjFactura.Fecha = ClsPaginas.NowADS()
|
||||||
ObjFactura.CvePrePoliza = -1
|
|
||||||
ObjFactura.CveMetodoPago = 1
|
ObjFactura.CveMetodoPago = 1
|
||||||
ObjFactura.MetodoPago = "Efectivo"
|
ObjFactura.MetodoPago = "Efectivo"
|
||||||
ObjFactura.FechaPago = DateTime.Today
|
ObjFactura.FechaPago = DateTime.Today
|
||||||
ObjFactura.MotivoDescuento = ""
|
|
||||||
ObjFactura.Observaciones = ""
|
|
||||||
ObjFactura.FechaEjecucion = DateTime.Today
|
ObjFactura.FechaEjecucion = DateTime.Today
|
||||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||||
ObjFactura.CveCondicionEntrega = -1
|
|
||||||
ObjFactura.CondicionEntrega = ""
|
|
||||||
ObjFactura.NumeroCuenta = ""
|
|
||||||
ObjFactura.CondicionesPago = 0
|
ObjFactura.CondicionesPago = 0
|
||||||
ObjFactura.FormaPago = 0
|
|
||||||
ObjFactura.PedidoContrato = ""
|
|
||||||
ObjFactura.NumeroContrato = ""
|
|
||||||
ObjFactura.DescripcionContrato = ""
|
|
||||||
ObjFactura.CveCorte = -1
|
|
||||||
ObjFactura.TipoDocumento = "Factura"
|
ObjFactura.TipoDocumento = "Factura"
|
||||||
ObjFactura.Alfa1 = ""
|
|
||||||
ObjFactura.Alfa2 = ""
|
|
||||||
ObjFactura.Alfa3 = ""
|
|
||||||
'Totales, Y se llena TmpDTImpuestos
|
'Totales, Y se llena TmpDTImpuestos
|
||||||
ObjFactura.Descuento = 0
|
|
||||||
ObjFactura.Amortizacion = 0
|
|
||||||
ObjFactura.CveContrato = -1
|
|
||||||
'CLIENTE
|
'CLIENTE
|
||||||
ObjFactura.CveCliente = CveCliente
|
ObjFactura.CveCliente = CveCliente
|
||||||
ObjFactura.SetCliente()
|
ObjFactura.SetCliente()
|
||||||
@@ -1345,13 +1330,13 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjCliente.GetSucursales(ObjFactura.CveCliente) Then
|
'If ObjCliente.GetSucursales(ObjFactura.CveCliente) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
' If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
ObjFactura.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
' ObjFactura.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
|
||||||
Else
|
' Else
|
||||||
ObjFactura.CveClienteSucursal = -1
|
' ObjFactura.CveClienteSucursal = -1
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
ObjFactura.CveSubProyecto = CveSubProyecto.ToEntero
|
ObjFactura.CveSubProyecto = CveSubProyecto.ToEntero
|
||||||
@@ -1377,7 +1362,6 @@ Namespace Modelos
|
|||||||
ObjFactura = Nothing
|
ObjFactura = Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
Return ObjFactura
|
Return ObjFactura
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -7181,7 +7165,7 @@ Namespace Modelos
|
|||||||
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
||||||
Public Property Version As String = ""
|
Public Property Version As String = ""
|
||||||
Public Property Serie As String = ""
|
Public Property Serie As String = ""
|
||||||
Public Property Folio As Integer
|
Public Property Folio As Integer = -1
|
||||||
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
||||||
Public ReadOnly Property SerieFolio As String
|
Public ReadOnly Property SerieFolio As String
|
||||||
Get
|
Get
|
||||||
@@ -7321,7 +7305,7 @@ Namespace Modelos
|
|||||||
Public Property MonedaAbreviatura As String
|
Public Property MonedaAbreviatura As String
|
||||||
Public Property TipoCambio As Decimal = 1
|
Public Property TipoCambio As Decimal = 1
|
||||||
Public Property TipoCambioDolares As Decimal
|
Public Property TipoCambioDolares As Decimal
|
||||||
Public Property ConvertirPesos As Boolean
|
Public Property ConvertirPesos As Boolean = False
|
||||||
Public Property ConvertirDolares As Boolean
|
Public Property ConvertirDolares As Boolean
|
||||||
Public Property FormaPago As Integer = 0
|
Public Property FormaPago As Integer = 0
|
||||||
|
|
||||||
|
|||||||
@@ -904,10 +904,10 @@ Public Class Timbrado
|
|||||||
Equivalencia = 1
|
Equivalencia = 1
|
||||||
'condiciones especiales para el pago en pesos, facturas en moneda extranjera
|
'condiciones especiales para el pago en pesos, facturas en moneda extranjera
|
||||||
ElseIf MonedaPago = "MXN" AndAlso VentaAbreviaturaSAT <> "MXN" Then
|
ElseIf MonedaPago = "MXN" AndAlso VentaAbreviaturaSAT <> "MXN" Then
|
||||||
VentaTipoCambio = Math.Round(VentaTipoCambio, 10)
|
VentaTipoCambio = Math.Round(VentaTipoCambio, 6)
|
||||||
Equivalencia = Math.Round((1 / VentaTipoCambio), 10)
|
Equivalencia = Math.Round((1 / VentaTipoCambio), 10)
|
||||||
ElseIf MonedaPago = "USD" AndAlso VentaAbreviaturaSAT <> "USD" Then
|
ElseIf MonedaPago = "USD" AndAlso VentaAbreviaturaSAT <> "USD" Then
|
||||||
VentaTipoCambio = Math.Round(VentaTipoCambio, 10)
|
VentaTipoCambio = Math.Round(VentaTipoCambio, 6)
|
||||||
Equivalencia = VentaTipoCambio
|
Equivalencia = VentaTipoCambio
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user