Compras no deducible, Clientes lineas de adicionales
This commit is contained in:
@@ -5575,6 +5575,124 @@ Public Class ClsVentas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetLineasAdicionales(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, CveMoneda As Integer,
|
||||||
|
FechaI As Date, FechaF As Date, CveEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_LineasAdicionalesGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error obtener las lineas de adicionales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AddLineasAdicionales(LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
|
||||||
|
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_LineasAdicionalesAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
|
||||||
|
.Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||||
|
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
|
||||||
|
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function UpdateLineasAdicionales(CveLineaAdicional As Integer, LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
|
||||||
|
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional Comprobante As String = "-1") As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_LineasAdicionalesUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||||
|
.Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||||
|
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante
|
||||||
|
|
||||||
|
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveLineasAdicionales(CveLineaAdicional As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_LineasAdicionalesRemove")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error eliminar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Imports System.IO
|
|||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.ReportingServices.DataProcessing
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
@@ -7318,35 +7319,35 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
|
If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
|
||||||
|
|
||||||
Dim Pago As New CompraPago
|
Dim Pago As New CompraPago
|
||||||
Pago.ImportePago = importeMovimiento
|
Pago.ImportePago = importeMovimiento
|
||||||
Pago.CveIE = Ant.CveIE
|
Pago.CveIE = Ant.CveIE
|
||||||
Pago.TCPago = Ant.TCCompra
|
Pago.TCPago = Ant.TCCompra
|
||||||
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
||||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||||
|
|
||||||
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
|
||||||
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
|
||||||
|
|
||||||
'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
|
||||||
|
|
||||||
' Dim Pago As New CompraPago
|
|
||||||
' Pago.ImportePago = importeMovimiento
|
|
||||||
' Pago.CveIE = Ant.CveIE
|
|
||||||
' Pago.CveMonedaPago = 1
|
|
||||||
|
|
||||||
' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta)
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
||||||
|
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
||||||
|
|
||||||
|
'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
||||||
|
|
||||||
|
' Dim Pago As New CompraPago
|
||||||
|
' Pago.ImportePago = importeMovimiento
|
||||||
|
' Pago.CveIE = Ant.CveIE
|
||||||
|
' Pago.CveMonedaPago = 1
|
||||||
|
|
||||||
|
' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta)
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(83) Then
|
If UsuarioActual.CveEmpresa.Contiene(83) Then
|
||||||
'Unificacion de PrePolizas
|
'Unificacion de PrePolizas
|
||||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||||
@@ -8567,8 +8568,20 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||||
|
|
||||||
|
If CveFactura > 0 Then
|
||||||
|
If Not AjustaCombustibles() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'VALIDA IMPORTES
|
'VALIDA IMPORTES
|
||||||
If CveFactura > 0 Then 'SI NO VIENE DE FACTURA/XML NO VALIDA TOTALES
|
If CveFactura > 0 Then 'SI NO VIENE DE FACTURA/XML NO VALIDA TOTALES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ValidaTotalesGuardar() Then
|
If Not ValidaTotalesGuardar() Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -9315,15 +9328,15 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Removemos los conceptos de la prepoliza
|
'Removemos los conceptos de la prepoliza
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) 'GASTO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) 'ALMACEN
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) 'AF
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) 'PS YA RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) 'PS YA RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) 'PS YA RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) 'PS NO RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) 'PS NO RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) 'PS NO RECIBIDO
|
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||||
|
|
||||||
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
|
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
|
||||||
Dim ConceptoContabilizacionAlmacen = 0
|
Dim ConceptoContabilizacionAlmacen = 0
|
||||||
@@ -16163,7 +16176,14 @@ Partial Class Compras_Compras
|
|||||||
RetIVA = TmpDT.SUM("RetIVA")
|
RetIVA = TmpDT.SUM("RetIVA")
|
||||||
RetISR = TmpDT.SUM("RetISR")
|
RetISR = TmpDT.SUM("RetISR")
|
||||||
IEPSPS = TmpDT.SUM("IEPSPS")
|
IEPSPS = TmpDT.SUM("IEPSPS")
|
||||||
IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0)
|
|
||||||
|
If CveCompra > 0 AndAlso CveFactura > 0 Then
|
||||||
|
IVA = TxtIVA.Text.ToDecimal
|
||||||
|
Else
|
||||||
|
IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble
|
'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble
|
||||||
Descuentos = TmpDT.SUM("Descuento")
|
Descuentos = TmpDT.SUM("Descuento")
|
||||||
|
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ Partial Class Contratos_Default
|
|||||||
TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString
|
TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString
|
||||||
TxtUbicacion.Text = ObjContratos.Ubicacion
|
TxtUbicacion.Text = ObjContratos.Ubicacion
|
||||||
TxtResponsable.Text = ObjContratos.Responsable
|
TxtResponsable.Text = ObjContratos.Responsable
|
||||||
TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
TxtPorAnticipo.Text = ObjContratos.PorAnticipo.FormatoNumero
|
||||||
TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
||||||
TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero
|
TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero
|
||||||
'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString
|
'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString
|
||||||
|
|||||||
@@ -956,8 +956,7 @@ Partial Class Inventarios_Consignaciones
|
|||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
||||||
|
|
||||||
Dim CveMovimiento = 0
|
|
||||||
Dim Folio = 0
|
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim TextoError = ""
|
Dim TextoError = ""
|
||||||
Dim Fecha As Date = TxtFechaDevolucion.Text.ToDate
|
Dim Fecha As Date = TxtFechaDevolucion.Text.ToDate
|
||||||
@@ -972,6 +971,10 @@ Partial Class Inventarios_Consignaciones
|
|||||||
Dim MovtoNew = False
|
Dim MovtoNew = False
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
|
|
||||||
|
Dim CveMovimiento = 0
|
||||||
|
Dim Folio = 0
|
||||||
|
|
||||||
If Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble > 0 Then
|
If Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble > 0 Then
|
||||||
|
|
||||||
If CveAlmacen = -1 Or CveAlmacen <> Gvr.DataKey("CveAlmacen").ToString.ToEntero Then
|
If CveAlmacen = -1 Or CveAlmacen <> Gvr.DataKey("CveAlmacen").ToString.ToEntero Then
|
||||||
|
|||||||
@@ -244,9 +244,9 @@ Partial Class Inventarios_RepAnomalias
|
|||||||
ImgExcelProdcutosCoinciden.Visible = True
|
ImgExcelProdcutosCoinciden.Visible = True
|
||||||
LnkDescarExcelGrupos.Visible = False
|
LnkDescarExcelGrupos.Visible = False
|
||||||
|
|
||||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
|
||||||
GvS.DataSource = dt.FiltraParametros("Diferencia > 0")
|
GvS.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia > 0")
|
Dim DtS As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||||
|
|||||||
@@ -308,6 +308,17 @@
|
|||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAcciopnesLineasAdicionales" RenderMode="Inline" >
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAgregarLineaAdicional" data-toggle="tooltip" runat="server" Text="<i class='fa fa-plus'></i> Agregar Linea Adicional" Visible="false" OnClick="LnkAgregarLineaAdicional_Click"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
|
||||||
@@ -4538,6 +4549,67 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabLineasAdicionales" runat="server" HeaderText="Lineas Adicionales" Visible="false">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row ">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="row ">
|
||||||
|
<div class=" col-md-12" style="text-align: right!important">
|
||||||
|
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row ">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
|
||||||
|
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor"
|
||||||
|
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Proveedor" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="TipoLineaSTR" HeaderText="TipoLiena" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Opciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEditarLineaAdicional" runat ="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" OnClick="LnkEditarLineaAdicional_Click" />
|
||||||
|
<asp:LinkButton ID="LnkEliminarLineaAdicional" runat ="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClick="LnkEliminarLineaAdicional_Click" />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="10%" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
@@ -6624,6 +6696,129 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DVLineasAdicionales" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpLineaAdicionalmodal" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="H4" runat="server"><asp:Literal runat="server" ID="LtlLineasAdicionalesTotuloModal"></asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtLineaAdicionalModal" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Linea Adicional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= TxtLineaAdicionalModal.ClientID.ToString()%>">
|
||||||
|
<asp:Literal ID="LtlLineaAdicionalModal" runat="server" Text="Linea Adicional:"></asp:Literal>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<ADS:Dropdownlost ID="DdlProveedorLineaAdicionalModal" runat="server" CssStyle="width: 250px; selected2me" Width="250px" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm DdlPS"></ADS:Dropdownlost>
|
||||||
|
<label for="<%= DdlProveedorLineaAdicionalModal.ClientID.ToString()%>">Proveedor: </label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px">
|
||||||
|
<asp:ListItem Text="Seleccione Uno" Value="-1" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Normal" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Linea''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlTipoLineaAdicionalModal.ClientID.ToString()%>">Tipo de Linea:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtImporteLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true" Width="250px" ></asp:TextBox>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtImporteLineaAdicionalModal" runat="server" ControlToValidate="TxtImporteLineaAdicionalModal" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtImporteLineaAdicionalModal" ValidChars="1234567890." FilterType="Custom" />
|
||||||
|
<label for="<%= TxtImporteLineaAdicionalModal.ClientID.ToString()%>">Importe: </label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlMonedaLineAdicionalModal" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Width="250px" >
|
||||||
|
<asp:ListItem Selected="True" Text="SeleccioneUna" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Dolares" Value="2"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlMonedaLineAdicionalModal" InitialValue="-1" runat="server" ControlToValidate="DdlMonedaLineAdicionalModal" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlMonedaLineAdicionalModal.ClientID.ToString()%>">Moneda: </label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtFechaVencimientoLineaAdicionalModal.ClientID.ToString()%>">FechaVencimiento: </label>
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFechaVencimientoLineaAdicionalModal" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<button runat="server" id="LnkTxtFechaVencimientoLineaAdicionalModal" class="btn default" type="button">
|
||||||
|
<i class="fa fa-calendar"></i>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="METxtFechaVencimientoLineaAdicionalModal" runat="server" TargetControlID="TxtFechaVencimientoLineaAdicionalModal" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CETxtFechaVencimientoLineaAdicionalModal" TargetControlID="TxtFechaVencimientoLineaAdicionalModal" PopupButtonID="LnkTxtFechaVencimientoLineaAdicionalModal" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtFechaVencimientoLineaAdicionalModal" runat="server" ControlToValidate="TxtFechaVencimientoLineaAdicionalModal" Display="None"
|
||||||
|
ErrorMessage="El campo <b>''Fecha Vencimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaVencimientoLineaAdicionalModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlClasificacionLienaAdicionalModal" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="250px" runat="server" CssClass="form-control select2me">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlClasificacionLienaAdicionalModal" InitialValue="-1" runat="server" ControlToValidate="DdlClasificacionLienaAdicionalModal" CssClass="help-block errorimput"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||||
|
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:LinkButton ID="LnkAgregarLineaAdicionalModal" runat="server" CssClass="btn btn-success" Text="Guardar" OnClick="LnkAgregarLineaAdicionalModal_Click" ValidationGroup="GrpLineaAdicional" ></asp:LinkButton>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|||||||
@@ -501,6 +501,22 @@ Partial Class Clientes
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveLineaAdicional As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveLineaAdicional") Is Nothing Then
|
||||||
|
ViewState("CveLineaAdicional") = -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return ViewState("CveLineaAdicional").ToString.ToEntero
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveLineaAdicional") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Documentacion"
|
#Region "Documentacion"
|
||||||
@@ -917,6 +933,18 @@ Partial Class Clientes
|
|||||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveCliente:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveCliente)
|
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveCliente:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveCliente)
|
||||||
|
|
||||||
MostrarTxtDireccionesClienteEnvio()
|
MostrarTxtDireccionesClienteEnvio()
|
||||||
|
|
||||||
|
|
||||||
|
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 1) Then
|
||||||
|
CargaCombosLineasAdicionales()
|
||||||
|
TabLineasAdicionales.Visible = True
|
||||||
|
LnkAgregarLineaAdicional.Visible = True
|
||||||
|
GetLineasAdicionales()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
||||||
@@ -926,6 +954,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region " PERMISOS PAGINAS "
|
#Region " PERMISOS PAGINAS "
|
||||||
|
|
||||||
Private Sub MostrarTxtDireccionesClienteEnvio()
|
Private Sub MostrarTxtDireccionesClienteEnvio()
|
||||||
@@ -10308,5 +10338,157 @@ Partial Class Clientes
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaCombosLineasAdicionales()
|
||||||
|
|
||||||
|
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
|
||||||
|
DdlProveedorLineaAdicionalModal.setEsWebService(True)
|
||||||
|
DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
|
||||||
|
DdlProveedorLineaAdicionalModal.SelectedText = "Todos"
|
||||||
|
DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
|
||||||
|
Else
|
||||||
|
DdlProveedorLineaAdicionalModal.setEsWebService(False)
|
||||||
|
DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlProveedorLineaAdicionalModal.ddl.DataBind()
|
||||||
|
DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DdlClasificacionLienaAdicionalModal.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
|
DdlClasificacionLienaAdicionalModal.DataBind()
|
||||||
|
DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GetLineasAdicionales()
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvLineasAdicionales.DataSource = ObjVentas.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
GvLineasAdicionales.DataBind()
|
||||||
|
UpLineasAdicionales.Update()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||||
|
CveLineaAdicional = -1
|
||||||
|
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
||||||
|
LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional"
|
||||||
|
AgregarLineaAdicionalLimpiarControles()
|
||||||
|
UpLineaAdicionalmodal.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AgregarLineaAdicionalLimpiarControles()
|
||||||
|
|
||||||
|
TxtLineaAdicionalModal.Text = ""
|
||||||
|
DdlProveedorLineaAdicionalModal.txtText.Value = ""
|
||||||
|
DdlProveedorLineaAdicionalModal.txtValue.Value = ""
|
||||||
|
DdlTipoLineaAdicionalModal.SelectedValueExist(-1)
|
||||||
|
TxtFechaVencimientoLineaAdicionalModal.Text = ""
|
||||||
|
DdlClasificacionLienaAdicionalModal.SelectedValueExist(-1)
|
||||||
|
TxtImporteLineaAdicionalModal.Text = ""
|
||||||
|
DdlMonedaLineAdicionalModal.SelectedValueExist(-1)
|
||||||
|
|
||||||
|
UpLineaAdicionalmodal.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkAgregarLineaAdicionalModal_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim ErrorAgregar As Boolean = False
|
||||||
|
|
||||||
|
If DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero <= 0 Then
|
||||||
|
Alert("El proveedor es requerido", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
|
||||||
|
If CveLineaAdicional > 0 Then
|
||||||
|
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||||
|
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorAgregar = True
|
||||||
|
Else
|
||||||
|
Alert("Linea Adicional Actualizada Correctamente")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||||
|
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0) Then
|
||||||
|
ErrorAgregar = True
|
||||||
|
Else
|
||||||
|
Alert("Linea Adicional Agregada Correctamente")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If Not ErrorAgregar Then
|
||||||
|
RegistraScript("$('#DVLineasAdicionales').modal('hide')")
|
||||||
|
GetLineasAdicionales()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkEditarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
LtlLineasAdicionalesTotuloModal.Text = "Editar Linea Adicional"
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
Dim ErrorEdicion As Boolean = False
|
||||||
|
|
||||||
|
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||||
|
|
||||||
|
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
|
||||||
|
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
|
||||||
|
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||||
|
DdlTipoLineaAdicionalModal.SelectedValueExist(GvRow.DataKey("TipoLinea").ToEntero)
|
||||||
|
TxtFechaVencimientoLineaAdicionalModal.Text = GvRow.DataKey("FechaVencimiento").ToDate.ToString("dd/MM/yyyy")
|
||||||
|
DdlClasificacionLienaAdicionalModal.SelectedValueExist(GvRow.DataKey("CveClasificacionPS").ToEntero)
|
||||||
|
TxtImporteLineaAdicionalModal.Text = GvRow.DataKey("Importe").ToDecimal.ToString("###,###,###.00")
|
||||||
|
DdlMonedaLineAdicionalModal.SelectedValueExist(GvRow.DataKey("CveMoneda").ToEntero)
|
||||||
|
|
||||||
|
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
||||||
|
|
||||||
|
UpLineaAdicionalmodal.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkEliminarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
Dim CveLineaAdicionalEliminar = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||||
|
Dim ErrorEliminacion As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If Not ObjVentas.RemoveLineasAdicionales(CveLineaAdicionalEliminar, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorEliminacion = True
|
||||||
|
Else
|
||||||
|
Alert("Linea Adicional Eliminada Correctamente")
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If Not ErrorEliminacion Then
|
||||||
|
GetLineasAdicionales()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user