diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 1745f277d..328071a34 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1254,7 +1254,7 @@ Partial Class PopUpVerFactura
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
- Dim Consola As String = If(UrlParametros("CVEMOVIMIENTO") IsNot Nothing, UrlParametros("CVEMOVIMIENTO").ToString.Trim, "")
+ Dim Consola As String = If(UrlParametros("CONSOLA") IsNot Nothing, UrlParametros("CONSOLA").ToString.Trim, "")
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio, Consola:=Consola)
diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx
index 3c3ac64f7..2728a7ae1 100644
--- a/Compras/RepRembolsoComprobaciones.aspx
+++ b/Compras/RepRembolsoComprobaciones.aspx
@@ -195,7 +195,7 @@
- Monto Compra (Saldo Orig.)
+ Total Compra
@@ -243,7 +243,7 @@
-
+
diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb
index 98cbd2dd3..aa6416bd4 100644
--- a/Compras/RepRembolsoComprobaciones.aspx.vb
+++ b/Compras/RepRembolsoComprobaciones.aspx.vb
@@ -64,13 +64,9 @@ Partial Class Compras_RepRembolsoComprobaciones
DdlCajaChica.DataSource = dt
DdlCajaChica.DataBind()
- Dim ObjPersonal As New ClsRH
- ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
- DdlPersonal.DataSource = ObjPersonal.DtResultados
- ObjPersonal.Dispose()
+ DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlPersonal.DataBind()
-
End If
End Sub
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 719c8b22f..3130410a4 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -583,7 +583,7 @@
-
+
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx
index 9c0e62c84..d623ae77c 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx
@@ -223,9 +223,18 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -481,6 +490,13 @@
+
+
+
+
+
+
+
@@ -630,6 +646,38 @@
snd.currentTime = 0;
}
+
+ function Dividir(t) {
+ $get("HdnCantidadMovimiento").value = $get(t).value;
+ }
+
+ function LimitaCantidad(C, textbox, button) {
+
+ // var contenedor = $(textbox).parent().find("#" + buttonIdDiv);
+
+ if (ToDouble(textbox.value) >= C) {
+ textbox.value = "";
+ }
+
+ if (parseFloat(textbox.value) > 0) {
+ $get(button).style.display = "";
+ //$(contenedor).show();
+ }
+ else {
+ $get(button).style.display = "none";
+ //$(contenedor).hide();
+
+ }
+ }
+
+
+ function evitarPostBack(event) {
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ return false;
+ }
+ }
+
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index 1658292ec..5c31e2e4e 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -124,6 +124,38 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
ViewState("DtExistenciasDesarmado") = value
End Set
End Property
+
+
+ Private Property DtDatosArmado As DataTable
+ Get
+ If ViewState("DtDatosArmado") Is Nothing Then
+ ViewState("DtDatosArmado") = New DataTable
+ End If
+
+ Return CType(ViewState("DtDatosArmado"), DataTable)
+
+ End Get
+ Set(value As DataTable)
+ ViewState("DtDatosArmado") = value
+ End Set
+ End Property
+
+
+ Private Property DtDatosDesArmado As DataTable
+ Get
+ If ViewState("DtDatosDesArmado") Is Nothing Then
+ ViewState("DtDatosDesArmado") = New DataTable
+ End If
+
+ Return CType(ViewState("DtDatosDesArmado"), DataTable)
+
+ End Get
+ Set(value As DataTable)
+ ViewState("DtDatosDesArmado") = value
+ End Set
+ End Property
+
+
#End Region
@@ -217,20 +249,20 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Limpia(TipoMovimiento)
Dim ObjProductosServicios As New ClsProductosServicios
- Dim DtDatos As New DataTable
+ DtDatosArmado = New DataTable
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("")
Dim CveUMTemp As Integer = drP("CveUM").ToString.ToEntero
If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteArmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadArmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then
- DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
+ DtDatosArmado = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
Else
- DtDatos = Nothing
+ DtDatosArmado = Nothing
Alert("Ocurrió un error al obtener los componentes del paquete. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
ObjProductosServicios.Dispose()
- If DtDatos Is Nothing Then
+ If DtDatosArmado Is Nothing Then
Exit Sub
End If
@@ -238,15 +270,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
CveCliente = If(RowClienteArmado.Visible, DdlClienteArmado.SelectedValue.ToEntero, -1)
- If DtDatos.Rows.Count > 0 Then
- For Each Dr As DataRow In DtDatos.Rows
+ If DtDatosArmado.Rows.Count > 0 Then
+ For Each Dr As DataRow In DtDatosArmado.Rows
Dr("Cantidad") = Dr("Cantidad").ToString.ToDecimal * TxtCantidadArmado.Text.ToDecimal
Next
End If
Dim TextoExistencias As String = "No hay existencia suficiente de los siguientes componentes:
"
Dim ErrorExistencias As Boolean = False
- For Each Dr As DataRow In DtDatos.Rows
+ For Each Dr As DataRow In DtDatosArmado.Rows
If Dr("CantidadDisponible2").ToString.ToDecimal < Dr("Cantidad").ToString.ToDecimal Then
TextoExistencias += $" - Componente: ""{Dr("CodigoPS")}""."
ErrorExistencias = True
@@ -280,13 +312,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero
CveAlmacenArmado = DdlAlmacenArmado.SelectedValue.ToEntero
- GvDatosArmado.DataSource = DtDatos
+ GvDatosArmado.DataSource = DtDatosArmado
GvDatosArmado.DataBind()
- GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
- GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
- GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True"
- GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True"
+ GvDatosArmado.Columns(4).Visible = DtDatosArmado.MAX("AplicaSerie", "") = "True"
+ GvDatosArmado.Columns(5).Visible = DtDatosArmado.MAX("AplicaSeccion") = "True"
+ GvDatosArmado.Columns(6).Visible = DtDatosArmado.MAX("AplicaLote") = "True"
+ GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True"
'If ErrorExistencias Then
' GvDatosArmado.Columns(4).Visible = False
@@ -338,23 +370,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Dim ObjProductosServicios As New ClsProductosServicios
- Dim DtDatos As New DataTable
+ DtDatosDesArmado = New DataTable
If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteDesarmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then
- DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
+ DtDatosDesArmado = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
Else
- DtDatos = Nothing
+ DtDatosDesArmado = Nothing
Alert("Ocurrió un error al obtener los componentes del paquete. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
ObjProductosServicios.Dispose()
- If DtDatos Is Nothing Then
+ If DtDatosDesArmado Is Nothing Then
Exit Sub
End If
- If DtDatos.Rows.Count > 0 Then
- For Each Dr As DataRow In DtDatos.Rows
+ If DtDatosDesArmado.Rows.Count > 0 Then
+ For Each Dr As DataRow In DtDatosDesArmado.Rows
Dr("Cantidad") = Dr("Cantidad").ToString.ToDecimal * TxtCantidadDesarmado.Text.ToDecimal
Next
End If
@@ -372,13 +404,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
CvePaqueteDesarmado = DdlPaqueteDesarmado.SelectedValue.ToEntero
CveAlmacenDesarmado = DdlAlmacenDesarmado.SelectedValue.ToEntero
- GvDatosDesarmado.DataSource = DtDatos
+ GvDatosDesarmado.DataSource = DtDatosDesArmado
GvDatosDesarmado.DataBind()
- GvDatosArmado.Columns(4).Visible = DtDatos.MAX("AplicaSerie", "") = "True"
- GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
- GvDatosArmado.Columns(6).Visible = DtDatos.MAX("AplicaLote") = "True"
- GvDatosArmado.Columns(7).Visible = DtDatos.MAX("AplicaCaducidad") = "True"
+ GvDatosArmado.Columns(4).Visible = DtDatosDesArmado.MAX("AplicaSerie", "") = "True"
+ GvDatosArmado.Columns(5).Visible = DtDatosDesArmado.MAX("AplicaSeccion") = "True"
+ GvDatosArmado.Columns(6).Visible = DtDatosDesArmado.MAX("AplicaLote") = "True"
+ GvDatosArmado.Columns(7).Visible = DtDatosDesArmado.MAX("AplicaCaducidad") = "True"
BtnGuadarDesarmado.Visible = True
@@ -855,8 +887,120 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
' e.Row.FCTextBox("TbCantidadF").Enabled = False
'End If
+ e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
+ e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString()
+ e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID))
+
End If
End Sub
+
+
+ Protected Sub Dividir(sender As Object, e As EventArgs)
+ Dim index2 As Integer = 0
+
+ If Not DtDatosArmado.Columns.Contains("Lote") Then
+ DtDatosArmado.Columns.Add("Lote", GetType(String))
+ End If
+
+ If Not DtDatosArmado.Columns.Contains("CveSeccion") Then
+ DtDatosArmado.Columns.Add("CveSeccion", GetType(Integer))
+ End If
+
+ If Not DtDatosArmado.Columns.Contains("FechaCaducidad") Then
+ DtDatosArmado.Columns.Add("FechaCaducidad", GetType(String))
+ End If
+
+ DtDatosArmado.AcceptChanges()
+
+ For Each Row As DataRow In DtDatosArmado.Rows
+
+
+ Row("Lote") = GvDatosArmado.Rows(index2).FCTextBox("TxtLote").Text
+ 'End If
+ 'If GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue <> "-1" Then
+ Row("CveSeccion") = GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
+ ' End If
+ 'If GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text <> "" Then
+ Row("FechaCaducidad") = GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text
+ 'End If
+ index2 += 1
+ Next
+
+ DtDatosArmado.AcceptChanges()
+
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, Button)).NamingContainer, GridViewRow)
+ Dim Index As Integer = gvRow.RowIndex
+ Dim Cantidad As String = HdnCantidadMovimiento.Value
+ Dim drOriginal As DataRow = DtDatosArmado.Rows(Index)
+ Dim drNew As DataRow = DtDatosArmado.NewRow
+
+ drNew.ItemArray = drOriginal.ItemArray
+
+ drOriginal("Cantidad") = (drOriginal("Cantidad").ToString().ToDouble - Cantidad.ToDouble)
+
+ 'Dim CantidadFOriginal As Double = drOriginal("CantidadF").ToString().ToDouble
+ 'drOriginal("CantidadF") = (drOriginal("CantidadF").ToString().ToDouble - Cantidad.ToDouble)
+
+ 'Dim CantidadSOriginal As Double = drOriginal("CantidadS").ToString().ToDouble
+ 'drOriginal("CantidadS") = (CantidadSOriginal * drOriginal("CantidadF").ToString().ToDouble) / CantidadFOriginal
+
+ 'Dim CantidadSeleccionadaOriginal As Double = drOriginal("CantidadSeleccionada").ToString().ToDouble
+ 'drOriginal("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > drOriginal("CantidadF").ToString().ToDouble, drOriginal("CantidadF").ToString().ToDouble, CantidadSeleccionadaOriginal)
+
+ 'CantidadSeleccionadaOriginal = CantidadSeleccionadaOriginal - drOriginal("CantidadF").ToString().ToDouble
+
+ 'Dim CostoIndirectoOriginal As Double = dr1("CostoIndirecto").ToString().ToDouble
+ 'dr1("CostoIndirecto") = (CostoIndirectoOriginal * dr1("CantidadF").ToString().ToDouble) / CantidadFOriginal
+ 'Dim CostoIndirectoExtranjeroOriginal As Double = dr1("CostoIndirectoExtranjero").ToString().ToDouble
+ 'dr1("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr1("CantidadF").ToString().ToDouble) / CantidadFOriginal
+
+ DtDatosArmado.AcceptChanges()
+
+ drNew("Cantidad") = Cantidad.ToDecimal
+ 'drNew("CantidadF") = Cantidad.ToDouble
+ 'drNew("CantidadS") = (CantidadSOriginal * drNew("CantidadF").ToString().ToDouble) / CantidadFOriginal
+ 'drNew("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > 0, CantidadSeleccionadaOriginal, 0)
+ 'drNew("Seleccionado") = If(CantidadSeleccionadaOriginal > 0, True, False)
+ 'dr("CostoIndirecto") = (CostoIndirectoOriginal * dr("CantidadF").ToString().ToDouble) / CantidadFOriginal
+ 'dr("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr("CantidadF").ToString().ToDouble) / CantidadFOriginal
+ DtDatosArmado.Rows.InsertAt(drNew, Index)
+ DtDatosArmado.AcceptChanges()
+
+ index2 = 1
+ For Each Row As DataRow In DtDatosArmado.Rows
+ Row("Consec") = index2
+ index2 += 1
+ Next
+ DtDatosArmado.AcceptChanges()
+
+
+ GvDatosArmado.DataSource = DtDatosArmado
+ GvDatosArmado.DataBind()
+
+
+ index2 = 0
+ For Each Row As DataRow In DtDatosArmado.Rows
+ 'GvDatosArmado.Rows(index2).FCCheckBox("cbInv").Checked = CBool(Row("Seleccionado"))
+ 'If Row("CantidadSeleccionada").ToString() <> "" Then
+ ' GvDatosArmado.Rows(index2).FCTextBox("TbCantidadF").Text = Row("CantidadSeleccionada").ToString()
+ 'End If
+ If Row("Lote").ToString() <> "" Then
+ GvDatosArmado.Rows(index2).FCTextBox("TxtLote").Text = Row("Lote").ToString()
+ End If
+ If Row("CveSeccion").ToString() <> "" Then
+ GvDatosArmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString()
+ End If
+ If Row("FechaCaducidad").ToString() <> "" Then
+ GvDatosArmado.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString().ToDate.ToShortDateString
+ End If
+ index2 += 1
+ Next
+
+ UpDatosArmado.Update()
+
+ End Sub
+
+
#End Region
#Region " GV DESARMADO "
@@ -894,8 +1038,90 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
e.Row.FCTextBox("TxtCosto").Attributes.Add("onkeyup", "SumaValores();")
+
+ e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
+ e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString()
+ e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID))
+
End If
End Sub
+
+
+ Protected Sub DividirDesarmado(sender As Object, e As EventArgs)
+ Dim index2 As Integer = 0
+
+ If Not DtDatosDesArmado.Columns.Contains("Lote") Then
+ DtDatosDesArmado.Columns.Add("Lote", GetType(String))
+ End If
+
+ If Not DtDatosDesArmado.Columns.Contains("CveSeccion") Then
+ DtDatosDesArmado.Columns.Add("CveSeccion", GetType(Integer))
+ End If
+
+ If Not DtDatosDesArmado.Columns.Contains("FechaCaducidad") Then
+ DtDatosDesArmado.Columns.Add("FechaCaducidad", GetType(String))
+ End If
+
+ DtDatosDesArmado.AcceptChanges()
+
+ For Each Row As DataRow In DtDatosDesArmado.Rows
+ Row("Lote") = GvDatosDesarmado.Rows(index2).FCTextBox("TxtLote").Text
+ Row("CveSeccion") = GvDatosDesarmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
+ Row("FechaCaducidad") = GvDatosDesarmado.Rows(index2).FCTextBox("TxtCaducidad").Text
+ index2 += 1
+ Next
+
+ DtDatosDesArmado.AcceptChanges()
+
+ Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, Button)).NamingContainer, GridViewRow)
+ Dim Index As Integer = gvRow.RowIndex
+ Dim Cantidad As String = HdnCantidadMovimiento.Value
+ Dim drOriginal As DataRow = DtDatosDesArmado.Rows(Index)
+ Dim drNew As DataRow = DtDatosDesArmado.NewRow
+
+ drNew.ItemArray = drOriginal.ItemArray
+
+ drOriginal("Cantidad") = (drOriginal("Cantidad").ToString().ToDouble - Cantidad.ToDouble)
+
+
+
+ DtDatosDesArmado.AcceptChanges()
+
+ drNew("Cantidad") = Cantidad.ToDecimal
+
+ DtDatosDesArmado.Rows.InsertAt(drNew, Index)
+ DtDatosDesArmado.AcceptChanges()
+
+ index2 = 1
+ For Each Row As DataRow In DtDatosDesArmado.Rows
+ Row("Consec") = index2
+ index2 += 1
+ Next
+ DtDatosDesArmado.AcceptChanges()
+
+
+ GvDatosDesarmado.DataSource = DtDatosDesArmado
+ GvDatosDesarmado.DataBind()
+
+
+ index2 = 0
+ For Each Row As DataRow In DtDatosDesArmado.Rows
+
+ If Row("Lote").ToString() <> "" Then
+ GvDatosDesarmado.Rows(index2).FCTextBox("TxtLote").Text = Row("Lote").ToString()
+ End If
+ If Row("CveSeccion").ToString() <> "" Then
+ GvDatosDesarmado.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString()
+ End If
+ If Row("FechaCaducidad").ToString() <> "" Then
+ GvDatosDesarmado.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("FechaCaducidad").ToString().ToDate.ToShortDateString
+ End If
+ index2 += 1
+ Next
+
+ UpDatosDesarmado.Update()
+
+ End Sub
#End Region
#Region " SERIE LOTE "
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 382b175f2..544982725 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -3329,8 +3329,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim CveConceptoContableCosto As Integer = -1
Dim CveConceptoContableCostoME As Integer = -1
Dim CveConceptoContableCostoComplementaria As Integer = -1
- Dim UsaComplementariaFleteImportaciones As Boolean = False
- If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaFleteImportaciones = False
+ Dim UsaComplementariaFleteImportaciones As Boolean = True
If DtCostos.Rows.Count > 0 Then
If CveCompraSurtir > 0 Then
@@ -3358,7 +3357,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveConceptoContableCostoME = 228
CveConceptoContableCostoComplementaria = 229
- If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaFleteImportaciones = True
+ UsaComplementariaFleteImportaciones = True
Else
ErrorMovInv = True
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index ae637ae02..5e5c1f007 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -625,7 +625,7 @@ Partial Class Inventarios_ResguardoMaterial
Protected Sub GvMLiberacion_RowCreated(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
- Dim Index = e.Row.RowIndex
+ Dim Index As Integer = e.Row.RowIndex
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index))
End If
End Sub
@@ -792,7 +792,7 @@ Partial Class Inventarios_ResguardoMaterial
'VALIDA LA EXISTENCIA DEL ALMACEN
Dim ObjInventario As New ClsInventarios
- Dim ErrorExistencia = False
+ Dim ErrorExistencia As Boolean = False
Dim TextoExistencia As StringBuilder = New StringBuilder
Dim Existencia As Double
TextoExistencia.Append("Los siguiente productos se ajustaron por falta de exitencia: ")
@@ -1079,7 +1079,7 @@ Partial Class Inventarios_ResguardoMaterial
Private Function AgregarAgenda(ByRef ObjEventos As ClsOIEventos, FolioEntrada As Integer, FolioSalida As Integer) As Boolean
Dim TieneError As Boolean = False
- Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1", CveAgendaTipo = 4, Prioridad = 3, CveTipoEvento = 2, Importe = -1
+ Dim RecurrenciaTipo As Integer = 0, Frecuencia As Integer = -1, DiasSemana As String = "-1", Dias As Integer = -1, Mes As Integer = -1, RecurrenciaFin As String = "-1", CveAgendaTipo As Integer = 4, Prioridad As Integer = 3, CveTipoEvento As Integer = 2, Importe As Integer = -1
Dim Asunto As String = $"Vencimiento de Resguardo de Material. FolioEntrada:{FolioEntrada}, FolioSalida:{FolioSalida}"
Dim Descripcion As String = TxtObservaciones.Text.Trim()
diff --git a/Transportes/CatRutas.aspx b/Transportes/CatRutas.aspx
index fadda2efd..3a6c48f3f 100644
--- a/Transportes/CatRutas.aspx
+++ b/Transportes/CatRutas.aspx
@@ -48,19 +48,13 @@
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveRuta, Ruta, Estatus, CveUsuario, FechaIng, CveEmpresa">
-
-
-
-
-
-
-
+
-
+
@@ -105,26 +99,20 @@
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveDestino, Destino, EsNacional, Estatus, CveUsuario, FechaIng, CveEmpresa">
-
-
-
-
-
-
-
+
-
+
-
+
@@ -169,33 +157,27 @@
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
data-sort="true" DataKeyNames="CveDestinoTarifa, CveRuta, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Salida">
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx
index a5c307b84..339d007a1 100644
--- a/Transportes/RepContratos.aspx
+++ b/Transportes/RepContratos.aspx
@@ -37,19 +37,18 @@
display: flex;
justify-content: space-around;
align-items: center;
- margin-bottom:1rem;
+ margin-bottom: 1rem;
}
.consulta_campo {
display: flex;
gap: 1rem;
align-items: center;
- width:100%;
+ width: 100%;
}
.consulta_campo label {
color: white;
- font-weight: bold;
}
@@ -74,10 +73,29 @@
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb
index 0f72b315c..c01c47982 100644
--- a/Transportes/RepContratosCalendario.aspx.vb
+++ b/Transportes/RepContratosCalendario.aspx.vb
@@ -11,6 +11,9 @@ Partial Class RepContratosCalendario
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd").Replace(" ", "T")
+ txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd").Replace(" ", "T")
+
If Not IsPostBack Then
CargaCombos()
InicializaCalendar()
@@ -21,13 +24,26 @@ Partial Class RepContratosCalendario
End Sub
Private Sub CargaDatos()
+
+
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
GvContratos.DataSource = ObjContratos.DtResultados
+ GvContratos.DataBind()
End If
- ObjContratos.Dispose()
- GvContratos.DataBind()
+ If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
+ DdlEstatusConsulta.DataSource = ObjContratos.DtResultados
+ DdlEstatusConsulta.DataBind()
+ DdlEstatusConsulta.Items.Insert(0, New ListItem("-", ""))
+
+ DdlEstatusContrato.DataSource = ObjContratos.DtResultados
+ DdlEstatusContrato.DataBind()
+ DdlEstatusContrato.Items.Insert(0, New ListItem("-", ""))
+
+ End If
+
+ ObjContratos.Dispose()
End Sub
Private Sub InicializaCalendar()
@@ -36,15 +52,15 @@ Partial Class RepContratosCalendario
End Sub
Private Sub CargaCombos()
+ 'Lista de Tipos de activo fijos
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
- DdlTipoAF.DataBind()
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
DdlTipoAF.DataBind()
+ 'Lista de Activos fijos
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", ""))
- DdlTipoAF.DataBind()
'Lista Chofer'
DdlChofer.DataSource = GlobalDTRHPersonal(185)
@@ -55,16 +71,8 @@ Partial Class RepContratosCalendario
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- Dim estatusContrato As String = DataBinder.Eval(e.Row.DataItem, "EstatusContrato").ToString()
-
- Select Case estatusContrato
- Case "1"
- e.Row.BackColor = Drawing.Color.FromArgb(0, 165, 106)
- Case "2"
- e.Row.BackColor = Drawing.Color.FromArgb(43, 79, 214)
- Case "3"
- e.Row.BackColor = Drawing.Color.FromArgb(238, 96, 46)
- End Select
+ Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
+ e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor)
End If
End Sub
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
@@ -102,11 +110,6 @@ Partial Class RepContratosCalendario
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
- 'If DdlClientes.SelectedValue = "" Then
- ' Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
- ' Exit Sub
- 'End If
-
Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL()