Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1162,6 +1162,8 @@ Public Class ClsContPAQi
|
||||
StrSQL.AppendLine("")
|
||||
StrSQL.AppendLine(" BEGIN TRY")
|
||||
StrSQL.AppendLine("")
|
||||
StrSQL.AppendLine(" SET ARITHABORT ON; ")
|
||||
StrSQL.AppendLine("")
|
||||
StrSQL.AppendLine(" CREATE TABLE #TablaContable (")
|
||||
StrSQL.AppendLine(" Id INT,")
|
||||
StrSQL.AppendLine(" IdPoliza INT,")
|
||||
|
||||
@@ -723,7 +723,8 @@ Public Class ClsMovimientos
|
||||
|
||||
Public Function GetCxPPeriodo(CveProveedor As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveUsuarioResponsable As Integer,
|
||||
CveUsuarioRegistro As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveSucursal As Integer,
|
||||
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer) As Boolean
|
||||
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer,
|
||||
Optional TipoDocto As String = "-1", Optional CveMoneda As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_RepCxPPeriodo")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -740,6 +741,8 @@ Public Class ClsMovimientos
|
||||
.Add("@FechaCorte", SqlDbType.Date).Value = FechaCorte
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -3238,6 +3238,27 @@ Public Class ClsNominas
|
||||
End Function
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function GetLayoutAltaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -33,7 +33,7 @@ Public Class ClsOC
|
||||
Public Property CveIEAnticipo As Integer
|
||||
Public Property CveProveedorAnticipo As Integer
|
||||
Public Property FolioIEAnticipo As Integer
|
||||
Public Property ImporteAnticipo As Double
|
||||
Public Property ImporteAnticipo As Decimal
|
||||
|
||||
Public Property FolioAdicional As String
|
||||
Public Property EntregaDirecta As Boolean
|
||||
@@ -79,16 +79,16 @@ Public Class ClsOC
|
||||
Public Property RFC As String
|
||||
Public Property LugarEntrega As String
|
||||
Public Property Cancelacion As String
|
||||
Public Property PorcentajeIVA As Double
|
||||
Public Property PorcentajeIVA As Decimal
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CveVendedor As Integer
|
||||
Public Property PrioridadObservacion As String
|
||||
Public Property SubTotal As Double
|
||||
Public Property IVA As Double
|
||||
Public Property RetIVA As Double
|
||||
Public Property RetISR As Double
|
||||
Public Property IEPS As Double
|
||||
Public Property Total As Double
|
||||
Public Property SubTotal As Decimal
|
||||
Public Property IVA As Decimal
|
||||
Public Property RetIVA As Decimal
|
||||
Public Property RetISR As Decimal
|
||||
Public Property IEPS As Decimal
|
||||
Public Property Total As Decimal
|
||||
Public Property CvePresupuestoEgreso As Integer
|
||||
Public Property RequiereCotizacion As Boolean
|
||||
Public Property CveActivoFijo As Integer
|
||||
@@ -98,8 +98,8 @@ Public Class ClsOC
|
||||
Public Property SubProyecto As String
|
||||
Public Property UsuarioSolicito As String
|
||||
Public Property UsuarioAutorizo As String
|
||||
Public Property Descuento As Double
|
||||
Public Property Pendiente As Double
|
||||
Public Property Descuento As Decimal
|
||||
Public Property Pendiente As Decimal
|
||||
Public Property NombreCliente As String
|
||||
Public Property SucCalle As String
|
||||
Public Property SucNoExt As String
|
||||
@@ -274,7 +274,7 @@ Public Class ClsOC
|
||||
Extension = Data.Rows(0)("Extension").ToString
|
||||
Usuario = Data.Rows(0)("Usuario").ToString
|
||||
Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
||||
Me.Total = Data.Rows(0)("Total").ToString.ToDouble
|
||||
Me.Total = Data.Rows(0)("Total").ToString.ToDecimal
|
||||
|
||||
|
||||
Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
||||
@@ -416,7 +416,7 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Double, pCantidad As Double, pCveUM As Integer, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean
|
||||
Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Decimal, pCantidad As Decimal, pCveUM As Integer, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_CotizacionesDetalleAdd")
|
||||
@@ -425,9 +425,9 @@ Public Class ClsOC
|
||||
.Add("@CveCotizacion", SqlDbType.Int).Value = pCveCotizacion
|
||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad
|
||||
.Add("@CveUM", SqlDbType.Int).Value = pCveUM
|
||||
.Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir
|
||||
.Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir
|
||||
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
||||
@@ -452,14 +452,14 @@ Public Class ClsOC
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Double, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String) As Boolean
|
||||
Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Decimal, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_CotizacionesDetalleUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
||||
.Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir
|
||||
.Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir
|
||||
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
||||
.Add("@CveCotizacionDetalle", SqlDbType.Int).Value = pCveCotizacionDetalle
|
||||
@@ -546,107 +546,6 @@ Public Class ClsOC
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
'Public Function GetEstatusCompra(ByVal CveEstatusCompra As Integer, ByVal EstatusCompra As String) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_OC_EstatusOrdenCompraGet")
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' If Data.Rows.Count = 1 Then
|
||||
' _CveEstatusCompra = Data.Rows(0)("CveEstatusCompra").ToString().ToEntero()
|
||||
' _EstatusCompra = Data.Rows(0)("EstatusCompra").ToString()
|
||||
' _Estatus = Data.Rows(0)("Estatus").ToString = "True"
|
||||
' _FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate()
|
||||
' _CveUsuario = Data.Rows(0)("CveUsuario").ToString().ToEntero()
|
||||
' _NombreUsuario = Data.Rows(0)("Nombre").ToString()
|
||||
' End If
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener el Catálogo de Estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
'Public Function AddEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveUsuario As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_OC_EstatusOrdenCompraAdd")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion
|
||||
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' If ex.Number = 2627 Then
|
||||
' Alert("La Clave o Descripción del EstatusCompra ya existe.", TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
'Public Function UpdateEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveEstatusCompra As Integer, ByVal CveUsuario As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_OC_EstatusOrdenCompraUpdate")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion
|
||||
' '.Add("@pCveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
' .Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As SqlException
|
||||
' If ex.Number = 2627 Then
|
||||
' Alert("La Clave o Descripción del Estatus de Compra ya existe.", TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' OnError("Ocurrió un error al guardar los cambios en el estatus de compra", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al guardar los cambios en el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
'Public Function RemoveEstatusCompra(ByVal CveEstatusCompra As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
' DataAdapter("PA_OC_EstatusOrdenCompraRemove")
|
||||
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra
|
||||
' End With
|
||||
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al eliminar el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
#Region "O R D E N E S - D E - C O M P R A S"
|
||||
Public Function GetOC(ObjOrdenCompra As Modelos.OrdenCompra) As Boolean
|
||||
@@ -707,7 +606,7 @@ Public Class ClsOC
|
||||
_Folio = dr("Folio").ToString.ToEntero
|
||||
_CveIEAnticipo = dr("CveIEAnticipo").ToString.ToEntero
|
||||
_FolioIEAnticipo = dr("FolioIEAnticipo").ToString.ToEntero
|
||||
_ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDouble
|
||||
_ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDecimal
|
||||
_CveProveedorAnticipo = dr("CveProveedorAnticipo").ToString.ToEntero
|
||||
_CveEmpresa = dr("CveEmpresa").ToString.ToEntero
|
||||
_CveProyecto = dr("CveProyecto").ToString.ToEntero
|
||||
@@ -752,32 +651,15 @@ Public Class ClsOC
|
||||
Me.SucursalTelefono = If(Not IsDBNull(dr("TelefonoSucursal")), dr("TelefonoSucursal").ToString, "")
|
||||
ProveedorContacto = dr("ContactoNombre").ToString
|
||||
|
||||
PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDouble
|
||||
SubTotal = dr("SubTotal").ToString.ToDouble
|
||||
Descuento = dr("Descuento").ToString.ToDouble
|
||||
IVA = dr("IVA").ToString.ToDouble
|
||||
RetIVA = dr("RetIVA").ToString.ToDouble
|
||||
RetISR = dr("RetISR").ToString.ToDouble
|
||||
IEPS = dr("IEPS").ToString.ToDouble
|
||||
Total = dr("Total").ToString.ToDouble
|
||||
Pendiente = dr("Pendiente").ToString.ToDouble
|
||||
'If Not IsDBNull(dr("SubTotal")) Then
|
||||
' SubTotal = dr("SubTotal").ToString.ToDouble
|
||||
' If IVA <= 0 Then
|
||||
' _IVA = _SubTotal * dr("PorcentajeIVA").ToString.ToDouble
|
||||
' End If
|
||||
' _Total = _SubTotal + _IVA - _Descuento - _RetIVA - _RetISR
|
||||
'End If
|
||||
|
||||
'_CveSupervisara = dr("CveSupervisara").ToString.ToEntero
|
||||
'_CveAutoriza = dr("CveAutoriza").ToString.ToEntero
|
||||
'_CveAutorizara = dr("CveAutorizara").ToString.ToEntero
|
||||
|
||||
'_NombreSupervisa = dr("NombreSupervisa").ToString
|
||||
|
||||
'_NombreAutoriza = dr("NombreAutoriza").ToString
|
||||
'_FechaSupervisa = dr("FechaSupervisa").ToString.ToDate
|
||||
'_FechaAutoriza = dr("FechaAutoriza").ToString.ToDate
|
||||
PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||
SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||
Descuento = dr("Descuento").ToString.ToDecimal
|
||||
IVA = dr("IVA").ToString.ToDecimal
|
||||
RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||
RetISR = dr("RetISR").ToString.ToDecimal
|
||||
IEPS = dr("IEPS").ToString.ToDecimal
|
||||
Total = dr("Total").ToString.ToDecimal
|
||||
Pendiente = dr("Pendiente").ToString.ToDecimal
|
||||
|
||||
'RequiereCotizacion = CType(dr("RequiereCotizacion"), Boolean)
|
||||
SubProyecto = dr("SubProyecto").ToString
|
||||
@@ -820,9 +702,9 @@ Public Class ClsOC
|
||||
pFechaEstimadaEntrega As String, pLugarEntrega As String, pCveUsuario As Integer, pCveEmpresa As Integer, pCvePresupuestoEgreso As Integer,
|
||||
Optional pCveProveedor As Integer = -1, Optional pCveProveedorSucursal As Integer = -1, Optional IDPoliza As Integer = -1, Optional RequiereCotizacion As Boolean = False, Optional CveUsuarioAsignado As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||
Optional PorcentajeIVA As Double = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Double = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -971,7 +853,7 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Double, CveUsuarioModifico As Integer) As Boolean
|
||||
Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Decimal, CveUsuarioModifico As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAjusteUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1028,7 +910,7 @@ Public Class ClsOC
|
||||
pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
||||
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Double = 0.16) As Boolean
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
||||
@@ -1266,18 +1148,18 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||
Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOrdenCompra", SqlDbType.Int).Value = pCveOrdenCompra
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
||||
.Add("@Descuento", SqlDbType.Float).Value = Descuento
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad
|
||||
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
|
||||
.Add("@Importe", SqlDbType.Float).Value = pImporte
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||
@@ -1290,16 +1172,16 @@ Public Class ClsOC
|
||||
.Add("@vCveOrdenCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
||||
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
||||
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
|
||||
.Add("@RetISR", SqlDbType.Float).Value = RetISR
|
||||
.Add("@Total", SqlDbType.Float).Value = Total
|
||||
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
|
||||
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
|
||||
.Add("@Total", SqlDbType.Decimal).Value = Total
|
||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
|
||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
||||
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
|
||||
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
|
||||
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
|
||||
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
|
||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
|
||||
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||
@@ -1322,11 +1204,11 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateOrdenCompraDetalle(pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||
pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveTipoGastoObra As Integer = -1) As Integer
|
||||
Public Function UpdateOrdenCompraDetalle(pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||
pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveTipoGastoObra As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleUpdate")
|
||||
@@ -1336,8 +1218,8 @@ Public Class ClsOC
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||
.Add("@Descuento", SqlDbType.Float).Value = Descuento
|
||||
.Add("@Importe", SqlDbType.Float).Value = pImporte
|
||||
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
|
||||
.Add("@Importe", SqlDbType.Decimal).Value = pImporte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = pCveSubProyecto
|
||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = pCveActivoFijo
|
||||
@@ -1346,16 +1228,16 @@ Public Class ClsOC
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = pCveUsuario
|
||||
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
||||
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
||||
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
|
||||
.Add("@RetISR", SqlDbType.Float).Value = RetISR
|
||||
.Add("@Total", SqlDbType.Float).Value = Total
|
||||
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
|
||||
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
|
||||
.Add("@Total", SqlDbType.Decimal).Value = Total
|
||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
|
||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
||||
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
|
||||
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
|
||||
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
|
||||
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
|
||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
|
||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||
End With
|
||||
|
||||
@@ -2412,7 +2294,7 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Double, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Decimal, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_SolicitudAnticipoAdd")
|
||||
|
||||
@@ -2496,16 +2378,16 @@ Public Class ClsOC
|
||||
End Function
|
||||
|
||||
#Region " OC DETALLE - SALDOS [ SURTIDO INV | VINCULADO COMP ]"
|
||||
Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Double, CveCompraDetalle As Integer, CantidadVinculada As Double) As Boolean
|
||||
Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Decimal, CveCompraDetalle As Integer, CantidadVinculada As Decimal) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("OC_OrdenesCompraDetalleSaldosInvCompraAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
|
||||
.Add("@CveInvDetalle", SqlDbType.Int).Value = CveInvDetalle
|
||||
.Add("@CantidadSurtida", SqlDbType.Float).Value = CantidadSurtida
|
||||
.Add("@CantidadSurtida", SqlDbType.Decimal).Value = CantidadSurtida
|
||||
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
||||
.Add("@CantidadVinculada", SqlDbType.Float).Value = CantidadVinculada
|
||||
.Add("@CantidadVinculada", SqlDbType.Decimal).Value = CantidadVinculada
|
||||
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -7153,8 +7153,11 @@ Public Class ClsPaginas
|
||||
'DATOS GENERALES
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(15) Then
|
||||
params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
||||
End If
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
||||
params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
|
||||
params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
|
||||
params.Add(New ReportParameter("Status", Vta.EstatusFactura))
|
||||
|
||||
@@ -761,6 +761,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
||||
|
||||
Dim cveclienteclasificacion = IfNull(context.Request("cveclienteclasificacion"), "-1").ToString.ToEntero
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
If IsNothing(usuario) Then
|
||||
@@ -772,7 +774,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
'sino existe, recarga los datos
|
||||
If context.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1, CveClienteClasificacion:=cveclienteclasificacion) Then
|
||||
context.Application(AppNombre) = ObjClientes.DtResultados
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
|
||||
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
|
||||
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
||||
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
||||
<asp:ListItem Value="-2" Text="Tarjetas"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" Visible="false" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="40px">
|
||||
@@ -281,9 +282,10 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)">
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFactura" runat="server"/>
|
||||
<asp:CheckBox ID="ChkFactura" CssClass="CssSelector" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Factura">
|
||||
@@ -560,8 +562,8 @@
|
||||
function txtSumaTntermediario(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtComisionIntermediario').val(ComisionIntermediario);
|
||||
alert("No es posible poner un importe superior a lo seleccionado");
|
||||
//$('#C_TxtComisionIntermediario').val(ComisionIntermediario);
|
||||
//alert("No es posible poner un importe superior a lo seleccionado");
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
@@ -653,6 +655,32 @@
|
||||
ComisionIntermediario = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function SelectorNotas(Chk) {
|
||||
|
||||
|
||||
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||
|
||||
if (Chk.checked) {
|
||||
|
||||
if (! $(this).prop('checked')) {
|
||||
$(this).click();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if ($(this).prop('checked')) {
|
||||
$(this).click();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -215,6 +215,19 @@
|
||||
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
<div runat="server" id="DvFolioACCondiciones" visible="false">
|
||||
|
||||
<ajax:FilteredTextBoxExtender runat="server" ID="FTEFolio" TargetControlID="TxtFolio" FilterType="Custom" ValidChars="0123456789" />
|
||||
<asp:RangeValidator ID="RvTxtFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El Folio debe de tener un valor de entre 1 y 2147483647" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RvTxtFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
<label class="col-md-1 control-label text-right">Importe:</label>
|
||||
|
||||
@@ -843,6 +843,9 @@ Partial Class Bancos_IE
|
||||
DdlMotivoCancelacion.DataBind()
|
||||
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
DvFolioACCondiciones.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -861,6 +864,8 @@ Partial Class Bancos_IE
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
||||
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
||||
<%-- <asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>--%>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 240px;"></ADS:Dropdownlost>
|
||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargaClientes" Style="display: none;" />
|
||||
</li>
|
||||
<li> F.I.:
|
||||
|
||||
@@ -27,8 +27,17 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
'DdlProveedores.DataBind()
|
||||
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(91) Then
|
||||
@@ -58,15 +67,16 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
|
||||
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
|
||||
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
|
||||
If Mov.GetIngresosPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
If Mov.GetIngresosPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = Mov.DtResultados
|
||||
CargaGrid("")
|
||||
UPDatos.Update()
|
||||
|
||||
End If
|
||||
|
||||
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||
DtAnticipos = Mov.DtResultados
|
||||
CargaGrid("")
|
||||
UpAnt.Update()
|
||||
@@ -77,13 +87,26 @@ Partial Class Bancos_RepIngresosPorComprobar
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
|
||||
DdlClientes.CssClass += " select2me"
|
||||
DdlClientes.Items.Clear()
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlClientes.Attributes.Remove("onclick")
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
'DdlClientes.CssClass += " select2me"
|
||||
'DdlClientes.Items.Clear()
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
|
||||
'DdlClientes.DataBind()
|
||||
'DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'DdlClientes.Attributes.Remove("onclick")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2149,18 +2149,8 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Sub CargaRetIVAConcepto(Optional Cambio As Boolean = False)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If TrRetIVA.Visible Then
|
||||
TdRetIVAConcepto.Visible = True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Cambio Then
|
||||
@@ -2174,15 +2164,12 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
||||
'End If
|
||||
|
||||
''If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||
'DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
||||
''End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
UpPS.Update()
|
||||
|
||||
End Sub
|
||||
@@ -3380,6 +3367,47 @@ Partial Class Compras_Compras
|
||||
DdlRetIVAConcepto.SelectedValueExist("2") ' flete pf
|
||||
DdlRetIVAConcepto.SelectedValueExist("3") ' fletes pm
|
||||
DdlRetISRConcepto.SelectedValueExist("1") ' honorarios
|
||||
ElseIf ObjProveedor.DIOTCveTipoOperacion = 0 Then
|
||||
|
||||
|
||||
If CveFactura > 0 Then
|
||||
|
||||
If RetIVAOriginal > 0 Then
|
||||
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
|
||||
|
||||
If (CalRetIVAPor).RoundAD(6) = 0.106667 Then
|
||||
DdlRetIVAConcepto.SelectedValueExist("1") '10.66 servicios profecionales
|
||||
End If
|
||||
|
||||
If (CalRetIVAPor).RoundAD(2) = 0.04 Then '4 Fletes
|
||||
|
||||
If RFCProv.Length = 13 Then
|
||||
DdlRetIVAConcepto.SelectedValueExist("2")
|
||||
Else
|
||||
DdlRetIVAConcepto.SelectedValueExist("3")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If RetISROriginal > 0 Then
|
||||
|
||||
Dim CalRetISRPor As Decimal = (RetISROriginal * 1 / SubTotal2Original).RoundAD(5).ToDecimal
|
||||
|
||||
If (CalRetISRPor).RoundAD(1) = 0.1 Then '10 Sercviios profecionales
|
||||
DdlRetISRConcepto.SelectedValueExist("1")
|
||||
End If
|
||||
|
||||
If (CalRetISRPor).RoundAD(4) = 0.0125 Then '1.25 Recico regimen simplificado confianza
|
||||
DdlRetISRConcepto.SelectedValueExist("3")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
LbAgregar.Enabled = True
|
||||
@@ -5219,7 +5247,7 @@ Partial Class Compras_Compras
|
||||
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
||||
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDouble) Then
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal) Then
|
||||
ErrorSaldosInvComp = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -10775,7 +10803,7 @@ Partial Class Compras_Compras
|
||||
'End If
|
||||
|
||||
'AGREGA MOVIMIENTO
|
||||
If importeMovimiento <> 0 Then
|
||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||
ErrorPrepoliza = True
|
||||
|
||||
@@ -205,9 +205,13 @@ Partial Class PopUpVerFactura
|
||||
If Request("onlyPrint").ToString() = "PalletCaja" Then
|
||||
imprimirpallet(Request("CvePallet").ToString.ToEntero())
|
||||
End If
|
||||
|
||||
If Request("onlyPrint").ToString() = "manifiesto" Then
|
||||
imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||
End If
|
||||
If Request("onlyPrint").ToString() = "manifiestoRemision" Then
|
||||
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -330,6 +334,150 @@ Partial Class PopUpVerFactura
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub imprimirManifiestoRemisionRemision(cveEmbarqueManifiesto As Integer)
|
||||
Dim NoEmbarque As String = ""
|
||||
Dim Fecha As String = ""
|
||||
Dim SubProyecto As String = ""
|
||||
Dim AgenciaAduanalUSA As String = ""
|
||||
Dim AgenciaAduanalMEX As String = ""
|
||||
Dim Temperatura As String = ""
|
||||
Dim Hora As String = ""
|
||||
Dim Chofer As String = ""
|
||||
Dim CamPlaca As String = ""
|
||||
Dim Camion As String = ""
|
||||
Dim Rem1Placa As String = ""
|
||||
Dim Remolque1 As String = ""
|
||||
Dim NoPallets As String = ""
|
||||
Dim NoBultos As String = ""
|
||||
Dim NoKgManifiesto As String = ""
|
||||
Dim Mercado As String = ""
|
||||
Dim NoFactura As String = ""
|
||||
Dim DivisoresdeCarton As String = ""
|
||||
Dim BolsasdePlastico As String = ""
|
||||
Dim TapaderasdeCarton As String = ""
|
||||
Dim CAJASDECARTON As String = ""
|
||||
Dim RPC As String = ""
|
||||
Dim BINSDECARTON As String = ""
|
||||
Dim TotalDlls As String = ""
|
||||
|
||||
|
||||
|
||||
Dim LongitudCaja As String = ""
|
||||
Dim LineaTransportacion As String = ""
|
||||
Dim SCAC As String = ""
|
||||
Dim CAAT As String = ""
|
||||
Dim NumeroTrailer As String = ""
|
||||
|
||||
|
||||
Dim tablaReporte As New DataTable
|
||||
|
||||
'Envase = "1 1/9"
|
||||
'Tamano = "Small"
|
||||
'Cultivo = "Tomate"
|
||||
'noPallet = "000001"
|
||||
'Variedad = "Golden"
|
||||
Using objnom As New ClsNominas
|
||||
If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
Dim row As DataRow = objnom.DtResultados.Rows(0)
|
||||
NoEmbarque = row("NoEmbarque").ToString()
|
||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
||||
RPC = String.Format("{0:N0}", row("RPC"))
|
||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||
|
||||
|
||||
|
||||
SubProyecto = row("SubProyecto").ToString()
|
||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||
Temperatura = row("Temperatura").ToString()
|
||||
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||
Chofer = row("Chofer").ToString()
|
||||
CamPlaca = row("CamPlaca").ToString()
|
||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||
Rem1Placa = row("Rem1Placa").ToString()
|
||||
NoFactura = row("NoFactura").ToString()
|
||||
Remolque1 = String.Format("{0} ", row("NumeroTrailer"), row("Rem1Anio"))
|
||||
Mercado = If(row("CveDestino").ToString() = "2", "Extranjero", "Nacional")
|
||||
|
||||
NumeroTrailer = String.Format("No. {0}", row("NumeroTrailer").ToString())
|
||||
|
||||
LongitudCaja = row("LongitudCaja").ToString()
|
||||
LineaTransportacion = row("LineaTransportacion").ToString()
|
||||
SCAC = row("SCAC").ToString()
|
||||
CAAT = row("CAAT").ToString()
|
||||
|
||||
'If row("CveCamionRemolque1").ToString() = "1" Then
|
||||
' Rem1Placa = "12-TF-5E"
|
||||
' Remolque1 = "Remolque 1"
|
||||
'Else
|
||||
' Rem1Placa = "15-TF-7f"
|
||||
' Remolque1 = "Remolque 2"
|
||||
|
||||
'End If
|
||||
|
||||
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||
tablaReporte = objnom.DtResultados
|
||||
End If
|
||||
End If
|
||||
'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f
|
||||
End Using
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NoEmbarque", NoEmbarque))
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA))
|
||||
params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX))
|
||||
params.Add(New ReportParameter("Temperatura", Temperatura))
|
||||
params.Add(New ReportParameter("Hora", Hora))
|
||||
params.Add(New ReportParameter("Chofer", Chofer))
|
||||
params.Add(New ReportParameter("CamPlaca", CamPlaca))
|
||||
params.Add(New ReportParameter("Camion", Camion))
|
||||
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
|
||||
params.Add(New ReportParameter("Remolque1", Remolque1))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
|
||||
params.Add(New ReportParameter("LineaTransportacion", LineaTransportacion))
|
||||
params.Add(New ReportParameter("SCAC", SCAC))
|
||||
params.Add(New ReportParameter("CAAT", CAAT))
|
||||
params.Add(New ReportParameter("NumeroTrailer", NumeroTrailer))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("NoFactura", NoFactura))
|
||||
params.Add(New ReportParameter("Mercado", Mercado))
|
||||
params.Add(New ReportParameter("NoBultos", NoBultos))
|
||||
params.Add(New ReportParameter("NoPallets", NoPallets))
|
||||
params.Add(New ReportParameter("NoKgManifiesto", NoKgManifiesto))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("DivisoresdeCarton", DivisoresdeCarton))
|
||||
params.Add(New ReportParameter("BolsasdePlastico", BolsasdePlastico))
|
||||
params.Add(New ReportParameter("TapaderasdeCarton", TapaderasdeCarton))
|
||||
params.Add(New ReportParameter("CAJASDECARTON", CAJASDECARTON))
|
||||
params.Add(New ReportParameter("RPC", RPC))
|
||||
params.Add(New ReportParameter("BINSDECARTON", BINSDECARTON))
|
||||
params.Add(New ReportParameter("TotalDlls", TotalDlls))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||
lrds.Add(rds)
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Manifesto")
|
||||
End Sub
|
||||
Private Sub imprimirpallet2(cvePallet As Integer)
|
||||
Dim Envase As String = ""
|
||||
Dim Tamano As String = ""
|
||||
|
||||
@@ -48,9 +48,7 @@
|
||||
<div class="row text-size-12">
|
||||
<div class="col-md-1"><span>Proveedor: </span></div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%; selected2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Clasificación:</span></div>
|
||||
<div class="col-md-1">
|
||||
@@ -126,6 +124,16 @@
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1"><span>Tipo Docto:</span></div>
|
||||
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Fac" Text="Factura"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="NC" Text="Nota Crédito"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="ExC" Text="Egresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="DEV" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,8 +44,28 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
||||
TipoCambio = 1;
|
||||
TCEspecifico = -1;
|
||||
|
||||
DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
DdlProveedor.DataBind();
|
||||
|
||||
|
||||
|
||||
//DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
//DdlProveedor.DataBind();
|
||||
|
||||
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(105) == "1") {
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
}
|
||||
else {
|
||||
DdlProveedor.setEsWebService(false);
|
||||
DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
DdlProveedor.ddl.DataBind();
|
||||
DdlProveedor.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}").FiltraParametros("ProveedoresResponsables > 0");
|
||||
DdlUsuarioResponsable.DataBind();
|
||||
@@ -72,10 +92,16 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
||||
{
|
||||
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
|
||||
string TipoDocto = (DdlTipoDocto.GetSelectedValuesM() == "") ? "-1" : DdlTipoDocto.GetSelectedValuesM();
|
||||
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
if (ObjMov.GetCxPPeriodo(DdlProveedor.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),DdlProveedoresClasificaciones.SelectedValue.ToEntero(),
|
||||
if (ObjMov.GetCxPPeriodo(CveProveedor, DdlSubProyecto.SelectedValue.ToEntero(),DdlProveedoresClasificaciones.SelectedValue.ToEntero(),
|
||||
DdlUsuarioResponsable.SelectedValue.ToEntero(),DdlUsuarioRegistro.SelectedValue.ToEntero(),DdlEstatusCompra.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa,
|
||||
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,DdlTipoProveedor.SelectedValue.ToEntero()))
|
||||
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,
|
||||
DdlTipoProveedor.SelectedValue.ToEntero(), TipoDocto: TipoDocto))
|
||||
{
|
||||
GvDatos.DataSource = ObjMov.DtResultados;
|
||||
DtDatos = ObjMov.DtResultados;
|
||||
@@ -234,7 +260,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
||||
if (DdlGrupo.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Grupo</b>: {0}", DdlGrupo.SelectedItem.Text);
|
||||
if (DdlProveedor.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Proveedor</b>: {0}", DdlProveedor.SelectedItem.Text);
|
||||
StrFiltro.AppendFormat(" <b>Proveedor</b>: {0}", DdlProveedor.ddl.SelectedItem.Text);
|
||||
if (DdlProveedoresClasificaciones.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Clasificación Proveedor</b>: {0}", DdlProveedoresClasificaciones.SelectedItem.Text);
|
||||
if (DdlTipoProveedor.SelectedValue != "-1")
|
||||
|
||||
@@ -1581,7 +1581,10 @@ Partial Class Compras_eFacturas
|
||||
swTiempo.AppendFormat("espera: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
swmili = sw.ElapsedMilliseconds
|
||||
sw.Start()
|
||||
VerificaCorreo(True)
|
||||
|
||||
If VerificaCorreo(True) Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
sw.Stop()
|
||||
swTiempo.AppendFormat("Verifica En la app: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
@@ -1695,6 +1698,9 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||
|
||||
|
||||
asdasd
|
||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||
End Sub
|
||||
|
||||
@@ -2847,6 +2853,37 @@ Partial Class Compras_eFacturas
|
||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
|
||||
Dim Prefijo As String = ""
|
||||
|
||||
|
||||
|
||||
|
||||
Dim DTDocumentosRelacionados As New DataTable
|
||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
|
||||
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
|
||||
@@ -2913,30 +2950,7 @@ Partial Class Compras_eFacturas
|
||||
UUIDPago = ValorXML(nodeTFD, "UUID")
|
||||
LblUUID.Text = UUIDPago
|
||||
|
||||
Dim DTDocumentosRelacionados As New DataTable
|
||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
|
||||
Dim nodePagosN As XmlNodeList
|
||||
@@ -3140,7 +3154,9 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
'saco la información de lo vinculado en el ie
|
||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
'ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||
ImporteIES = DTDocumentosRelacionados.FiltraParametros("CveIE > 0").SUM("ImportePago")
|
||||
|
||||
|
||||
DiferenciaImportes = Monto - ImporteIES
|
||||
ObjCompras.Dispose()
|
||||
|
||||
@@ -1164,38 +1164,38 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
'MENSAJE IE
|
||||
'MENSAJE IE
|
||||
|
||||
'If CveIE Then
|
||||
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||
'Else
|
||||
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||
'End If
|
||||
'If CveIE Then
|
||||
' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||
'Else
|
||||
' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
|
||||
'End If
|
||||
|
||||
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
|
||||
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}</b>", $"Se registro con exito <b>{If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} </b><br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
|
||||
|
||||
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
ObjIE.Commit()
|
||||
If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
UPPDocumento.Update()
|
||||
UPPDocumento.Update()
|
||||
|
||||
TxtConcepto.Text = ""
|
||||
'GvMov.DataBind()
|
||||
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
|
||||
TxtConcepto.Text = ""
|
||||
'GvMov.DataBind()
|
||||
DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
TxtFechaDocumento.Text = ""
|
||||
TxtFechaDocumento.Text = ""
|
||||
|
||||
Else
|
||||
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
|
||||
ObjIE.RollBack()
|
||||
If Conta IsNot Nothing Then Conta.RollBack()
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
If Conta IsNot Nothing Then Conta.Dispose()
|
||||
Else
|
||||
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
|
||||
ObjIE.RollBack()
|
||||
If Conta IsNot Nothing Then Conta.RollBack()
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
If Conta IsNot Nothing Then Conta.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ActualizarPrePoliza()
|
||||
@@ -1297,6 +1297,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||
Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero
|
||||
|
||||
'CargaConceptosContablesE()
|
||||
'CargaModalConceptoCuentas()
|
||||
@@ -1338,6 +1339,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
DdlVentasE.SelectedValueExist(CveVenta)
|
||||
|
||||
If CveClasificacion > 0 Then
|
||||
DdlClasificacionesE.SelectedValue = CveClasificacion
|
||||
End If
|
||||
TxtConceptoE.Text = Concepto
|
||||
TxtReferenciaE.Text = Referencia
|
||||
|
||||
|
||||
@@ -3,16 +3,28 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Balanza de Comprobación
|
||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||
|
||||
@@ -228,10 +228,15 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
GenerarPDFCrystal("EXCEL")
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", UsuarioActual.Empresa.Ruta))
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
'If UsuarioActual.CveUsuario = 100 Then
|
||||
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||
' End If
|
||||
' Exit Sub
|
||||
|
||||
If Not IsNothing(DtDatos) Then
|
||||
'Dim dr As DataRow = DtCxC.Rows(0)
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
@@ -245,7 +250,9 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
||||
lista.Add(New CrystalParametro("pImg", ""))
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DtDatos, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
Dim DTTemp As DataTable = DtDatos.Copy
|
||||
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DTTemp, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||
|
||||
Else
|
||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Binary file not shown.
@@ -117,7 +117,8 @@
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Egs" Text="Egresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
|
||||
@@ -39,13 +39,18 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
TipoCambio = 1;
|
||||
TCEspecifico = -1;
|
||||
|
||||
//CargaClientes
|
||||
if (UsuarioActual.CveEmpresa == 119) {
|
||||
if (UsuarioActual.Empresa.Funcionalidad(105) == "1")
|
||||
{
|
||||
DdlClientesWS.setEsWebService(true);
|
||||
}
|
||||
else
|
||||
@@ -93,8 +98,11 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
||||
|
||||
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||
|
||||
|
||||
int CveCliente = DdlClientesWS.SelectedValue.ToEntero() > 0 ? DdlClientesWS.SelectedValue.ToEntero() : -1;
|
||||
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
if (ObjMov.GetCxCPeriodo(DdlClientesWS.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),DdlVendedor.SelectedValue.ToEntero(),DdlUsuario.SelectedValue.ToEntero(),
|
||||
if (ObjMov.GetCxCPeriodo(CveCliente, DdlSubProyecto.SelectedValue.ToEntero(),DdlVendedor.SelectedValue.ToEntero(),DdlUsuario.SelectedValue.ToEntero(),
|
||||
-1,"-1",UsuarioActual.CveEmpresa,DdlGrupo.SelectedValue.ToEntero(),DdlResponsable.SelectedValue.ToEntero(),TipoCambio,TCEspecifico, TipoDocto,txtCorteA.Text.ToDate(),
|
||||
DdlEstatusCliente.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, DdlCobranzaEstatus.SelectedValue.ToEntero(), DdlClienteClasificacion.SelectedValue.ToEntero())){
|
||||
GvDatos.DataSource = ObjMov.DtResultados;
|
||||
@@ -107,13 +115,34 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
||||
|
||||
private void CargaClientes()
|
||||
{
|
||||
if (UsuarioActual.CveEmpresa != 119)
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(105) == "1")
|
||||
{
|
||||
DdlClientesWS.setEsWebService(true);
|
||||
|
||||
if( DdlClienteClasificacion.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlClientesWS.ddlWS.Attributes.Add("data-cveclienteclasificacion", DdlClienteClasificacion.SelectedValue);
|
||||
DdlClientesWS.txtValue.Value = "";
|
||||
DdlClientesWS.txtText.Value = "";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlClientesWS.ddlWS.Attributes.Add("data-cveclienteclasificacion", "-1");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlClientesWS.ddl.Items.Clear();
|
||||
DdlClientesWS.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero()} OR {DdlClienteClasificacion.SelectedValue.ToEntero()} = -1");
|
||||
DdlClientesWS.DataBind();
|
||||
DdlClientesWS.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
UPFiltros.Update();
|
||||
|
||||
}
|
||||
|
||||
protected void DdlClienteClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -768,15 +768,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>83140</Value>
|
||||
<Value>=Parameters!CP.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -3193,7 +3185,19 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Regímen: Regímen General de Ley Personas Morales 601; Método de Pago: </Value>
|
||||
<Value>Regímen: Regímen General de Ley Personas Morales 601</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Método de Pago: </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -3206,15 +3210,20 @@
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>; Num. Cta Pago:</Value>
|
||||
<Value>Forma de pago: </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value)</Value>
|
||||
<Value>=Parameters!FormaPago.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
@@ -3227,7 +3236,7 @@
|
||||
<rd:DefaultName>Textbox62</rd:DefaultName>
|
||||
<Top>0.83682in</Top>
|
||||
<Left>1.59827in</Left>
|
||||
<Height>0.29498in</Height>
|
||||
<Height>0.40038in</Height>
|
||||
<Width>6.31865in</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<Style>
|
||||
@@ -3257,9 +3266,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox63</rd:DefaultName>
|
||||
<Top>1.1747in</Top>
|
||||
<Top>1.2372in</Top>
|
||||
<Left>2.35328in</Left>
|
||||
<Height>0.25in</Height>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>3.69856in</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Style>
|
||||
@@ -3379,7 +3388,6 @@
|
||||
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
@@ -4074,13 +4082,13 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>0.74104in</Width>
|
||||
<Width>0.73688in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.57756in</Width>
|
||||
<Width>0.5734in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.67516in</Width>
|
||||
<Width>0.671in</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -4329,9 +4337,9 @@
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet3</DataSetName>
|
||||
<Top>0.26817in</Top>
|
||||
<Left>5.86887in</Left>
|
||||
<Left>5.88134in</Left>
|
||||
<Height>0.34081in</Height>
|
||||
<Width>1.99376in</Width>
|
||||
<Width>1.98129in</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -4362,6 +4370,14 @@
|
||||
<Value>Moneda </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!MonedaAbreviatura.Value</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Moneda.Value</Value>
|
||||
<Style />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
3091
GPS/EmbarqueManifiestoRemision.rdlc
Normal file
3091
GPS/EmbarqueManifiestoRemision.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -169,17 +169,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-3"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2"></asp:Label>
|
||||
<div class="col-md-9" style="padding-left: 5px;">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Fecha:</label>
|
||||
<label class="col-md-2">Fecha:</label>
|
||||
<div class="col-md-3" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
@@ -202,7 +200,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" id="divEmitir" runat="server">
|
||||
<label class="col-md-3">Emitir:</label>
|
||||
<label class="col-md-2">Emitir:</label>
|
||||
<div class="col-md-9">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -216,32 +214,32 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Chofer:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="col-md-2">Chofer:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1" style="text-align:left!important">
|
||||
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row rowpadding">
|
||||
<label class="col-md-3">Unidad:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="col-md-2">Unidad:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="col-md-1" style="text-align:left!important">
|
||||
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||
<label class="col-md-3">Configuración:</label>
|
||||
<div class="col-md-9">
|
||||
<label class="col-md-2">Configuración:</label>
|
||||
<div class="col-md-6">
|
||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="CveConfigAutoTransporte" Style="padding: 0px">
|
||||
</asp:DropDownList>
|
||||
@@ -251,16 +249,16 @@
|
||||
</div>
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||
<label class="col-md-3">Remolque 1:</label>
|
||||
<div class="col-md-9">
|
||||
<label class="col-md-6">Remolque 1:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||
<label class="col-md-3">Remolque 2:</label>
|
||||
<div class="col-md-9">
|
||||
<label class="col-md-2">Remolque 2:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1777,7 +1777,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
|
||||
TipoMovtoOtro = Not TipoMovtoAlmacen
|
||||
|
||||
Dim CveConceptoContable As Integer = 78
|
||||
Dim CveConceptoContable As Integer = 260
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Select Case DdlConcepto.SelectedValue.ToEntero
|
||||
Case 28, 31
|
||||
|
||||
@@ -533,11 +533,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1)
|
||||
Dim StrAlmacenes As String = ""
|
||||
|
||||
If UsuarioActual.CveSubProyecto = 8804 Then 'AGS
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,12,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
Else
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
End If
|
||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14,19")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||
|
||||
If CveTipoCompra = 10 Then
|
||||
StrAlmacenes = $"Modalidad = 0"
|
||||
@@ -3693,7 +3689,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDouble, -1, -1) Then
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDecimal, -1, -1) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenProrrateo" OnClick="LnkOpenProrrateo_Click" runat="server"><i class="fa fa-percent"></i> Prorrateo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkLayoutContable" Visible="false" OnClick="LnkLayoutContable_Click" runat="server"><i class="fa fa-university" aria-hidden="true"></i>Layout banco</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
@@ -286,8 +286,7 @@
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
||||
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||
|
||||
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -4213,6 +4212,67 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalLayoutBancos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpModalBancosLayout" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Layout banco</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
||||
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
||||
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione Uno</asp:ListItem>
|
||||
<asp:ListItem Value="1">Bancomer</asp:ListItem>
|
||||
<asp:ListItem Value="2">Banorte</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlModalBancosLayout">Banco:</asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalBancosLayout" runat="server" CssClass="help-block errorimput" Display="none" InitialValue="-1" ControlToValidate="DdlModalBancosLayout"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalBancoLayout">
|
||||
</asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERfvDdlModalBancosLayout" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalBancosLayout" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%-- <asp:UpdatePanel ID="UpModalBancosLayoutBotones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>--%>
|
||||
<button id="BtnModalBancosLayoutCerrar" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Generar" ID="BtnModalBancosProcesar" OnClick="BtnModalBancosProcesar_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalBancoLayout" runat="server" />
|
||||
<%-- </ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnModalBancosProcesar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||
|
||||
@@ -7662,108 +7662,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
loadtablas();
|
||||
}
|
||||
private void CrearLayout(DataTable DTNomina)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||
|
||||
|
||||
|
||||
if (RFC.Trim().Length == 0)
|
||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||
|
||||
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||
if (!Coincidencia.Success)
|
||||
{
|
||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
if (BancoNumCuenta.Trim().Length != 10)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
|
||||
if (Importe <= 0)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
ErroresValidaciones = false;
|
||||
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
int Count = 1;
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
StringBuilder SbLinea = new StringBuilder();
|
||||
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"));
|
||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||
SbLinea.Append("03");
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||
|
||||
|
||||
if (Nombre.Trim().Length > 40)
|
||||
Nombre = Nombre.Substring(0, 40);
|
||||
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||
|
||||
SbLinea.Append("012");
|
||||
SbLinea.Append("000");
|
||||
|
||||
sb.AppendLine(SbLinea.ToString());
|
||||
|
||||
|
||||
Count = Count + 1;
|
||||
}
|
||||
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.AppendHeader("Content-Length", sb.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayout(objnom.DtResultados);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -8204,4 +8105,259 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
this.Alert("El Vacaciones_Empresas Se ha Eliminado");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Layouts
|
||||
|
||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||
{
|
||||
RBLModalBancosLayout.SelectedValue = "1";
|
||||
DdlModalBancosLayout.SelectedValueExist("-1");
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||
UpModalBancosLayout.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void RBLModalBancosLayout_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayoutNominaBancomer(objnom.DtResultados);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
if(DdlModalBancosLayout.SelectedValue.ToEntero() == 1 )
|
||||
{
|
||||
|
||||
}
|
||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
//Banorte
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CrearLayoutNominaBancomer(DataTable DTNomina)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||
|
||||
|
||||
|
||||
if (RFC.Trim().Length == 0)
|
||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||
|
||||
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||
if (!Coincidencia.Success)
|
||||
{
|
||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
if (BancoNumCuenta.Trim().Length != 10)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
|
||||
if (Importe <= 0)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
ErroresValidaciones = false;
|
||||
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
int Count = 1;
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
StringBuilder SbLinea = new StringBuilder();
|
||||
|
||||
string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"));
|
||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||
SbLinea.Append("03");
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||
|
||||
|
||||
if (Nombre.Trim().Length > 40)
|
||||
Nombre = Nombre.Substring(0, 40);
|
||||
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||
|
||||
SbLinea.Append("012");
|
||||
SbLinea.Append("000");
|
||||
|
||||
sb.AppendLine(SbLinea.ToString());
|
||||
|
||||
|
||||
Count = Count + 1;
|
||||
}
|
||||
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.AppendHeader("Content-Length", sb.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||
Response.Flush();
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CrearLayoutAltaBanorte(DataTable DTNomina, string Promotor, string NIE, string RazonSocial)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErrorProceso = false;
|
||||
|
||||
|
||||
|
||||
Promotor = Promotor.Trim();
|
||||
NIE = NIE.Trim();
|
||||
RazonSocial = RazonSocial.Trim();
|
||||
|
||||
//SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
|
||||
|
||||
if (DTNomina.Rows.Count > 0)
|
||||
{
|
||||
|
||||
//Tip oRegistro 1 1-1
|
||||
//Clave servicio 2 2-3
|
||||
sb.Append($"HNE");
|
||||
|
||||
|
||||
//Promotor 8 4-11
|
||||
if (Promotor.Length > 0 && Promotor.Length <= 8)
|
||||
{
|
||||
sb.Append(Promotor.PadLeft(8, '0'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"Promotor {Promotor} debe de tener una logitud de entre 1 y 8<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
//NIE 5 12-26
|
||||
if (ErrorProceso == false && NIE.Length > 0 && NIE.Length <= 5)
|
||||
{
|
||||
sb.Append(NIE.PadLeft(5, ' '));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"NIE {NIE} debe de tener una NIE de entre 1 y 8<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
|
||||
//Nombre de Empresa ó Razón Social 40 17-56
|
||||
if (ErrorProceso == false && RazonSocial.Length > 0 && RazonSocial.Length <= 40)
|
||||
{
|
||||
sb.Append(RazonSocial.PadLeft(40, ' '));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
//57-58consecutivo 1
|
||||
sb.Append("1");
|
||||
|
||||
|
||||
//Número de registros N 6 59-64
|
||||
sb.Append(DTNomina.Rows.ToString().PadRight(6, ' '));
|
||||
|
||||
//Filler A 283 65-347
|
||||
sb.Append(DTNomina.Rows.ToString().PadLeft(283, ' '));
|
||||
|
||||
|
||||
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
|
||||
|
||||
string CodigoEmpleado = dRow["CodigoEmpleado"].ToString().Trim();
|
||||
|
||||
//Tipo de registro A 1 1-1
|
||||
sb.AppendLine("D");
|
||||
|
||||
|
||||
//CodigoEmpleado A 10 2-11
|
||||
if (ErrorProceso == false && CodigoEmpleado.Length > 0 && CodigoEmpleado.Trim().Length <= 10)
|
||||
{
|
||||
sb.Append(CodigoEmpleado.PadLeft(10, '0'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una NIE de entre 1 y 40<br/>");
|
||||
ErrorProceso = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
456
OC/OC.aspx.vb
456
OC/OC.aspx.vb
File diff suppressed because it is too large
Load Diff
@@ -294,158 +294,158 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
<script>
|
||||
function Ir() {
|
||||
try {
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.tb_remove();
|
||||
|
||||
|
||||
} catch (ex) {
|
||||
console.log(ex.message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ClientValidateFechaEntrega(source, arguments) {
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
if (txtCantidadSurtir.value == 0) {
|
||||
arguments.IsValid = false;
|
||||
} else {
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
{ arguments.IsValid = true; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ClientValidatePU(source, arguments) {
|
||||
|
||||
|
||||
arguments.IsValid = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CalculaImporte(Cant, tPU, Imp) {
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
Imp.value = ToDouble(Importe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function validacionRow(objControl, tipo) {
|
||||
|
||||
var eRow;
|
||||
|
||||
|
||||
var eRow;
|
||||
|
||||
if (tipo == 1) {
|
||||
eRow = $(objControl).parent().parent();
|
||||
} else if (tipo == 2) {
|
||||
eRow = $(objControl).parent().parent().parent();
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||
var activarValidadores = false;
|
||||
var ControlConValor = "";
|
||||
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||
var activarValidadores = false;
|
||||
var ControlConValor = "";
|
||||
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
for (var i = 0; i < controleslen; i++) {
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
if ($(controlName).val().length > 0) {
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
break;
|
||||
|
||||
|
||||
} else {
|
||||
$(controlName).IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (activarValidadores) {
|
||||
|
||||
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
try {
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
ValidatorEnable($get(ValidatorName), true);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('validadores activados');
|
||||
} else {
|
||||
console.log('Error al activar validadores');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
try {
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
ValidatorEnable($get(ValidatorName), false);
|
||||
} catch (err) {
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('Validadores desactivados');
|
||||
} else {
|
||||
console.log('Error al desactivar validadores');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function FechaActualddMMyyy() {
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
if (dd < 10) {
|
||||
dd = '0' + dd;
|
||||
}
|
||||
}
|
||||
if (mm < 10) {
|
||||
mm = '0' + mm;
|
||||
}
|
||||
}
|
||||
return today = dd + '/' + mm + '/' + yyyy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -208,8 +208,8 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal,
|
||||
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
||||
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
If TieneError = True Then Exit For
|
||||
@@ -230,12 +230,12 @@ Partial Class PopOCCotizacionesDetalle
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
Else
|
||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||
|
||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1215,7 +1215,9 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor')
|
||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor'),
|
||||
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion')
|
||||
|
||||
|
||||
//Metodo: metodo
|
||||
};
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Observaciones</label>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="3" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:HiddenField ID="HdnObs" runat="server" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-2 input-icon">
|
||||
@@ -450,9 +450,15 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--24--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Total Gastos">
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiqCol8" Width="55px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLiqCol8" Width="55px" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--24--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--25--%>
|
||||
@@ -948,13 +954,14 @@
|
||||
});
|
||||
|
||||
Total = Total + Anticipos;
|
||||
|
||||
|
||||
$(ClsSelLiqVentaTotal).each(function () {
|
||||
$(this).val(Total);
|
||||
FormatoMoneda2($(this));
|
||||
});
|
||||
|
||||
FormatoMoneda(txt);
|
||||
|
||||
//FormatoMoneda(txt);
|
||||
|
||||
var Suma = SumaValores(pagoMultiple, monedaPago);
|
||||
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||
|
||||
@@ -31,7 +31,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Property
|
||||
Private Property CveMonedaFiltro As Integer
|
||||
Get
|
||||
Return ViewState("CveMonedaFiltro").ToString.ToEntero
|
||||
Return IfNull(ViewState("CveMonedaFiltro"), "0").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMonedaFiltro") = value
|
||||
@@ -391,7 +391,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(21).HeaderText = "Aduana<br/>Mex" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol5).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(22).HeaderText = "Diversos" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol6).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(23).HeaderText = "Aduana<br/>USA" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
'GvCxC.Columns(24).HeaderText = "Material<br/>Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(24).HeaderText = "Material<br/>Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(25).HeaderText = "Total<br/>Gastos"
|
||||
|
||||
DvLiquidacion1.Visible = True
|
||||
DvLiquidacion2.Visible = True
|
||||
@@ -549,6 +550,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol6").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqCol7").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqCol8").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqColT").Visible = False
|
||||
e.Row.FCTextBox("TxtAmort").Visible = False
|
||||
e.Row.FCDropDownList("DdlAnti").Visible = False
|
||||
|
||||
@@ -634,7 +636,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqColT").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("class", $"ClsSelLiqAnt")
|
||||
|
||||
e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("onkeyup", $"SumaLiq (this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
@@ -644,6 +647,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
|
||||
e.Row.FCDropDownList("DdlAnti").DataSource = DtIngresos
|
||||
@@ -930,9 +934,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim EsAnticipoEspecial As Boolean = False
|
||||
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
|
||||
Dim FluctuacionAnticipo As Decimal = 0
|
||||
|
||||
If dtConceptos IsNot Nothing Then
|
||||
|
||||
FluctuacionAnticipo = 0 ' se limpia la fluctuación por cada factura.
|
||||
For Each Row As DataRow In dtConceptos.Rows
|
||||
|
||||
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||
@@ -953,7 +958,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If gvr.DataKey("CveMoneda").ToEntero > 1 Then ConceptoContable = 292
|
||||
|
||||
ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal).RoundSQL
|
||||
ImporteMN = (ImporteMovimiento * tipoCambioVentaValuacion).RoundSQL
|
||||
ImporteMN = ImporteMovimiento '(ImporteMovimiento * tipoCambioVentaValuacion).RoundSQL
|
||||
TipoCambioGeneral = tipoCambioVentaValuacion
|
||||
CveSubProyectoContabilizar = CveSubProyecto
|
||||
|
||||
@@ -983,6 +988,94 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola
|
||||
|
||||
Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal
|
||||
Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal
|
||||
Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal
|
||||
Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal
|
||||
Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal
|
||||
Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal
|
||||
Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal
|
||||
Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal
|
||||
|
||||
Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta
|
||||
Dim CveClasificacionCol2 As Integer = 21916 ' manejo
|
||||
Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección
|
||||
Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación
|
||||
Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex
|
||||
Dim CveClasificacionCol6 As Integer = 21920 ' diveros
|
||||
Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa
|
||||
Dim CveClasificacionCol8 As Integer = 21211 'material Empaque
|
||||
|
||||
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveConceptoLiquidacion As Integer = 51
|
||||
Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text
|
||||
|
||||
If ImporteLiq1 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq2 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq3 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq4 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq5 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq6 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq7 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq8 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then
|
||||
Dim TCP As Decimal = 0
|
||||
If DtIngresos IsNot Nothing Then
|
||||
TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue))
|
||||
End If
|
||||
'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo
|
||||
FluctuacionAnticipo = ((TCP - tipoCambioVenta) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVenta)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Case 8 'Ret IVA x Trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then
|
||||
@@ -1193,6 +1286,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
|
||||
End If
|
||||
|
||||
'If FluctuacionAnticipo <> 0 Then
|
||||
' tImportePago += FluctuacionAnticipo
|
||||
'End If
|
||||
|
||||
If tImporteVenta <> tImportePago Then
|
||||
If tImporteVenta < tImportePago Then
|
||||
ConceptoContable = 64
|
||||
@@ -1206,6 +1303,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
End If
|
||||
Diferencia = tImporteVenta - tImportePago
|
||||
|
||||
End If
|
||||
|
||||
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
|
||||
@@ -1292,89 +1390,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola
|
||||
|
||||
Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal
|
||||
Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal
|
||||
Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal
|
||||
Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal
|
||||
Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal
|
||||
Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal
|
||||
Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal
|
||||
Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal
|
||||
|
||||
Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta
|
||||
Dim CveClasificacionCol2 As Integer = 21916 ' manejo
|
||||
Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección
|
||||
Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación
|
||||
Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex
|
||||
Dim CveClasificacionCol6 As Integer = 21920 ' diveros
|
||||
Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa
|
||||
Dim CveClasificacionCol8 As Integer = 21211 'material Empaque
|
||||
|
||||
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveConceptoLiquidacion As Integer = 51
|
||||
Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text
|
||||
|
||||
If ImporteLiq1 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq2 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq3 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq4 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq5 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq6 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq7 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
'If ImporteLiq8 <> 0 Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' Exit For
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then
|
||||
Dim TCP As Decimal = 0
|
||||
If DtIngresos IsNot Nothing Then
|
||||
TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue))
|
||||
End If
|
||||
MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVenta)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||
ListaFacturasGenerarNC.Add(ObjFactura)
|
||||
@@ -1424,7 +1440,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
If CveMoneda > 1 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAnticipo.Text.ToDecimal, TxtFolio.Text, 226, TxtObservaciones.Text, Now, -1, -1, CveIE, -1, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(TxtAnticipo.Text.ToDecimal * tipoCambioPago).RoundSQL, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=0, ImporteME:=If(CveMoneda > 1, TxtAnticipo.Text.ToDecimal, 0)) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAnticipo.Text.ToDecimal, TxtFolio.Text, 226, TxtObservaciones.Text, Now, -1, -1, CveIE, -1, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=((TxtAnticipo.Text.ToDecimal * tipoCambioPago) - TxtAnticipo.Text.ToDecimal).RoundSQL, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=0, ImporteME:=If(CveMoneda > 1, TxtAnticipo.Text.ToDecimal, 0)) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1686,17 +1702,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
'Else
|
||||
' If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
' ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=If(CveMoneda = 2, Importe * tipoCambioPago, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
'End If
|
||||
Else
|
||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
@@ -2885,10 +2891,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(22).Visible = True
|
||||
GvCxC.Columns(23).Visible = True
|
||||
GvCxC.Columns(24).Visible = True
|
||||
GvCxC.Columns(25).Visible = True 'anticipos
|
||||
GvCxC.Columns(25).Visible = True
|
||||
GvCxC.Columns(26).Visible = True 'anticipos
|
||||
|
||||
GvCxC.Columns(26).Visible = False
|
||||
GvCxC.Columns(27).Visible = False
|
||||
GvCxC.Columns(28).Visible = False
|
||||
|
||||
|
||||
Else
|
||||
@@ -2907,9 +2914,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(23).Visible = False
|
||||
GvCxC.Columns(24).Visible = False
|
||||
GvCxC.Columns(25).Visible = False
|
||||
GvCxC.Columns(26).Visible = False
|
||||
|
||||
GvCxC.Columns(26).Visible = True
|
||||
GvCxC.Columns(27).Visible = True
|
||||
GvCxC.Columns(28).Visible = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -3853,7 +3853,7 @@
|
||||
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
|
||||
|
||||
<%--<asp:Button ID="Button2" runat="server" Text="Button" />--%>
|
||||
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" OnClick="BtnGenerarPoliza_Click" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||
|
||||
<asp:Button ID="BtnEditarCotizacion" runat="server" Text="Actualizar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||
|
||||
@@ -9144,6 +9144,10 @@ Partial Class Ventas
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
AutoConta = True
|
||||
End If
|
||||
|
||||
If AutoConta Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
@@ -9177,9 +9181,6 @@ Partial Class Ventas
|
||||
|
||||
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.CveEmpresa, UsuarioActual.CveUsuario, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
@@ -9188,7 +9189,6 @@ Partial Class Ventas
|
||||
End If
|
||||
GVAnticipos.DataBind()
|
||||
|
||||
|
||||
Try
|
||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||
If Not Directory.Exists(DirectoriArchivoXML) Then
|
||||
@@ -34434,5 +34434,38 @@ Partial Class Ventas
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
||||
CreaObjetosVenta()
|
||||
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim Msgok As New StringBuilder
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
||||
|
||||
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFactura)
|
||||
|
||||
If IDPoliza.IdPoliza > 0 Then
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.UpdateVentaPrePoliza(IDPoliza.IdPoliza, IDPoliza.FolioPoliza, CvePrePoliza, CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
'Si se facturó la cotización hay que vincular la venta
|
||||
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'Si se facturó la cotización hay que vincular la venta
|
||||
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||
|
||||
Else
|
||||
ErrorList.Add("Ocurrió un error al generar A.C. en la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
|
||||
Else
|
||||
Msgok.Append("Movimiento Registrado Correctamente.<br/><br/> ")
|
||||
End If
|
||||
ObjAC.dispose
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -472,6 +472,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user