Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1199,6 +1199,25 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetPrePolizasDetalleCompra(CveCompra As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_PrePolizasDetalleCompraGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener movimientos prepolizas de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
|
||||
|
||||
@@ -1446,14 +1446,14 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTPrecioListas") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTMesas() As DataTable
|
||||
Get
|
||||
GlobalDTMesas = DirectCast(Application("GlobalDTMesas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTMesas") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property GlobalDTMesas() As DataTable
|
||||
' Get
|
||||
' GlobalDTMesas = DirectCast(Application("GlobalDTMesas"), DataTable)
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' Application("GlobalDTMesas") = value
|
||||
' End Set
|
||||
'End Property
|
||||
Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
GlobalDTTipoOrdenServicios = DirectCast(Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
@@ -4296,8 +4296,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Documentacion/TableroMaterialidadDetalle.aspx".ToUpper(), 965)
|
||||
PaginaDict.Add("/RH/DiasFestivos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1)
|
||||
''CONFIGURACIONES GENERALES
|
||||
PaginaDict.Add("/Sistemas/SistemaSIG.aspx".ToUpper(), 9999)
|
||||
|
||||
|
||||
'Páginas agregadas recientemente (Implementación Metronic)
|
||||
@@ -5448,7 +5446,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepProductos.aspx".ToUpper(), 32)
|
||||
PaginaDict.Add("/Ventas/CatVendedores.aspx".ToUpper(), 142)
|
||||
PaginaDict.Add("/Ventas/PuntoVenta.aspx".ToUpper(), 163)
|
||||
PaginaDict.Add("/Ventas/CatMesas.aspx".ToUpper(), 244)
|
||||
'PaginaDict.Add("/Ventas/CatMesas.aspx".ToUpper(), 244)
|
||||
PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
|
||||
PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
|
||||
PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
|
||||
@@ -10136,19 +10134,30 @@ Public Class ClsPaginas
|
||||
If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
If Pago.FechaDocumentoRelacionado.Year <= 2017 Then
|
||||
Dim ObjCliente As New ClsClientes(ObjConta.IniciaTransacSQL())
|
||||
If ObjCliente.GetClientes(VentaActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) AndAlso ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If Pago.CveMonedaPago > 1 Then VentaActual.IdCtaContableClienteAnticipoExtranjera = ObjCliente.IdCtaContMonedaExtranjera Else VentaActual.IdCtaContableClienteAnticipo = ObjCliente.IdCtaContClientes
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 66, Pago.Referencia, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 66, Pago.Referencia, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ Public Class ClsVentas
|
||||
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Double, Descuento As Double, Amortizacion As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double,
|
||||
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As Date,
|
||||
CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,
|
||||
Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, CveMesa As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional Propina As Double = -1, Optional CveVentaTerminal As Integer = -1, Optional AtencionA As String = "-1", Optional CveContrato As Integer = -1,
|
||||
Optional CveVentaPadre As Integer = -1, Optional Det_OrdenCompra As String = "", Optional Det_FechaOrdenCompra As String = "", Optional otros As Decimal = 0,
|
||||
Optional Entrega As String = "-1", Optional Vigencia As DateTime = MinFecha, Optional CveAlmacenTraspasoDestino As Integer = -1, Optional CveAlmacenTraspasoOrigen As Integer = -1, Optional CveDireccionEnvio As Integer = -1,
|
||||
@@ -458,7 +458,6 @@ Public Class ClsVentas
|
||||
.Add("@Fech2", SqlDbType.VarChar).Value = IIf(Fech2.ToString.Contiene("1/1/0001 12:00:00 a. m.", "01/01/0001 12:00:00 a. m."), "-1", Fech2.ToString("yyyy/MM/dd"))
|
||||
.Add("@Fech3", SqlDbType.VarChar).Value = IIf(Fech3.ToString.Contiene("1/1/0001 12:00:00 a. m.", "01/01/0001 12:00:00 a. m."), "-1", Fech3.ToString("yyyy/MM/dd"))
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveMesa", SqlDbType.Int).Value = CveMesa
|
||||
.Add("@NumeroPersonas", SqlDbType.Int).Value = NumeroPersonas
|
||||
.Add("@Propina", SqlDbType.Float).Value = Propina
|
||||
.Add("@CveVentaTerminal", SqlDbType.Int).Value = CveVentaTerminal
|
||||
@@ -2022,107 +2021,6 @@ Public Class ClsVentas
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "V E N T A S - M E S A S"
|
||||
Public Function GetMesas(Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_MesasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Catálogo de Mesas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddMesa(Mesa As String, CveUsuario As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_MesasAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Mesa", SqlDbType.VarChar).Value = Mesa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un Mesa con el mismo nombre: " & Mesa & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar el Mesa.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar el Mesa", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateMesa(Mesa As String, Estatus As Boolean, CveSubProyecto As Integer, CveMesa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_MesasUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Mesa", SqlDbType.VarChar).Value = Mesa
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveMesa", SqlDbType.Int).Value = CveMesa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un Mesa con el mismo nombre: " & Mesa & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los cambios en el Mesa", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios en el Mesa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveMesa(CveMesa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_MesasRemove")
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveMesa", SqlDbType.Int).Value = CveMesa
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 547;") Then
|
||||
Alert("El Mesa no se pudo eliminar porque está siendo usado por un registro.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al eliminar el Mesa.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al eliminar el Mesa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "V E N T A S - B I T A C O R A"
|
||||
Public Function GetVta_Bitacora(CveVenta As Integer, FechaI As String, FechaF As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -501,7 +501,7 @@ Namespace Modelos
|
||||
Me.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ")
|
||||
Me.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ")
|
||||
Me.RefDocto = ""
|
||||
Me.CveMesa = -1
|
||||
' Me.CveMesa = -1
|
||||
Me.Fecha = Now
|
||||
Me.CvePrePoliza = -1
|
||||
Me.FechaPago = Now
|
||||
@@ -1505,7 +1505,7 @@ Namespace Modelos
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor,
|
||||
factura.Alfa1, factura.Alfa2, factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, TelefonoGenerico:=factura.TelefonoGenerico, CveContrato:=factura.CveContrato,
|
||||
CveVentaPadre:=If(AplicaDevolucion, CveVentaDevolucion, factura.CveVentaPadre), Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
Entrega:=factura.Entrega, Vigencia:=If(factura.TipoDocto = "Cot", FechaVencimiento, MinFecha),
|
||||
@@ -7113,7 +7113,7 @@ Namespace Modelos
|
||||
Public Property EsDiasCreditoFijo As Boolean
|
||||
|
||||
Public Property CveCorte As Integer = -1
|
||||
Public Property CveMesa As Integer = -1
|
||||
'Public Property CveMesa As Integer = -1
|
||||
Public Property NumeroPersonas As Integer = 0
|
||||
|
||||
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -931,7 +931,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
ObjFactura.TipoDocto = TipoDocto
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
@@ -314,7 +314,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
|
||||
ObjFactura.TipoDocto = "Ing"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
@@ -297,7 +297,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = -1
|
||||
ObjFactura.Serie = "-1"
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = DR("FechaVenc").ToString.ToDate
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.CveMetodoPago = 1
|
||||
|
||||
@@ -6950,15 +6950,13 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
ErrorPrepoliza = True : Exit For
|
||||
End If
|
||||
End If
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
|
||||
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
Next
|
||||
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each rw As GridViewRow In GvDeudores.Rows
|
||||
If rw.FCCheckBox("Chk").Checked Then
|
||||
@@ -6970,8 +6968,7 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
|
||||
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
End If
|
||||
Next
|
||||
@@ -8461,14 +8458,14 @@ Partial Class Compras_Compras
|
||||
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
|
||||
|
||||
Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo) * TipoCambioAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
|
||||
If CveMonedaAnticipo > 1 Then
|
||||
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
|
||||
ErrorMovtosCxP = 1
|
||||
End If
|
||||
End If
|
||||
@@ -9241,8 +9238,7 @@ Partial Class Compras_Compras
|
||||
tipoCambioPago = 1
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim DtPrePolizas As DataTable = Nothing
|
||||
|
||||
If ObjConta.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPrePoliza) Then
|
||||
For Each Row As DataRow In ObjConta.DtResultados.Rows
|
||||
@@ -9258,13 +9254,16 @@ Partial Class Compras_Compras
|
||||
Select Case ConceptoContable
|
||||
|
||||
Case 6
|
||||
|
||||
Dim CveProveedorConcepto As Integer = 0, CveIE As Integer = 0, CveCreditoDetalle As Integer = 0
|
||||
Dim ConceptoPersonal As String = "", Concepto As String = ""
|
||||
|
||||
If Not ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjConta.GetPrePolizasDetalleCompra(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
If ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (6,68,49,205,176)").Rows.Count > 0 Then
|
||||
DtPrePolizas = ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (6,68,49,205,176)")
|
||||
|
||||
If DtPrePolizas.Rows.Count > 0 Then
|
||||
CveProveedorConcepto = ObjConta.DtResultados.FiltraParametros("CveConceptoContable = 6 OR CveConceptoContable = 68 OR CveConceptoContable = 49 OR CveConceptoContable = 205 OR CveConceptoContable = 176").Rows(0)("CveProveedor").ToString.ToEntero
|
||||
CveIE = ObjConta.DtResultados.FiltraParametros("CveConceptoContable = 6 OR CveConceptoContable = 68 OR CveConceptoContable = 49 OR CveConceptoContable = 205 OR CveConceptoContable = 176").Rows(0)("CveIE").ToString.ToEntero
|
||||
CveCreditoDetalle = ObjConta.DtResultados.FiltraParametros("CveConceptoContable = 6 OR CveConceptoContable = 68 OR CveConceptoContable = 49 OR CveConceptoContable = 205 OR CveConceptoContable = 176").Rows(0)("CveCreditoDetalle").ToString.ToEntero
|
||||
@@ -9276,181 +9275,192 @@ Partial Class Compras_Compras
|
||||
CveProveedorConcepto = DdlProveedor.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
'Removemos los conceptos de la prepoliza
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ErrorPrepoliza Then
|
||||
For Each RowPrePoliza As DataRow In DtPrePolizas.FiltraParametros("", DistinctColumns:={"CvePrePoliza"}).Rows
|
||||
|
||||
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
|
||||
Dim ConceptoContabilizacionAlmacen = 0
|
||||
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
ConceptoContabilizacionAlmacen = ObjCompra.DtResultados.FiltroPrimeroValor("CveConceptoContableAlmacen").ToEntero
|
||||
End If
|
||||
Dim CvePrePoliza As Integer = RowPrePoliza("CvePrePoliza").ToString().ToEntero()
|
||||
|
||||
'AF
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
||||
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = Row2("Total").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero
|
||||
'Removemos los conceptos de la prepoliza
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
|
||||
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
|
||||
Dim ConceptoContabilizacionAlmacen = 0
|
||||
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
ConceptoContabilizacionAlmacen = ObjCompra.DtResultados.FiltroPrimeroValor("CveConceptoContableAlmacen").ToEntero
|
||||
End If
|
||||
|
||||
'AF
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2")
|
||||
If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = Row2("Total").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'LIMPIA
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
|
||||
'COSTO ALMACEN
|
||||
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
|
||||
DT.AcceptChanges()
|
||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||
If (DT.Rows.Count > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
|
||||
importeMovimiento = TmpDT.SUM("Total", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim SeContabiliza As Boolean = True
|
||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
SeContabiliza = False
|
||||
IdCtaContable = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'LIMPIA
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
|
||||
'LIMPIA
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
|
||||
'COSTO ALMACEN
|
||||
Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then
|
||||
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"})
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
|
||||
DT.AcceptChanges()
|
||||
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
|
||||
If (DT.Rows.Count > 0) AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
|
||||
importeMovimiento = TmpDT.SUM("Total", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
|
||||
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
|
||||
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim SeContabiliza As Boolean = True
|
||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||
If DdlTipoCompra.SelectedValue = "10" Then
|
||||
SeContabiliza = False
|
||||
IdCtaContable = 0
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
If importeMovimiento <> 0 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
'LIMPIA
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
|
||||
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
|
||||
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
'NC CON PRODUCTOS - CUENTA PUENTE
|
||||
|
||||
End If
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(225) Then
|
||||
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
'NC CON PRODUCTOS - CUENTA PUENTE
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(225) Then
|
||||
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContabilizacionAlmacen, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'GASTO
|
||||
DT = TmpDT.Copy
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
|
||||
DT.AcceptChanges()
|
||||
DtAlmacenes.Dispose()
|
||||
|
||||
'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS]
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then
|
||||
DT = DT.FiltraParametros("CveTipoPS <> 2")
|
||||
End If
|
||||
|
||||
Dim DTDistinct = DT.Copy
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
Else
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
End If
|
||||
|
||||
If DTDistinct.Rows.Count > 0 Then
|
||||
For Each Row2 As DataRow In DTDistinct.Rows
|
||||
|
||||
'DETERMINA IMPORTE
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal
|
||||
Else
|
||||
importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal
|
||||
End If
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
'CLASIFICACION
|
||||
If Row2("CveClasificacion").ToString.ToEntero > 0 Then
|
||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
If importeMovimiento <> 0 Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionAlmacen, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento)) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGA MOVIMIENTO
|
||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
'GASTO
|
||||
DT = TmpDT.Copy
|
||||
'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN
|
||||
If DdlTipoCompra.SelectedValue <> "10" Then
|
||||
For Each Dr As DataRow In DT.Rows
|
||||
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
|
||||
Dr("CveAlmacen") = 0
|
||||
End If
|
||||
Dr.AcceptChanges()
|
||||
Next
|
||||
End If
|
||||
|
||||
DT.AcceptChanges()
|
||||
DtAlmacenes.Dispose()
|
||||
|
||||
'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS]
|
||||
If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then
|
||||
DT = DT.FiltraParametros("CveTipoPS <> 2")
|
||||
End If
|
||||
|
||||
Dim DTDistinct = DT.Copy
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
Else
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
End If
|
||||
|
||||
If DTDistinct.Rows.Count > 0 Then
|
||||
For Each Row2 As DataRow In DTDistinct.Rows
|
||||
|
||||
'DETERMINA IMPORTE
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal
|
||||
Else
|
||||
importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal
|
||||
End If
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
'CLASIFICACION
|
||||
If Row2("CveClasificacion").ToString.ToEntero > 0 Then
|
||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'AGREGA MOVIMIENTO
|
||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'LIMPIA
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -9458,10 +9468,86 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
|
||||
' Case 5 'Proveedores
|
||||
' Dim TieneConceptoProveedorAcreedor As Boolean = False
|
||||
' Dim CveIE As Integer = -1
|
||||
|
||||
' 'If Not ObjConta.GetPrePolizasDetalleCompra(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||
' ' ErrorPrepoliza = True
|
||||
' 'Else
|
||||
' ' If ObjConta.DtResultados.FiltraParametros("CveConceptoContable IN (5,305)").Rows.Count > 0 Then
|
||||
' ' TieneConceptoProveedorAcreedor = True
|
||||
' ' CveIE = ObjConta.DtResultados.FiltraParametros("CveConceptoContable = 6 OR CveConceptoContable = 68 OR CveConceptoContable = 49 OR CveConceptoContable = 205 OR CveConceptoContable = 176").Rows(0)("CveIE").ToString.ToEntero
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
' If TieneConceptoProveedorAcreedor Then
|
||||
' If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
|
||||
' Dim UsaComplementaria As Boolean = True
|
||||
' If tipoCambioActual <> 1 Then
|
||||
' Select Case ConceptoContable
|
||||
' Case 5
|
||||
' ConceptoContable = 311
|
||||
' Case 305
|
||||
' ConceptoContable = 306
|
||||
' Case Else
|
||||
' End Select
|
||||
' End If
|
||||
|
||||
' Dim importeProv As Decimal = 0
|
||||
' importeProv = TxtTotal.Text.ToDecimal
|
||||
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
|
||||
' importeMovimiento = importeProv
|
||||
' importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
' If tipoCambioActual > 1 Then Referencia += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' Dim CveConceptoContableComplementaria As Integer = 201
|
||||
' If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307
|
||||
|
||||
|
||||
|
||||
' If tipoCambioActual = 1 Then
|
||||
' IdCtaContable = If(CveTipoConcepto = 2, CtaProveedorAcreedores, CtaProveedor)
|
||||
' Dim Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=-1, CveProveedor:=CveProveedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=-1, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual) Then
|
||||
' ErrorPrepoliza = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' IdCtaContable = CtaProveedorComplementaria
|
||||
' If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
|
||||
' importeMN = importeMovimiento
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Referencia, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, TipoCambio:=tipoCambioActual) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
' IdCtaContable = CtaProveedorExtranjera
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
If DtPrePolizas IsNot Nothing Then
|
||||
For Each RowPrePoliza As DataRow In DtPrePolizas.FiltraParametros("", DistinctColumns:={"CvePrePoliza"}).Rows
|
||||
If ObjConta.ValidacionPrePolizaCuadre(RowPrePoliza("CvePrePoliza").ToString().ToEntero(), 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'VALIDAR PREPOLIZA DE COMPRA
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
|
||||
@@ -2556,7 +2556,7 @@ Partial Class PopUpVerFactura
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio
|
||||
ObjFactura.Serie = "Tra"
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
<td>
|
||||
<div class="form-group form-md-line-input" style="width: 200px">
|
||||
<asp:TextBox ID="TxtRFC" CssClass="form-control input-sm" runat="server" MaxLength="13"></asp:TextBox><label></label>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardar" ControlToValidate="TxtRFC" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardar" ControlToValidate="TxtRFC" ValidationExpression="^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEREVRFC" runat="server" HighlightCssClass="vco" TargetControlID="REVRFC" Width="300px" BehaviorID="_content_VCEREVRFC"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVRFC" Width="300px" BehaviorID="_content_VCERFC"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -432,7 +432,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = -1
|
||||
ObjFactura.Serie = "-1"
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = If(DR("FechaVenc").ToString.ToDate > Now, Now, DR("FechaVenc").ToString.ToDate)
|
||||
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
|
||||
@@ -40,21 +40,21 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.23598cm</Width>
|
||||
<Width>2.07721cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.45786cm</Width>
|
||||
<Width>1.08203cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.18249cm</Width>
|
||||
<Width>0.88603cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.28144cm</Width>
|
||||
<Width>0.77332cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.36188cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -67,7 +67,7 @@
|
||||
<TextRun>
|
||||
<Value>PALLET-TAG</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -99,14 +99,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -163,7 +163,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.38833cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -176,7 +176,7 @@
|
||||
<TextRun>
|
||||
<Value>COMMODITY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -208,7 +208,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cultivo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -234,7 +234,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.30896cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -247,7 +247,7 @@
|
||||
<TextRun>
|
||||
<Value>VARIETY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -279,7 +279,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Variedad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -305,7 +305,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.38833cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -318,7 +318,7 @@
|
||||
<TextRun>
|
||||
<Value>STYLE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -350,7 +350,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Envase.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -376,7 +376,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.36187cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -389,7 +389,7 @@
|
||||
<TextRun>
|
||||
<Value>LABEL</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -421,7 +421,7 @@
|
||||
<TextRun>
|
||||
<Value>Grower</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -448,7 +448,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.33541cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -461,7 +461,7 @@
|
||||
<TextRun>
|
||||
<Value>PACKS</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -493,7 +493,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!NoCajas.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -519,7 +519,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.15021cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -649,7 +649,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.48521cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -735,7 +735,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.49417cm</Height>
|
||||
<Height>0.4cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -844,7 +844,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.22958cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -975,7 +975,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.41479cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -988,7 +988,7 @@
|
||||
<TextRun>
|
||||
<Value>PALLET-TAG</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1020,7 +1020,7 @@
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1051,14 +1051,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1113,7 +1113,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.44125cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1126,7 +1126,7 @@
|
||||
<TextRun>
|
||||
<Value>COMMODITY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1158,7 +1158,7 @@
|
||||
<TextRun>
|
||||
<Value>VARIETY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1190,7 +1190,7 @@
|
||||
<TextRun>
|
||||
<Value>COUNTRY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1230,7 +1230,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.45921cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1242,7 +1242,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cultivo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1272,7 +1272,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Variedad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1303,7 +1303,7 @@
|
||||
<TextRun>
|
||||
<Value>MEXICO</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1335,14 +1335,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1366,7 +1366,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.3475cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1379,7 +1379,7 @@
|
||||
<TextRun>
|
||||
<Value>STYLE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1411,7 +1411,7 @@
|
||||
<TextRun>
|
||||
<Value>SIZE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1443,7 +1443,7 @@
|
||||
<TextRun>
|
||||
<Value>LABEL</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1498,7 +1498,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1511,7 +1511,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Envase.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1542,7 +1542,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Tamano.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1573,7 +1573,7 @@
|
||||
<TextRun>
|
||||
<Value>Grower</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1629,7 +1629,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.36187cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1642,7 +1642,7 @@
|
||||
<TextRun>
|
||||
<Value>PALLET-TAG</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1674,7 +1674,7 @@
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1705,14 +1705,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1767,7 +1767,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.17667cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1780,7 +1780,7 @@
|
||||
<TextRun>
|
||||
<Value>COMMODITY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1812,7 +1812,7 @@
|
||||
<TextRun>
|
||||
<Value>VARIETY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1844,7 +1844,7 @@
|
||||
<TextRun>
|
||||
<Value>COUNTRY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1884,7 +1884,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.44125cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -1896,7 +1896,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cultivo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1926,7 +1926,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Variedad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1957,7 +1957,7 @@
|
||||
<TextRun>
|
||||
<Value>MEXICO</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1989,14 +1989,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2020,7 +2020,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.36187cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2033,7 +2033,7 @@
|
||||
<TextRun>
|
||||
<Value>STYLE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2065,7 +2065,7 @@
|
||||
<TextRun>
|
||||
<Value>SIZE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2097,7 +2097,7 @@
|
||||
<TextRun>
|
||||
<Value>LABEL</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2152,7 +2152,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.62646cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2165,7 +2165,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Envase.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2196,7 +2196,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Tamano.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2227,7 +2227,7 @@
|
||||
<TextRun>
|
||||
<Value>Grower</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2283,7 +2283,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.41479cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2296,7 +2296,7 @@
|
||||
<TextRun>
|
||||
<Value>PALLET-TAG</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2328,7 +2328,7 @@
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2359,14 +2359,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2421,7 +2421,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.41479cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2434,7 +2434,7 @@
|
||||
<TextRun>
|
||||
<Value>COMMODITY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2466,7 +2466,7 @@
|
||||
<TextRun>
|
||||
<Value>VARIETY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2498,7 +2498,7 @@
|
||||
<TextRun>
|
||||
<Value>COUNTRY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2538,7 +2538,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.38833cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2550,7 +2550,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cultivo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2580,7 +2580,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Variedad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2611,7 +2611,7 @@
|
||||
<TextRun>
|
||||
<Value>MEXICO</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2643,14 +2643,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2674,7 +2674,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.38833cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2687,7 +2687,7 @@
|
||||
<TextRun>
|
||||
<Value>STYLE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2719,7 +2719,7 @@
|
||||
<TextRun>
|
||||
<Value>SIZE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2751,7 +2751,7 @@
|
||||
<TextRun>
|
||||
<Value>LABEL</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2806,7 +2806,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2819,7 +2819,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Envase.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2850,7 +2850,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Tamano.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2881,7 +2881,7 @@
|
||||
<TextRun>
|
||||
<Value>Grower</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2937,7 +2937,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.44125cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -2950,7 +2950,7 @@
|
||||
<TextRun>
|
||||
<Value>PALLET-TAG</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2982,7 +2982,7 @@
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3013,14 +3013,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3075,7 +3075,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.36187cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -3088,7 +3088,7 @@
|
||||
<TextRun>
|
||||
<Value>COMMODITY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3120,7 +3120,7 @@
|
||||
<TextRun>
|
||||
<Value>VARIETY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3152,7 +3152,7 @@
|
||||
<TextRun>
|
||||
<Value>COUNTRY</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3192,7 +3192,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.44125cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -3204,7 +3204,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Cultivo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3234,7 +3234,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Variedad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3265,7 +3265,7 @@
|
||||
<TextRun>
|
||||
<Value>MEXICO</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3297,14 +3297,14 @@
|
||||
<TextRun>
|
||||
<Value>03</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!noPallet.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3328,7 +3328,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.33542cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -3341,7 +3341,7 @@
|
||||
<TextRun>
|
||||
<Value>STYLE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3373,7 +3373,7 @@
|
||||
<TextRun>
|
||||
<Value>SIZE</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3405,7 +3405,7 @@
|
||||
<TextRun>
|
||||
<Value>LABEL</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3460,7 +3460,7 @@
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.36187cm</Height>
|
||||
<Height>0.3cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -3473,7 +3473,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Envase.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3504,7 +3504,7 @@
|
||||
<TextRun>
|
||||
<Value>=Parameters!Tamano.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -3535,7 +3535,7 @@
|
||||
<TextRun>
|
||||
<Value>Grower</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
<FontSize>4pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -3635,9 +3635,9 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<Top>0.0762cm</Top>
|
||||
<Left>0.10266cm</Left>
|
||||
<Height>11.99751cm</Height>
|
||||
<Width>9.15777cm</Width>
|
||||
<Left>0.04974cm</Left>
|
||||
<Height>9.28521cm</Height>
|
||||
<Width>4.81858cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3645,17 +3645,17 @@
|
||||
</Style>
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<Height>4.7951in</Height>
|
||||
<Height>3.72218in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>3.67708in</Width>
|
||||
<Width>1.91666in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>0.5cm</LeftMargin>
|
||||
<RightMargin>0.5cm</RightMargin>
|
||||
<TopMargin>0.5cm</TopMargin>
|
||||
<BottomMargin>0.5cm</BottomMargin>
|
||||
<PageHeight>10cm</PageHeight>
|
||||
<PageWidth>5cm</PageWidth>
|
||||
<LeftMargin>0.05cm</LeftMargin>
|
||||
<RightMargin>0.05cm</RightMargin>
|
||||
<TopMargin>0.05cm</TopMargin>
|
||||
<BottomMargin>0.05cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
'V E N T A S
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetMesas Then Application("GlobalDTMesas") = ObjVentas.DtResultados Else Application("GlobalDTMesas") = Nothing
|
||||
'If ObjVentas.GetMesas Then Application("GlobalDTMesas") = ObjVentas.DtResultados Else Application("GlobalDTMesas") = Nothing
|
||||
If ObjVentas.GetPrecioListas Then Application("GlobalDTPrecioListas") = ObjVentas.DtResultados Else Application("GlobalDTPrecioListas") = Nothing
|
||||
If ObjVentas.GetCondicionesEntrega(-1) Then Application("GlobalDTVtaCondicionesEntrega") = ObjVentas.DtResultados Else Application("GlobalDTVtaCondicionesEntrega") = Nothing
|
||||
If ObjVentas.GetFormaPago() Then Application("GlobalDTVtaFormaPago") = ObjVentas.DtResultados Else Application("GlobalDTVtaFormaPago") = Nothing
|
||||
|
||||
@@ -5317,7 +5317,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio.ToEntero
|
||||
ObjFactura.Serie = "Tra"
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -94,11 +93,10 @@
|
||||
<tr align="left" runat="server" id="TrCompuesto" visible="false">
|
||||
<td class="text-right"><b>Compuesto:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCompuesto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
|
||||
@@ -331,7 +331,7 @@ Partial Class Inventarios_RecepcionDevolucion
|
||||
Me.ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", Me.ObjRemisionNC.CveMoneda))
|
||||
Me.ObjRemisionNC.TipoDocto = "RNC"
|
||||
Me.ObjRemisionNC.RefDocto = ""
|
||||
Me.ObjRemisionNC.CveMesa = -1
|
||||
'Me.ObjRemisionNC.CveMesa = -1
|
||||
Me.ObjRemisionNC.Fecha = Now
|
||||
Me.ObjRemisionNC.CvePrePoliza = -1
|
||||
Me.ObjRemisionNC.FechaPago = Now
|
||||
|
||||
@@ -424,7 +424,7 @@ Partial Class Inventarios_Remanufactura
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio.ToEntero
|
||||
ObjFactura.Serie = Serie
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = TxtFecha.Text.ToDate
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.CveMetodoPago = 1
|
||||
@@ -668,7 +668,7 @@ Partial Class Inventarios_Remanufactura
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor, factura.Alfa1, factura.Alfa2,
|
||||
factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, TelefonoGenerico:="", CveContrato:=factura.CveContrato, CveVentaPadre:=factura.CveVentaPadre, Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
Entrega:="", Vigencia:=MinFecha,
|
||||
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=-1, CveOC:=-1, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=-1,
|
||||
|
||||
@@ -185,14 +185,12 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="dvCa" style="width:100%;visibility:hidden;top:40px">
|
||||
|
||||
@@ -8,7 +8,6 @@ Imports Newtonsoft.Json
|
||||
|
||||
Partial Class OC_OC
|
||||
Inherits ClsPaginas
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property CveEmpresaActual As Integer
|
||||
|
||||
@@ -143,7 +143,7 @@ Partial Class CatSubProyectos
|
||||
|
||||
Private Sub CargaSegmentosNegocio()
|
||||
DdlSegmentoNegocio.Items.Clear()
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
@@ -962,15 +962,17 @@ Partial Class CatSubProyectos
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim Erroreliminacion As Boolean = False
|
||||
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
Dim ObjUsuarios As New ClsSisUsuarios()
|
||||
Dim ObjGenerales As New ClsGenerales(ObjUsuarios.IniciaTransacSQL)
|
||||
|
||||
If ObjUsuarios.RemoveSubProyectos(CveUsuario, CveSubProyectoUsuarios, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjGenerales.AddHistorialBitacora(406, -1, -1, -1, -1, -1, -1, -1, "", SubProyecto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
Erroreliminacion = True
|
||||
ObjUsuarios.Commit()
|
||||
End If
|
||||
Else
|
||||
Erroreliminacion = True
|
||||
ObjUsuarios.RollBack()
|
||||
End If
|
||||
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
@@ -1432,7 +1432,7 @@
|
||||
<table border="0" id="Table1" runat="server" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="GvPedidos" runat="server" Width="100%" OnRowDataBound="GvPedidos_RowDataBound" DataKeyNames="CveVenta,Total,SerieFolio" AutoGenerateColumns="False" EmptyDataText="No se encontraron pedidos en el cliente" ToolTip="Listado de pedidos" CssClass="table table-striped table-advance table-hover " Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvPedidos" runat="server" Width="100%" OnRowDataBound="GvPedidos_RowDataBound" DataKeyNames="CveVenta,Total,SerieFolio" AutoGenerateColumns="False" EmptyDataText="No se encontraron pedidos en el cliente" ToolTip="Listado de pedidos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Pedido</HeaderTemplate>
|
||||
@@ -2071,6 +2071,13 @@
|
||||
catch (e) { alert(e); }
|
||||
}
|
||||
|
||||
function CerrarModalVenta() {
|
||||
try {
|
||||
$('#DivVenta').modal('hide');
|
||||
}
|
||||
catch (e) { alert(e); }
|
||||
}
|
||||
|
||||
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MAYOR A C
|
||||
function ValidarCantidad(t, c) {
|
||||
t.value = (ToDouble(t.value) > ToDouble(c) ? c : t.value)
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports System.IO.Compression
|
||||
Imports System.Net
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Ventas_PortalCliente
|
||||
Inherits ClsPaginas
|
||||
@@ -24,6 +25,15 @@ Partial Class Ventas_PortalCliente
|
||||
Set(value As Integer)
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePrecioLista As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("CvePrecioLista"), "-1", ViewState("CvePrecioLista")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrecioLista") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Destino As String
|
||||
@@ -223,8 +233,13 @@ Partial Class Ventas_PortalCliente
|
||||
CargarTipoBuzon()
|
||||
CargarClienteSucursal()
|
||||
End If
|
||||
|
||||
CargaPedidos()
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
TabPedidos.Visible = True
|
||||
CargaPedidos(TipoDocto:="Rem")
|
||||
Else
|
||||
CargaPedidos()
|
||||
End If
|
||||
|
||||
CargaCuentasDepositos()
|
||||
|
||||
'??ESTE TAB VA DESAPARECER - PARA QUE SOLO LA EMPRESA GESTIONE A LOS USUARIOS POR CLIENTE??
|
||||
@@ -260,6 +275,7 @@ Partial Class Ventas_PortalCliente
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
'Campos para Modificación
|
||||
LtlCliente.Text = ObjClientes.Nombre
|
||||
CvePrecioLista = ObjClientes.CvePrecioLista
|
||||
Else
|
||||
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -1736,11 +1752,11 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
UpIxC.Update()
|
||||
End Sub
|
||||
Private Sub CargaPedidos(Optional TopPedidos As Integer = 21)
|
||||
Private Sub CargaPedidos(Optional TopPedidos As Integer = 21, Optional TipoDocto As String = "Pd2")
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, TopPedidos, CveClienteSucursal:=-1, TipoDocto:=TipoDocto, CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
|
||||
GvPedidos.DataSource = ObjClientes.DtResultados
|
||||
If ObjClientes.DtResultados.Rows.Count < 21 Then
|
||||
LnkVerMasPedidos.Visible = False
|
||||
@@ -1753,15 +1769,24 @@ Partial Class Ventas_PortalCliente
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaPedidos()
|
||||
Dim TipoDocto As String = "Pd2"
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
TipoDocto = "Rem"
|
||||
End If
|
||||
CargaPedidos(TipoDocto:=TipoDocto)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnVerMasPedidos_Click(sender As Object, e As EventArgs)
|
||||
Dim TipoDocto As String = "Pd2"
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
TipoDocto = "Rem"
|
||||
End If
|
||||
|
||||
If BtnVerMasVentas.Text = "Ver Más" Then
|
||||
CargaPedidos(-1)
|
||||
CargaPedidos(-1, TipoDocto:=TipoDocto)
|
||||
BtnVerMasVentas.Text = "Ver Menos"
|
||||
Else
|
||||
CargaPedidos(21)
|
||||
CargaPedidos(21, TipoDocto:=TipoDocto)
|
||||
BtnVerMasVentas.Text = "Ver Más"
|
||||
End If
|
||||
End Sub
|
||||
@@ -2532,7 +2557,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
#Region "CARGAS"
|
||||
|
||||
Private Sub CargaFolios()
|
||||
Private Sub CargaFolios(Optional TipoDocto As String = "Pd2")
|
||||
|
||||
If CveSubProyecto <= 0 Then
|
||||
Alert("No se tienen asignadas sucursales", TipoMensaje.MsgError)
|
||||
@@ -2540,8 +2565,8 @@ Partial Class Ventas_PortalCliente
|
||||
End If
|
||||
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
If ObjFolios.GetFolios("Pd2", UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If ObjFolios.GetFolios(TipoDocto, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ViewState("CveFolio") = DT.Rows(0)("CveFolio").ToString.ToEntero
|
||||
ViewState("FolioActual") = DT.Rows(0)("FActual").ToString
|
||||
@@ -2593,8 +2618,13 @@ Partial Class Ventas_PortalCliente
|
||||
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||
|
||||
CargaFolios()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
CargaFolios("Rem")
|
||||
Else
|
||||
CargaFolios()
|
||||
End If
|
||||
|
||||
|
||||
Dim Dt = New DataSet
|
||||
Dt.Tables.Add("Datos")
|
||||
Dt.Tables("Datos").Columns.Add("")
|
||||
@@ -2751,6 +2781,7 @@ Partial Class Ventas_PortalCliente
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
TxtPrecio.Text = ""
|
||||
DdlPSIndexChange()
|
||||
End Sub
|
||||
|
||||
@@ -2769,25 +2800,45 @@ Partial Class Ventas_PortalCliente
|
||||
DdlUM.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlUM.SelectedValue = "-1"
|
||||
DdlUM.DataBind()
|
||||
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
|
||||
TxtPrecio.Text = drPS("Precio").ToString.FormatoNumero(2).Replace(","c, "")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 80 Then
|
||||
'busca el precio de la sucursal
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSSucursales(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveSubProyecto) Then
|
||||
Dim dtt As DataTable = ObjPS.DtResultados
|
||||
Dim drPrecio As DataRow = dtt.FiltroPrimero("")
|
||||
|
||||
If drPrecio IsNot Nothing Then
|
||||
TxtPrecio.Text = drPrecio("Importe").ToString.ToDouble.ToString("N4")
|
||||
End If
|
||||
dtt.Dispose()
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
If CvePrecioLista > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, CvePS:=DdlPS.SelectedValue.ToEntero()) Then
|
||||
If ObjPS.DtResultados.Rows.Count > 0 Then
|
||||
TxtPrecio.Text = ObjPS.DtResultados.Rows(0)("PrecioLista").ToString().ToDecimal().FormatoNumero()
|
||||
Else
|
||||
TxtPrecio.Text = ""
|
||||
End If
|
||||
Else
|
||||
TxtPrecio.Text = ""
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
Else
|
||||
If UsuarioActual.CveEmpresa = 80 Then
|
||||
'busca el precio de la sucursal
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSSucursales(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveSubProyecto) Then
|
||||
Dim dtt As DataTable = ObjPS.DtResultados
|
||||
Dim drPrecio As DataRow = dtt.FiltroPrimero("")
|
||||
|
||||
If drPrecio IsNot Nothing Then
|
||||
TxtPrecio.Text = drPrecio("Importe").ToString.ToDouble.ToString("N4")
|
||||
End If
|
||||
dtt.Dispose()
|
||||
End If
|
||||
|
||||
ObjPS.Dispose()
|
||||
Else
|
||||
TxtPrecio.Text = drPS("Precio").ToString.FormatoNumero(2).Replace(","c, "")
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtPrecio.Text.ToDecimal() <= 0 Then
|
||||
Alert("No se encontro un precio para el producto seleccionado", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString IsNot Nothing Then
|
||||
@@ -2804,6 +2855,7 @@ Partial Class Ventas_PortalCliente
|
||||
Else
|
||||
Alert("Es necesario seleccionar el cliente al cual se le va a facturar.", TipoMensaje.MsgAdvertencia, "AbrirVentana(""/Ventas/PopUpBuscarClientes.aspx?Opt=Fact"", 800, 547, ""N"", ""PopUpBuscar"")")
|
||||
End If
|
||||
|
||||
RegistraScript("Recalcula();")
|
||||
UpVenta.Update()
|
||||
|
||||
@@ -2819,6 +2871,21 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
#Region "AGREGAR/EDITAR/ELIMINAR"
|
||||
Protected Sub LnkAddPedido_Click(sender As Object, e As EventArgs)
|
||||
If TmpDT IsNot Nothing Then
|
||||
TmpDT.Rows.Clear()
|
||||
TxtObsFact.Text = ""
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
CalculaTotalesVenta()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
DdlMoneda.SelectedValueExist(1)
|
||||
DdlMoneda.Enabled = False
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DivVenta').modal({backdrop: 'static',keyboard: false});")
|
||||
End Sub
|
||||
Protected Sub LnkAddPSVenta_Click(sender As Object, e As EventArgs)
|
||||
@@ -2836,7 +2903,13 @@ Partial Class Ventas_PortalCliente
|
||||
End If
|
||||
DdlClasificacion.SelectedIndex = -1
|
||||
DdlUM.Items.Clear()
|
||||
ChkAgregar.Checked = True
|
||||
ChkAgregar.Checked = True
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
TxtPrecio.Enabled = False
|
||||
End If
|
||||
|
||||
UpVenta.Update()
|
||||
UpAddPedido.Update()
|
||||
|
||||
RegistraScript("$('#DivAddVenta').modal({backdrop: 'static',keyboard: false});")
|
||||
@@ -2850,7 +2923,7 @@ Partial Class Ventas_PortalCliente
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||
UpClasificacion.Update()
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
||||
DdlPS.SelectedValue = GvRow.DataKey("CvePS")
|
||||
DdlPS.ddl.SelectedValueExist(GvRow.DataKey("CvePS"))
|
||||
Else
|
||||
DdlPS.SelectedValue = GvRow.DataKey("CvePS")
|
||||
DdlPS.SelectedText = GvRow.DataKey("PS")
|
||||
@@ -2905,7 +2978,21 @@ Partial Class Ventas_PortalCliente
|
||||
UpAddPedido.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub AgregarPS()
|
||||
Private Sub AgregarPS()
|
||||
If TxtPrecio.Text.ToDecimal() <= 0 Then
|
||||
Alert("El precio del producto debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
For Each Row As DataRow In TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).Rows
|
||||
If DdlClasificacion.SelectedValue.ToEntero <> Row("CveClasificacion").ToString().ToEntero() Then
|
||||
Alert($"El pedido actual solo es para la clasificación '{Row("Clasificacion")}'. Debe seleccionar productos de la misma clasificación", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Modalidad = "U" Then
|
||||
|
||||
Dim ErrorEdit As Boolean = True
|
||||
@@ -3092,7 +3179,7 @@ Partial Class Ventas_PortalCliente
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = Folio.ToEntero
|
||||
ObjFactura.Serie = Serie
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
@@ -3181,7 +3268,7 @@ Partial Class Ventas_PortalCliente
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||
@@ -3284,11 +3371,139 @@ Partial Class Ventas_PortalCliente
|
||||
i += 1
|
||||
Next
|
||||
Return Timbre
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 143 Then
|
||||
GuardarWS()
|
||||
Else
|
||||
Guardar()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function SubProyectosClasificaciones() As Hashtable
|
||||
Dim retorno As New Hashtable()
|
||||
|
||||
'CVECLASIFICACION/CVESUBPROYECTO
|
||||
retorno.Add(20331, 11713)
|
||||
retorno.Add(20332, 11761)
|
||||
retorno.Add(20333, 11714)
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Private Sub GuardarWS()
|
||||
|
||||
Dim DtClasificaciones As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"})
|
||||
|
||||
If DtClasificaciones IsNot Nothing AndAlso DtClasificaciones.Rows.Count > 1 Then
|
||||
Alert("El pedido debe tener productos de una misma clasificación", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveSubProyectoPedido As Integer = -1
|
||||
|
||||
Dim CveClasificacion As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion").ToEntero()
|
||||
|
||||
Dim SubProyectos = SubProyectosClasificaciones()
|
||||
|
||||
'VERIFICA SI LA CLASIFICACION PERTENECE AL SUBPROYECTO
|
||||
If SubProyectos.ContainsKey(CveClasificacion) Then
|
||||
CveSubProyectoPedido = SubProyectos(CveClasificacion).ToString().ToEntero()
|
||||
Else
|
||||
CveSubProyectoPedido = Me.CveSubProyecto
|
||||
End If
|
||||
|
||||
Dim productos As New JArray()
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
productos.Add(New JObject(
|
||||
New JProperty("CvePS", Row("CvePS").ToString().ToEntero()),
|
||||
New JProperty("Cantidad", Row("Cantidad").ToString().ToDecimal()),
|
||||
New JProperty("Obs", Row("Obs").ToString()),
|
||||
New JProperty("Precio", Row("PU").ToString().ToDecimal()),
|
||||
New JProperty("Descuento", Row("Descuento").ToString().ToDecimal())
|
||||
)
|
||||
)
|
||||
Next
|
||||
|
||||
Dim URLAPI As String = "https://sig.adssistemas.mx/asmx/WSApp.asmx?WSDL"
|
||||
|
||||
If Not EsProduccion Then
|
||||
URLAPI = "http://localhost:85/asmx/WSApp.asmx?WSDL"
|
||||
End If
|
||||
|
||||
Dim jsonResp = EnviarPedidoWS(URLAPI, CveCliente, CveSubProyectoPedido, UsuarioActual.CveUsuario, TxtObsFact.Text, productos.ToString())
|
||||
|
||||
If Not String.IsNullOrEmpty(jsonResp) Then
|
||||
Dim resp As JObject = JObject.Parse(jsonResp)
|
||||
Dim TieneError As Boolean = CBool(resp("TieneError"))
|
||||
If Not TieneError Then
|
||||
Alert($"La remisión <b>'{resp("SerieFolio")}'</b> se genero correctamente.", JSBtnAceptar:="CerrarModalVenta();", ShowCloseButton:=False)
|
||||
CargaPedidos(TipoDocto:="Rem")
|
||||
Else
|
||||
Alert($"Ocurrió un error al generar el pedido.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function EnviarPedidoWS(ByVal url As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, Observaciones As String, Productos As String) As String
|
||||
Dim retorno = ""
|
||||
|
||||
Try
|
||||
Dim request As HttpWebRequest = CType(WebRequest.Create($"{url}"), HttpWebRequest)
|
||||
request.ContentType = "text/xml;charset=""utf-8"""
|
||||
request.Accept = "text/xml"
|
||||
request.Method = "POST"
|
||||
Dim XMLString As String = $"<Envelope xmlns=""http://schemas.xmlsoap.org/soap/envelope/"">
|
||||
<Body>
|
||||
<AddPedido xmlns=""http://ADSistemas.org/"">
|
||||
<CveCliente>{CveCliente}</CveCliente>
|
||||
<CveSubProyecto>{CveSubProyecto}</CveSubProyecto>
|
||||
<CveUsuario>{CveUsuario}</CveUsuario>
|
||||
<Observaciones>{Observaciones}</Observaciones>
|
||||
<Productos>{Productos}</Productos>
|
||||
</AddPedido>
|
||||
</Body>
|
||||
</Envelope>"
|
||||
Dim SOAPReqBody As XmlDocument = New XmlDocument()
|
||||
SOAPReqBody.LoadXml(XMLString)
|
||||
|
||||
Using stream As Stream = request.GetRequestStream()
|
||||
SOAPReqBody.Save(stream)
|
||||
End Using
|
||||
|
||||
Dim response As String = ""
|
||||
|
||||
Using Serviceres As WebResponse = request.GetResponse()
|
||||
Using rd As StreamReader = New StreamReader(Serviceres.GetResponseStream())
|
||||
response = rd.ReadToEnd()
|
||||
End Using
|
||||
End Using
|
||||
|
||||
If Not String.IsNullOrEmpty(response) Then
|
||||
Dim xmlRetorno = New XmlDocument()
|
||||
xmlRetorno.LoadXml(response)
|
||||
retorno = xmlRetorno.InnerText
|
||||
Else
|
||||
Alert($"Ocurrió un error al leer la respuesta.", TipoMensaje.MsgError)
|
||||
retorno = ""
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = ""
|
||||
OnError("Ocurrió un error al guardar el pedido", ex)
|
||||
End Try
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub Guardar()
|
||||
If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Then
|
||||
Alert("Es necesario tener al menos un concepto registrado.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -3423,9 +3638,9 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoPedido(ObjFactura As Modelos.Factura)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, ObjFactura.CveVenta, True, ObjFactura))
|
||||
Hilo.Start()
|
||||
@@ -3444,7 +3659,7 @@ Partial Class Ventas_PortalCliente
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor,
|
||||
factura.Alfa1, factura.Alfa2, factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, CveContrato:=factura.CveContrato, Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, IEPS:=factura.IEPSTC, Serie:=factura.Serie,
|
||||
CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||
|
||||
@@ -90,11 +90,11 @@
|
||||
</div>
|
||||
|
||||
<asp:Label runat="server" CssClass="col-md-1">Supervisor: </asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" Width="100%" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Asignar" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSupervisor" runat="server" Width="100%" AppendDataBoundItems="True" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Asignar" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -179,7 +179,7 @@
|
||||
<asp:TemplateField HeaderStyle-Width="250px">
|
||||
<ItemTemplate>
|
||||
<%--<asp:Literal runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>--%>
|
||||
<asp:DropDownList ID="DdlGVSubProyecto" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me" ></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlGVSubProyecto" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="form-control input-sm select2me"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="200px" />
|
||||
</asp:TemplateField>
|
||||
@@ -189,9 +189,9 @@
|
||||
<%--<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>--%>
|
||||
<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="form-control input-sm select2me" Style="width: 100%"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px"/>
|
||||
<ItemStyle HorizontalAlign="Left" Width="80px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="80px" Visible="false">
|
||||
<asp:TemplateField HeaderStyle-Width="80px" Visible="false">
|
||||
<HeaderTemplate>SDD</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSalarioDiario" runat="server" MaxLength="10" Text='<%# Eval("SalarioDiario", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
@@ -200,7 +200,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>SDI</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSDI" runat="server" MaxLength="10" Text='<%# Eval("SDI", "{0:N2}") %>' Width="70px"></asp:TextBox>
|
||||
@@ -233,14 +233,19 @@
|
||||
<asp:ListItem Text="Cabecera" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="280px">
|
||||
<HeaderTemplate>Cliente</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -249,7 +254,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class=" text-center">
|
||||
<asp:Button ID="BtnGuardarSupervisor" OnClick="BtnGuardarSupervisor_Click" runat="server" Text="Guardar" class="btn btn-primary" /></div>
|
||||
<asp:Button ID="BtnGuardarSupervisor" OnClick="BtnGuardarSupervisor_Click" runat="server" Text="Guardar" class="btn btn-primary" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMesas.aspx.vb" Inherits="Ventas_CatMesas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Mesas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="portlet box blue-hoki" style="min-width:895px;">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-grid"></i>Catalogo
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover" style="min-width:880px; width:100%;">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="155px">
|
||||
<asp:LinkButton ID="LbSucursal" runat="server" CausesValidation="false" Text="" CommandArgument="Sucursal" OnClick="LbOrden_Click">
|
||||
Sucursal
|
||||
<asp:Literal ID="ImgSucursal" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="255px">
|
||||
<asp:LinkButton ID="LbMesa" runat="server" CausesValidation="false" Text="" CommandArgument="Mesa" OnClick="LbOrden_Click">
|
||||
Mesa
|
||||
<asp:Literal ID="ImgMesa" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="101px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="102px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="165px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="ddlSucursal" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Width="134px" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RangeValidator ID="RVSucursal" runat="server" ControlToValidate="ddlSucursal" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESucursal" runat="server" HighlightCssClass="vco" TargetControlID="RVSucursal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtMesa" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesa" runat="server" ControlToValidate="TxtMesa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mesa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMesa" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMesa" EmptyDataText="No se encontraron Mesas Registrados" ToolTip="Listado de Mesas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; min-width:880px; width:100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("Sucursal", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="ddlSucursal" runat="server" Width="134" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMesa" runat="server" Text='<%# Eval("Mesa", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMesa" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Mesa") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMesa" runat="server" ControlToValidate="TxtMesa" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mesa''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMesa" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesa" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -1,213 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_CatMesas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property PuedeEditar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PuedeEliminar As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("PuedeEditar"))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PuedeEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaSucursales()
|
||||
CargaDatos()
|
||||
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaSucursales()
|
||||
ddlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
ddlSucursal.DataBind()
|
||||
ddlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.GetMesas() Then
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ddlSucursal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlSucursal.SelectedIndexChanged
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.AddMesa(TxtMesa.Text.Trim, UsuarioActual.CveUsuario, ddlSucursal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
TxtMesa.Text = ""
|
||||
Alert("La nueva Mesa se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
ObjMesas.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(250)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(61)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("ddlSucursal").DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("ddlSucursal").DataBind()
|
||||
e.Row.FCDropDownList("ddlSucursal").SelectedValue = e.Row.DBCampo("CveSucursal")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjMesas As New ClsVentas
|
||||
If ObjMesas.RemoveMesa(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Alert("La Mesa se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjMesas As New ClsVentas
|
||||
Dim CveSucursal As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("ddlSucursal").SelectedValue.ToEntero
|
||||
Dim Mesa As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtMesa"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim CveMesa As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjMesas.UpdateMesa(Mesa, Estatus, CveSucursal, CveMesa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTMesas") = ObjMesas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTMesas = ObjMesas.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjMesas.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTMesas"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable().FiltraParametros(String.Format("CveSucursal = {0} OR {0} = -1", ddlSucursal.SelectedValue))
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTMesas"), DataTable).FiltraParametros(String.Format("CveSucursal = {0} OR {0} = -1", ddlSucursal.SelectedValue))
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -1890,7 +1890,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.FechaPago = Now
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = -1
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = -1
|
||||
ObjFacturaDevolucion.DescripcionContrato = ""
|
||||
|
||||
@@ -3707,7 +3707,7 @@ Partial Class PV
|
||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
|
||||
@@ -8974,15 +8974,15 @@ Partial Class Ventas
|
||||
EsValido = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(133).ToEntero() > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
|
||||
CostoMayor = Costo + ((UsuarioActual.Empresa.Funcionalidad(133).ToDecimal / 100) * Costo)
|
||||
'SI EL PRECIO ES MAYOR AL COSTO, SI PASA
|
||||
If PU <= CostoMayor Then
|
||||
EsValidoMayor = True
|
||||
End If
|
||||
Else
|
||||
EsValidoMayor = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(133).ToEntero() > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
|
||||
' CostoMayor = Costo + ((UsuarioActual.Empresa.Funcionalidad(133).ToDecimal / 100) * Costo)
|
||||
' 'SI EL PRECIO ES MAYOR AL COSTO, SI PASA
|
||||
' If PU <= CostoMayor Then
|
||||
' EsValidoMayor = True
|
||||
' End If
|
||||
'Else
|
||||
' EsValidoMayor = True
|
||||
'End If
|
||||
|
||||
'VALIDA PROMOCION: SI TIENE PROMOCION Y EL PRECIO ES MENOR AL PRECIO DE PROMOCION, NO PASA | SI YA CUMPLE NO VUELVE A VALIDAR
|
||||
If Not EsValido Or PU = 0 Then
|
||||
@@ -8998,24 +8998,24 @@ Partial Class Ventas
|
||||
End If
|
||||
'NO DEJA REGISTRAR CON VALIDACION DE COSTO ALMACEN O PROMOCION
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
If Not EsValido Then
|
||||
'If Not EsValido Then
|
||||
|
||||
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
|
||||
If TienePermisoImportes Then
|
||||
MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
|
||||
MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero(), CostoMenor)
|
||||
MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
|
||||
End If
|
||||
End If
|
||||
' MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
|
||||
' If TienePermisoImportes Then
|
||||
' MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
|
||||
' MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero(), CostoMenor)
|
||||
' MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not EsValidoMayor Then
|
||||
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
|
||||
If TienePermisoImportes Then
|
||||
MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
|
||||
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero(), CostoMayor)
|
||||
MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
|
||||
End If
|
||||
End If
|
||||
'If Not EsValidoMayor Then
|
||||
' MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
|
||||
' If TienePermisoImportes Then
|
||||
' MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
|
||||
' MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero(), CostoMayor)
|
||||
' MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
|
||||
' End If
|
||||
'End If
|
||||
|
||||
' SOLO SI TIENE LA FUNCIONALIDAD DE RESTRICCION VALIDA EL IMPORTE CERO
|
||||
If UsuarioActual.Empresa.Funcionalidad(139).ToString().ToEntero() > 0 Then
|
||||
@@ -10229,7 +10229,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -10519,7 +10519,7 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaBonificacion.CveCorte = CveCorte
|
||||
ObjFacturaBonificacion.CveMesa = -1
|
||||
'ObjFacturaBonificacion.CveMesa = -1
|
||||
ObjFacturaBonificacion.NumeroPersonas = 0
|
||||
ObjFacturaBonificacion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaBonificacion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -11011,7 +11011,7 @@ Partial Class Ventas
|
||||
ObjFactura.EsDiasCreditoFijo = EsDiasCreditoFijo
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
@@ -11717,7 +11717,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -12669,7 +12669,7 @@ Partial Class Ventas
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor,
|
||||
factura.Alfa1, factura.Alfa2, factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, TelefonoGenerico:=TxtTelefonoGenerico.Text.Trim, CveContrato:=factura.CveContrato, CveVentaPadre:=If(AplicaDevolucion, CveVentaDevolucion, factura.CveVentaPadre), Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
Entrega:=TxtEntrega.Text, Vigencia:=If(DdlTipoComprobante.SelectedValue = "Cot", TxtFechaVencimientoCotizacion.Text.ToDate, MinFecha),
|
||||
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero(), -1), CveOC:=CveOC, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=DdlFormaEntrega.SelectedValue.ToEntero(),
|
||||
@@ -15776,47 +15776,8 @@ Partial Class Ventas
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked Then
|
||||
|
||||
|
||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
Dim tFecha As Date = Now
|
||||
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
|
||||
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
|
||||
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero() = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 1 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN PESOS
|
||||
tipoCambioPago = 1
|
||||
tipoCambioVenta = 1
|
||||
tipoCambioVentaValuacion = 1
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 1 Then 'SI LA VENTA VIENE EN DOLARES Y SE VA A PAGAR EN PESOS
|
||||
tipoCambioPago = gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 2 Then 'SI LA VENTA VIENE EN DOLARES Y SE VA A PAGAR EN DOLARES
|
||||
tipoCambioPago = gvr.DataKey("TipoCambio").ToString().ToDecimal
|
||||
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 2 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN DOLARES
|
||||
tipoCambioPago = gvr.DataKey("TipoCambioHoy").ToDecimal() ' gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||
tipoCambioVenta = 1
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
End If
|
||||
|
||||
Dim importeMovimiento As Decimal = 0
|
||||
Dim importeMN As Decimal = 0
|
||||
Dim TC As Decimal
|
||||
Dim IdCtaContable As Integer
|
||||
Dim TipoMovimiento As Boolean = True
|
||||
Dim Concepto As String = VentaActual.SerieFolio
|
||||
@@ -15886,81 +15847,22 @@ Partial Class Ventas
|
||||
If gvr.DataKey("CveIE").ToEntero() > 0 Then
|
||||
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
IdCtaContable = IdCtaContClientes
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = importeMovimiento
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = CveIEAnticipo
|
||||
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
||||
Pago.TipoPago = "A"
|
||||
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
||||
Pago.TipoPago = "I"
|
||||
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
|
||||
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||
Pago.Referencia = gvr.DataKey("Folio")
|
||||
|
||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
' Agregamos el 2
|
||||
If tipoCambioPago = 1 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
Else 'Cuando son dolares
|
||||
If importeMovimiento <> 0 Then
|
||||
If IdCtaContComplementaria > 0 Or 0 > 0 Then
|
||||
'Agregamos la Complementaria
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
Else
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
|
||||
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
|
||||
'Agregamos el 92
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
||||
IdCtaContable = IdCtaContAnticipos
|
||||
|
||||
If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
If Not tipoCambioPago = 1 Then
|
||||
IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos
|
||||
Else
|
||||
IdCtaContable = ObjCliente.IdCtaContAnticipos
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
If Not tipoCambioPago = 1 Then
|
||||
IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera
|
||||
Else
|
||||
IdCtaContable = ObjCliente.IdCtaContClientes
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
@@ -33797,7 +33699,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.FechaPago = Now
|
||||
|
||||
ObjFacturaProntoPago.CveCorte = -1
|
||||
ObjFacturaProntoPago.CveMesa = -1
|
||||
'ObjFacturaProntoPago.CveMesa = -1
|
||||
ObjFacturaProntoPago.NumeroPersonas = 0
|
||||
ObjFacturaProntoPago.CveContrato = -1
|
||||
ObjFacturaProntoPago.DescripcionContrato = ""
|
||||
|
||||
@@ -1070,7 +1070,7 @@ Public Class WSApp
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
ObjFactura.TipoDocto = "Rem"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
@@ -1893,7 +1893,7 @@ Public Class WSSIGApp
|
||||
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
|
||||
ObjFactura.TipoDocto = TipoDocto
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaPago = Now
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -566,6 +566,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user