+
diff --git a/Agropecuaria/RepPreciosVentaManifiesto.aspx.vb b/Agropecuaria/RepPreciosVentaManifiesto.aspx.vb
index 4de8fd0db..e413df747 100644
--- a/Agropecuaria/RepPreciosVentaManifiesto.aspx.vb
+++ b/Agropecuaria/RepPreciosVentaManifiesto.aspx.vb
@@ -142,7 +142,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
Dim ObjVentas As New ClsVentas
If ObjVentas.GetCultivos(-1, UsuarioActual.CveEmpresa) Then
- DdlModalCultivo.DataSource = ObjVentas.DtResultados
+ DdlModalCultivo.DataSource = ObjVentas.DtResultados.FiltraParametros("", "Cultivo")
Else
DdlModalCultivo.DataSource = Nothing
End If
@@ -163,7 +163,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
Dim objVentas As New ClsVentas
If objVentas.GetCultivosVariedad(CveCultivo, -1, UsuarioActual.CveEmpresa) Then
- DdlModalCultivoVariedad.DataSource = objVentas.DtResultados
+ DdlModalCultivoVariedad.DataSource = objVentas.DtResultados.FiltraParametros("", "CultivoVariedad")
End If
objVentas.Dispose()
@@ -182,7 +182,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
Dim objVentas As New ClsVentas
If objVentas.GetEmbarqueTamaño(-1, -1, UsuarioActual.CveEmpresa) Then
- DdlModalTamaño.DataSource = objVentas.DtResultados
+ DdlModalTamaño.DataSource = objVentas.DtResultados.FiltraParametros("", "Tamaño")
End If
objVentas.Dispose()
diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index ae6256b6b..ca454e46a 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -4,7 +4,7 @@ Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones
-Imports iText.StyledXmlParser.Css.Resolve.Shorthand.Impl
+
Public Class ClsCompras
Implements IDisposable
@@ -200,7 +200,7 @@ Public Class ClsCompras
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Decimal = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Integer = 0, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Decimal = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1,
- Optional CveCompraRelacionada As Integer = -1) As Boolean
+ Optional CveCompraRelacionada As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -256,7 +256,7 @@ Public Class ClsCompras
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
- .Add("@CveCompraRelacionada", SqlDbType.Int).Value = CveCompraRelacionada
+ .Add("@CveCompraRelacionada", SqlDbType.Int).Value = CveCompraRelacionada
End With
Try
@@ -3250,13 +3250,14 @@ Public Class ClsCompras
Return Retorno
End Function
- Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean
+ Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 8e1b2afe6..2f9873a89 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -6269,6 +6269,7 @@ Public Class ClsPaginas
DtMercancias.Columns.Add(New DataColumn("PesoEnKg", GetType(String)))
DtMercancias.Columns.Add(New DataColumn("CveMaterialPeligroso", GetType(String)))
+ DtMercancias.Columns.Add(New DataColumn("MaterialPeligroso", GetType(String)))
DtMercancias.Columns.Add(New DataColumn("Embalaje", GetType(String)))
DtMercancias.Columns.Add(New DataColumn("SectorCOFEPRIS", GetType(String)))
@@ -6461,6 +6462,7 @@ Public Class ClsPaginas
Row("PesoEnKg") = ValorXML(node, "PesoEnKg", "")
Row("CveMaterialPeligroso") = ValorXML(node, "CveMaterialPeligroso", "")
+ Row("MaterialPeligroso") = If(ValorXML(node, "MaterialPeligroso", "").ToUpper() = "SÍ", "Sí", "No")
Row("Embalaje") = ValorXML(node, "Embalaje", "")
Row("SectorCOFEPRIS") = ValorXML(node, "SectorCOFEPRIS", "")
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index dee1cabf4..f5df7ceeb 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -7358,7 +7358,7 @@ Public Class ClsVentas
End Function
- Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuarioAtendio As Integer, CveUsuarioConsulta As Integer, CveTipoVenta As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean
+ Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuarioAtendio As Integer, CveUsuarioConsulta As Integer, CveTipoVenta As Integer, CveMarca As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
@@ -7371,6 +7371,7 @@ Public Class ClsVentas
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
.Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago
@@ -7717,6 +7718,33 @@ Public Class ClsVentas
Return Retorno
End Function
+ Public Function AddPreciosVentaManifiesto(PalletNum As String, CveCultivo As Integer, CveTamaño As Integer, CveCultivoVariedad As Integer, Referencia As String, LdDate As Date, InvDate As Date, PDDate As Date, CantidadVendida As Decimal, PUVenta As Decimal, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Agro_PreciosVentaManifiestoAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@PalletNum", SqlDbType.VarChar).Value = PalletNum
+ .Add("@CveCultivo", SqlDbType.Int).Value = CveCultivo
+ .Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
+ .Add("@CveCultivoVariedad", SqlDbType.Int).Value = CveCultivoVariedad
+ .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
+ .Add("@LdDate", SqlDbType.Date).Value = LdDate
+ .Add("@InvDate", SqlDbType.Date).Value = InvDate
+ .Add("@PDDate", SqlDbType.Date).Value = PDDate
+ .Add("@CantidadVendida", SqlDbType.Money).Value = CantidadVendida
+ .Add("@PUVenta", SqlDbType.Money).Value = PUVenta
+ .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar los datos de manifiesto de ventaa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+ Return Retorno
+
+ End Function
Public Function GetPreciosVentaManifiesto(FechaInicio As Date, FechaFin As Date, CveEmbarqueManifiesto As Integer, CveSubProyecto As Integer, CveCultivo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -7733,7 +7761,7 @@ Public Class ClsVentas
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los indicadores de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al obtener los datos de manifiesto de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -7744,7 +7772,6 @@ Public Class ClsVentas
Dim Retorno As Boolean = False
DataAdapter("PA_Agro_PreciosVentaFechaAdd")
With SqlAdapter.SelectCommand.Parameters
-
.Add("@CveCultivo", SqlDbType.Int).Value = CveCultivo
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
.Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion
diff --git a/Ashx/E158.ashx b/Ashx/E158.ashx
index 9ca13d1cc..cc6b92bc6 100644
--- a/Ashx/E158.ashx
+++ b/Ashx/E158.ashx
@@ -23,6 +23,7 @@ Imports System.Xml
Imports System.Diagnostics
Imports System.Drawing
Imports System.Drawing.Imaging
+Imports System.ComponentModel
@@ -76,8 +77,8 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
End Sub
Private Function PreciosVentaCultivo(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
- Dim Respuesta As Boolean = False
- Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
+ Dim Respuesta As Boolean = True
+ Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
' Crear una instancia del servicio web
Dim wsservice As New GrowerService.Service()
@@ -93,8 +94,134 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
Dim Parametro6 As Integer = 0
Dim Parametro6Date As Date = Now.AddDays(-3)
- 'Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
+
+
+ Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
+ 'DTresp.FiltraParametros("", "", {"CommodityDesc"}).WriteXml("C:\temp\GrowerService\CommodityDesc.xml", XmlWriteMode.WriteSchema)
+ 'DTresp.FiltraParametros("", "", {"VarietyDesc"}).WriteXml("C:\temp\GrowerService\VarietyDesc.xml", XmlWriteMode.WriteSchema)
+ 'DTresp.FiltraParametros("", "", {"SizeDesc"}).WriteXml("C:\temp\GrowerService\SizeDesc.xml", XmlWriteMode.WriteSchema)
+
+
+ DTresp.Columns.Add("InvoiceDateReal", GetType(DateTime))
+
+ For Each row As DataRow In DTresp.Rows
+ Dim fechaTexto As String = row("InvoiceDate").ToString().Trim()
+
+ If DateTime.TryParseExact(fechaTexto, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, Nothing) Then
+ row("InvoiceDateReal") = DateTime.ParseExact(fechaTexto, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
+ Else
+ row("InvoiceDateReal") = DBNull.Value
+ End If
+ Next
+
+ DTresp = DTresp.FiltraParametros(" InvoiceDateReal >= #01/01/2025# ")
+
+
+ Dim ObjVentas As New ClsVentas
+ Dim DTCultivo As New DataTable
+ Dim DTCultivoVariedad As New DataTable
+ Dim DTTamaño As New DataTable
+
+ If ObjVentas.GetCultivos(-1, CveEmpresa) Then
+ DTCultivo = ObjVentas.DtResultados
+ Else
+ Respuesta = False
+ End If
+
+ If ObjVentas.GetCultivosVariedad(-1, -1, CveEmpresa) Then
+ DTCultivoVariedad = ObjVentas.DtResultados
+ Else
+ Respuesta = False
+ End If
+
+ If ObjVentas.GetEmbarqueTamaño(-1, -1, CveEmpresa) Then
+ DTTamaño = ObjVentas.DtResultados
+ Else
+ Respuesta = False
+ End If
+
+ If Respuesta Then
+ ObjVentas.IniciaTransacSQL()
+
+ For Each dRow As DataRow In DTresp.Rows
+
+ Dim PalletNum As String = dRow("PalletNum").ToString
+
+ Try
+ Dim CveCultivo As Integer = DTCultivo.FiltroPrimeroValor("CveCultivo", $" Alias = '{dRow("CommodityDesc").ToString}' ").ToEntero
+ If Not CveCultivo > 0 Then
+ GuardaLog($"No se encontro el cultivo {dRow("CommodityDesc").ToString}")
+ Exit For
+ End If
+
+ Dim CveCultivoVariedad As Integer = DTCultivoVariedad.FiltroPrimeroValor("CveCultivoVariedad", $" Alias = '{dRow("VarietyDesc").ToString}' ").ToEntero
+ If Not CveCultivoVariedad > 0 Then
+ GuardaLog($"No se encontro la variedad {dRow("VarietyDesc").ToString}")
+ Exit For
+ End If
+
+ Dim CveTamaño As Integer = DTTamaño.FiltroPrimeroValor("CveTamaño", $" Alias = '{dRow("SizeDesc").ToString.Replace("'", "''")}' ").ToEntero
+ If Not CveTamaño > 0 Then
+ GuardaLog($"No se encontro el tamaño {dRow("SizeDesc").ToString}")
+ Exit For
+ End If
+
+ Dim LoadDate As Date = DateTime.ParseExact(dRow("LoadDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
+ Dim InvoiceDate As Date = DateTime.ParseExact(dRow("InvoiceDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
+
+ Dim PaidDate As Date = MinFecha
+ If dRow("PaidDate").ToString.Trim.Length > 0 Then
+ PaidDate = DateTime.ParseExact(dRow("PaidDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
+ End If
+
+
+
+ If Not ObjVentas.AddPreciosVentaManifiesto(dRow("PalletNum").ToString, CveCultivo, CveTamaño, CveCultivoVariedad, dRow("GroReference").ToString,
+ LoadDate, InvoiceDate, PaidDate,
+ dRow("InvPkgs").ToString.ToDecimal, dRow("NetProdPrice").ToString.ToDecimal, dRow("ProductDesc").ToString,
+ UsuarioActual.CveUsuario, CveEmpresa) Then
+ Respuesta = False
+ Exit For
+ End If
+
+ Catch ex As Exception
+
+ GuardaLog($"Error PalletNum: {PalletNum} {ex.Message} --> {ex.StackTrace}")
+ Respuesta = False
+
+ End Try
+
+
+
+ Next
+
+
+ If Respuesta Then
+ ObjVentas.Commit()
+ Else
+ ObjVentas.RollBack()
+ End If
+ End If
+
+
+
+ ObjVentas.Dispose()
+
+
+ 'For Each dRow As DataRow In DTresp.Rows
+
+ 'Next
+
+ 'Dim ObjVentas As New ClsVentas
+
+ 'If ObjVentas.AddPreciosVentaManifiesto() Then
+
+ 'End If
+
+ 'ObjVentas.Dispose()
+ 'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
+
'Dim DTAdjustements As DataTable = wsservice.GetAdjustements(Parametro1, Parametro2, Parametro4, Parametro5, Parametro6)
'DTAdjustements.WriteXml("C:\temp\GrowerService\Adjustements.xml", XmlWriteMode.WriteSchema)
@@ -107,8 +234,8 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
'Dim DTLotexpenses As DataTable = wsservice.GetLotExpenses(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6, expenseID:=)
'DTLotexpenses.WriteXml("C:\temp\GrowerService\Lotexpenses.xml", XmlWriteMode.WriteSchema)
- Dim DTTodayInvoices As DataTable = wsservice.GetTodayInvoices(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6Date, ContractFilter:=1)
- DTTodayInvoices.WriteXml("C:\temp\GrowerService\TodayInvoices.xml", XmlWriteMode.WriteSchema)
+ 'Dim DTTodayInvoices As DataTable = wsservice.GetTodayInvoices(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6Date, ContractFilter:=1)
+ 'DTTodayInvoices.WriteXml("C:\temp\GrowerService\TodayInvoices.xml", XmlWriteMode.WriteSchema)
Dim InvParametro1 As Integer = 9
Dim InvParametro2 As Integer = 1
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index a74d504d2..86cad07ec 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -94,6 +94,14 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("CveAplicaNC") = value
End Set
End Property
+ Private Property ProveedorPlazoPago As Integer
+ Get
+ Return ViewState("ProveedorPlazoPago").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("ProveedorPlazoPago") = value
+ End Set
+ End Property
Private Property CveMoneda As Integer
Get
@@ -468,6 +476,7 @@ Partial Class Bancos_ProveedoresAbonar
TxtImporte.Attributes.Add("disabled", "disabled")
If DdlTipoTransaccion.SelectedValue = "1" Then RFVFolio.Enabled = True Else RFVFolio.Enabled = False
TxtNotificarA.Text = $"{ObjProveedor.NotificarA.Trim}"
+ ProveedorPlazoPago = ObjProveedor.PlazoPago
If ObjProveedor.CorreoCobranza.Trim <> "" Then TxtNotificarA.Text = $"{TxtNotificarA.Text};{ObjProveedor.CorreoCobranza.Trim}"
'Sección de pago a proveedor
@@ -525,6 +534,11 @@ Partial Class Bancos_ProveedoresAbonar
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format(" RNCAutocheck = true;FnCambia({0},this,{1},2,'{2}',2);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
End If
+ 'si el vencimiento es diferente al configurado en el proveedor, se pone en rojo
+ If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DateDiff(DateInterval.Day, e.Row.DBCampo("Fecha").ToDate, e.Row.DBCampo("FechaVencimiento").ToDate) <> ProveedorPlazoPago Then
+ e.Row.Cells(6).ForeColor = Drawing.Color.Red
+ e.Row.Cells(6).ToolTip = $"Dias de Vencimiento ({DateDiff(DateInterval.Day, e.Row.DBCampo("Fecha").ToDate, e.Row.DBCampo("FechaVencimiento").ToDate)}) diferente al configurado en el proveedor ({ProveedorPlazoPago})"
+ End If
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
@@ -581,15 +595,10 @@ Partial Class Bancos_ProveedoresAbonar
e.Row.FCTextBox("TxtAbonar").Enabled = True
End If
End If
-
End If
-
-
e.Row.FCLiteral("LtlAux").Text = String.Format("
Ir", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra"))
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv))
-
-
If Not PermiteModificarImporte Then e.Row.FCTextBox("TxtAbonar").Enabled = False
If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
e.Row.FCHyperLink("HplNC").Visible = True
@@ -622,11 +631,9 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.Empresa.Funcionalidad(306) = "1" And e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
e.Row.FCCheckBox("Chk").Enabled = False
End If
-
e.Row.FCTextBox("TxtDescuento").Attributes.Add("onkeyup", $" calculaDescuentoEscalonado({e.Row.DBCampo("Saldo")},'{e.Row.FCTextBox("TxtDescuento").ClientID}',{e.Row.FCTextBox("TxtAbonar").ClientID},{e.Row.FCCheckBox("Chk").ClientID},'El Importe no debe de exceder el saldo',1)")
Else
e.Row.FCTextBox("TxtDescuento").Visible = False
-
End If
End If
End Sub
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index a948d5b24..c404ad0b2 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -216,6 +216,11 @@ Partial Class Compras_Compras
Return ViewState("CveTipoProveedor").ToString.ToEntero
End Get
End Property
+ Private ReadOnly Property CveTipoFechaVencimiento As Integer
+ Get
+ Return ViewState("CveTipoFechaVencimiento").ToString.ToEntero
+ End Get
+ End Property
Private ReadOnly Property NombreProveedor As String
Get
@@ -3788,6 +3793,7 @@ Partial Class Compras_Compras
ViewState("CveProveedor") = ObjProveedor.CveProveedor
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
+ ViewState("CveTipoFechaVencimiento") = ObjProveedor.CveTipoFechaVencimiento
TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
'comentado RMF.2024.05.21. en anticipos parciales, está bloquenado
'If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
@@ -5166,6 +5172,18 @@ Partial Class Compras_Compras
If (tNoDeducible > 0) Then
tNoDeducible = If(TmpDT.MIN("NoDeducible", "IVA > 0") = "False", 2, 1)
End If
+ 'cuando es el cálculo de la fecha de vencimiento por entrada almacen
+ If CveTipoFechaVencimiento = 2 Then
+ 'verificar que tenga seleccionado entrada en almacen.
+ Dim ConEntradaDirecta As Boolean = False
+ For Each gvr As GridViewRow In GvInv.Rows
+ If gvr.FCCheckBox("cbinv").Checked Then
+ ConEntradaDirecta = True : Exit For
+ End If
+ Next
+ If ConEntradaDirecta Then TxtFechaPago.Text = (Now.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
+ End If
+
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDecimal, TxtDescuento.Text.ToDecimal,
LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, TxtRetISR.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtOtrosImpuestos.Text.ToDecimal,
TxtRedondeo.Text.ToDecimal, TxtTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
@@ -15136,11 +15154,6 @@ Partial Class Compras_Compras
End If
- Dim DiasCreditoOCActual As Integer = DTOCTemp.FiltroPrimeroValor("DiasCreditoOC").ToEntero
-
- If DiasCreditoOCActual > DiasCredito Then
- DiasCredito = DiasCreditoOCActual
- End If
IvaAcumulado += ObjOC.DtResultados.Rows(0)("IVA").ToString.ToDouble
@@ -15263,10 +15276,6 @@ Partial Class Compras_Compras
DivOCPromocion.Visible = True
End If
- If DiasCredito > 0 Then
- TxtFechaPago.Text = Now.AddDays(DiasCredito).ToString("dd/MM/yyyy")
- UPCondicionesPago.Update()
- End If
'CARGA DATOS DE OC
CargaVinculacionOC(True)
@@ -21048,7 +21057,7 @@ Partial Class Compras_Compras
Exit Sub
End If
- If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
+ If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
Alert("Fecha de pago actualizada correctamente.")
End If
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 55db2884b..95591bce5 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1167,6 +1167,17 @@ Partial Class Compras_eFacturas
' End If
'End If
+ Dim Funcionalidad123 As Integer = UsuarioActual.Empresa.Funcionalidad(123).ToEntero
+ If Funcionalidad123 > 0 Then
+ If NowADS().Day >= Funcionalidad123 Then
+ Dim FechaLimite As Date = New Date(NowADS().Year, NowADS().Month, 1)
+ If e.Row.DBCampo("FechaFactura").ToDate < FechaLimite Then
+ e.Row.FCHyperLink("HplAgregar").Visible = False
+ End If
+ End If
+ End If
+
+
e.Row.FCCheckBox("chkRegistraFactura").Attributes.Add("onclick", "ChkRegsitraFacturas()")
End If
diff --git a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
index c12514aa1..38000e5c8 100644
--- a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
+++ b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
@@ -105,6 +105,10 @@
CveMaterialPeligroso
System.String
+
+ MaterialPeligroso
+ System.String
+
Embalaje
System.String
@@ -301,13 +305,16 @@
8.04092cm
- 2.60983cm
+ 2.00481cm
1.90464cm
- 2.35479cm
+ 1.59235cm
+
+
+ 1.38195cm
@@ -515,8 +522,50 @@
1pt
+
+ 1pt
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!MaterialPeligroso.Value
+
+
+
+
+
+
+ MaterialPeligroso
+
+
+
1pt
+
+
+
2pt
2pt
@@ -732,6 +781,46 @@
+
+
+ 0.52062cm
+
+
+ true
+ true
+
+
+
+
+ Peligroso
+
+
+
+
+
+
+ Textbox53
+
+
+ #4f81bd
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
@@ -795,9 +884,9 @@
true
DataSet3
8.7754cm
- 0.38395cm
+ 0.40259cm
1.12062cm
- 19.15904cm
+ 19.17353cm
@@ -4957,7 +5046,7 @@
- transporte
+ transporte
@@ -5387,7 +5476,7 @@
Textbox57
- 12.60522cm
+ 12.57347cm
5.80743cm
1.99491cm
4.05859cm
@@ -5558,7 +5647,6 @@
CERTIFICADO DE ARRUMAZÓN DEL CONTENEDOR/VEHÍCULO
Declaro que las mercancías descritas más arriba han sido arrumadas/cargadas en el contenedor/vehículo de conformidad con el IMDG.
-
POR CADA CARGA DEL CONTENEDOR/VEHÍCULO LA PERSONA RESPONSABLE DE LA ARRUMAZÓN/CARGA HA DE LLENAR Y FIRMAR ESTA SECCIÓN.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ___________________________
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Textbox57
14.60013cm
1.35021cm
- 2.92513cm
+ 3.54602cm
8.52539cm
27
+
+
+
+
+
+
+
+ Firma
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ___________________________
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Textbox57
14.60013cm
9.86956cm
- 2.92513cm
+ 3.54602cm
9.31662cm
28
- 21.86398cm
+ 22.49898cm
1.5cm
0cm
3.90544cm
@@ -6156,7 +6374,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
- 21.86398cm
+ 22.49898cm
9.94339cm
0cm
3.90544cm
@@ -6168,8 +6386,8 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
- 21.86398cm
- 14.68568cm
+ 22.49898cm
+ 14.71743cm
0cm
3.90544cm
43
@@ -6197,7 +6415,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
Textbox120
- 22.10051cm
+ 22.67201cm
1.36431cm
0.45969cm
10.17692cm
@@ -6212,11 +6430,85 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
2pt
+
+ true
+ true
+
+
+
+
+ =Parameters!SerieFolio.Value
+
+
+
+
+
+
+ SerieFolio
+ 0.67478cm
+ 15.20438cm
+ 0.6cm
+ 3.97474cm
+ 45
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+ =Parameters!FechaCertificacion.Value
+
+
+
+
+
+
+ SerieFolio
+ 1.45117cm
+ 15.20438cm
+ 0.6cm
+ 3.97474cm
+ 46
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
true
23.161cm
- 0.02115cm
- 22.5602cm
+ 0.03979cm
+ 23.1317cm
19.53633cm
29
@@ -6437,7 +6729,7 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
true
19.47094cm
- 0.10398cm
+ 0.12262cm
3.556cm
19.66645cm
30
@@ -6447,11 +6739,915 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
+
+
+
+
+ End
+
+ true
+ 0.46378cm
+ 0.10353cm
+ 18.12737cm
+
+
+
+
+
+ External
+ =Parameters!LogoPath.Value
+ FitProportional
+ 0.20936cm
+ 0.19973in
+ 0.76284in
+ 1.18285in
+ 1
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Transporte de mercancías peligrosas
+
+
+
+
+
+
+
+
+ NOM-043-SCT-SEMAR-ARTF-2023
+
+
+
+
+
+
+ Textbox2
+ 0.20936cm
+ 5.26408cm
+ 0.94606cm
+ 9.73471cm
+ 2
+
+
+
+ true
+
+
+
+
+ 1. Expedidor
+
+
+
+
+
+
+
+
+ =Parameters!NombreEmpresa.Value
+
+
+
+
+
+
+
+
+ =Parameters!DomicilioFiscal.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Textbox57
+ 2.20355cm
+ 1.3457cm
+ 1.7cm
+ 7.76888cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ 2. Número del documento de transporte
+
+
+
+ =Parameters!SerieFolio.Value
+
+
+
+
+
+
+ Textbox57
+ 2.20355cm
+ 9.11458cm
+ 0.53987cm
+ 10.05649cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ 3. Página 2 de 2 Páginas
+
+
+
+
+
+
+ Textbox57
+ 2.74342cm
+ 9.11811cm
+ 0.53987cm
+ 5.04544cm
+ 5
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Referencia del expedidor
+
+
+
+
+
+
+ Textbox57
+ 2.74342cm
+ 14.16002cm
+ 0.53987cm
+ 5.01105cm
+ 6
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Referencia del expedidor de la carga
+
+
+
+
+
+
+ Textbox57
+ 3.28681cm
+ 14.16002cm
+ 0.61674cm
+ 5.01105cm
+ 7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox57
+ 3.28681cm
+ 9.11105cm
+ 0.61674cm
+ 5.04544cm
+ 8
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ 7. Porteador/Transportista (debe llenarlo el porteador/transportista)
+
+
+
+
+
+
+ Textbox57
+ 3.90355cm
+ 9.11105cm
+ 0.53987cm
+ 10.05649cm
+ 9
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ 6. Destinatario
+
+
+
+
+
+
+ Textbox57
+ 3.90355cm
+ 1.34923cm
+ 0.53987cm
+ 7.76535cm
+ 10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ 1.94544cm
+
+
+ 9.84993cm
+
+
+ 2.13881cm
+
+
+ 1.84139cm
+
+
+ 2.05903cm
+
+
+
+
+ 0.66035cm
+
+
+
+
+ true
+ true
+
+
+
+
+ 14 Marcas de
+
+
+
+
+
+
+
+
+ transporte
+
+
+
+
+
+
+ Textbox84
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ *Número y tipo de bultos:
+
+
+
+
+
+
+
+
+ Descripción de la mercancia
+
+
+
+
+
+
+ Textbox86
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Peso Bruto (kg)
+
+
+
+
+
+
+ Textbox88
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ PesoNeto(Kg)
+
+
+
+
+
+
+ Textbox90
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Volumen (m3)
+
+
+
+
+
+
+ Textbox92
+
+
+
+
+
+
+
+
+
+ 0.33965cm
+
+
+
+
+ true
+ true
+
+
+
+
+ Si
+
+
+
+
+
+
+ Textbox85
+
+ =IIF(Fields!MaterialPeligroso.Value = "No",true,false)
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Descripcion.Value
+
+
+
+
+
+
+ Descripcion
+
+ =IIF(Fields!MaterialPeligroso.Value = "No",true,false)
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!PesoEnKg.Value
+
+
+
+
+
+
+
+
+
+
+ PesoEnKg1
+
+ =IIF(Fields!MaterialPeligroso.Value = "No",true,false)
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!PesoEnKg.Value
+
+
+
+
+
+
+
+
+
+
+ PesoEnKg3
+
+ =IIF(Fields!MaterialPeligroso.Value = "No",true,false)
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox93
+
+ =IIF(Fields!MaterialPeligroso.Value = "No",true,false)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ DataSet3
+ 0.06703cm
+ 1cm
+ 17.8346cm
+
+
+
+
+
+ true
+ 4.45047cm
+ 1.33863cm
+ 1.06703cm
+ 17.8346cm
+ 11
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!SerieFolio.Value
+
+
+
+
+
+
+ SerieFolio
+ 0.67478cm
+ 15.20438cm
+ 0.6cm
+ 3.97474cm
+ 12
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+ =Parameters!FechaCertificacion.Value
+
+
+
+
+
+
+ SerieFolio
+ 1.45117cm
+ 15.20438cm
+ 0.6cm
+ 3.97474cm
+ 13
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ 47.03985cm
+ 5.54925cm
+ 19.53633cm
+ 31
+
+ =Microsoft.VisualBasic.Interaction.IIF(Parameters!imprmirNom043.Value = "1", False, True)
+
+
+
+
+
- 18.0263in
+ 20.70437in