diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 060485b51..b3d91f4c4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4790,9 +4790,13 @@ Public Class ClsPaginas PaginaDict.Add("/OI/RepDesarrollo.aspx".ToUpper(), 475) PaginaDict.Add("/OI/DesarrolloWizard.aspx".ToUpper(), 474) PaginaDict.Add("/OI/SubidasADS.aspx".ToUpper(), 476) - PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), 760) - PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), 761) - PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), 762) + + 'PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), 760) + 'PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), 761) + 'PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), 762) + PaginaDict.Add("/OI/CatDocumentoCategoria.aspx".ToUpper(), -1) + PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), -1) + PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), -1) PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1) #End Region #Region "Planeacion" diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ac7337fa9..d090cd757 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1355,7 +1355,7 @@ Partial Class Compras_Compras GvInv.Visible = True CargaProveedor(-1, RFC) - If Not DdlTipoComprobante.SelectedValue = "NC" Then + If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then If TmpDT.MAX("CvePS").ToEntero > 0 Then BtnGuardar.Enabled = False @@ -4060,13 +4060,15 @@ Partial Class Compras_Compras ' DtNoEncontrados.Dispose() 'End If - 'Verifica funcionalidad 702 "Require orden de compra para factura de compra" + 'Verifica funcionalidad 128 "Require orden de compra para factura de compra" - If UsuarioActual.Empresa.Funcionalidad(128) <> "" Then - If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then - If Not CompraEstaVinculadaOC Then - Alert("Debe de vincular una orden de compra para registrar la factura") - Exit Sub + If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then + If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then + If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then + If Not CompraEstaVinculadaOC Then + Alert("Debe de vincular una orden de compra para registrar la factura") + Exit Sub + End If End If End If End If diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 448fded84..9c1333df2 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -382,6 +382,63 @@ Partial Class Compras_ReembolsosComprobaciones #Region " BTN GUARDAR " Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click + + + + + Dim ValFechaDocumento As Boolean = False + Dim FoliosFechasValFechaDocumento As New StringBuilder + + FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
") + + For Each gvRowVal As GridViewRow In GvCxP.Rows + + If gvRowVal.FCCheckBox("Chk").Checked Then + + + Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate + + + Dim FechaDocumento As Date + + + If DDlCheques.SelectedValue.ToEntero = -1 Then + FechaDocumento = TxtFechaDocumento.Text.ToDate + Else + FechaDocumento = TxtFechaPrePoliza.Text.ToDate + End If + + + + Dim AnioFactura As Integer = FechaFactura.Year + Dim MesFactura As Integer = FechaFactura.Month + + + Dim AnioDocumento As Integer = FechaDocumento.Year + Dim MesDocumento As Integer = FechaDocumento.Month + + + If AnioFactura > AnioDocumento Then + + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If + + End If + + Next + + + If ValFechaDocumento Then + Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia) Exit Sub diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 75bbb20de..0585cb4a3 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1053,7 +1053,7 @@ Partial Class Inventarios_RecepcionAlmacen DivTraspasoDevolucion.Visible = True LtlTextoDevolucion.Text = "La mercancía sera trasladada desde el almacen seleccionado al almacén de devolución" ElseIf TipoMovimiento = 2 AndAlso GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=21).Rows.Count = 0 Then - LtlTextoDevolucion.Text = "La mercancía sera devuelta ha el almacen seleccionado." + LtlTextoDevolucion.Text = "La mercancía sera devuelta a el almacen seleccionado." DivTraspasoDevolucion.Visible = True End If @@ -1125,7 +1125,7 @@ Partial Class Inventarios_RecepcionAlmacen BtnGuardar.Enabled = False LtAdvertencia.Text = "No se puede recibir la mercancía por ser de apartados y no contar con un almacen de apartado." Else - LtAdvertencia.Text = "La mercancía sera traspasada ha apartados" + LtAdvertencia.Text = "La mercancía sera traspasada a apartados" If CargaSoloUsados Then CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra) Else diff --git a/OI/CatDocumentoCategoria.aspx.cs b/OI/CatDocumentoCategoria.aspx.cs index 8efdf08c4..d497acc8e 100644 --- a/OI/CatDocumentoCategoria.aspx.cs +++ b/OI/CatDocumentoCategoria.aspx.cs @@ -45,6 +45,7 @@ public partial class OI_CatDocumentoCategoria : ClsPaginas protected void BtnAgregarCategoria_Click(object sender, EventArgs e) { BtnAgregarCategoriaDoc.Text = "Agregar"; + LtlTituloModalTiposD.Text = "Agregar Categoría de Documentos"; TxtCategoria.Text = ""; ChkEstatus.Checked = true; UpModalTiposD.Update(); @@ -54,6 +55,7 @@ public partial class OI_CatDocumentoCategoria : ClsPaginas protected void LnkEditar_Click(object sender, EventArgs e) { BtnAgregarCategoriaDoc.Text = "Actualizar"; + LtlTituloModalTiposD.Text = "Actualizar Categoría de Documentos"; GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveCategoria = GvRow.DataKey("CveCategoria").ToEntero(); TxtCategoria.Text = GvRow.DataKey("Categoria"); diff --git a/OI/CatDocumentoSubCategoria.aspx b/OI/CatDocumentoSubCategoria.aspx index dd5bc8ce5..a96e33491 100644 --- a/OI/CatDocumentoSubCategoria.aspx +++ b/OI/CatDocumentoSubCategoria.aspx @@ -50,7 +50,7 @@
- +
@@ -58,6 +58,8 @@

+ +

diff --git a/OI/CatDocumentoSubCategoria.aspx.cs b/OI/CatDocumentoSubCategoria.aspx.cs index 709f6e89a..2e1da1f68 100644 --- a/OI/CatDocumentoSubCategoria.aspx.cs +++ b/OI/CatDocumentoSubCategoria.aspx.cs @@ -49,6 +49,7 @@ public partial class OI_CatDocumentoSubCategoria : ClsPaginas { DdlCategorias.DataSource = ObjOI.DtResultados.FiltraParametros("Estado = 1"); DdlCategorias.DataBind(); + DdlCategorias.Items.Insert(0, new ListItem("Seleccione una","-1")); } ObjOI.Dispose(); } @@ -56,6 +57,7 @@ public partial class OI_CatDocumentoSubCategoria : ClsPaginas protected void BtnAgregarSubCategoria_Click(object sender, EventArgs e) { BtnAgregarSubCategoriaDoc.Text = "Agregar"; + LtlTituloModalTiposD.Text = "Agregar Subcategoría de Documentos"; TxtSubCategoria.Text = ""; UpModalTiposD.Update(); RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); @@ -64,9 +66,14 @@ public partial class OI_CatDocumentoSubCategoria : ClsPaginas protected void LnkEditar_Click(object sender, EventArgs e) { BtnAgregarSubCategoriaDoc.Text = "Actualizar"; + LtlTituloModalTiposD.Text = "Actualizar Subcategoría de Documentos"; + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveSubCategoria = GvRow.DataKey("CveSubCategoria").ToEntero(); TxtSubCategoria.Text = GvRow.DataKey("SubCategoria"); + + DdlCategorias.SelectedValueExist(GvRow.DataKey("CveCategoria")); + UpModalTiposD.Update(); RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")); }