Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -698,6 +698,21 @@ Public Class ClsAcumuladores
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
Public Function GetGarantiasDetalle(CveVenta As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
SqlDataAdapter("PA_Acum_GarantiasDetalleGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As SqlException
|
||||||
|
OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Imports System
|
|||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
|
Imports System.Net.Http
|
||||||
|
|
||||||
Namespace Modelos
|
Namespace Modelos
|
||||||
|
|
||||||
@@ -375,6 +376,7 @@ Namespace Modelos
|
|||||||
Me.RemisionesLista = New List(Of Integer)
|
Me.RemisionesLista = New List(Of Integer)
|
||||||
Me.ListaMensajes = New List(Of String)
|
Me.ListaMensajes = New List(Of String)
|
||||||
Me.FolioFiscal = ""
|
Me.FolioFiscal = ""
|
||||||
|
Me.GenerarPDFFactura = False
|
||||||
IniciaValores()
|
IniciaValores()
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
|
If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
|
||||||
@@ -895,6 +897,9 @@ Namespace Modelos
|
|||||||
If Me.TipoDocto.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Pd2") Then
|
If Me.TipoDocto.Contiene("Ing", "Rem", "Ant", "Egs", "Dev", "Pd2") Then
|
||||||
'If Not ImprimeAlert Then
|
'If Not ImprimeAlert Then
|
||||||
|
|
||||||
|
If Me.GenerarPDFFactura Then
|
||||||
|
DescargarFactura(CveVenta, CveEmpresa)
|
||||||
|
|
||||||
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoIngPyMe As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.mrt", UsuarioActual.Empresa.Ruta))
|
||||||
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoIng As New System.IO.FileInfo(String.Format("{0}Formatos/Factura.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoRem As New System.IO.FileInfo(String.Format("{0}Formatos/Remision.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -907,6 +912,8 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'ERROR DE NO TIMBRADO
|
'ERROR DE NO TIMBRADO
|
||||||
If Not SeTimbro And (Me.TipoDocto = "Ing" Or Me.TipoDocto.Contiene("Egs", "Dev") Or Me.TipoDocto = "Ant") Then
|
If Not SeTimbro And (Me.TipoDocto = "Ing" Or Me.TipoDocto.Contiene("Egs", "Dev") Or Me.TipoDocto = "Ant") Then
|
||||||
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
||||||
@@ -1016,6 +1023,28 @@ Namespace Modelos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer) As Byte()
|
||||||
|
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||||
|
Dim File As Byte() = Nothing
|
||||||
|
Try
|
||||||
|
Using httpClient = New HttpClient()
|
||||||
|
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||||
|
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||||
|
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||||
|
Dim response = httpClient.SendAsync(request).Result
|
||||||
|
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
|
File = response.Content.ReadAsByteArrayAsync().Result
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
File = Nothing
|
||||||
|
OnError("Ocurrió un error al descargar la factura", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return File
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, NC , ESTIMACIONES, AC, NOTA DE CRÉDITO "
|
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, NC , ESTIMACIONES, AC, NOTA DE CRÉDITO "
|
||||||
Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean
|
Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean
|
||||||
Dim ProcesoCorrecto As Boolean = True
|
Dim ProcesoCorrecto As Boolean = True
|
||||||
@@ -1758,7 +1787,6 @@ Namespace Modelos
|
|||||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas) As Boolean
|
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas) As Boolean
|
||||||
Dim Resultado As Boolean = True
|
Dim Resultado As Boolean = True
|
||||||
|
|
||||||
'If ClienteEsDistribuidor Then
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 Then
|
||||||
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero
|
||||||
|
|
||||||
@@ -1785,19 +1813,9 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
|
||||||
Resultado = False
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
ErrorList.Add("El cliente es Distribuidor y no se tiene un producto o servicio asigando como PS Acumulador")
|
|
||||||
Resultado = False
|
|
||||||
End If
|
End If
|
||||||
'Else
|
|
||||||
' Resultado = True
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Return Resultado
|
Return Resultado
|
||||||
|
|
||||||
@@ -8258,6 +8276,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Public Property CveContratoSecciones As String
|
Public Property CveContratoSecciones As String
|
||||||
Public Property CveEstatus As Integer
|
Public Property CveEstatus As Integer
|
||||||
|
Public Property GenerarPDFFactura As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6208,7 +6208,7 @@ Partial Class Compras_Compras
|
|||||||
Case 176
|
Case 176
|
||||||
Dim SumatoriaOCINV = 0.0D, Importe176 = 0.0D, ImporteME176 = 0.0D, ImporteMN176 = 0.0D, Importe228 = 0.0D, ImporteME228 = 0.0D, ImporteMN228 = 0.0D, Importe229 = 0.0D, ImporteME229 = 0.0D, ImporteMN229 = 0.0D, ImporteCI176 = 0.0D
|
Dim SumatoriaOCINV = 0.0D, Importe176 = 0.0D, ImporteME176 = 0.0D, ImporteMN176 = 0.0D, Importe228 = 0.0D, ImporteME228 = 0.0D, ImporteMN228 = 0.0D, Importe229 = 0.0D, ImporteME229 = 0.0D, ImporteMN229 = 0.0D, ImporteCI176 = 0.0D
|
||||||
For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").Rows
|
For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").Rows
|
||||||
If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count = 1 Then
|
If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count >= 1 Then
|
||||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}"
|
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}"
|
||||||
Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||||
Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal
|
||||||
@@ -15327,11 +15327,13 @@ Partial Class Compras_Compras
|
|||||||
TotalFlete = 0
|
TotalFlete = 0
|
||||||
TotalAlmacen = 0
|
TotalAlmacen = 0
|
||||||
|
|
||||||
|
If DtInv IsNot Nothing Then
|
||||||
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
||||||
For Each Dr2 As DataRow In DtInv.Rows
|
For Each Dr2 As DataRow In DtInv.Rows
|
||||||
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
||||||
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
||||||
Next
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
'sino hay producto en almacen para aplciarle un servicio, no se debe de amrcar como costo indirecto
|
'sino hay producto en almacen para aplciarle un servicio, no se debe de amrcar como costo indirecto
|
||||||
'esto aplica cuando la factura solo trae un concepto, y es el de servicio
|
'esto aplica cuando la factura solo trae un concepto, y es el de servicio
|
||||||
|
|||||||
@@ -1517,6 +1517,7 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL())
|
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL())
|
||||||
|
Dim ObjAcumuladores As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||||
Dim CveMovimiento As Integer
|
Dim CveMovimiento As Integer
|
||||||
Dim Folio As Integer
|
Dim Folio As Integer
|
||||||
Dim ErrorMovInv As Boolean
|
Dim ErrorMovInv As Boolean
|
||||||
@@ -1524,6 +1525,8 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Dim DtDetalleLote As New DataTable
|
Dim DtDetalleLote As New DataTable
|
||||||
Dim TextoError = ""
|
Dim TextoError = ""
|
||||||
|
|
||||||
|
Dim CveMovimientoGarantia As Integer = -1
|
||||||
|
Dim FolioGarantia As Integer = -1
|
||||||
|
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index = 0
|
||||||
@@ -1561,7 +1564,17 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim DtTraspasos As New DataTable
|
||||||
|
DtTraspasos.Columns.Add("CveAlmacen", GetType(Integer))
|
||||||
|
DtTraspasos.Columns.Add("Almacen", GetType(String))
|
||||||
|
DtTraspasos.Columns.Add("CveMovimientoSalida", GetType(Integer))
|
||||||
|
DtTraspasos.Columns.Add("FolioSalida", GetType(Integer))
|
||||||
|
DtTraspasos.Columns.Add("CveMovimientoEntrada", GetType(Integer))
|
||||||
|
DtTraspasos.Columns.Add("FolioEntrada", GetType(Integer))
|
||||||
|
|
||||||
|
Dim CveMovimientoSalida = -1, FolioSalida = -1, CveMovimientoEntrada = -1, CveMovimientoEntradaApartado = -1, FolioEntrada = -1, CveMovimientoSalidaDevRem = -1, FolioMovimientoSalidaDevRem = -1, CveMovimientoEntradaDevRem = -1, FolioMovimientoEntradaDevRem = -1
|
||||||
|
|
||||||
|
Try
|
||||||
'VALIDA EXISTENCIA 2
|
'VALIDA EXISTENCIA 2
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
|
|
||||||
@@ -1686,15 +1699,6 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
|
|
||||||
|
|
||||||
'' COMIENZA: APARTADOS
|
'' COMIENZA: APARTADOS
|
||||||
Dim DtTraspasos As New DataTable
|
|
||||||
DtTraspasos.Columns.Add("CveAlmacen", GetType(Integer))
|
|
||||||
DtTraspasos.Columns.Add("Almacen", GetType(String))
|
|
||||||
DtTraspasos.Columns.Add("CveMovimientoSalida", GetType(Integer))
|
|
||||||
DtTraspasos.Columns.Add("FolioSalida", GetType(Integer))
|
|
||||||
DtTraspasos.Columns.Add("CveMovimientoEntrada", GetType(Integer))
|
|
||||||
DtTraspasos.Columns.Add("FolioEntrada", GetType(Integer))
|
|
||||||
|
|
||||||
Dim CveMovimientoSalida = -1, FolioSalida = -1, CveMovimientoEntrada = -1, CveMovimientoEntradaApartado = -1, FolioEntrada = -1, CveMovimientoSalidaDevRem = -1, FolioMovimientoSalidaDevRem = -1, CveMovimientoEntradaDevRem = -1, FolioMovimientoEntradaDevRem = -1
|
|
||||||
Dim CantidadPendiente As Decimal = 0
|
Dim CantidadPendiente As Decimal = 0
|
||||||
Dim CantidadSaldo As Decimal = 0
|
Dim CantidadSaldo As Decimal = 0
|
||||||
|
|
||||||
@@ -1889,6 +1893,36 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End If
|
End If
|
||||||
'' TERMINA: APARTADOS
|
'' TERMINA: APARTADOS
|
||||||
|
|
||||||
|
' COMIENZA: GARANTIAS
|
||||||
|
If TipoDocto.Contiene("Rem") AndAlso UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 1 Then
|
||||||
|
|
||||||
|
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||||
|
Dim DtGarantias As DataTable = Nothing
|
||||||
|
|
||||||
|
If ObjAcumuladores.GetGarantiasDetalle(CveVentaSurtir) Then
|
||||||
|
DtGarantias = ObjAcumuladores.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 Then
|
||||||
|
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text)
|
||||||
|
FolioGarantia = ObjInventario.Folio
|
||||||
|
|
||||||
|
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||||
|
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
|
||||||
|
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
||||||
|
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
||||||
|
Dim PU As Double = RowGarantia("Importe").ToString().ToDouble() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, -1) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' TERMINA: GARANTIAS
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Dim ConceptoMovimiento = 3
|
Dim ConceptoMovimiento = 3
|
||||||
@@ -2320,6 +2354,12 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
ErrorMovInv = True
|
||||||
|
OnError("Ocurrió un error al guardar",ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
@@ -2345,6 +2385,11 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveMovimientoGarantia > 0 Then
|
||||||
|
Msg.AppendFormat("<br/>Movimiento de Entrada (garantías): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoGarantia, FolioGarantia)
|
||||||
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoGarantia)))
|
||||||
|
End If
|
||||||
|
|
||||||
'If CveMovimientoSalidaDevRem > 0 Then
|
'If CveMovimientoSalidaDevRem > 0 Then
|
||||||
' Msg.AppendFormat("<br/><br/> Movimiento de salida de devolución (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalidaDevRem, FolioMovimientoSalidaDevRem)
|
' Msg.AppendFormat("<br/><br/> Movimiento de salida de devolución (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoSalidaDevRem, FolioMovimientoSalidaDevRem)
|
||||||
' Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaDevRem)))
|
' Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaDevRem)))
|
||||||
@@ -2358,11 +2403,12 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Limpia()
|
Limpia()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
Else
|
Else
|
||||||
|
ObjInventario.RollBack()
|
||||||
Alert(TextoError, TipoMensaje.MsgError)
|
Alert(TextoError, TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
ObjInventario.RollBack()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjAcumuladores.Dispose()
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
|||||||
@@ -83,16 +83,11 @@
|
|||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
<div class="row" style="margin-left: 0px; margin-right: 0px;">
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpGenerales" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGenerales" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="col-md-8">
|
<div class="portlet smmallpadding light bordered infomov" style="width: 100%">
|
||||||
<div class="portlet smmallpadding light bordered infomov" style="width: 750px">
|
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
@@ -100,6 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información del movimiento
|
<i class="fa fa-info-circle"></i>Información del movimiento
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||||
@@ -241,6 +237,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 truncate" style="width: 110px">
|
<label class="col-md-1 truncate" style="width: 110px">
|
||||||
Observaciones:
|
Observaciones:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
||||||
@@ -282,10 +279,58 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div id="DivRecepcionUsados" runat="server" visible="false" class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Remisiones por Recibir</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Panel runat="server" DefaultButton="BtnConsultarPendientes">
|
||||||
|
|
||||||
|
|
||||||
|
<b>Sucursal:</b>
|
||||||
|
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="90px"></asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:TextBox ID="TxtFechaPendientes" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpPendientes" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
<asp:LinkButton ID="ImgFechaPendientes" Style="background-color: white;" class="btn default " Text="<i style='width:16px; height:16px;' class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaPendientes" runat="server" TargetControlID="TxtFechaPendientes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaPendientes" TargetControlID="TxtFechaPendientes" PopupButtonID="ImgFechaPendientes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPendientes"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpPendientes"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1Pendientes" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2Pendientes" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<asp:Button Text="Recarga" Width="75px" ID="BtnConsultarPendientes" OnClick="BtnConsultarPendientes_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpPendientes" />
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<asp:GridView ID="GVPendientes" runat="server" DataKeyNames="CveVenta" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Serie-Folio" ItemStyle-Width="20%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label runat="server" ID="LblFolio" Text='<%# Eval("SerieFolio")%>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton Text="Recibir" ID="BtnRecibir" CommandArgument="-1" OnClick="BtnRecibir_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Center" Width="20%" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<%--INVENTARIO INICIAL--%>
|
<%--INVENTARIO INICIAL--%>
|
||||||
<asp:UpdatePanel runat="server" ID="UpCodigoBarras" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpCodigoBarras" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -297,6 +342,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Agregar Producto
|
<i class="fa fa-info-circle"></i>Agregar Producto
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -351,8 +397,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpRegistroTipoCambio" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpRegistroTipoCambio" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -365,12 +409,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información de registro
|
<i class="fa fa-info-circle"></i>Información de registro
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Usuario:
|
Usuario:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||||
@@ -380,6 +426,7 @@
|
|||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Fecha:
|
Fecha:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||||
@@ -388,6 +435,7 @@
|
|||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Referencia:
|
Referencia:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||||
@@ -400,6 +448,7 @@
|
|||||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Consignación:
|
Consignación:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||||
@@ -409,6 +458,7 @@
|
|||||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Tipo Cambio:
|
Tipo Cambio:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||||
@@ -417,6 +467,7 @@
|
|||||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Mto. Rel.:
|
Mto. Rel.:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||||
@@ -434,6 +485,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -470,9 +522,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||||
@@ -702,6 +752,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5" style="text-align: right;">
|
<div class="col-md-5" style="text-align: right;">
|
||||||
Cantidad
|
Cantidad
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||||
@@ -766,7 +817,8 @@
|
|||||||
<label for='<%= DdlProducto2.ClientID %>'>Producto:</label>
|
<label for='<%= DdlProducto2.ClientID %>'>Producto:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input "><br />
|
<div class="form-group form-md-line-input ">
|
||||||
|
<br />
|
||||||
<label for='<%= DdlUnidad.ClientID %>'>Unidad de Medida:</label><br />
|
<label for='<%= DdlUnidad.ClientID %>'>Unidad de Medida:</label><br />
|
||||||
<asp:DropDownList ID="DdlUnidad" runat="server" Class="form-control input-sm select2me" Style="width: 75px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
|
<asp:DropDownList ID="DdlUnidad" runat="server" Class="form-control input-sm select2me" Style="width: 75px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
|
||||||
<asp:CompareValidator ID="CVUnidad" runat="server" ControlToValidate="ddlUnidad" Type="Integer" Operator="GreaterThan" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Medida''</b> es necesario, por favor selecione una." Display="None" ValueToCompare="0" ValidationGroup="GprAgregarUsado"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVUnidad" runat="server" ControlToValidate="ddlUnidad" Type="Integer" Operator="GreaterThan" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Medida''</b> es necesario, por favor selecione una." Display="None" ValueToCompare="0" ValidationGroup="GprAgregarUsado"></asp:CompareValidator>
|
||||||
|
|||||||
@@ -198,6 +198,22 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ViewState("FolioAsignado") = value
|
ViewState("FolioAsignado") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property CveRemisionRecibida As Integer
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("CveRemisionRecibida"), -1, CType(ViewState("CveRemisionRecibida"), Integer)).ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveRemisionRecibida") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property EsDistribuidor As Boolean
|
||||||
|
Get
|
||||||
|
Return CBool(IfNull(ViewState("EsDistribuidor"), False, CBool(ViewState("EsDistribuidor"))))
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("EsDistribuidor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private ReadOnly Property CveConcepto As Integer
|
Private ReadOnly Property CveConcepto As Integer
|
||||||
@@ -270,6 +286,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
CreaDT()
|
CreaDT()
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
TxtFecha.Text = Now.ToShortDateString
|
TxtFecha.Text = Now.ToShortDateString
|
||||||
|
TxtFechaPendientes.Text = Now.ToShortDateString
|
||||||
RVFecha.MaximumValue = Now.ToShortDateString
|
RVFecha.MaximumValue = Now.ToShortDateString
|
||||||
InicializaClientes()
|
InicializaClientes()
|
||||||
|
|
||||||
@@ -298,6 +315,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaSubProyectosUsados()
|
||||||
InicializaBitacoraTemporal()
|
InicializaBitacoraTemporal()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||||
@@ -507,8 +525,30 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Private Sub CargaSubProyectos()
|
Private Sub CargaSubProyectos()
|
||||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
||||||
DdlSubProyecto.DataBind()
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
|
||||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaSubProyectosUsados()
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
DivRecepcionUsados.Visible = True
|
||||||
|
|
||||||
|
If Not UsuarioActual.TienePermisoProceso(190) Then
|
||||||
|
'CARGA SOLO LAS SUCURSALES DE LOS ALMCENES QUE TIENE ASIGNADO EL USUARIO
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
If ObjInventarios.GetSucursalesAlmacenUsuario(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlSubProyectos.DataSource = ObjInventarios.DtResultados
|
||||||
|
End If
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
Else
|
||||||
|
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
End If
|
||||||
|
DdlSubProyectos.DataBind()
|
||||||
|
DdlSubProyectos.SelectedValueExist(UsuarioActual.CveSubProyecto.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
Private Sub CargaPersonal()
|
Private Sub CargaPersonal()
|
||||||
TrPersonal.Visible = True
|
TrPersonal.Visible = True
|
||||||
Dim dt As DataTable = Nothing
|
Dim dt As DataTable = Nothing
|
||||||
@@ -940,16 +980,12 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If GvM.Rows.Count > 0 Then
|
If GvM.Rows.Count > 0 Then
|
||||||
|
|
||||||
'Dim CveMovimiento As Integer
|
'Dim CveMovimiento As Integer
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
Dim ObjAcum As New ClsAcumuladores(ObjInventario.IniciaTransacSQL())
|
||||||
|
Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL())
|
||||||
|
|
||||||
Dim ErrorMovInv As Boolean = False
|
Dim ErrorMovInv As Boolean = False
|
||||||
Dim ErrorAC As Boolean = False
|
Dim ErrorAC As Boolean = False
|
||||||
@@ -978,9 +1014,12 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
Dim tCveProveedor As Integer = -1
|
Dim tCveProveedor As Integer = -1
|
||||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedor.SelectedValue.ToEntero
|
If DdlProveedor.SelectedValue.ToEntero > 0 Then tCveProveedor = DdlProveedor.SelectedValue.ToEntero
|
||||||
|
Dim CveVenta As Integer = -1
|
||||||
|
If CveRemisionRecibida > 0 Then
|
||||||
|
CveVenta = CveRemisionRecibida
|
||||||
|
End If
|
||||||
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, $" {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, $" {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1,
|
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
|
||||||
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
|
||||||
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
|
||||||
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor)
|
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor)
|
||||||
@@ -1007,11 +1046,17 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ObjVentas.UpdateVentaUsadoRecibido(CveRemisionRecibida, Dr("CvePS").ToString.ToEntero, True) Then
|
||||||
|
Mensaje = "Error al actualizar el recibo de los usados"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
|
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
|
||||||
|
|
||||||
|
|
||||||
If RBLOpcion.SelectedValue.ToEntero <> 3 Then
|
If RBLOpcion.SelectedValue.ToEntero <> 3 Then
|
||||||
|
If EsDistribuidor Then
|
||||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, -1, UsuarioActual.CveUsuario,
|
||||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||||
|
|
||||||
@@ -1023,6 +1068,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1933,4 +1980,62 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
UpGenerales.Update()
|
UpGenerales.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||||
|
GVPendientes.DataSource = ObjVentas.DtResultados
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
GVPendientes.DataBind()
|
||||||
|
|
||||||
|
UpGenerales.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs)
|
||||||
|
DtMovimientos.Rows.Clear()
|
||||||
|
|
||||||
|
Me.CveRemisionRecibida = -1
|
||||||
|
Me.CveRemisionRecibida = CType(CType(sender, LinkButton).NamingContainer, GridViewRow).DataKey("CveVenta").ToEntero()
|
||||||
|
|
||||||
|
|
||||||
|
Dim DtUsados As DataTable = Nothing
|
||||||
|
Dim CveCliente As Integer = -1
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
|
||||||
|
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If EsDistribuidor Then
|
||||||
|
DivCliente.Visible = True
|
||||||
|
Else
|
||||||
|
DivCliente.Visible = False
|
||||||
|
End If
|
||||||
|
DdlClientes.SelectedValueExist(CveCliente)
|
||||||
|
|
||||||
|
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
|
||||||
|
DtUsados = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtUsados IsNot Nothing Then
|
||||||
|
For Each RowUsado As DataRow In DtUsados.Rows
|
||||||
|
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim RowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0) '.FiltroPrimeroValor("CveTamaño", $"CvePS = { DdlProducto2.SelectedValue.ToEntero }").ToEntero
|
||||||
|
Dim CveTamaño As Integer = RowPS("CveTamaño").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim PS As String = RowPS("PS").ToString()
|
||||||
|
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
|
||||||
|
Dim UM As String = RowPS("UnidadMedida").ToString()
|
||||||
|
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
|
||||||
|
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||||
|
|
||||||
|
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpGenerales.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
21
LogMail.txt
21
LogMail.txt
@@ -4,23 +4,4 @@
|
|||||||
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
||||||
|
|
||||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
||||||
|
|
||||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'japmx95@gmail.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-23' - CCP: '' - Adjuntos: 1
|
|
||||||
|
|
||||||
05/09/2019:11:02 a. m. From:'signotificaciones@adssistemas.mx' - Para:';' - Asunto:'Envío de complemento de pago' - CCP: '' - Adjuntos: 2
|
|
||||||
- Ocurrió un error al mandar correo.System.InvalidOperationException: Se debe especificar un destinatario.
|
|
||||||
en System.Net.Mail.SmtpClient.Send(MailMessage message)
|
|
||||||
en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
|
|
||||||
|
|
||||||
05/09/2019:12:31 p. m. From:'signotificaciones@adssistemas.mx' - Para:';' - Asunto:'Envío de complemento de pago' - CCP: '' - Adjuntos: 2
|
|
||||||
- Ocurrió un error al mandar correo.System.InvalidOperationException: Se debe especificar un destinatario.
|
|
||||||
en System.Net.Mail.SmtpClient.Send(MailMessage message)
|
|
||||||
en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
|
|
||||||
|
|
||||||
10/09/2019:12:16 p. m. From:'signotificaciones@adssistemas.mx' - Para:'DSDDS@hotmail.com' - Asunto:'SIG - La Orden Compra #26598 cambió de estatus.' - CCP: '' - Adjuntos: 0
|
|
||||||
|
|
||||||
10/09/2019:02:58 p. m. No se especifico a remitente - SIG - La Orden Compra #28107 cambió de estatus.
|
|
||||||
|
|
||||||
11/09/2019:11:56 a. m. From:'signotificaciones@adssistemas.mx' - Para:'antonio.gonzalez@adssistemas.mx' - Asunto:'Solicitud Vacaciones ' - CCP: '' - Adjuntos: 0
|
|
||||||
|
|
||||||
11/09/2019:12:35 p. m. From:'signotificaciones@adssistemas.mx' - Para:'antonio.gonzalez@adssistemas.mx' - Asunto:'(Vacaciones:Permisos) Asistencia Técnica AD Sistemas' - CCP: '' - Adjuntos: 0
|
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
|
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=2', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>
|
<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=-1', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>
|
||||||
<asp:LinkButton ID="LnkAgregarCliente" runat="server" AlternateText="Agregar Cliente" Text="<i class='fa fa-plus-square'></i>" />
|
<asp:LinkButton ID="LnkAgregarCliente" runat="server" AlternateText="Agregar Cliente" Text="<i class='fa fa-plus-square'></i>" />
|
||||||
<asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox>
|
<asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox>
|
||||||
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
@@ -338,7 +338,6 @@
|
|||||||
<asp:ListItem Value="Ing" Text="Ingresos" Selected="True"></asp:ListItem>
|
<asp:ListItem Value="Ing" Text="Ingresos" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<%--<td id="TdReferencia" runat="server" style="display: none;"> Ref: <asp:TextBox ID="TxtDocto" runat="server" ToolTip="Referencia (Número de factura original)" Width="40px"></asp:TextBox></td>--%>
|
<%--<td id="TdReferencia" runat="server" style="display: none;"> Ref: <asp:TextBox ID="TxtDocto" runat="server" ToolTip="Referencia (Número de factura original)" Width="40px"></asp:TextBox></td>--%>
|
||||||
<td runat="server" id="TdOrdenPago" visible="false">
|
<td runat="server" id="TdOrdenPago" visible="false">
|
||||||
@@ -1503,7 +1502,7 @@
|
|||||||
<asp:Literal ID="LtlRecepcionUsados" Text="Recepcion Usados" runat="server"> </asp:Literal></h4>
|
<asp:Literal ID="LtlRecepcionUsados" Text="Recepcion Usados" runat="server"> </asp:Literal></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
<asp:GridView ID="GvRecepcionUsadosModal" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CvePSCargo,CveUM,Cargo">
|
DataKeyNames="CvePSCargo,CveUM,Cargo">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -2620,7 +2619,7 @@
|
|||||||
<asp:HiddenField ID="HdnPorcentajeIEPS" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnPorcentajeIEPS" runat="server" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnCvePS" runat="server" Value="-1" />
|
<asp:HiddenField ID="HdnCvePS" runat="server" Value="-1" />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row" runat="server" visible="false">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged">
|
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged">
|
||||||
@@ -2643,7 +2642,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<asp:UpdatePanel runat="server" ID="UpUnidadMedida" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpUnidadMedida" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlUnidadMedida" AppendDataBoundItems="true" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%;"></asp:DropDownList>
|
<asp:DropDownList ID="DdlUnidadMedida" AppendDataBoundItems="true" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%;"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="DdlUnidadMedida" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="DdlUnidadMedida" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEUnidadMedida" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadMedida" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEUnidadMedida" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadMedida" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -2653,12 +2652,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
<div class="row">
|
||||||
<div>
|
<div class="col-md-7">
|
||||||
<label>Observación:</label>
|
<label>Observación:</label>
|
||||||
<br />
|
<br />
|
||||||
<asp:TextBox ID="TxtObsPS" runat="server" Height="50" Width="398px" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
<asp:TextBox ID="TxtObsPS" runat="server" Height="100%" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-5" id="DivRecepcionUsados" runat="server" visible="false">
|
||||||
|
<asp:GridView ID="GvRecepcionUsados" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
|
||||||
|
data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-height="100"
|
||||||
|
DataKeyNames="CvePSCargo,CveUM,Cargo,CveTamaño">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70%" />
|
||||||
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%" >
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtCantidad" runat="server" Width="80%"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="76px" CssClass="form-control "></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="76px" CssClass="form-control "></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ Option Strict On
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Xml
|
Imports System.Linq
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports System.Security.Cryptography.X509Certificates
|
Imports System.Security.Cryptography.X509Certificates
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
|
||||||
@@ -1162,6 +1161,10 @@ Partial Class PV
|
|||||||
BtnEmitirImprimir.Attributes.Add("data-html", "true")
|
BtnEmitirImprimir.Attributes.Add("data-html", "true")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then
|
||||||
|
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||||
|
End If
|
||||||
|
|
||||||
'Le quitamos el tamaño extra
|
'Le quitamos el tamaño extra
|
||||||
'RegistraScript("window.onload = function AjustarVentana() { $('.page-content').css('min-height','100%'); }")
|
'RegistraScript("window.onload = function AjustarVentana() { $('.page-content').css('min-height','100%'); }")
|
||||||
@@ -1601,6 +1604,7 @@ Partial Class PV
|
|||||||
ViewState("CliNoInt") = ObjCliente.NoInt
|
ViewState("CliNoInt") = ObjCliente.NoInt
|
||||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||||
ViewState("CliPais") = ObjCliente.Pais
|
ViewState("CliPais") = ObjCliente.Pais
|
||||||
|
|
||||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||||
EnviarCorreoCliente = ObjCliente.EnviarFactura
|
EnviarCorreoCliente = ObjCliente.EnviarFactura
|
||||||
ChkEnviarFactura.Visible = True
|
ChkEnviarFactura.Visible = True
|
||||||
@@ -1622,8 +1626,8 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
DdlMetodoPago.SelectedValue = ObjCliente.CveMetodoPago.ToString
|
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
|
||||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
|
||||||
End If
|
End If
|
||||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||||
|
|
||||||
@@ -1955,9 +1959,10 @@ Partial Class PV
|
|||||||
|
|
||||||
Dim DbRow As DataRow = Nothing
|
Dim DbRow As DataRow = Nothing
|
||||||
DbRow = TmpDT.Rows(e.RowIndex)
|
DbRow = TmpDT.Rows(e.RowIndex)
|
||||||
TmpDT.Rows.Remove(DbRow)
|
|
||||||
|
|
||||||
CalculaUsados()
|
EliminarUsados(DbRow("Consec").ToString().ToEntero())
|
||||||
|
|
||||||
|
TmpDT.Rows.Remove(DbRow)
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
@@ -2069,14 +2074,14 @@ Partial Class PV
|
|||||||
e.Row.FCCheckBox("cbInv").Enabled = True
|
e.Row.FCCheckBox("cbInv").Enabled = True
|
||||||
|
|
||||||
'SI ES REMISION O VENTA DEBE SALIR DE ALMACEN
|
'SI ES REMISION O VENTA DEBE SALIR DE ALMACEN
|
||||||
If UsuarioActual.TienePermisoProceso(157) AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
'If UsuarioActual.TienePermisoProceso(157) AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
||||||
e.Row.FCCheckBox("cbInv").Checked = True
|
' e.Row.FCCheckBox("cbInv").Checked = True
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
' e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||||
e.Row.FCCheckBox("cbInv").Checked = True
|
' e.Row.FCCheckBox("cbInv").Checked = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2256,22 +2261,18 @@ Partial Class PV
|
|||||||
MandarCorreoSupervisor = False
|
MandarCorreoSupervisor = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If DdlTipoComprobante.SelectedValue = "Cot" Then
|
'If TmpDTAjustes IsNot Nothing AndAlso Not TmpDTAjustes.Rows.Count > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||||
' EmitirImprimirNew()
|
' RegistraScript("$('#DModalRecepcionUsados').modal('show');")
|
||||||
'Else
|
'Else
|
||||||
' LimpiaEscondeContado()
|
' EmitirImprimirNew()
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If TmpDTAjustes IsNot Nothing AndAlso Not TmpDTAjustes.Rows.Count > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DModalRecepcionUsados"))
|
|
||||||
Else
|
|
||||||
EmitirImprimirNew()
|
EmitirImprimirNew()
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " NNNNEEEEEEEWWWWWW "
|
#Region "E M I T I R - F A C T U R A"
|
||||||
Protected Sub EmitirImprimirNew()
|
Protected Sub EmitirImprimirNew()
|
||||||
|
|
||||||
If ValidaPagosContado() Then
|
If ValidaPagosContado() Then
|
||||||
@@ -2293,12 +2294,6 @@ Partial Class PV
|
|||||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV))
|
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
' 'MUESTA ALERT OK
|
|
||||||
' Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";")
|
|
||||||
' Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, Liga)
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2490,29 +2485,38 @@ Partial Class PV
|
|||||||
|
|
||||||
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
|
ObjFactura.DtRecepcionUsados = TmpDTRecepcionUsados
|
||||||
|
|
||||||
|
ObjFactura.GenerarPDFFactura = True
|
||||||
|
|
||||||
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
Dim CveTipoAlmacen As Integer = If(TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0, 6, 22)
|
||||||
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
If GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows.Count > 0 Then
|
||||||
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
ObjFactura.CveAlmacenRecepcionUsados = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveTipoAlmacen = {CveTipoAlmacen} AND CveSubProyecto= {DdlSubProyectoDatos.SelectedValue}").Rows(0)("CveAlmacen").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ddlAlmacen.SelectedValue.ToEntero > 0 AndAlso ddlAlmacen.Items.Count > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
'If Not ddlAlmacen.SelectedValue.ToEntero > 0 AndAlso ddlAlmacen.Items.Count > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
|
||||||
ddlAlmacen.SelectedIndex = 1
|
' ddlAlmacen.SelectedIndex = 1
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
If ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||||
ObjFactura.CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
ObjFactura.CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
If Not DtInv.Columns.Contains("Seleccionado") Then
|
||||||
DtInv.Columns.Add("Seleccionado", GetType(Integer))
|
DtInv.Columns.Add("Seleccionado", GetType(Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
Dim Dr As DataRow = DtInv.Select($"CvePS={Gvr.DataKey("CvePS")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"CvePS={Gvr.DataKey("CvePS")}")(0)
|
||||||
If Gvr.FCCheckBox("cbInv").Checked Then
|
If Gvr.FCCheckBox("cbInv").Checked AndAlso ddlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||||
Dr("Seleccionado") = 1
|
Dr("Seleccionado") = 1
|
||||||
Else
|
Else
|
||||||
Dr("Seleccionado") = 0
|
Dr("Seleccionado") = 0
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
|
|
||||||
ObjFactura.DtInventario = DtInv.FiltraParametros("Seleccionado = 1")
|
ObjFactura.DtInventario = DtInv.FiltraParametros("Seleccionado = 1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2717,6 +2721,11 @@ Partial Class PV
|
|||||||
HdnTipoInv.Value = drPS("Inv_CveMetodoInventario").ToString
|
HdnTipoInv.Value = drPS("Inv_CveMetodoInventario").ToString
|
||||||
HdnAplicaIEPS.Value = drPS("AplicaIEPS").ToString
|
HdnAplicaIEPS.Value = drPS("AplicaIEPS").ToString
|
||||||
HdnPorcentajeIEPS.Value = drPS("IEPSPorcentaje").ToString
|
HdnPorcentajeIEPS.Value = drPS("IEPSPorcentaje").ToString
|
||||||
|
'Muestra la tabla de tamaños
|
||||||
|
If drPS("CveTamaño").ToString().ToEntero() > 0 Then
|
||||||
|
DivRecepcionUsados.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
DdlUnidadMedida.Items.Clear()
|
DdlUnidadMedida.Items.Clear()
|
||||||
If UsuarioActual.Empresa.UsaInventarios Then
|
If UsuarioActual.Empresa.UsaInventarios Then
|
||||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1)
|
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(CvePSParametro, -1)
|
||||||
@@ -2791,7 +2800,7 @@ Partial Class PV
|
|||||||
UpClasificacion.Update()
|
UpClasificacion.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpUnidadMedida.Update()
|
UpUnidadMedida.Update()
|
||||||
|
UpAddVenta.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
|
Protected Sub DdlPS_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlPS.selectedindexchange
|
||||||
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero, DdlPS)
|
DdlPSIndexChange(DdlPS.SelectedValue.ToEntero, DdlPS)
|
||||||
@@ -2980,6 +2989,9 @@ Partial Class PV
|
|||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
@@ -3152,6 +3164,13 @@ Partial Class PV
|
|||||||
|
|
||||||
ChkAgregar.Checked = True
|
ChkAgregar.Checked = True
|
||||||
|
|
||||||
|
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||||
|
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
Gvr.FCTextBox("TxtCantidad").Text = ""
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
DivRecepcionUsados.Visible = False
|
||||||
|
|
||||||
LimpiaAjuste()
|
LimpiaAjuste()
|
||||||
|
|
||||||
UPPDescuento.Update()
|
UPPDescuento.Update()
|
||||||
@@ -3164,17 +3183,19 @@ Partial Class PV
|
|||||||
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False) As Boolean
|
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False) As Integer
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Integer = -1
|
||||||
If Not CvePS > 0 Then
|
If Not CvePS > 0 Then
|
||||||
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (Obs.Length + PS.Length > 1000) Then
|
If (Obs.Length + PS.Length > 1000) Then
|
||||||
Alert(String.Format("El Nombre y observación del producto tiene longitud de {0} caracteres y excede los 1000 caracteres permitidos.", Obs.Length + PS.Length), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("El Nombre y observación del producto tiene longitud de {0} caracteres y excede los 1000 caracteres permitidos.", Obs.Length + PS.Length), TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VALIDA CONCEPTOS EN CERO - YA SE VALIDA ANTES CON FUNCIONALIDAD - A MIRAS DE ELIMINAR - IPP 28 AGOSTO 2017
|
'VALIDA CONCEPTOS EN CERO - YA SE VALIDA ANTES CON FUNCIONALIDAD - A MIRAS DE ELIMINAR - IPP 28 AGOSTO 2017
|
||||||
@@ -3183,153 +3204,19 @@ Partial Class PV
|
|||||||
If Cantidad * PU <= 0 Then
|
If Cantidad * PU <= 0 Then
|
||||||
If Not DdlTipoComprobante.SelectedValue = "DPe" Then
|
If Not DdlTipoComprobante.SelectedValue = "DPe" Then
|
||||||
Alert("El importe del concepto debe ser mayor a cero. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El importe del concepto debe ser mayor a cero. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim Row As DataRow = Nothing
|
||||||
|
|
||||||
If Modalidad = "A" Then
|
If Modalidad = "A" Then
|
||||||
Dim Row As DataRow = Nothing
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = 0
|
|
||||||
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
|
||||||
|
|
||||||
Row = TmpDT.NewRow()
|
Row = TmpDT.NewRow()
|
||||||
Row("CveProyecto") = CveProyecto
|
|
||||||
Row("Proyecto") = Proyecto
|
|
||||||
Row("CveSubProyecto") = CveSubProyecto
|
|
||||||
Row("SubProyecto") = SubProyecto
|
|
||||||
Row("SerieLote") = SerieLote
|
|
||||||
Row("TiempoEntrega") = TiempoEntrega
|
|
||||||
Row("Orden") = TmpDT.Rows.Count + 1
|
|
||||||
Row("Cantidad") = Cantidad
|
|
||||||
Row("CveUM") = CveUM
|
|
||||||
Row("UM") = UM
|
|
||||||
Row("CveClasificacion") = CveClasificacion
|
|
||||||
Row("Clasificacion") = Clasificacion
|
|
||||||
Row("CvePS") = CvePS
|
|
||||||
Row("Obs") = Obs
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim DrPS As DataRow = Nothing
|
|
||||||
|
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
|
||||||
|
|
||||||
If DrPS Is Nothing Then
|
|
||||||
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Not ClienteDesglosaIEPS Then
|
|
||||||
If Not RegeneraIEPS Then
|
|
||||||
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal)
|
|
||||||
End If
|
|
||||||
DrPS("IEPSPorcentaje") = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
'verifica si tiene ventaminima
|
|
||||||
If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then
|
|
||||||
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
|
||||||
If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
|
||||||
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString))
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
|
||||||
|
|
||||||
Row("PU") = PU
|
|
||||||
Row("Codigo") = DrPS("Codigo")
|
|
||||||
Row("NoIdentificacion") = DrPS("Codigo")
|
|
||||||
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
|
|
||||||
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
|
||||||
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
|
||||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
|
||||||
Row("Consec") = TmpDT.Rows.Count + 1
|
|
||||||
If Not EsCargo Then
|
|
||||||
ConsecutivoVenta = TmpDT.Rows.Count + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
Row("PS") = DrPS("PS")
|
|
||||||
Row("CodigoPS") = DrPS("PSCodigo").ToString
|
|
||||||
Row("CveTipoPS") = DrPS("CveTipoPS")
|
|
||||||
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
|
|
||||||
Row("CveTamaño") = DrPS("CveTamaño")
|
|
||||||
|
|
||||||
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
|
||||||
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
|
||||||
|
|
||||||
If DrPS("IVA").ToString.Contiene("-1", "") Then
|
|
||||||
Row("PorcentajeIVA") = SubProyectoPorcentajeIVA
|
|
||||||
Else
|
|
||||||
Row("PorcentajeIVA") = DrPS("IVA")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Row("IVA") = Row("PorcentajeIVA")
|
|
||||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
|
||||||
|
|
||||||
|
|
||||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
|
||||||
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
|
||||||
Row("PorcentajeRetIVA") = ClienteRetIVA
|
|
||||||
Row("PorcentajeRetISR") = ClienteRetISR
|
|
||||||
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
|
|
||||||
Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
|
||||||
Row("IEPS") = Row("ImporteIEPS")
|
|
||||||
Row("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
|
||||||
Row("TipoDescuento") = HdnTipoDescuento.Value
|
|
||||||
Row("Total") = (Cantidad * PU)
|
|
||||||
Row("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
|
||||||
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
|
||||||
' Row("IdCtaContVentas") = IdCtaContable
|
|
||||||
' Row("AplicaParaConcepto") = AplicaParaConcepto
|
|
||||||
|
|
||||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
|
||||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
|
||||||
|
|
||||||
|
|
||||||
Row("EntregaDirecta") = EntregaDirecta
|
|
||||||
'Contratos
|
|
||||||
Row("CveContratoDetalle") = CveContratoDetalle
|
|
||||||
Row("CveVentaDetalle") = CveVentaDetalle
|
|
||||||
Row("CveMovimientoDetallePedido") = CveVentaDetalle
|
|
||||||
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
|
|
||||||
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
|
|
||||||
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
|
|
||||||
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
|
|
||||||
Row("CuentaPredial") = CuentaPredial
|
|
||||||
Row("EsCargo") = EsCargo
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
|
||||||
|
|
||||||
'MONEDA DIFERENTE DEL PS AL PRIMER PS AGREGADO
|
|
||||||
If DdlMoneda.Enabled = False And CveVenta < 0 And TmpDT.Rows.Count > 0 Then
|
|
||||||
If DdlMoneda.SelectedValue <> DrPS("CveMoneda").ToString Then
|
|
||||||
Alert($"La moneda base del producto: <b>{DrPS("PSCodigo").ToString}</b> es diferente a la moneda del documento.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ACTIVA PRODUCTOS DE LA MISMA MONEDA
|
|
||||||
If TmpDT.Rows.Count = 0 And CveVenta < 0 Then
|
|
||||||
DdlMoneda.SelectedValueExist(DrPS("CveMoneda").ToString)
|
|
||||||
CambiaMoneda()
|
|
||||||
DdlMoneda.Enabled = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'RECARGAR GV
|
|
||||||
TmpDT.Rows.Add(Row)
|
|
||||||
|
|
||||||
ElseIf Modalidad = "U" Then
|
ElseIf Modalidad = "U" Then
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = 0
|
|
||||||
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
If Dr("Consec").ToString.ToEntero = Index Then
|
If Dr("Consec").ToString.ToEntero = Index Then
|
||||||
@@ -3337,7 +3224,12 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
Contador = Contador + 1
|
Contador = Contador + 1
|
||||||
Next
|
Next
|
||||||
Dim Row As DataRow = TmpDT.Rows(Contador)
|
Row = TmpDT.Rows(Contador)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim TotalCalculableImpuestos As Decimal = 0
|
||||||
|
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||||
|
|
||||||
Row("CveProyecto") = CveProyecto
|
Row("CveProyecto") = CveProyecto
|
||||||
Row("Proyecto") = Proyecto
|
Row("Proyecto") = Proyecto
|
||||||
Row("CveSubProyecto") = CveSubProyecto
|
Row("CveSubProyecto") = CveSubProyecto
|
||||||
@@ -3353,16 +3245,14 @@ Partial Class PV
|
|||||||
Row("CvePS") = CvePS
|
Row("CvePS") = CvePS
|
||||||
Row("Obs") = Obs
|
Row("Obs") = Obs
|
||||||
|
|
||||||
Dim DrPS As DataRow = Nothing
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
||||||
|
|
||||||
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
|
|
||||||
|
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
If Not RegeneraIEPS Then
|
If Not RegeneraIEPS Then
|
||||||
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal)
|
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal)
|
||||||
@@ -3375,12 +3265,20 @@ Partial Class PV
|
|||||||
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
|
||||||
If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then
|
||||||
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString))
|
Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString))
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
|
||||||
|
|
||||||
|
If Modalidad = "A" Then
|
||||||
|
If Not TmpDT.Columns.Contains("PUOriginal") Then
|
||||||
|
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||||
|
End If
|
||||||
|
Row("PUOriginal") = PU
|
||||||
|
End If
|
||||||
|
|
||||||
Row("PU") = PU
|
Row("PU") = PU
|
||||||
Row("Codigo") = DrPS("Codigo")
|
Row("Codigo") = DrPS("Codigo")
|
||||||
Row("NoIdentificacion") = DrPS("Codigo")
|
Row("NoIdentificacion") = DrPS("Codigo")
|
||||||
@@ -3388,9 +3286,17 @@ Partial Class PV
|
|||||||
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
|
||||||
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
|
||||||
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
|
||||||
|
|
||||||
|
If Modalidad = "A" Then
|
||||||
|
Row("Consec") = TmpDT.Rows.Count + 1
|
||||||
|
If Not EsCargo Then
|
||||||
|
ConsecutivoVenta = TmpDT.Rows.Count + 1
|
||||||
|
End If
|
||||||
|
ElseIf Modalidad = "U" Then
|
||||||
If Not EsCargo Then
|
If Not EsCargo Then
|
||||||
ConsecutivoVenta = Row("Consec").ToString.ToEntero
|
ConsecutivoVenta = Row("Consec").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Row("PS") = DrPS("PS")
|
Row("PS") = DrPS("PS")
|
||||||
Row("CodigoPS") = DrPS("PSCodigo").ToString
|
Row("CodigoPS") = DrPS("PSCodigo").ToString
|
||||||
@@ -3409,8 +3315,6 @@ Partial Class PV
|
|||||||
|
|
||||||
Row("IVA") = Row("PorcentajeIVA")
|
Row("IVA") = Row("PorcentajeIVA")
|
||||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||||
|
|
||||||
|
|
||||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||||
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
||||||
Row("PorcentajeRetIVA") = ClienteRetIVA
|
Row("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
@@ -3449,7 +3353,8 @@ Partial Class PV
|
|||||||
If DdlMoneda.Enabled = False And CveVenta < 0 And TmpDT.Rows.Count > 0 Then
|
If DdlMoneda.Enabled = False And CveVenta < 0 And TmpDT.Rows.Count > 0 Then
|
||||||
If DdlMoneda.SelectedValue <> DrPS("CveMoneda").ToString Then
|
If DdlMoneda.SelectedValue <> DrPS("CveMoneda").ToString Then
|
||||||
Alert($"La moneda base del producto: <b>{DrPS("PSCodigo").ToString}</b> es diferente a la moneda del documento.", TipoMensaje.MsgAdvertencia)
|
Alert($"La moneda base del producto: <b>{DrPS("PSCodigo").ToString}</b> es diferente a la moneda del documento.", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Retorno = -1
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3462,10 +3367,14 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Modalidad = "A" Then
|
||||||
|
TmpDT.Rows.Add(Row)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Retorno = Row("Consec").ToString().ToEntero()
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
Retorno = True
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer) As Boolean 'NO TOCAR - IPP
|
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer) As Boolean 'NO TOCAR - IPP
|
||||||
@@ -3489,7 +3398,19 @@ Partial Class PV
|
|||||||
|
|
||||||
|
|
||||||
If CveCliente <= 0 Then
|
If CveCliente <= 0 Then
|
||||||
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia, "AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=2', 800, 547, 'N', 'PopUpBuscar')")
|
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia, "AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=-1', 800, 547, 'N', 'PopUpBuscar')")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CantidadUsados As Decimal = 0
|
||||||
|
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||||
|
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If CantidadUsados > TxtCantidad.Text.ToEntero() Then
|
||||||
|
Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3625,7 +3546,7 @@ Partial Class PV
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
||||||
If Not CveCliente > 0 Then RegistraScript("javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=2', 800, 547, 'N', 'PopUpBuscar')") : Exit Sub
|
If Not CveCliente > 0 Then RegistraScript("javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact&TipoCliente=-1', 800, 547, 'N', 'PopUpBuscar')") : Exit Sub
|
||||||
CargaAgregar()
|
CargaAgregar()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaAgregar()
|
Private Sub CargaAgregar()
|
||||||
@@ -3704,30 +3625,22 @@ Partial Class PV
|
|||||||
Dim CveProyecto As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveProyecto").ToString.ToEntero
|
Dim CveProyecto As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveProyecto").ToString.ToEntero
|
||||||
Dim Proyecto As String = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("Proyecto").ToString
|
Dim Proyecto As String = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("Proyecto").ToString
|
||||||
|
|
||||||
AgregarProductoServicio(TxtCantidad.Text.ToDecimal, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
|
||||||
|
Dim Consec = AgregarProductoServicio(TxtCantidad.Text.ToDecimal, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||||
CvePS, "", TxtObsPS.Text.Trim, If(CvePSAmortizacion > 0, TxtPrecio.Text.Trim.ToDecimal * -1, TxtPrecio.Text.Trim.ToDecimal), Descuento,
|
CvePS, "", TxtObsPS.Text.Trim, If(CvePSAmortizacion > 0, TxtPrecio.Text.Trim.ToDecimal * -1, TxtPrecio.Text.Trim.ToDecimal), Descuento,
|
||||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||||
SerieLote:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS)
|
SerieLote:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS)
|
||||||
|
|
||||||
CalculaUsados()
|
Dim ListaPSCargo = CalculaUsados(Consec)
|
||||||
|
If ListaPSCargo.Count > 0 Then
|
||||||
|
CalculaRecepcionUsados(GvRecepcionUsados, CvePS, ListaPSCargo)
|
||||||
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''NO SIRVE PARA NADA - NO SE USAN LAS VARIABLES - IPP 28 AGOSTO 2017
|
|
||||||
'For Each gvr As GridViewRow In GVAnticipos.Rows
|
|
||||||
' Dim total As Decimal = TxtTotal.Text.ToString.ToDecimal
|
|
||||||
' Dim saldo As Decimal = gvr.DataKey("Saldo").ToDecimal
|
|
||||||
' Dim maxsaldo As Decimal
|
|
||||||
' If total > saldo Then
|
|
||||||
' maxsaldo = saldo
|
|
||||||
' Else
|
|
||||||
' maxsaldo = total
|
|
||||||
' End If
|
|
||||||
'Next
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -4653,7 +4566,7 @@ Partial Class PV
|
|||||||
|
|
||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
|
|
||||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CvePreioLista) Then
|
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "") Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
RegistraScript("hideDivEC();")
|
RegistraScript("hideDivEC();")
|
||||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
|
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
|
||||||
@@ -4919,7 +4832,7 @@ Partial Class PV
|
|||||||
DdlFolioGarantia.DataSource = ObjAcum.DtResultados
|
DdlFolioGarantia.DataSource = ObjAcum.DtResultados
|
||||||
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
ObjAcum.Dispose()
|
||||||
|
|
||||||
DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1"))
|
DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1"))
|
||||||
|
|
||||||
@@ -4929,14 +4842,17 @@ Partial Class PV
|
|||||||
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
GvRecepcionUsados.DataSource = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0")
|
Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0")
|
||||||
|
|
||||||
|
GvRecepcionUsados.DataSource = DtTamanios
|
||||||
|
GvRecepcionUsadosModal.DataSource = DtTamanios
|
||||||
|
|
||||||
ObjAcum.Dispose()
|
|
||||||
DdlFolioGarantia.DataBind()
|
DdlFolioGarantia.DataBind()
|
||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
DdlTipoDefecto.DataBind()
|
DdlTipoDefecto.DataBind()
|
||||||
GvRecepcionUsados.DataBind()
|
|
||||||
DdlFacturas.DataBind()
|
DdlFacturas.DataBind()
|
||||||
|
GvRecepcionUsados.DataBind()
|
||||||
|
GvRecepcionUsadosModal.DataBind()
|
||||||
|
|
||||||
CargaPSAjuste()
|
CargaPSAjuste()
|
||||||
|
|
||||||
@@ -4944,8 +4860,6 @@ Partial Class PV
|
|||||||
CreaDTmpDTRecepcionUsados()
|
CreaDTmpDTRecepcionUsados()
|
||||||
|
|
||||||
DivChkAjuste.Visible = True
|
DivChkAjuste.Visible = True
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaPSAjuste()
|
Private Sub CargaPSAjuste()
|
||||||
@@ -5252,6 +5166,14 @@ Partial Class PV
|
|||||||
|
|
||||||
Protected Sub ChkAjuste_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkAjuste_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
If ChkAjuste.Checked Then
|
If ChkAjuste.Checked Then
|
||||||
|
|
||||||
|
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||||
|
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
Gvr.FCTextBox("TxtCantidad").Text = ""
|
||||||
|
Gvr.FCTextBox("TxtCantidad").Enabled = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
DivAjuste.Visible = True
|
DivAjuste.Visible = True
|
||||||
TxtCantidad.Text = "1"
|
TxtCantidad.Text = "1"
|
||||||
TxtCantidad.Enabled = False
|
TxtCantidad.Enabled = False
|
||||||
@@ -5264,6 +5186,13 @@ Partial Class PV
|
|||||||
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPUFactura.ClientID});")
|
||||||
TxtPUFactura.Text = TxtPrecio.Text
|
TxtPUFactura.Text = TxtPrecio.Text
|
||||||
Else
|
Else
|
||||||
|
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
||||||
|
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
Gvr.FCTextBox("TxtCantidad").Text = ""
|
||||||
|
Gvr.FCTextBox("TxtCantidad").Enabled = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
DivAjuste.Visible = False
|
DivAjuste.Visible = False
|
||||||
TxtCantidad.Enabled = True
|
TxtCantidad.Enabled = True
|
||||||
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||||
@@ -5286,6 +5215,7 @@ Partial Class PV
|
|||||||
Private Sub CreaDTmpDTRecepcionUsados()
|
Private Sub CreaDTmpDTRecepcionUsados()
|
||||||
TmpDTRecepcionUsados = New DataTable
|
TmpDTRecepcionUsados = New DataTable
|
||||||
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveUM", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
@@ -5293,18 +5223,41 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnRecepcionUsados_Click(sender As Object, e As EventArgs)
|
||||||
TmpDTRecepcionUsados.Clear()
|
|
||||||
|
'CalculaRecepcionUsados(GvRecepcionUsadosModal)
|
||||||
|
RegistraScript("$('#DModalRecepcionUsados').modal('hide');")
|
||||||
|
|
||||||
|
EmitirImprimirNew()
|
||||||
|
End Sub
|
||||||
|
Private Sub CalculaRecepcionUsados(Gv As GridView, CvePS As Integer, ListaPSCargo As List(Of Integer))
|
||||||
|
|
||||||
|
If Modalidad = "U" Then
|
||||||
|
If TmpDTRecepcionUsados.Rows.Count > 0 Then
|
||||||
|
Dim Elimino As Boolean = False
|
||||||
|
For Each Row As DataRow In TmpDTRecepcionUsados.Rows
|
||||||
|
If Row("CvePSRelacionado").ToString().ToEntero() = CvePS Then
|
||||||
|
Row.Delete()
|
||||||
|
Elimino = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Elimino Then
|
||||||
TmpDTRecepcionUsados.AcceptChanges()
|
TmpDTRecepcionUsados.AcceptChanges()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Dim TotalCargos As Decimal = 0
|
Dim TotalCargos As Decimal = 0
|
||||||
Dim TotalCantidad As Decimal = 0
|
Dim TotalCantidad As Decimal = 0
|
||||||
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
For Each Gvr As GridViewRow In Gv.Rows
|
||||||
|
If Gvr.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
|
If Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
|
||||||
TotalCargos += Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal * Gvr.DataKey("Cargo").ToDecimal
|
TotalCargos += Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal * Gvr.DataKey("Cargo").ToDecimal
|
||||||
TotalCantidad += Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
|
TotalCantidad += Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
|
||||||
|
|
||||||
Dim Row As DataRow = TmpDTRecepcionUsados.NewRow()
|
Dim Row As DataRow = TmpDTRecepcionUsados.NewRow()
|
||||||
Row("CvePS") = Gvr.DataKey("CvePSCargo").ToEntero
|
Row("CvePS") = Gvr.DataKey("CvePSCargo").ToEntero
|
||||||
|
Row("CvePSRelacionado") = CvePS
|
||||||
Row("Cantidad") = Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
|
Row("Cantidad") = Gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal
|
||||||
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
|
Row("CveUM") = Gvr.DataKey("CveUM").ToEntero
|
||||||
Row("CveVentaDetalle") = -1
|
Row("CveVentaDetalle") = -1
|
||||||
@@ -5312,15 +5265,24 @@ Partial Class PV
|
|||||||
TmpDTRecepcionUsados.Rows.Add(Row)
|
TmpDTRecepcionUsados.Rows.Add(Row)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If TotalCantidad > TmpDT.FiltraParametros("EsCargo = True").SUMD("Cantidad") Then
|
Dim StrCargos As New StringBuilder
|
||||||
|
For Each CvePSCargo As Integer In ListaPSCargo
|
||||||
|
StrCargos.AppendFormat("{0},", CvePSCargo)
|
||||||
|
Next
|
||||||
|
StrCargos.Remove(StrCargos.Length - 1, 1)
|
||||||
|
|
||||||
|
If TotalCantidad > TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").SUMD("Cantidad") Then
|
||||||
|
Dim drt As DataRow() = TmpDT.Select("CvePS = " & CvePS)
|
||||||
|
TmpDT.Rows.Remove(drt(0))
|
||||||
|
|
||||||
Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each Dr As DataRow In TmpDT.FiltraParametros("EsCargo = True").Rows
|
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").Rows
|
||||||
|
|
||||||
|
|
||||||
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
||||||
Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
|
Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
|
||||||
@@ -5352,8 +5314,7 @@ Partial Class PV
|
|||||||
Next
|
Next
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
|
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
|
||||||
For Each Dr As DataRow In TmpDT.FiltraParametros("EsCargo = False").Rows
|
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND CvePS={CvePS}").Rows
|
||||||
|
|
||||||
|
|
||||||
Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
||||||
Dim PUActual As Decimal = PUAnterior - (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
|
Dim PUActual As Decimal = PUAnterior - (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
|
||||||
@@ -5375,7 +5336,6 @@ Partial Class PV
|
|||||||
drr("IEPS") = Dr("ImporteIEPS")
|
drr("IEPS") = Dr("ImporteIEPS")
|
||||||
drr("Total") = (Dr("Cantidad").ToString.ToDecimal * PUActual)
|
drr("Total") = (Dr("Cantidad").ToString.ToDecimal * PUActual)
|
||||||
drr("TotalImporte") = Math.Round(Dr("Cantidad").ToString.ToDecimal * PUActual, NumeroDecimales)
|
drr("TotalImporte") = Math.Round(Dr("Cantidad").ToString.ToDecimal * PUActual, NumeroDecimales)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TotalCargos <= 0 Then
|
If TotalCargos <= 0 Then
|
||||||
@@ -5390,15 +5350,14 @@ Partial Class PV
|
|||||||
TmpDTRecepcionUsados.AcceptChanges()
|
TmpDTRecepcionUsados.AcceptChanges()
|
||||||
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DModalRecepcionUsados"))
|
|
||||||
|
|
||||||
EmitirImprimirNew()
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CalculaUsados()
|
Private Function CalculaUsados(Consec As Integer) As List(Of Integer)
|
||||||
|
|
||||||
|
'If Modalidad = "U" Then
|
||||||
|
' EliminarUsados(Consec)
|
||||||
|
'End If
|
||||||
|
|
||||||
'If ClienteEsDistribuidor Then
|
Dim ListaPScargo As New List(Of Integer)
|
||||||
|
|
||||||
Dim DTTamanios As New DataTable
|
Dim DTTamanios As New DataTable
|
||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
@@ -5406,35 +5365,8 @@ Partial Class PV
|
|||||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
DTTamanios = ObjAcum.DtResultados
|
DTTamanios = ObjAcum.DtResultados
|
||||||
|
Dim DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
||||||
|
|
||||||
Dim DTCvePSCostos As New DataTable
|
|
||||||
DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
|
||||||
|
|
||||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
|
||||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each drow As DataRow In TmpDT.Rows
|
|
||||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
|
||||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
|
||||||
drow("Eliminar") = 1
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim TmpDTView As New DataView(TmpDT)
|
|
||||||
TmpDTView.RowFilter = "Eliminar = 1"
|
|
||||||
|
|
||||||
For Each dRowEliminar As DataRowView In TmpDTView
|
|
||||||
dRowEliminar.Delete()
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
|
||||||
|
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
|
||||||
|
|
||||||
Dim CveUnidadMedidaPSA As Integer = -1
|
Dim CveUnidadMedidaPSA As Integer = -1
|
||||||
Dim UnidadMedidaPSA As String = "Unidad"
|
Dim UnidadMedidaPSA As String = "Unidad"
|
||||||
@@ -5448,7 +5380,7 @@ Partial Class PV
|
|||||||
Dim PSPSA As String = ""
|
Dim PSPSA As String = ""
|
||||||
|
|
||||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||||
'AgregarProductoServicio(1, CveUnidadMedidaPSA, UnidadMedidaPSA, CveClacificacionPSA, ClacificacionPSA, CvePSPSA, PSPSA, "", ImporteCargo, 0, -1, "", CveSubProyectoPSA, SubProyectoPSA)
|
|
||||||
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
||||||
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||||
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
||||||
@@ -5460,7 +5392,9 @@ Partial Class PV
|
|||||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||||
|
|
||||||
For Each DrowPartidas As DataRow In TmpDT.Rows
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
|
For Each DrowPartidas As DataRow In TmpDT.Select($"Consec = {Consec}")
|
||||||
|
|
||||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||||
|
|
||||||
If CveTamanioTemp > 0 Then
|
If CveTamanioTemp > 0 Then
|
||||||
@@ -5522,25 +5456,74 @@ Partial Class PV
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
ObjProductosServicios.Dispose()
|
||||||
|
|
||||||
|
Dim ModalidadBack = Modalidad
|
||||||
|
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
||||||
|
If Modalidad = "U" Then
|
||||||
|
Modalidad = "A"
|
||||||
|
End If
|
||||||
|
|
||||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||||
Modalidad = "A"
|
|
||||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||||
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||||
drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True)
|
drowPsTamaños("SubProyecto").ToString, EsCargo:=True)
|
||||||
|
If Consec > 0 Then
|
||||||
|
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ObjProductosServicios.Dispose()
|
Modalidad = ModalidadBack
|
||||||
End If
|
End If
|
||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
|
|
||||||
' End If
|
Return ListaPScargo
|
||||||
End Sub
|
End Function
|
||||||
|
Private Sub EliminarUsados(Consec As Integer)
|
||||||
|
Dim DTTamanios As New DataTable
|
||||||
|
|
||||||
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
|
|
||||||
|
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
DTTamanios = ObjAcum.DtResultados
|
||||||
|
Dim DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
||||||
|
|
||||||
|
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||||
|
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each drow As DataRow In TmpDT.FiltraParametros($"Consec ={Consec}").Rows
|
||||||
|
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||||
|
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||||
|
drow("Eliminar") = 1
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim TmpDTView As New DataView(TmpDT)
|
||||||
|
TmpDTView.RowFilter = "Eliminar = 1"
|
||||||
|
|
||||||
|
For Each dRowEliminar As DataRowView In TmpDTView
|
||||||
|
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
||||||
|
If (RowRecepcionUsados("CvePS").ToString() = dRowEliminar("CvePS").ToString()) Then
|
||||||
|
RowRecepcionUsados.Delete()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
dRowEliminar.Delete()
|
||||||
|
Next
|
||||||
|
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
TmpDTRecepcionUsados.AcceptChanges()
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjAcum.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4102,6 +4102,13 @@ Partial Class Ventas
|
|||||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") And GvRemisiones.Rows.Count > 0 Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Rem") And GvRemisiones.Rows.Count > 0 Then
|
||||||
LbCancelarDocumento.Visible = False
|
LbCancelarDocumento.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI TIENE REMISIONES Y VA A CANCELAR ES NECESARIO EL MOVIMIENTO DE DEVOLUCION
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") AndAlso GvRemisiones.Rows.Count > 0 Then
|
||||||
|
ChkDevAlm.Checked = True
|
||||||
|
ChkDevAlm.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
|
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
|
||||||
@@ -9033,7 +9040,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
|
If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then
|
||||||
|
|
||||||
Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True")
|
Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True")
|
||||||
If dt.Rows.Count > 0 Then
|
If dt.Rows.Count > 0 Then
|
||||||
@@ -17779,6 +17786,7 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||||
If ChkDevAlm.Checked Then
|
If ChkDevAlm.Checked Then
|
||||||
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1074,6 +1074,11 @@ Public Class WSApp
|
|||||||
|
|
||||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
ObjFactura.CveContratoSecciones = ""
|
ObjFactura.CveContratoSecciones = ""
|
||||||
|
|
||||||
|
'BORRAR
|
||||||
|
ObjFactura.DtRecepcionUsados = New DataTable
|
||||||
|
ObjFactura.DtRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Retorno.Mensajes.Add(ex.ToString())
|
Retorno.Mensajes.Add(ex.ToString())
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@@ -1167,6 +1172,8 @@ Public Class WSApp
|
|||||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CveTamaño", GetType(Double))
|
||||||
|
|
||||||
Try
|
Try
|
||||||
For Each PS As MVentaProductos In ListaPS
|
For Each PS As MVentaProductos In ListaPS
|
||||||
Dim Row As DataRow = AgregarProductoServicio(Retorno, TmpDT, PS, CveEmpresa, CvePrecioLista, CveSubProyecto, ClienteRetIVA:=ClienteRetIVA, ClienteRetISR:=ClienteRetISR)
|
Dim Row As DataRow = AgregarProductoServicio(Retorno, TmpDT, PS, CveEmpresa, CvePrecioLista, CveSubProyecto, ClienteRetIVA:=ClienteRetIVA, ClienteRetISR:=ClienteRetISR)
|
||||||
|
|||||||
Reference in New Issue
Block a user