Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2275,7 +2275,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetDiarioPagosCompras(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveCuenta As Integer, CveTipoTransaccion As Integer, CveEmpresa As Integer) As DataSet
|
Public Function GetDiarioPagosCompras(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveCuenta As Integer, CveTipoTransaccion As Integer, CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataSet
|
||||||
Dim Retorno As New DataSet
|
Dim Retorno As New DataSet
|
||||||
DataAdapter("PA_Conta_DiarioPagosComprasGet33")
|
DataAdapter("PA_Conta_DiarioPagosComprasGet33")
|
||||||
|
|
||||||
@@ -2287,6 +2287,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
|
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -317,26 +317,23 @@ Public Class ClsMovimientos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
|
Public Function GetCxCDetalle(FechaInicio As Date, FechaFin As Date, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
|
||||||
AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
|
AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
|
||||||
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
||||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
|
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
|
||||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
|
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
|
||||||
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1,
|
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1,
|
||||||
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
|
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DS = New DataSet
|
DS = New DataSet
|
||||||
'Data = New DataTable
|
|
||||||
'SqlAdapter = New SqlDataAdapter("PA_RepCxCDetalle", SqlConexion)
|
|
||||||
'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
|
||||||
|
|
||||||
DataAdapter("PA_RepCxCDetalle")
|
DataAdapter("PA_RepCxCDetalle")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
'.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
|
||||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
||||||
|
|||||||
@@ -9342,7 +9342,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/RepVentasUtilidad.aspx".ToUpper(), 590)
|
PaginaDict.Add("/Ventas/RepVentasUtilidad.aspx".ToUpper(), 590)
|
||||||
PaginaDict.Add("/Ventas/RepVentasUtilidadDetalle.aspx".ToUpper(), 590)
|
PaginaDict.Add("/Ventas/RepVentasUtilidadDetalle.aspx".ToUpper(), 590)
|
||||||
PaginaDict.Add("/Ventas/PV.aspx".ToUpper(), 163)
|
PaginaDict.Add("/Ventas/PV.aspx".ToUpper(), 163)
|
||||||
PaginaDict.Add("/Ventas/PVRene.aspx".ToUpper(), 163)
|
PaginaDict.Add("/Ventas/PVCobranza.aspx".ToUpper(), 319)
|
||||||
PaginaDict.Add("/Ventas/Corporativo.aspx".ToUpper(), 807)
|
PaginaDict.Add("/Ventas/Corporativo.aspx".ToUpper(), 807)
|
||||||
PaginaDict.Add("/Ventas/RepRecuperacion.aspx".ToUpper(), 88)
|
PaginaDict.Add("/Ventas/RepRecuperacion.aspx".ToUpper(), 88)
|
||||||
PaginaDict.Add("/Ventas/RepRecuperacionDetalle.aspx".ToUpper(), 88)
|
PaginaDict.Add("/Ventas/RepRecuperacionDetalle.aspx".ToUpper(), 88)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Imports System.Data
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports DocumentFormat.OpenXml.VariantTypes
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
@@ -7557,7 +7556,7 @@ Namespace Modelos
|
|||||||
Public Property ClaveUsoCFDI As String = ""
|
Public Property ClaveUsoCFDI As String = ""
|
||||||
Public Property CveTipoRelacion As Integer = -1
|
Public Property CveTipoRelacion As Integer = -1
|
||||||
Public Property CveEstatusFactura As Integer
|
Public Property CveEstatusFactura As Integer
|
||||||
Public Property CveVendedor As Integer
|
Public Property CveVendedor As Integer = 0
|
||||||
Public Property VendedorCodigo As String = ""
|
Public Property VendedorCodigo As String = ""
|
||||||
Public Property CveSucursalEjecucion As Integer
|
Public Property CveSucursalEjecucion As Integer
|
||||||
Public Property FechaEjecucion As Date
|
Public Property FechaEjecucion As Date
|
||||||
@@ -7572,7 +7571,7 @@ Namespace Modelos
|
|||||||
Public Property Entrega As String = ""
|
Public Property Entrega As String = ""
|
||||||
Public Property TiempoEntrega As String = ""
|
Public Property TiempoEntrega As String = ""
|
||||||
Public Property Vigencia As Date
|
Public Property Vigencia As Date
|
||||||
Public Property TipoEstatus As Integer
|
Public Property TipoEstatus As Integer = 0
|
||||||
Public Property CveCondicionEntrega As Integer = -1
|
Public Property CveCondicionEntrega As Integer = -1
|
||||||
Public Property CondicionEntrega As String = ""
|
Public Property CondicionEntrega As String = ""
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ Namespace Extensiones
|
|||||||
Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log")
|
Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log")
|
||||||
Dim ArchivoW As StreamWriter
|
Dim ArchivoW As StreamWriter
|
||||||
|
|
||||||
Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm"))
|
Dim MensajeFormato As String = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm"))
|
||||||
|
|
||||||
Try
|
Try
|
||||||
ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8)
|
ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8)
|
||||||
@@ -2893,7 +2893,7 @@ Namespace Extensiones
|
|||||||
|
|
||||||
'CUERPO (TABLAS DEL REPORTE)
|
'CUERPO (TABLAS DEL REPORTE)
|
||||||
'Se tiene que convertir la salida en elementos y posteriormente agregarlos al documento para que se respeten los márgenes
|
'Se tiene que convertir la salida en elementos y posteriormente agregarlos al documento para que se respeten los márgenes
|
||||||
Dim els = HtmlConverter.ConvertToElements(sw.ToString(), properties)
|
Dim els As IList(Of Element.IElement) = HtmlConverter.ConvertToElements(sw.ToString(), properties)
|
||||||
For Each el As Element.IBlockElement In els
|
For Each el As Element.IBlockElement In els
|
||||||
document.Add(el)
|
document.Add(el)
|
||||||
Next
|
Next
|
||||||
@@ -3867,19 +3867,19 @@ Namespace Extensiones
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub OnAuthorization(ByVal actionContext As HttpActionContext)
|
Public Overrides Sub OnAuthorization(ByVal actionContext As HttpActionContext)
|
||||||
Dim authHeader = actionContext.Request.Headers.Authorization
|
Dim authHeader As Headers.AuthenticationHeaderValue = actionContext.Request.Headers.Authorization
|
||||||
Dim noautorizado As Boolean = True
|
Dim noautorizado As Boolean = True
|
||||||
If authHeader IsNot Nothing Then
|
If authHeader IsNot Nothing Then
|
||||||
If Left(actionContext.Request.RequestUri.AbsolutePath, 11).ToUpper() = SigfoxPath.ToUpper() Then
|
If Left(actionContext.Request.RequestUri.AbsolutePath, 11).ToUpper() = SigfoxPath.ToUpper() Then
|
||||||
Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(authHeader.Parameter)).Split(":"c)
|
Dim usernamePasswordArray As String() = Encoding.UTF8.GetString(Convert.FromBase64String(authHeader.Parameter)).Split(":"c)
|
||||||
Dim userName = usernamePasswordArray(0)
|
Dim userName As String = usernamePasswordArray(0)
|
||||||
Dim password = usernamePasswordArray(1)
|
Dim password As String = usernamePasswordArray(1)
|
||||||
noautorizado = Not (userName = Me.Usuario AndAlso password = Me.Contra)
|
noautorizado = Not (userName = Me.Usuario AndAlso password = Me.Contra)
|
||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
|
|
||||||
If actionContext.Request.RequestUri.AbsolutePath.ToUpper() <> LoginPath.ToUpper() Then
|
If actionContext.Request.RequestUri.AbsolutePath.ToUpper() <> LoginPath.ToUpper() Then
|
||||||
Dim dataArray = Extensiones.Decripta(authHeader.Parameter).Split("|"c)
|
Dim dataArray As String() = Extensiones.Decripta(authHeader.Parameter).Split("|"c)
|
||||||
If dataArray.Length > 4 AndAlso IsNumeric(dataArray(0)) AndAlso IsNumeric(dataArray(1)) AndAlso IsNumeric(dataArray(4)) Then
|
If dataArray.Length > 4 AndAlso IsNumeric(dataArray(0)) AndAlso IsNumeric(dataArray(1)) AndAlso IsNumeric(dataArray(4)) Then
|
||||||
|
|
||||||
Dim CveUsuario As Integer = dataArray(0).ToEntero()
|
Dim CveUsuario As Integer = dataArray(0).ToEntero()
|
||||||
|
|||||||
@@ -444,8 +444,14 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
||||||
|
|
||||||
If Resp.CveVenta > 0 Then
|
If Resp.CveVenta > 0 Then
|
||||||
|
Dim data As New JArray
|
||||||
|
Dim objSucursal As New JObject(
|
||||||
|
New JProperty("Cve", Resp.CveVenta),
|
||||||
|
New JProperty("SerieFolio", Resp.SerieFolio)
|
||||||
|
)
|
||||||
|
data.Add(objSucursal)
|
||||||
Respuesta.status = "success"
|
Respuesta.status = "success"
|
||||||
Respuesta.data = Resp.SerieFolio
|
Respuesta.data = data
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -247,10 +247,8 @@
|
|||||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" Visible="false" Onselectedindexchange="DdlProveedores_selectedindexchange"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor" Visible="false" Onselectedindexchange="DdlProveedores_selectedindexchange"></ADS:Dropdownlost>
|
||||||
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm input-medium select2me" Visible="false" Width="100%" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged" AutoPostBack="true">
|
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm input-medium select2me" Visible="false" Width="100%" OnSelectedIndexChanged="DdlPersonal_SelectedIndexChanged" AutoPostBack="true">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
<asp:Label runat="server" ID="LblPagarA" Visible="false"></asp:Label>
|
<asp:Label runat="server" ID="LblPagarA" Visible="false"></asp:Label>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:CheckBox ID="ChkAbonoCuenta" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Abono en Cuenta"></asp:CheckBox>
|
<asp:CheckBox ID="ChkAbonoCuenta" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Abono en Cuenta"></asp:CheckBox>
|
||||||
|
|||||||
@@ -606,7 +606,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
CargaTipoTransaccion()
|
CargaTipoTransaccion()
|
||||||
CargaCuenta()
|
CargaCuenta()
|
||||||
CargaDDLPersonal()
|
|
||||||
|
|
||||||
DdlProveedores.setEsWebService(True)
|
DdlProveedores.setEsWebService(True)
|
||||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||||
@@ -628,11 +627,9 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
|
If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
|
||||||
CveProveedor = Request("CveProveedor").ToEntero
|
CveProveedor = Request("CveProveedor").ToEntero
|
||||||
|
|
||||||
CargaProveedor(CveProveedor, "-1")
|
CargaProveedor(CveProveedor, "-1")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinC" AndAlso Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
|
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "DevDinC" AndAlso Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
|
||||||
If Masivonotas Then
|
If Masivonotas Then
|
||||||
'CargaNotas()
|
'CargaNotas()
|
||||||
@@ -719,7 +716,6 @@ Partial Class Bancos_IE
|
|||||||
DdlProveedores.Enabled = False
|
DdlProveedores.Enabled = False
|
||||||
DdlPersonal.Visible = False
|
DdlPersonal.Visible = False
|
||||||
|
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
@@ -784,8 +780,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)")
|
DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)")
|
||||||
DdlMotivoCancelacion.DataBind()
|
DdlMotivoCancelacion.DataBind()
|
||||||
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
@@ -794,7 +788,6 @@ Partial Class Bancos_IE
|
|||||||
DvFolioACCondiciones.Visible = True
|
DvFolioACCondiciones.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||||
TRImporteDeduccionesPago.Visible = True
|
TRImporteDeduccionesPago.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -816,7 +809,6 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
||||||
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
||||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||||
@@ -1404,15 +1396,7 @@ Partial Class Bancos_IE
|
|||||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||||
DdlPersonal.DataBind()
|
DdlPersonal.DataBind()
|
||||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||||
'Dim ObjPersonal As New ClsRH
|
|
||||||
'If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DdlPersonal.DataSource = ObjPersonal.DtResultados
|
|
||||||
' DdlPersonal.DataBind()
|
|
||||||
' DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'ObjPersonal.Dispose()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
@@ -3601,7 +3585,7 @@ Partial Class Bancos_IE
|
|||||||
ChkAplicaViatico.Visible = False
|
ChkAplicaViatico.Visible = False
|
||||||
If RBL.SelectedValue = "FE" Then
|
If RBL.SelectedValue = "FE" Then
|
||||||
If UsuarioActual.CveRol = 1 Then ChkAplicaViatico.Visible = True
|
If UsuarioActual.CveRol = 1 Then ChkAplicaViatico.Visible = True
|
||||||
|
If DdlPersonal.Items.Count = 0 Then CargaDDLPersonal()
|
||||||
DdlPersonal.Visible = True
|
DdlPersonal.Visible = True
|
||||||
DdlProveedores.Visible = False
|
DdlProveedores.Visible = False
|
||||||
DdlCliente.Visible = False
|
DdlCliente.Visible = False
|
||||||
@@ -4301,24 +4285,16 @@ Partial Class Bancos_IE
|
|||||||
If Not ErrorCompra Then
|
If Not ErrorCompra Then
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||||
|
|
||||||
If Banc.ExisteConexion Then
|
If Banc.ExisteConexion Then
|
||||||
Banc.Commit()
|
Banc.Commit()
|
||||||
Alert($"El documento bancario quedó eliminado. {MsgEliminar}", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/RepIE.aspx""")
|
Alert($"El documento bancario quedó eliminado. {MsgEliminar}", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/RepIE.aspx""")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Alert($"El documento no ha sido eliminado. {If(UsuarioActual.CveRol = 1, MsgEliminar, "")}", TipoMensaje.MsgAdvertencia)
|
Alert($"El documento no ha sido eliminado. {If(UsuarioActual.CveRol = 1, MsgEliminar, "")}", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||||
|
|
||||||
If Banc.ExisteConexion Then
|
If Banc.ExisteConexion Then
|
||||||
Banc.RollBack()
|
Banc.RollBack()
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||||
|
|||||||
@@ -53,10 +53,10 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr id="TrCuentaDestino" runat="server">
|
||||||
<td>Cuenta Destino:</td>
|
<td>Cuenta Destino:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlCuentaDestino" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="400px" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlCuentaDestino" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="400px" ValidationGroup="GrpGuardar">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVCuentaDestino" runat="server" ControlToValidate="DdlCuentaDestino" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta Destino''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVCuentaDestino" runat="server" ControlToValidate="DdlCuentaDestino" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta Destino''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOCuentaDestino" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDestino" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOCuentaDestino" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDestino" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvTC" runat="server" Visible="false" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%-- <asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
|
<%-- <asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
<asp:TextBox ID="TxtResponsable" runat="server" Width="250px" Text='<%# Eval("NumCuenta")%>' CssClass="TextBoxAsLabel"></asp:TextBox>
|
<asp:TextBox ID="TxtResponsable" runat="server" Width="250px" Text='<%# Eval("NumCuenta")%>' CssClass="TextBoxAsLabel"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
<asp:BoundField DataField="Numero" HeaderText="Tarjeta de Credito" ItemStyle-HorizontalAlign="Right">
|
<asp:BoundField DataField="CLABE" HeaderText="Tarjeta de Credito" >
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:TemplateField HeaderText="Responsable" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Responsable" ItemStyle-HorizontalAlign="Left">
|
||||||
|
|||||||
@@ -60,12 +60,13 @@ Partial Class Bancos_Transferencias
|
|||||||
If Opcion = 1 Then
|
If Opcion = 1 Then
|
||||||
LtlTitulo.Text = "Domicializaci<EFBFBD>n de tarjeta"
|
LtlTitulo.Text = "Domicializaci<EFBFBD>n de tarjeta"
|
||||||
RBLOpcion.Visible = True
|
RBLOpcion.Visible = True
|
||||||
TrCuentaOrigen.Visible = False
|
TrCuentaDestino.Visible = False
|
||||||
chkMovimientoTarjeta.Checked = True
|
chkMovimientoTarjeta.Checked = True
|
||||||
chkMovimientoTarjeta.Enabled = False
|
chkMovimientoTarjeta.Enabled = False
|
||||||
|
CargaCuenta(-1, DdlCuentaOrigen)
|
||||||
chkMovimientoTarjeta_CheckedChanged(Nothing, Nothing)
|
chkMovimientoTarjeta_CheckedChanged(Nothing, Nothing)
|
||||||
CargaCuenta(-1, DdlCuentaDestino)
|
|
||||||
CargaFolio(DdlCuentaDestino.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
'CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
||||||
Else
|
Else
|
||||||
CargaCuenta(-1, DdlCuentaOrigen)
|
CargaCuenta(-1, DdlCuentaOrigen)
|
||||||
CargaCuenta(DdlCuentaOrigen.SelectedValue.ToEntero, DdlCuentaDestino)
|
CargaCuenta(DdlCuentaOrigen.SelectedValue.ToEntero, DdlCuentaDestino)
|
||||||
@@ -89,7 +90,7 @@ Partial Class Bancos_Transferencias
|
|||||||
End If
|
End If
|
||||||
Ddl.DataBind()
|
Ddl.DataBind()
|
||||||
|
|
||||||
DdlCuentaDestino_SelectedIndexChanged(Nothing, Nothing)
|
'DdlCuentaDestino_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
If CveCuenta > 0 Then VerificaMonedas()
|
If CveCuenta > 0 Then VerificaMonedas()
|
||||||
|
|
||||||
@@ -155,43 +156,41 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlCuentaDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaDestino.SelectedIndexChanged
|
'Protected Sub DdlCuentaDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaDestino.SelectedIndexChanged
|
||||||
|
|
||||||
VerificaMonedas()
|
' VerificaMonedas()
|
||||||
|
|
||||||
If Opcion = 1 Then
|
' If Opcion = 1 Then
|
||||||
CargaFolio(DdlCuentaDestino.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
' CargaFolio(DdlCuentaDestino.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If chkMovimientoTarjeta.Checked AndAlso GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCuenta = {0} AND UsaTarjeta = 1", DdlCuentaDestino.SelectedValue.ToEntero)).Rows.Count > 0 Then
|
' If chkMovimientoTarjeta.Checked AndAlso GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCuenta = {0} AND UsaTarjeta = 1", DdlCuentaDestino.SelectedValue.ToEntero)).Rows.Count > 0 Then
|
||||||
CargaGridTarjetas()
|
' CargaGridTarjetas()
|
||||||
Else
|
' Else
|
||||||
GvTC.Visible = False
|
' GvTC.Visible = False
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub CargaGridTarjetas()
|
Private Sub CargaGridTarjetas()
|
||||||
Dim ObjCreditos As New ClsBancos
|
Dim ObjCreditos As New ClsBancos
|
||||||
If ObjCreditos.GetTarjetasCreditos(DdlCuentaDestino.SelectedValue.ToEntero) Then
|
If ObjCreditos.GetTarjetasCreditos(DdlCuentaOrigen.SelectedValue.ToEntero) Then
|
||||||
If ObjCreditos.DtResultados.Rows.Count > 0 Then
|
If ObjCreditos.DtResultados.Rows.Count > 0 Then
|
||||||
GvTC.DataSource = ObjCreditos.DtResultados
|
GvTC.DataSource = ObjCreditos.DtResultados
|
||||||
|
GvTC.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvTC.DataBind()
|
|
||||||
UpGvTC.Update()
|
UpGvTC.Update()
|
||||||
|
|
||||||
GvTC.Visible = True
|
|
||||||
End If
|
End If
|
||||||
ObjCreditos.Dispose()
|
ObjCreditos.Dispose()
|
||||||
|
GvTC.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
'VALIDACIONES
|
'VALIDACIONES
|
||||||
Dim SumaImportesTarjeta As Decimal = 0D
|
Dim SumaImportesTarjeta As Decimal = 0D
|
||||||
If GvTC.Visible Then
|
If GvTC.Visible AndAlso GvTC.Rows.Count > 0 Then
|
||||||
For Each row As GridViewRow In GvTC.Rows
|
For Each row As GridViewRow In GvTC.Rows
|
||||||
SumaImportesTarjeta += row.FCTextBox("TxtAbono").Text.ToDecimal
|
SumaImportesTarjeta += row.FCTextBox("TxtAbono").Text.ToDecimal
|
||||||
Next
|
Next
|
||||||
@@ -202,8 +201,8 @@ Partial Class Bancos_Transferencias
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlCuentaDestino.SelectedValue = "" Then
|
If DdlCuentaOrigen.SelectedValue = "" Then
|
||||||
Alert("Seleccione cuenta destino", TipoMensaje.MsgAdvertencia)
|
Alert("Seleccione cuenta origen", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -225,8 +224,7 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
'Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
|
Dim TipoCambio As Double = If(TxtTipoCambio.Visible, TxtTipoCambio.Text.ToDecimal, 1)
|
||||||
Dim TipoCambio As Double = If(TxtTipoCambio.Visible, TxtTipoCambio.Text.ToDecimal, 0)
|
|
||||||
Dim CveMonedaOrigen, CveMonedaDestino As Integer
|
Dim CveMonedaOrigen, CveMonedaDestino As Integer
|
||||||
Dim FolioOrigen As String = TxtFolio.Text.Trim
|
Dim FolioOrigen As String = TxtFolio.Text.Trim
|
||||||
Dim FolioDestino As String = GetFolio(DdlCuentaDestino.SelectedValue.ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3))
|
Dim FolioDestino As String = GetFolio(DdlCuentaDestino.SelectedValue.ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3))
|
||||||
@@ -246,15 +244,14 @@ Partial Class Bancos_Transferencias
|
|||||||
filemove = fileItem.filename
|
filemove = fileItem.filename
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaOrigen.SelectedValue))
|
||||||
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaDestino.SelectedValue))
|
If dr IsNot Nothing Then CveMonedaOrigen = dr("CveMoneda").ToString.ToEntero
|
||||||
If dr IsNot Nothing Then CveMonedaDestino = dr("CveMoneda").ToString.ToEntero
|
|
||||||
|
|
||||||
If Opcion = -1 Then
|
If Opcion = -1 Then
|
||||||
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaOrigen.SelectedValue))
|
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaDestino.SelectedValue))
|
||||||
If dr IsNot Nothing Then CveMonedaOrigen = dr("CveMoneda").ToString.ToEntero
|
If dr IsNot Nothing Then CveMonedaDestino = dr("CveMoneda").ToString.ToEntero
|
||||||
Else
|
Else
|
||||||
CveMonedaOrigen = CveMonedaDestino
|
CveMonedaDestino = CveMonedaOrigen
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMonedaOrigen = 1 AndAlso CveMonedaDestino <> 1 Then
|
If CveMonedaOrigen = 1 AndAlso CveMonedaDestino <> 1 Then
|
||||||
@@ -275,21 +272,18 @@ Partial Class Bancos_Transferencias
|
|||||||
If CveMonedaOrigen = 2 AndAlso CveMonedaDestino = 2 Then
|
If CveMonedaOrigen = 2 AndAlso CveMonedaDestino = 2 Then
|
||||||
TipoCambio = TxtTipoCambio.Text.ToDouble 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate)
|
TipoCambio = TxtTipoCambio.Text.ToDouble 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/Transferencias", 13, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TxtFechaDocumento.Text.ToDate, $"Transferencia entre cuentas {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/Transferencias", 13, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TxtFechaDocumento.Text.ToDate, $"Transferencia entre cuentas {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 48 Then
|
If UsuarioActual.CveEmpresa = 48 Then
|
||||||
CuentaDestino = "Alumbrado publico de Hermosillo S.A de C.V"
|
CuentaDestino = "Alumbrado publico de Hermosillo S.A de C.V"
|
||||||
Observaciones = String.Format("{0} {1}", DdlCuentaDestino.SelectedItem.Text, TxtObservaciones.Text.Trim)
|
Observaciones = String.Format("{0} {1}", DdlCuentaDestino.SelectedItem.Text, TxtObservaciones.Text.Trim)
|
||||||
Else
|
Else
|
||||||
CuentaDestino = String.Format("Transferencia Cta: {0}", DdlCuentaDestino.SelectedItem.Text)
|
CuentaDestino = String.Format("Transferencia Cta: {0}", If(DdlCuentaDestino.SelectedItem IsNot Nothing, DdlCuentaDestino.SelectedItem.Text, ""))
|
||||||
Observaciones = TxtObservaciones.Text.Trim
|
Observaciones = TxtObservaciones.Text.Trim
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Opcion = 1 Then 'ESTO ES TRANSFERENCIA ENTRE
|
If Opcion = 1 Then 'ESTO ES TRANSFERENCIA ENTRE
|
||||||
CveIE = ObjIE.AddBancos_IE(DdlCuentaDestino.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, CuentaDestino, ImporteMXOrigen, CveMonedaOrigen, TipoCambio, Observaciones, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIE = ObjIE.AddBancos_IE(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, CuentaDestino, ImporteMXOrigen, CveMonedaOrigen, TipoCambio, Observaciones, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
CveIEDestino = CveIE
|
CveIEDestino = CveIE
|
||||||
Else
|
Else
|
||||||
|
|
||||||
@@ -321,19 +315,10 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
If (CveIE > 0 AndAlso CveIEDestino > 0 Or CveIE > 0 AndAlso chkMovimientoTarjeta.Checked AndAlso SumaImportesTarjeta <> 0) Then
|
If (CveIE > 0 AndAlso CveIEDestino > 0 Or CveIE > 0 AndAlso chkMovimientoTarjeta.Checked AndAlso SumaImportesTarjeta <> 0) Then
|
||||||
|
|
||||||
If filemove <> "" Then
|
|
||||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'inserto los movimientos de la conta para abonar al saldo
|
'inserto los movimientos de la conta para abonar al saldo
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
|
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
|
|
||||||
Dim alertaContabilizacion As String = "Se envi<76> correctamente la siguiente p<>liza:<br><br>"
|
|
||||||
Dim CuentasContablesInvalidas As New StringBuilder
|
|
||||||
Dim RowCuentaOrigen As DataRow = Nothing
|
|
||||||
|
|
||||||
Dim TipoMovtoDetalle As Boolean = True
|
Dim TipoMovtoDetalle As Boolean = True
|
||||||
If RBLOpcion.SelectedValue = "2" Then TipoMovtoDetalle = False ' cuando sea un reembolso/devoluci<63>n, es ingreso a bancos
|
If RBLOpcion.SelectedValue = "2" Then TipoMovtoDetalle = False ' cuando sea un reembolso/devoluci<63>n, es ingreso a bancos
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
@@ -354,7 +339,6 @@ Partial Class Bancos_Transferencias
|
|||||||
TipoCambio:=TC) Then
|
TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Agregamos los Movimientos de Acreedor cuando es tarjeta
|
'Agregamos los Movimientos de Acreedor cuando es tarjeta
|
||||||
@@ -365,13 +349,12 @@ Partial Class Bancos_Transferencias
|
|||||||
For Each row As GridViewRow In GvTC.Rows
|
For Each row As GridViewRow In GvTC.Rows
|
||||||
|
|
||||||
If row.FCTextBox("TxtAbono").Text.ToDecimal > 0 Then
|
If row.FCTextBox("TxtAbono").Text.ToDecimal > 0 Then
|
||||||
FolioDestino = GetFolio(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TransaccioSQL:=ObjIE.IniciaTransacSQL())
|
FolioDestino = GetFolio(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TransaccionSQL:=ObjIE.IniciaTransacSQL())
|
||||||
|
|
||||||
If FolioDestino.Trim.Length = 0 Then
|
If FolioDestino.Trim.Length = 0 Then
|
||||||
MsgError = "Ocurrio un error al obtener el folio destino."
|
MsgError = "Ocurrio un error al obtener el folio destino."
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim PagueseA As String = $"Transferencia Cta: {If(DdlCuentaOrigen.SelectedItem Is Nothing, DdlCuentaDestino.SelectedItem.Text, DdlCuentaOrigen.SelectedItem.Text)}"
|
Dim PagueseA As String = $"Transferencia Cta: {If(DdlCuentaOrigen.SelectedItem Is Nothing, DdlCuentaDestino.SelectedItem.Text, DdlCuentaOrigen.SelectedItem.Text)}"
|
||||||
|
|
||||||
CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, PagueseA, row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, PagueseA, row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
@@ -385,9 +368,6 @@ Partial Class Bancos_Transferencias
|
|||||||
AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino)
|
AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'Agregamos la contraria a bancos cuando es cuenta
|
'Agregamos la contraria a bancos cuando es cuenta
|
||||||
@@ -408,7 +388,6 @@ Partial Class Bancos_Transferencias
|
|||||||
ImporteME:=ImporteDestino, TipoCambio:=TC) Then
|
ImporteME:=ImporteDestino, TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -424,22 +403,15 @@ Partial Class Bancos_Transferencias
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
|
|
||||||
If CveIE > 0 Then
|
If CveIE > 0 Then
|
||||||
AlertaGlobal.AppendFormat("<br/><br/>Movimiento: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIE, FolioOrigen)
|
AlertaGlobal.AppendFormat("<br/><br/>Movimiento: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIE, FolioOrigen)
|
||||||
End If
|
End If
|
||||||
If CveIEDestino > 0 AndAlso CveIE <> CveIEDestino Then
|
If CveIEDestino > 0 AndAlso CveIE <> CveIEDestino Then
|
||||||
|
|
||||||
If Not chkMovimientoTarjeta.Checked Then
|
If Not chkMovimientoTarjeta.Checked Then
|
||||||
AlertaGlobal.AppendFormat("<br/><br/>Recepci<63>n: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIEDestino, FolioDestino)
|
AlertaGlobal.AppendFormat("<br/><br/>Recepci<63>n: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIEDestino, FolioDestino)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
MsgError = "no se pudo insertar el detalle de la p<>liza2"
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgError = "no se pudo insertar el detalle de la p<>liza"
|
MsgError = "no se pudo insertar el detalle de la p<>liza"
|
||||||
End If
|
End If
|
||||||
@@ -454,13 +426,11 @@ Partial Class Bancos_Transferencias
|
|||||||
MsgError = "Error al guardar"
|
MsgError = "Error al guardar"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
ObjIE.Commit()
|
ObjIE.Commit()
|
||||||
|
If filemove <> "" Then
|
||||||
|
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||||
|
End If
|
||||||
Alert(String.Format("El Movimiento se realizo correctamente.<br>{0}", AlertaGlobal), TipoMensaje.MsgInformacion)
|
Alert(String.Format("El Movimiento se realizo correctamente.<br>{0}", AlertaGlobal), TipoMensaje.MsgInformacion)
|
||||||
Anexo.Text = ""
|
Anexo.Text = ""
|
||||||
'Enviar Correo a los usuarios que tienen acceso a las dos cuentas
|
'Enviar Correo a los usuarios que tienen acceso a las dos cuentas
|
||||||
@@ -470,10 +440,7 @@ Partial Class Bancos_Transferencias
|
|||||||
CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
|
'GeneraChequePDF(CveIEDestino, UsuarioActual.Empresa)
|
||||||
GeneraChequePDF(CveIEDestino, UsuarioActual.Empresa)
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
Alert(MsgError)
|
Alert(MsgError)
|
||||||
@@ -481,7 +448,7 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
ObjMov.Dispose()
|
ObjMov.Dispose()
|
||||||
'If ObjComp IsNot Nothing Then ObjComp.Dispose()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EnviaCorreo(Comprobante As String)
|
Private Sub EnviaCorreo(Comprobante As String)
|
||||||
@@ -607,24 +574,21 @@ Partial Class Bancos_Transferencias
|
|||||||
TxtFolio.Text = GetFolio(CveCuenta, CveTipoTransaccion)
|
TxtFolio.Text = GetFolio(CveCuenta, CveTipoTransaccion)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer, Optional ByRef TransaccioSQL As SqlTransaction = Nothing) As String
|
Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer, Optional ByRef TransaccionSQL As SqlTransaction = Nothing) As String
|
||||||
|
|
||||||
Dim Folio As String
|
Dim Folio As String
|
||||||
Dim Banco As ClsBancos
|
Dim Banco As ClsBancos
|
||||||
|
|
||||||
If TransaccioSQL Is Nothing Then
|
If TransaccionSQL Is Nothing Then
|
||||||
Banco = New ClsBancos
|
Banco = New ClsBancos
|
||||||
Else
|
Else
|
||||||
Banco = New ClsBancos(TransaccioSQL)
|
Banco = New ClsBancos(TransaccionSQL)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString
|
Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString
|
||||||
|
|
||||||
If TransaccioSQL Is Nothing Then
|
If TransaccionSQL Is Nothing Then
|
||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return Folio
|
Return Folio
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -644,18 +608,13 @@ Partial Class Bancos_Transferencias
|
|||||||
Private Sub DdlTipoMovto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoMovto.SelectedIndexChanged
|
Private Sub DdlTipoMovto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoMovto.SelectedIndexChanged
|
||||||
|
|
||||||
RFVTxtPaguese.Visible = False
|
RFVTxtPaguese.Visible = False
|
||||||
|
CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
||||||
|
|
||||||
If Opcion = 1 Then
|
If Not Opcion = 1 Then
|
||||||
CargaFolio(DdlCuentaDestino.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
|
||||||
Else
|
|
||||||
CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero)
|
|
||||||
|
|
||||||
If DdlTipoMovto.SelectedValue.ToEntero = 1 And Opcion <> 1 Then 'CHEQUE ACTIVA EL REQUIRED DE TxtPaguese
|
If DdlTipoMovto.SelectedValue.ToEntero = 1 And Opcion <> 1 Then 'CHEQUE ACTIVA EL REQUIRED DE TxtPaguese
|
||||||
RFVTxtPaguese.Visible = True
|
RFVTxtPaguese.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UPPDatos.Update()
|
UPPDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -590,8 +590,8 @@ Partial Class Contratos_Default
|
|||||||
'TabContratosGastos.Visible = False
|
'TabContratosGastos.Visible = False
|
||||||
|
|
||||||
'DONDE OCUPA ALMACEN
|
'DONDE OCUPA ALMACEN
|
||||||
Dim CveTipoAlmacenOrigen = "12,15"
|
Dim CveTipoAlmacenOrigen As String = "12,15"
|
||||||
Dim CveTipoAlmacenDestino = "11,12"
|
Dim CveTipoAlmacenDestino As String = "11,12"
|
||||||
If TipoContrato.Contiene({7, 9, 13, 16, 18, 21, 27}) Then
|
If TipoContrato.Contiene({7, 9, 13, 16, 18, 21, 27}) Then
|
||||||
RowAlmacen.Visible = True
|
RowAlmacen.Visible = True
|
||||||
If TipoContrato.Contiene(7, 9, 13, 21, 27) Then
|
If TipoContrato.Contiene(7, 9, 13, 21, 27) Then
|
||||||
@@ -603,7 +603,7 @@ Partial Class Contratos_Default
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveOrigen = DdlAlmacenOrigen.SelectedValue
|
Dim CveOrigen As String = DdlAlmacenOrigen.SelectedValue
|
||||||
DdlAlmacenOrigen.Items.Clear()
|
DdlAlmacenOrigen.Items.Clear()
|
||||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||||
DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
@@ -616,7 +616,7 @@ Partial Class Contratos_Default
|
|||||||
DdlAlmacenOrigen.SelectedValueExist(CveOrigen)
|
DdlAlmacenOrigen.SelectedValueExist(CveOrigen)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveDestino = DdlAlmacenDestino.SelectedValue
|
Dim CveDestino As String = DdlAlmacenDestino.SelectedValue
|
||||||
DdlAlmacenDestino.Items.Clear()
|
DdlAlmacenDestino.Items.Clear()
|
||||||
DdlAlmacenDestino.SelectedValue = "-1"
|
DdlAlmacenDestino.SelectedValue = "-1"
|
||||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
@@ -935,7 +935,7 @@ Partial Class Contratos_Default
|
|||||||
#Region " CARGA DATOS "
|
#Region " CARGA DATOS "
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjContratos As New ClsContratos()
|
Dim ObjContratos As New ClsContratos()
|
||||||
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
Dim Ruta As String = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
|
||||||
DivTipoContrato.Visible = False
|
DivTipoContrato.Visible = False
|
||||||
|
|
||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1339,11 +1339,11 @@ Partial Class Contratos_Default
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim Modificado = False
|
Dim Modificado As Boolean = False
|
||||||
' Dim Extension = Session("FileExtension").ToString
|
' Dim Extension = Session("FileExtension").ToString
|
||||||
Dim Archivo = Session("FileUpload").ToString
|
Dim Archivo As String = Session("FileUpload").ToString
|
||||||
Dim Ruta = Session("FileFolder").ToString
|
Dim Ruta As String = Session("FileFolder").ToString
|
||||||
|
|
||||||
Dim Minimo, Maximo, Total As Double
|
Dim Minimo, Maximo, Total As Double
|
||||||
'If txtMinimo.Text.ToDouble > 0 Then Minimo = txtMinimo.Text.ToDouble Else Minimo = -1
|
'If txtMinimo.Text.ToDouble > 0 Then Minimo = txtMinimo.Text.ToDouble Else Minimo = -1
|
||||||
@@ -1612,11 +1612,11 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
For Ciclo As Integer = 1 To CiclosComercialesEnMeses
|
For Ciclo As Integer = 1 To CiclosComercialesEnMeses
|
||||||
Dim FechaRef As DateTime = FechaI.AddMonths(PeriodoMeses * Ciclo)
|
Dim FechaRef As DateTime = FechaI.AddMonths(PeriodoMeses * Ciclo)
|
||||||
Dim lastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||||
|
|
||||||
Dim DiaMes As Integer = If(lastDayOfMonth < DdlDiaFact.SelectedValue.ToEntero(), lastDayOfMonth, DdlDiaFact.SelectedValue.ToEntero())
|
Dim DiaMes As Integer = If(lastDayOfMonth < DdlDiaFact.SelectedValue.ToEntero(), lastDayOfMonth, DdlDiaFact.SelectedValue.ToEntero())
|
||||||
|
|
||||||
Dim FechaFact = New DateTime(FechaRef.Year, FechaRef.Month, DiaMes)
|
Dim FechaFact As Date = New DateTime(FechaRef.Year, FechaRef.Month, DiaMes)
|
||||||
FechaFact = If(FechaFact > FechaF, FechaF, FechaFact)
|
FechaFact = If(FechaFact > FechaF, FechaF, FechaFact)
|
||||||
|
|
||||||
If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaFact) Then TieneError = True : Exit For
|
If Not ObjContratos.CicloComercialAdd(CveContrato, -1, DdlCliente.SelectedValue.ToEntero, False, -1, 1, UsuarioActual.CveEmpresa, FechaFact) Then TieneError = True : Exit For
|
||||||
@@ -1644,7 +1644,7 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
Dim DiaAnterior As Integer = 0
|
Dim DiaAnterior As Integer = 0
|
||||||
|
|
||||||
For CicloDias = 1 To CiclosPorMes
|
For CicloDias As Integer = 1 To CiclosPorMes
|
||||||
Dim DiaMes As Integer = 0
|
Dim DiaMes As Integer = 0
|
||||||
|
|
||||||
If CicloDias = 1 Then
|
If CicloDias = 1 Then
|
||||||
@@ -1994,8 +1994,8 @@ Partial Class Contratos_Default
|
|||||||
UpGV.Update()
|
UpGV.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnAutorizar_Click(sender As Object, e As EventArgs) Handles BtnAutorizar.Click
|
Protected Sub BtnAutorizar_Click(sender As Object, e As EventArgs) Handles BtnAutorizar.Click
|
||||||
Dim pinterno = TmpDT.SUM("Total", "CveTipoPresupuesto=1").ToString.ToDouble
|
Dim pinterno As Double = TmpDT.SUM("Total", "CveTipoPresupuesto=1").ToString.ToDouble
|
||||||
Dim pventas = TmpDT.SUM("Total", "CveTipoPresupuesto=2").ToString.ToDouble
|
Dim pventas As Double = TmpDT.SUM("Total", "CveTipoPresupuesto=2").ToString.ToDouble
|
||||||
If (pinterno < pventas) Then
|
If (pinterno < pventas) Then
|
||||||
Dim objContrato As New ClsContratos
|
Dim objContrato As New ClsContratos
|
||||||
|
|
||||||
@@ -2038,7 +2038,7 @@ Partial Class Contratos_Default
|
|||||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||||
|
|
||||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||||
|
|
||||||
@@ -2086,7 +2086,7 @@ Partial Class Contratos_Default
|
|||||||
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||||
Dim objContrato As New ClsContratos
|
Dim objContrato As New ClsContratos
|
||||||
If objContrato.UpdateContratosDetalleEstimacion(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
If objContrato.UpdateContratosDetalleEstimacion(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
||||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
Dim row As DataRow = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||||
row("PermitirEstimacion") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
row("PermitirEstimacion") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
||||||
Alert("Se ha permitido estimar", TipoMensaje.MsgInformacion)
|
Alert("Se ha permitido estimar", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
@@ -2103,7 +2103,7 @@ Partial Class Contratos_Default
|
|||||||
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
|
||||||
Dim objContrato As New ClsContratos
|
Dim objContrato As New ClsContratos
|
||||||
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(btn.Checked, 1, 0).ToString.ToEntero) Then
|
||||||
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
Dim row As DataRow = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||||
row("PermitirAvance") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
row("PermitirAvance") = IIf(btn.Checked, 1, 0).ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
@@ -2169,7 +2169,7 @@ Partial Class Contratos_Default
|
|||||||
OCInterna = Gv.Rows(e.RowIndex).FCTextBox("TxtOCInternaEdit").Text.ToString
|
OCInterna = Gv.Rows(e.RowIndex).FCTextBox("TxtOCInternaEdit").Text.ToString
|
||||||
LimitarCantidad = Gv.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
LimitarCantidad = Gv.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
||||||
Observaciones = Gv.Rows(e.RowIndex).FCTextBox("TxtObservacion").Text.ToString
|
Observaciones = Gv.Rows(e.RowIndex).FCTextBox("TxtObservacion").Text.ToString
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||||
Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True"
|
Dim LimitarCantidadValidator As Boolean = row("LimitarCantidad").ToString = "True"
|
||||||
If row("CantidadContratada").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse row("OCInterna").ToString <> OCInterna OrElse LimitarCantidadValidator <> LimitarCantidad Then
|
If row("CantidadContratada").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse row("OCInterna").ToString <> OCInterna OrElse LimitarCantidadValidator <> LimitarCantidad Then
|
||||||
|
|
||||||
@@ -2284,7 +2284,7 @@ Partial Class Contratos_Default
|
|||||||
End If
|
End If
|
||||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||||
|
|
||||||
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1"))
|
||||||
|
|
||||||
@@ -2354,7 +2354,7 @@ Partial Class Contratos_Default
|
|||||||
NoIdentificacion = GvInsumos.Rows(e.RowIndex).FCTextBox("TxtNoIdentificacion").Text.ToString
|
NoIdentificacion = GvInsumos.Rows(e.RowIndex).FCTextBox("TxtNoIdentificacion").Text.ToString
|
||||||
LimitarCantidad = GvInsumos.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
LimitarCantidad = GvInsumos.Rows(e.RowIndex).FCCheckBox("ChkLimitarCantidad").Checked
|
||||||
|
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||||
|
|
||||||
If row("Cantidad").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse (row("LimitarCantidad").ToString = "True") <> LimitarCantidad Then
|
If row("Cantidad").ToString.ToEntero <> Cantidad OrElse row("PU").ToString.ToEntero <> PU OrElse CveUM <> row("CveUM").ToString.ToEntero OrElse row("NoIdentificacion").ToString <> NoIdentificacion OrElse (row("LimitarCantidad").ToString = "True") <> LimitarCantidad Then
|
||||||
|
|
||||||
@@ -2453,7 +2453,7 @@ Partial Class Contratos_Default
|
|||||||
End If
|
End If
|
||||||
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
Dim TotalRow = Row("Total").ToString.ToDouble
|
Dim TotalRow As Double = Row("Total").ToString.ToDouble
|
||||||
GvInt.DataSource = TmpDT.FiltraParametros("CveTipoPresupuesto=1")
|
GvInt.DataSource = TmpDT.FiltraParametros("CveTipoPresupuesto=1")
|
||||||
GvInt.DataBind()
|
GvInt.DataBind()
|
||||||
|
|
||||||
@@ -2494,10 +2494,10 @@ Partial Class Contratos_Default
|
|||||||
CveUM = GvInt.Rows(e.RowIndex).FCDropDownList("DdlUMEdit").SelectedValue.ToEntero
|
CveUM = GvInt.Rows(e.RowIndex).FCDropDownList("DdlUMEdit").SelectedValue.ToEntero
|
||||||
|
|
||||||
'NoIdentificacion = GvInt.Rows(e.RowIndex).FCDropDownList("NoIdentificacion").ToString
|
'NoIdentificacion = GvInt.Rows(e.RowIndex).FCDropDownList("NoIdentificacion").ToString
|
||||||
Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
Dim row As DataRow = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalle))(0)
|
||||||
Dim c1 = row("Cantidad").ToString.ToEntero
|
Dim c1 As Integer = row("Cantidad").ToString.ToEntero
|
||||||
Dim p1 = row("PU").ToString.ToEntero
|
Dim p1 As Decimal = row("PU").ToString.ToDecimal
|
||||||
Dim cvum1 = row("CveUM").ToString.ToEntero
|
Dim cvum1 As Integer = row("CveUM").ToString.ToEntero
|
||||||
If c1 <> Cantidad OrElse p1 <> PU OrElse CveUM <> cvum1 Then
|
If c1 <> Cantidad OrElse p1 <> PU OrElse CveUM <> cvum1 Then
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
@@ -2573,7 +2573,7 @@ Partial Class Contratos_Default
|
|||||||
TabReporteAvance.Visible = True
|
TabReporteAvance.Visible = True
|
||||||
lbImprimirAvance.Visible = True
|
lbImprimirAvance.Visible = True
|
||||||
|
|
||||||
Dim Modalidad = IfNull(Request("Tipo"), 1, 2)
|
Dim Modalidad As Integer = IfNull(Request("Tipo"), 1, 2).ToString.ToEntero
|
||||||
|
|
||||||
If Modalidad.ToString.ToEntero = 2 Then
|
If Modalidad.ToString.ToEntero = 2 Then
|
||||||
Tab.ActiveTabIndex = 2
|
Tab.ActiveTabIndex = 2
|
||||||
@@ -2613,19 +2613,19 @@ Partial Class Contratos_Default
|
|||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Liga1 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1"
|
Dim Liga1 As String = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1"
|
||||||
e.Row.FCLinkButton("LBAvanceCantidad").CommandArgument = Liga1
|
e.Row.FCLinkButton("LBAvanceCantidad").CommandArgument = Liga1
|
||||||
e.Row.FCLinkButton("LBAvanceImporte").CommandArgument = Liga1
|
e.Row.FCLinkButton("LBAvanceImporte").CommandArgument = Liga1
|
||||||
|
|
||||||
Dim Liga2 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2"
|
Dim Liga2 As String = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2"
|
||||||
e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2
|
e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2
|
||||||
e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2
|
e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
||||||
Dim Btn = CType(sender, LinkButton)
|
Dim Btn As LinkButton = CType(sender, LinkButton)
|
||||||
Dim Parametros = Btn.CommandArgument.Split("|"c)
|
Dim Parametros As String() = Btn.CommandArgument.Split("|"c)
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
|
|
||||||
@@ -2987,7 +2987,7 @@ Partial Class Contratos_Default
|
|||||||
e.Row.Cells(4).Text = ""
|
e.Row.Cells(4).Text = ""
|
||||||
e.Row.Cells(5).Text = ""
|
e.Row.Cells(5).Text = ""
|
||||||
|
|
||||||
Dim Texto = $"Pedido: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
Dim Texto As String = $"Pedido: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||||
|
|
||||||
e.Row.Cells(0).ColumnSpan = 2
|
e.Row.Cells(0).ColumnSpan = 2
|
||||||
@@ -3014,7 +3014,7 @@ Partial Class Contratos_Default
|
|||||||
e.Row.Cells(4).Text = ""
|
e.Row.Cells(4).Text = ""
|
||||||
e.Row.Cells(5).Text = ""
|
e.Row.Cells(5).Text = ""
|
||||||
|
|
||||||
Dim Texto = $"Devolución: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
Dim Texto As String = $"Devolución: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||||
|
|
||||||
e.Row.Cells(0).ColumnSpan = 2
|
e.Row.Cells(0).ColumnSpan = 2
|
||||||
@@ -3102,7 +3102,7 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
LBLAFValorActivo.Text = DT.SUM("ValorImporte", "CveMovimientoDetalle > 0").ToString("###,###,###.00")
|
LBLAFValorActivo.Text = DT.SUM("ValorImporte", "CveMovimientoDetalle > 0").ToString("###,###,###.00")
|
||||||
|
|
||||||
Dim Total = DT.SUM("Cantidad", "CveMovimientoDetalle > 0 AND TipoDocto = 'Ped'") - DT.SUM("Cantidad", "TipoDocto = 'DPe'")
|
Dim Total As Decimal = DT.SUM("Cantidad", "CveMovimientoDetalle > 0 AND TipoDocto = 'Ped'") - DT.SUM("Cantidad", "TipoDocto = 'DPe'")
|
||||||
|
|
||||||
LBLAFTotal.Text = DT.SUM("Cantidad", "CveMovimientoDetalle > 0").ToString()
|
LBLAFTotal.Text = DT.SUM("Cantidad", "CveMovimientoDetalle > 0").ToString()
|
||||||
UPAFResumen.Update()
|
UPAFResumen.Update()
|
||||||
@@ -3119,7 +3119,7 @@ Partial Class Contratos_Default
|
|||||||
e.Row.Cells(4).Text = ""
|
e.Row.Cells(4).Text = ""
|
||||||
e.Row.Cells(5).Text = ""
|
e.Row.Cells(5).Text = ""
|
||||||
|
|
||||||
Dim Texto = $"{If(e.Row.DBCampo("TipoDocto") = "Ped", "Pedido", "Devolución") }: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
Dim Texto As String = $"{If(e.Row.DBCampo("TipoDocto") = "Ped", "Pedido", "Devolución") }: <b><a href='/Ventas/Ventas.aspx?CveVenta={e.Row.DBCampo("CveVenta")}' target='_blank'>{e.Row.DBCampo("SerieFolio")}</a></b> | "
|
||||||
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: <b><a href ='/Inventarios/EntradasSalidas.aspx?CveMovimiento={e.Row.DBCampo("CveMovimiento")}' target='_blank'>{e.Row.DBCampo("Folio")}</a></b>")
|
||||||
|
|
||||||
|
|
||||||
@@ -3169,7 +3169,7 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
For Each GRow As GridViewRow In GvDatosAlmacen.Rows
|
For Each GRow As GridViewRow In GvDatosAlmacen.Rows
|
||||||
Dim CveMovimientoDetalle As Integer = GRow.DataKey("CveMovimientoDetalle").ToEntero
|
Dim CveMovimientoDetalle As Integer = GRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
Dim ChkEsInterno = GRow.FCCheckBox("ChkEsInterno")
|
Dim ChkEsInterno As CheckBox = GRow.FCCheckBox("ChkEsInterno")
|
||||||
|
|
||||||
If CveMovimientoDetalle > 0 And ChkEsInterno.Checked And DdlEsInterno.SelectedValue.ToEntero > 0 Then
|
If CveMovimientoDetalle > 0 And ChkEsInterno.Checked And DdlEsInterno.SelectedValue.ToEntero > 0 Then
|
||||||
Dim EsInterno As Boolean
|
Dim EsInterno As Boolean
|
||||||
@@ -3221,7 +3221,7 @@ Partial Class Contratos_Default
|
|||||||
Protected Sub BtnDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
ObjVentas.IniciaTransacSQL()
|
ObjVentas.IniciaTransacSQL()
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
For Each Dr As DataRow In DtMovimientos.FiltraParametros("CveVenta IS NOT NULL AND CveMovimiento IS NOT NULL AND EsDevolucionVenta = 0", "", {"CveVenta"}).Rows
|
For Each Dr As DataRow In DtMovimientos.FiltraParametros("CveVenta IS NOT NULL AND CveMovimiento IS NOT NULL AND EsDevolucionVenta = 0", "", {"CveVenta"}).Rows
|
||||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(1, Dr("CveVenta").ToString.ToEntero) Then
|
If Not ObjVentas.UpdateVentasDevolucionAlmacen(1, Dr("CveVenta").ToString.ToEntero) Then
|
||||||
@@ -3229,7 +3229,6 @@ Partial Class Contratos_Default
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjVentas.Commit()
|
ObjVentas.Commit()
|
||||||
Alert("La solicitud de devolución se guardo correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La solicitud de devolución se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||||
@@ -3241,9 +3240,6 @@ Partial Class Contratos_Default
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub CargaDatosEncabezado()
|
Public Sub CargaDatosEncabezado()
|
||||||
|
|
||||||
TablaUtilidad.Visible = True
|
TablaUtilidad.Visible = True
|
||||||
@@ -3466,7 +3462,7 @@ Partial Class Contratos_Default
|
|||||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
dt = ReadExcelFile(Ruta + FileName, True)
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
'Try
|
'Try
|
||||||
@@ -3602,7 +3598,7 @@ Partial Class Contratos_Default
|
|||||||
guardarBitacora(msj)
|
guardarBitacora(msj)
|
||||||
dr("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
dr("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
TmpDT.Rows.Add(dr)
|
TmpDT.Rows.Add(dr)
|
||||||
Dim TotalRow = dr("Total").ToString.ToDouble
|
Dim TotalRow As Double = dr("Total").ToString.ToDouble
|
||||||
|
|
||||||
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
|
||||||
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero
|
||||||
@@ -3708,7 +3704,7 @@ Partial Class Contratos_Default
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDiasMes(Optional NumMaxDias As Integer = 31)
|
Private Sub CargaDiasMes(Optional NumMaxDias As Integer = 31)
|
||||||
DdlDiaFact.Items.Clear()
|
DdlDiaFact.Items.Clear()
|
||||||
For i = 1 To NumMaxDias
|
For i As Integer = 1 To NumMaxDias
|
||||||
DdlDiaFact.Items.Add(New ListItem(i.ToString(), i.ToString()))
|
DdlDiaFact.Items.Add(New ListItem(i.ToString(), i.ToString()))
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -4019,7 +4015,7 @@ Partial Class Contratos_Default
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
||||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If CveContrato <> -1 Then
|
If CveContrato <> -1 Then
|
||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -4072,7 +4068,7 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
#Region "CREAR A PARTIR DE"
|
#Region "CREAR A PARTIR DE"
|
||||||
Private Sub BtnAgregarContratoHijo_Click(sender As Object, e As EventArgs) Handles BtnAgregarContratoHijo.Click
|
Private Sub BtnAgregarContratoHijo_Click(sender As Object, e As EventArgs) Handles BtnAgregarContratoHijo.Click
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
ObjContratos.IniciaTransacSQL()
|
ObjContratos.IniciaTransacSQL()
|
||||||
@@ -4131,9 +4127,8 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Function AgregarDetalleHijo(CveContratoHijo As Integer, ByRef ObjContratos As ClsContratos) As Boolean
|
Private Function AgregarDetalleHijo(CveContratoHijo As Integer, ByRef ObjContratos As ClsContratos) As Boolean
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim Cantidades As Double
|
Dim Cantidades As Double
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
@@ -4600,8 +4595,8 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{MES}") Then
|
If Plantilla.Contains("{MES}") Then
|
||||||
Dim fecha As DateTime = NowADS()
|
Dim fecha As DateTime = NowADS()
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||||
End If
|
End If
|
||||||
@@ -4616,16 +4611,16 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||||
|
|
||||||
@@ -4634,10 +4629,10 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
Dim LastDayOfMonth As Integer = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||||
|
|
||||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||||
|
|
||||||
@@ -4655,8 +4650,8 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{MES}") Then
|
If Plantilla.Contains("{MES}") Then
|
||||||
Dim fecha As DateTime = NowADS()
|
Dim fecha As DateTime = NowADS()
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||||
End If
|
End If
|
||||||
@@ -4671,16 +4666,16 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||||
|
|
||||||
@@ -4689,10 +4684,10 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
Dim formatoFecha As DateTimeFormatInfo = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||||
|
|
||||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
Dim LastDayOfMonth As Integer = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||||
|
|
||||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||||
|
|
||||||
|
|||||||
@@ -294,21 +294,6 @@ Partial Class General_SaldosIniciales
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If Not dt.Columns(15).ColumnName = "IEPS" Then
|
|
||||||
' Alert("El nombre de la decimosexta columna debe ser 'IEPS'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If Not dt.Columns(16).ColumnName = "RetIVAPorcentaje" Then
|
|
||||||
' Alert("El nombre de la decimoséptima columna debe ser 'RetIVAPorcentaje'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If Not dt.Columns(17).ColumnName = "RetISRPorcentaje" Then
|
|
||||||
' Alert("El nombre de la decimoctava columna debe ser 'RetISRPorcentaje'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If RblFormato.SelectedValue = "4" Then
|
'If RblFormato.SelectedValue = "4" Then
|
||||||
' If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
|
' If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
|
||||||
' Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
|
' Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
@@ -716,7 +701,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
Dim NuevaClasificacion As Boolean = False
|
Dim NuevaClasificacion As Boolean = False
|
||||||
|
|
||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.FiltraParametros("Descripcion <> ''").Rows
|
||||||
Dim Codigo As String = Row("Codigo").ToString()
|
Dim Codigo As String = Row("Codigo").ToString()
|
||||||
Dim Descripcion As String = Row("Descripcion").ToString()
|
Dim Descripcion As String = Row("Descripcion").ToString()
|
||||||
Dim TipoPS As String = Row("Tipo").ToString().Trim.ToUpper
|
Dim TipoPS As String = Row("Tipo").ToString().Trim.ToUpper
|
||||||
@@ -1445,7 +1430,9 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
#Region "P R O V E E D O R E S - F A C T U R A S"
|
#Region "P R O V E E D O R E S - F A C T U R A S"
|
||||||
|
|
||||||
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorCompras As Boolean = False
|
Dim ErrorCompras As Boolean = False
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
|
||||||
Dim CveCompra As Integer
|
Dim CveCompra As Integer
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
Dim ExisteCompra As Boolean = False
|
Dim ExisteCompra As Boolean = False
|
||||||
@@ -1466,11 +1453,9 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||||
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
||||||
RFC = Row("RFC").ToString().Trim
|
RFC = Row("RFC").ToString().Trim
|
||||||
RFC = Row("RFC").ToString().Trim
|
|
||||||
Dim Serie As String = Row("Serie").ToString()
|
Dim Serie As String = Row("Serie").ToString()
|
||||||
Dim Folio As String = Row("Folio").ToString()
|
Dim Folio As String = Row("Folio").ToString()
|
||||||
Dim Fecha As Date = Row("Fecha").ToString().ToDate
|
Dim Fecha As Date = Row("Fecha").ToString().ToDate
|
||||||
@@ -1478,31 +1463,30 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim IVA As Decimal = Row("IVA").ToString().ToDecimal
|
Dim IVA As Decimal = Row("IVA").ToString().ToDecimal
|
||||||
Dim Total As Decimal = Row("Total").ToString().ToDecimal
|
Dim Total As Decimal = Row("Total").ToString().ToDecimal
|
||||||
Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal
|
Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal
|
||||||
Dim TipoDocumento As String = Row("Tipo Documento").ToString().Trim()
|
Dim TipoDocto As String = Row("Tipo Documento").ToString()
|
||||||
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString().ToEntero()
|
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString().ToEntero()
|
||||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString())
|
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString())
|
||||||
Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal
|
Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal
|
||||||
Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal
|
Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal
|
||||||
Dim IEPS As Decimal = If(dt.Columns.Contains("IEPS"), Row("IEPS").ToString(), "0").ToDecimal
|
Dim IEPS As Decimal = If(dt.Columns.Contains("IEPS"), Row("IEPS").ToString(), "0").ToDecimal
|
||||||
Dim Moneda As String = Row("Moneda").ToString()
|
Dim Moneda As String = Row("Moneda").ToString()
|
||||||
Dim TipoCambio As String = Row("Tipo Cambio").ToString()
|
Dim TipoCambio As String = If(dt.Columns.Contains("Tipo Cambio"), Row("Tipo Cambio").ToString(), "1")
|
||||||
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
|
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
|
||||||
Dim CveMoneda As Integer = 1
|
Dim CveMoneda As Integer = 1
|
||||||
Dim CveProveedorSucursal As Integer = Row("CveProveedorSucursal").ToString().ToEntero()
|
Dim CveProveedorSucursal As Integer = If(dt.Columns.Contains("CveProveedorSucursal"), Row("CveProveedorSucursal").ToString(), "0").ToEntero
|
||||||
Dim PorcentajeIVA As String = Row("PorcentajeIVA").ToString()
|
Dim PorcentajeIVA As String = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0")
|
||||||
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
|
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
|
||||||
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
|
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
|
||||||
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
|
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
|
||||||
|
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto='{0}'", If(dt.Columns.Contains("SubProyecto"), Row("SubProyecto").ToString(), ""))).ToEntero
|
||||||
|
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||||
|
|
||||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
|
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
|
||||||
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorCompras = True
|
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorCompras = True
|
||||||
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
|
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
|
||||||
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
|
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
|
||||||
|
|
||||||
Dim TipoDocto = IIf(TipoDocumento.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString()
|
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Temporalmente SE BORRARA
|
'Temporalmente SE BORRARA
|
||||||
Dim Transaccion As String = "" 'Row("Transaccion2").ToString()
|
Dim Transaccion As String = "" 'Row("Transaccion2").ToString()
|
||||||
@@ -1529,11 +1513,9 @@ Partial Class General_SaldosIniciales
|
|||||||
If FechaVencimiento = "".ToDate Or FechaVencimiento < "1900/01/01".ToDate Then
|
If FechaVencimiento = "".ToDate Or FechaVencimiento < "1900/01/01".ToDate Then
|
||||||
FechaVencimiento = Fecha
|
FechaVencimiento = Fecha
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Compra
|
|
||||||
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento,
|
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento,
|
||||||
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
|
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
|
||||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=Sucursal.ToEntero()) Then
|
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
|
||||||
ErrorCompras = True
|
ErrorCompras = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1555,8 +1537,6 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||||
|
|
||||||
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||||
@@ -1565,14 +1545,14 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
'Saldo
|
'Saldo
|
||||||
If Saldo < Total Then
|
If Saldo < Total Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Total - Saldo, 17, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Total - Saldo, 95, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For
|
|
||||||
End If
|
End If
|
||||||
Encontrados = Encontrados + 1
|
Encontrados = Encontrados + 1
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
If Not ErrorCompras Then
|
||||||
|
Next
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al cargar los datos", ex)
|
OnError("Ocurrió un error al cargar los datos", ex)
|
||||||
ErrorCompras = True
|
ErrorCompras = True
|
||||||
End Try
|
End Try
|
||||||
@@ -2394,8 +2374,6 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
|
|
||||||
Dim ErrorProceso As Boolean = False
|
Dim ErrorProceso As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
Dim SBMensajesCuentasNoEncontradas As New StringBuilder
|
Dim SBMensajesCuentasNoEncontradas As New StringBuilder
|
||||||
|
|
||||||
For Each dRow As DataRow In dt.FiltraParametros(" LEN(Clasificacion) > 0 ").Rows
|
For Each dRow As DataRow In dt.FiltraParametros(" LEN(Clasificacion) > 0 ").Rows
|
||||||
@@ -2430,26 +2408,21 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim ObjConta As New ClsContabilidad(ObjClasificaciones.IniciaTransacSQL)
|
Dim ObjConta As New ClsContabilidad(ObjClasificaciones.IniciaTransacSQL)
|
||||||
|
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
Dim DTClasificaiones As New DataTable
|
Dim DTClasificaiones As New DataTable
|
||||||
|
|
||||||
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
'If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||||
DTClasificaiones = ObjClasificaciones.DtResultados
|
' DTClasificaiones = ObjClasificaciones.DtResultados
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If Not DTClasificaiones.Rows.Count > 0 Then
|
|
||||||
ObjConta.Dispose()
|
|
||||||
Alert("Error a conusltar clasificaciones.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Not DTClasificaiones.Rows.Count > 0 Then
|
||||||
|
' ObjConta.Dispose()
|
||||||
|
' Alert("Error a consultar clasificaciones.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
DTClasificaiones.CaseSensitive = False
|
DTClasificaiones.CaseSensitive = False
|
||||||
|
|
||||||
For Each dRow As DataRow In dt.FiltraParametros(" LEN(Clasificacion) > 0 ").Rows
|
For Each dRow As DataRow In dt.FiltraParametros(" LEN(Clasificacion) > 0 ").Rows
|
||||||
|
|
||||||
|
|
||||||
Dim Clasificacion As String = dRow("Clasificacion").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
Dim Clasificacion As String = dRow("Clasificacion").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
||||||
Dim Categoria As String = dRow("Categoria").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
Dim Categoria As String = dRow("Categoria").ToString().Trim.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
||||||
Dim UsoClasificacion As String = dRow("UsoClasificacion").ToString().Trim.ToUpper.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
Dim UsoClasificacion As String = dRow("UsoClasificacion").ToString().Trim.ToUpper.Replace("\r\n", "").Replace(vbCrLf, "").Replace(vbCr, "")
|
||||||
@@ -2459,12 +2432,8 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Dim CveUsoClasificacion As Integer = -1
|
Dim CveUsoClasificacion As Integer = -1
|
||||||
Dim CveCategoria As Integer = -1
|
Dim CveCategoria As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
CveCategoria = GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", $" Categoria = '{Categoria}' ").ToEntero()
|
CveCategoria = GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", $" Categoria = '{Categoria}' ").ToEntero()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not CveCategoria > 0 Then
|
If Not CveCategoria > 0 Then
|
||||||
CveCategoria = GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToEntero()
|
CveCategoria = GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToEntero()
|
||||||
If Not CveCategoria > 0 Then
|
If Not CveCategoria > 0 Then
|
||||||
@@ -2472,7 +2441,6 @@ Partial Class General_SaldosIniciales
|
|||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -2514,34 +2482,24 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
If ObjClasificaciones.AddClasificaciones(Clasificacion, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
|
If ObjClasificaciones.AddClasificaciones(Clasificacion, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
|
||||||
CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then
|
CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then
|
||||||
|
|
||||||
CveClasificacion = ObjClasificaciones.CveClasificacion
|
CveClasificacion = ObjClasificaciones.CveClasificacion
|
||||||
|
|
||||||
If CveClasificacion > 0 Then
|
If CveClasificacion > 0 Then
|
||||||
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||||
DTClasificaiones = ObjClasificaciones.DtResultados
|
DTClasificaiones = ObjClasificaciones.DtResultados
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
|
If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
|
|
||||||
If CveCuentaContableIngreso > 0 Then
|
If CveCuentaContableIngreso > 0 Then
|
||||||
If Not AsignacionCuenta(ObjConta, 4, CveCuentaContableIngreso, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion, OpActualizarClasificacion:=True) Then
|
If Not AsignacionCuenta(ObjConta, 4, CveCuentaContableIngreso, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveClasificacion, OpActualizarClasificacion:=True) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
@@ -2557,22 +2515,16 @@ Partial Class General_SaldosIniciales
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Contador = Contador + 1
|
Contador = Contador + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
ObjClasificaciones.Commit()
|
ObjClasificaciones.Commit()
|
||||||
Alert($"Se agregaron {Contador} Clasificaciones.")
|
Alert($"Se agregaron {Contador} Clasificaciones.")
|
||||||
Else
|
Else
|
||||||
ObjClasificaciones.RollBack()
|
ObjClasificaciones.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjClasificaciones.Dispose()
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -2089,7 +2089,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
RetornoVirtual = GenerarMovimientoVirtual(CveMovimiento, ObjInventario)
|
RetornoVirtual = GenerarMovimientoVirtual(CveMovimiento, ObjInventario, ObjConta)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If RetornoVirtual IsNot Nothing Then
|
If RetornoVirtual IsNot Nothing Then
|
||||||
@@ -2968,7 +2968,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
#Region " CONTABILIZAR "
|
#Region " CONTABILIZAR "
|
||||||
|
|
||||||
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
|
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean, Optional dttCostos As DataTable = Nothing, Optional CveSubProyecto As Integer = -1) As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
|
||||||
@@ -2977,9 +2977,22 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
If CveMovimientoEntrada > 0 Then
|
||||||
ErrorMovInv = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
If dttCostos IsNot Nothing Then
|
||||||
|
For Each RowInv As DataRow In dttCostos.Rows
|
||||||
|
Dim ValorInventario As Decimal = dttCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, ValorInventario, 69, Concepto, Concepto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||||
|
|
||||||
@@ -4634,11 +4647,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||||
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
If CveMovimientoSalida > 0 Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoSalida, ObjInventario)
|
If CveMovimientoSalida > 0 Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoSalida, ObjInventario, ObjConta)
|
||||||
|
|
||||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||||
|
|
||||||
If CveMovimientoEntrada > 0 AndAlso Not ErrorMovInv Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoEntrada, ObjInventario)
|
If CveMovimientoEntrada > 0 AndAlso Not ErrorMovInv Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoEntrada, ObjInventario, ObjConta)
|
||||||
|
|
||||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||||
End If
|
End If
|
||||||
@@ -5421,8 +5434,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Protected Sub LnkGenerarVirtual_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkGenerarVirtual_Click(sender As Object, e As EventArgs)
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
ObjInventario.IniciaTransacSQL()
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
Dim Retorno As MMovimientoVirtual = GenerarMovimientoVirtual(Me.CveMovimiento, ObjInventario)
|
Dim Retorno As MMovimientoVirtual = GenerarMovimientoVirtual(Me.CveMovimiento, ObjInventario, ObjConta)
|
||||||
|
|
||||||
If Retorno.TieneError Then
|
If Retorno.TieneError Then
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
@@ -5440,7 +5453,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ByRef ObjInventario As ClsInventarios) As MMovimientoVirtual
|
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad) As MMovimientoVirtual
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
|
||||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||||
@@ -5449,14 +5462,20 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim tCveAlmacen As Integer = -1
|
Dim tCveAlmacen As Integer = -1
|
||||||
Dim tOrigen As Integer = -1
|
Dim tOrigen As Integer = -1
|
||||||
|
Dim tCveSubProyecto As Integer = -1
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
tCveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen").ToEntero()
|
tCveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen").ToEntero()
|
||||||
tOrigen = ObjInventario.DtResultados.FiltroPrimeroValor("Origen").ToEntero()
|
tOrigen = ObjInventario.DtResultados.FiltroPrimeroValor("Origen").ToEntero()
|
||||||
End If
|
End If
|
||||||
|
Dim drAlmacenVirtual As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimero("")
|
||||||
|
Dim CveAlmacenVirtual As Integer
|
||||||
|
If drAlmacenVirtual IsNot Nothing Then
|
||||||
|
CveAlmacenVirtual = drAlmacenVirtual("CveAlmacenVirtual").ToString.ToEntero
|
||||||
|
tCveSubProyecto = drAlmacenVirtual("CveSubProyecto").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
|
||||||
|
|
||||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||||
If CveAlmacenVirtual > 0 Then
|
If CveAlmacenVirtual > 0 Then
|
||||||
@@ -5482,6 +5501,17 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
Dim dttCosto As DataTable = Nothing
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||||
|
dttCosto = ObjInventario.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ContabilizaMovimientoAlmacen(ObjConta:=ObjConta, TxtFecha.Text.Replace(",", "").ToDate, "Virtual", "ES/GV", CveMovimientoVirtual, -1, DtPSVirtual.SUM("TotalCargo"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True, dttCosto, tCveSubProyecto) > 0 Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -5506,55 +5536,24 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Private Function CreaObjetosVenta() As Modelos.Factura
|
Private Function CreaObjetosVenta() As Modelos.Factura
|
||||||
Dim ObjFactura As New Modelos.Factura
|
Dim ObjFactura As New Modelos.Factura
|
||||||
ObjFactura.Version = "3.3"
|
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
ObjFactura.TipoCambio = 0
|
ObjFactura.TipoCambio = 0
|
||||||
ObjFactura.ConvertirPesos = False
|
|
||||||
ObjFactura.TipoCambio = 0
|
|
||||||
ObjFactura.CveMoneda = 1
|
ObjFactura.CveMoneda = 1
|
||||||
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||||
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
ObjFactura.MonedaAbreviatura = GlobalDTMonedas.FiltroPrimeroValor("Abreviatura", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||||
ObjFactura.TipoDocto = "Tra"
|
ObjFactura.TipoDocto = "Tra"
|
||||||
ObjFactura.RefDocto = ""
|
|
||||||
ObjFactura.Folio = Folio.ToEntero
|
ObjFactura.Folio = Folio.ToEntero
|
||||||
ObjFactura.Serie = "Tra"
|
ObjFactura.Serie = "Tra"
|
||||||
'ObjFactura.CveMesa = -1
|
'ObjFactura.CveMesa = -1
|
||||||
ObjFactura.Fecha = NowADS()
|
ObjFactura.Fecha = NowADS()
|
||||||
ObjFactura.CvePrePoliza = -1
|
|
||||||
ObjFactura.FechaPago = NowADS()
|
ObjFactura.FechaPago = NowADS()
|
||||||
ObjFactura.MotivoDescuento = ""
|
|
||||||
ObjFactura.Observaciones = ""
|
|
||||||
ObjFactura.FechaEjecucion = NowADS()
|
ObjFactura.FechaEjecucion = NowADS()
|
||||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||||
ObjFactura.CveCondicionEntrega = -1
|
|
||||||
ObjFactura.CondicionEntrega = ""
|
|
||||||
ObjFactura.NumeroCuenta = ""
|
|
||||||
ObjFactura.CondicionesPago = 0
|
|
||||||
ObjFactura.FormaPago = 0
|
|
||||||
ObjFactura.PedidoContrato = ""
|
|
||||||
ObjFactura.OrdenCompra = ""
|
|
||||||
ObjFactura.NumeroContrato = ""
|
|
||||||
ObjFactura.NumeroDescripcionContrato = ""
|
|
||||||
ObjFactura.DescripcionContrato = ""
|
|
||||||
ObjFactura.CveCorte = -1
|
|
||||||
ObjFactura.TipoDocumento = "Traspaso"
|
ObjFactura.TipoDocumento = "Traspaso"
|
||||||
ObjFactura.Alfa1 = ""
|
|
||||||
ObjFactura.Alfa2 = ""
|
|
||||||
ObjFactura.Alfa3 = ""
|
|
||||||
ObjFactura.Descuento = 0
|
|
||||||
ObjFactura.Amortizacion = 0
|
|
||||||
ObjFactura.CveContrato = 0
|
|
||||||
ObjFactura.CveVendedor = 0
|
|
||||||
ObjFactura.FechaVencimiento = NowADS()
|
ObjFactura.FechaVencimiento = NowADS()
|
||||||
ObjFactura.TipoEstatus = 0
|
|
||||||
ObjFactura.Det_OrdenCompra = ""
|
|
||||||
ObjFactura.Inv_CveEstatusEntrega = 0
|
|
||||||
ObjFactura.FormaPago33 = ""
|
|
||||||
ObjFactura.MetodoPago33 = ""
|
|
||||||
ObjFactura.UsoCFDI = ""
|
|
||||||
ObjFactura.CveClienteSucursal = 0
|
|
||||||
Dim CveSubProyecto As Integer = -1
|
Dim CveSubProyecto As Integer = -1
|
||||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
||||||
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
|||||||
@@ -1083,6 +1083,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1156,6 +1167,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
TextoError = "Ocurrió un error al generar el movimiento de salida virtual"
|
TextoError = "Ocurrió un error al generar el movimiento de salida virtual"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -1779,18 +1801,22 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePolizaMovVirtual, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Else
|
'Else
|
||||||
' TextoError = "La Sucursal no tiene creado un almacen virtual"
|
' TextoError = "La Sucursal no tiene creado un almacen virtual"
|
||||||
' ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
@@ -1812,7 +1838,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
TextoError = "Ocurrió un error al cancelar el traspaso"
|
TextoError = "Ocurrió un error al cancelar el traspaso"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -2094,7 +2130,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim Dtt As DataTable = Nothing
|
Dim Dtt As DataTable = Nothing
|
||||||
Dim CveMovimientoEntrada As Integer = 0
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
@@ -2216,11 +2251,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, importe, 68, TxtObservaciones.Text, TxtObservaciones.Text, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, importe, 68, TxtObservaciones.Text, TxtObservaciones.Text, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'VIRTUAL ENTRADA
|
'VIRTUAL ENTRADA
|
||||||
Dim CveMovimientoVirtualEntrada, CveMovimientoVirtualSalida As Integer
|
Dim CveMovimientoVirtualEntrada, CveMovimientoVirtualSalida As Integer
|
||||||
Dim FolioVirtualEntrada, FolioVirtualSalida As Integer
|
Dim FolioVirtualEntrada, FolioVirtualSalida As Integer
|
||||||
@@ -2281,6 +2326,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, importe, 68, TxtObservaciones.Text, TxtObservaciones.Text, CveMovimientoAlmacen:=CveMovimientoVirtualEntrada, Contabilizable:=False) Then
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, importe, 68, TxtObservaciones.Text, TxtObservaciones.Text, CveMovimientoAlmacen:=CveMovimientoVirtualEntrada, Contabilizable:=False) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
'MsgError = ObjMov.MensajePolizaDescuadre
|
||||||
|
ErrorMovInv = True
|
||||||
|
'GuardaLogAD($"Bancos/Transferencias | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
289
Ventas/PVCobranza.aspx
Normal file
289
Ventas/PVCobranza.aspx
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PVCobranza.aspx.vb" Inherits="Ventas_PVCobranza" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.e-big-btn {
|
||||||
|
height: 50px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Cobranza
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="IdPorlet" class="portlet solid grey-cascade portlet-filter" id="PortletPadre" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand" data-placement="left"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Sucursal:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 ">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none;">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||||
|
Fecha Inicio Docto:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||||
|
Fecha Fin Docto:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpL" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
|
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||||
|
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||||
|
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Descripcion" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="BtnPagar" runat="server" CssClass="btn btn-xs btn-success" Text="Cobrar" CommandName="Cobrar" CommandArgument='<%# Eval("CveVenta") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false" >
|
||||||
|
<div class="row">
|
||||||
|
<div class="note note-success">
|
||||||
|
<b>
|
||||||
|
Nombre:
|
||||||
|
</b>
|
||||||
|
<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>
|
||||||
|
<b>
|
||||||
|
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
|
||||||
|
</b>
|
||||||
|
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div runat="server" id="DivContadoBancos" class="row" visible="True">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="chequesie1">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Efectivo:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteEfectivo" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEImporteContado" runat="server" TargetControlID="TxtImporteEfectivo" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlCuentaEfectivo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:CustomValidator ID="RFVCuenta" runat="server" ClientValidationFunction="ValidaCuentaEfectivo" ControlToValidate="DdlCuentaEfectivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chequesie1">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Crédito:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" style="margin-right: -40px">
|
||||||
|
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:CustomValidator ID="RequiredFieldValidator1" runat="server" ClientValidationFunction="ValidaCuentaCredito" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false" style="text-align: right;">
|
||||||
|
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="80%">
|
||||||
|
<asp:ListItem Value="-1">MSI</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">3M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="6">6M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="9">9M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="12">12M</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<%--<asp:RequiredFieldValidator ID="RFVDDlMesesSinIntereses" runat="server" ControlToValidate="DDlMesesSinIntereses" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />campo <b>''Meses sin intereses''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CEDDlMesesSinIntereses" runat="server" HighlightCssClass="vco" TargetControlID="RFVDDlMesesSinIntereses" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chequesie1">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Débito:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteDebito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtImporteDebito" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlCuentaTarjetaDebito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:CustomValidator ID="RequiredFieldValidator4" runat="server" ClientValidationFunction="ValidaCuentaDebito" ControlToValidate="DdlCuentaTarjetaDebito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator4" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chequesie1">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Cheque:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteCheque" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBECheque" runat="server" TargetControlID="TxtImporteCheque" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlCuentaCheque" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:CustomValidator ID="RequiredFieldValidator3" runat="server" ClientValidationFunction="ValidaCuentaCheque" ControlToValidate="DdlCuentaCheque" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chequesie1" id="DivTransferencia" runat="server">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Transf.:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteTransferencia" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBETransferencia" runat="server" TargetControlID="TxtImporteTransferencia" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlCuentaTransferencia" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:CustomValidator ID="RFVTransferencia" runat="server" ClientValidationFunction="ValidaCuentaTransferencia" ControlToValidate="DdlCuentaTransferencia" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:CustomValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETransferencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVTransferencia" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chequesie1" runat="server" id="DivContadoOtros" visible="false">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" >
|
||||||
|
<asp:ListItem Value="-1">Otros</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Credito</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Debito</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">Cheque</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta">
|
||||||
|
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" runat="server" id="DivMesesSinIntereses2" visible="false">
|
||||||
|
<asp:DropDownList ID="DdlMesesSinIntereses2" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Meses</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">3M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="6">6M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="9">9M</asp:ListItem>
|
||||||
|
<asp:ListItem Value="12">12M</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chequesie2">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Total:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<label id="lblCambio" class="col-md-2">Cambio:</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align:center;">
|
||||||
|
<asp:HiddenField ID="HdnCveVenta" runat="server" />
|
||||||
|
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
235
Ventas/PVCobranza.aspx.vb
Normal file
235
Ventas/PVCobranza.aspx.vb
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Runtime.Remoting
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class Ventas_PVCobranza
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaFiltros()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaFiltros()
|
||||||
|
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
txtFechaI.Text = Now.AddYears(-1).ToShortDateString
|
||||||
|
txtFechaF.Text = Now.ToShortDateString
|
||||||
|
|
||||||
|
'DdlCuentaEfectivo.Items.Clear()
|
||||||
|
'DdlCuentaTarjetaCredito.Items.Clear()
|
||||||
|
'DdlCuentaTarjetaDebito.Items.Clear()
|
||||||
|
'DdlCuentaCheque.Items.Clear()
|
||||||
|
'DdlCuentaTransferencia.Items.Clear()
|
||||||
|
|
||||||
|
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
Dim CveMon As Integer = 1
|
||||||
|
|
||||||
|
'MOSTRAR SOLO CUENTAS DE CONTADO EN BDH
|
||||||
|
'If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
|
||||||
|
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", CveMon))
|
||||||
|
'Else
|
||||||
|
' DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||||
|
' DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||||
|
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||||
|
'Else
|
||||||
|
' DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
|
||||||
|
'DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", CveMon))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
|
||||||
|
|
||||||
|
DtCC.Dispose()
|
||||||
|
|
||||||
|
DdlCuentaEfectivo.DataBind()
|
||||||
|
DdlCuentaTarjetaCredito.DataBind()
|
||||||
|
DdlCuentaTarjetaDebito.DataBind()
|
||||||
|
DdlCuentaCheque.DataBind()
|
||||||
|
DdlCuentaTransferencia.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
Dim FechaI, FechaF As Date
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1)
|
||||||
|
|
||||||
|
If ObjMovtos.GetCxCDetalle(FechaI, FechaF, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, "-1", "-1", -1, "-1", -1,
|
||||||
|
"-1", 1, UsuarioActual.CveEmpresa, -1, 1,
|
||||||
|
TipoDocto:="Rem", FechaCorte:=NowADS.AddDays(1), CveUsuarioConsulta:=UsuarioActual.CveUsuario, AplicaAnticiposPagados:=0) Then
|
||||||
|
|
||||||
|
Dim dtt As DataTable = ObjMovtos.DSResultados.Tables(0).FiltraParametros("CveVenta > 0")
|
||||||
|
'si hay ya asignado, solo la mostrará
|
||||||
|
Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
||||||
|
If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||||
|
GvDatos.DataSource = dtt
|
||||||
|
End If
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
UpL.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveUsuarioCobranza") <> "" Then
|
||||||
|
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
||||||
|
'e.Row.CssClass = "blue-madison"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
|
||||||
|
If e.CommandName = "Cobrar" Then
|
||||||
|
Dim ImgBtn As LinkButton = DirectCast(e.CommandSource, LinkButton)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow)
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = e.CommandArgument.ToString.ToEntero
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
If Not ObjVentas.UpdateAsignaVentaCobranza(CveVenta, 1, UsuarioActual.CveUsuario, -1, "", Now) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
HdnCveVenta.Value = CveVenta.ToString
|
||||||
|
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo")
|
||||||
|
TxtImporteEfectivo.Focus()
|
||||||
|
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
|
||||||
|
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||||
|
'carga información para cobranza
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
ObjVentas.Commit()
|
||||||
|
PnlContado.Visible = True
|
||||||
|
Else
|
||||||
|
ObjVentas.RollBack()
|
||||||
|
PnlContado.Visible = False
|
||||||
|
Alert("Hubo un error al asignar datos de cobranza", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
'CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnPagar_Click(sender As Object, e As EventArgs) Handles BtnPagar.Click
|
||||||
|
'registrar pago
|
||||||
|
|
||||||
|
'validaciones
|
||||||
|
If TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal = 0 Then
|
||||||
|
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim VentaActual As New Venta(UsuarioActual)
|
||||||
|
VentaActual.CveVenta = CveVenta
|
||||||
|
|
||||||
|
VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate
|
||||||
|
VentaActual.CveCliente = DbRowVenta("CveCliente").ToString.ToEntero
|
||||||
|
VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
||||||
|
VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString
|
||||||
|
VentaActual.ClienteNombre = DbRowVenta("ClienteNombre").ToString
|
||||||
|
VentaActual.TC = DbRowVenta("TipoCambio").ToString.ToDecimal
|
||||||
|
VentaActual.Total = DbRowVenta("Total").ToString.ToDecimal
|
||||||
|
VentaActual.IVA = DbRowVenta("IVA").ToString.ToDecimal
|
||||||
|
VentaActual.IEPS = DbRowVenta("IEPS").ToString.ToDecimal
|
||||||
|
VentaActual.RetIVA = DbRowVenta("RetIVA").ToString.ToDecimal
|
||||||
|
VentaActual.RetISR = DbRowVenta("RetISR").ToString.ToDecimal
|
||||||
|
|
||||||
|
VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
|
||||||
|
VentaActual.UsuarioActual = UsuarioActual
|
||||||
|
VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
|
||||||
|
|
||||||
|
Dim CvePrePoliza As Integer
|
||||||
|
Dim Fecha As Date = NowADS()
|
||||||
|
Dim Mensaje As String = ""
|
||||||
|
|
||||||
|
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 5, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
If CvePrePoliza > 0 Then
|
||||||
|
|
||||||
|
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||||
|
Mensaje = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, TxtImporteEfectivo.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||||
|
End If
|
||||||
|
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||||
|
Mensaje = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||||
|
End If
|
||||||
|
If TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||||
|
Mensaje = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||||
|
End If
|
||||||
|
If TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||||
|
Mensaje = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Mensaje = "Error al registrar prepólizas"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Mensaje = "" Then
|
||||||
|
PnlContado.Visible = False
|
||||||
|
ObjConta.Commit()
|
||||||
|
CargaDatos()
|
||||||
|
Alert("Pago Registrado correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
ObjConta.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad) As String
|
||||||
|
Dim Retorno As String = ""
|
||||||
|
Dim CveIEPago As Integer = 0
|
||||||
|
Dim ErrorConta As Boolean
|
||||||
|
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, VentaActual.SerieFolio, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveIEPago > 0 Then
|
||||||
|
Dim Pago As New VentaPago
|
||||||
|
Pago.ImportePagoVenta = ImportePago
|
||||||
|
Pago.ImportePago = ImportePago
|
||||||
|
Pago.CveIE = CveIEPago
|
||||||
|
Pago.CveMonedaPago = VentaActual.CveMoneda
|
||||||
|
Pago.Fecha = NowADS()
|
||||||
|
Pago.Referencia = VentaActual.SerieFolio
|
||||||
|
|
||||||
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
If ErrorConta Then
|
||||||
|
Retorno = "Error en aplicación de pago"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Retorno = "Pago en Bancos no registrado"
|
||||||
|
ErrorConta = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -2772,6 +2772,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||||
|
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem") Then BtnPermisoEditarRemision.Visible = True
|
||||||
|
|
||||||
DivFechaAnticipoCliente.Visible = True
|
DivFechaAnticipoCliente.Visible = True
|
||||||
TxtFechaAnticipoCliente.Text = NowADS().ToShortDateString
|
TxtFechaAnticipoCliente.Text = NowADS().ToShortDateString
|
||||||
@@ -21219,6 +21220,7 @@ Partial Class Ventas
|
|||||||
DdlFormaPago33.Enabled = True
|
DdlFormaPago33.Enabled = True
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
If Me.PermiteCredito Then RBLPago.Enabled = True
|
If Me.PermiteCredito Then RBLPago.Enabled = True
|
||||||
|
DdlVendedor.Enabled = True
|
||||||
|
|
||||||
ModalidadEdicion = True
|
ModalidadEdicion = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user