diff --git a/AC/CatOGClasificaciones.aspx.vb b/AC/CatOGClasificaciones.aspx.vb index 97caaed70..c5739c56d 100644 --- a/AC/CatOGClasificaciones.aspx.vb +++ b/AC/CatOGClasificaciones.aspx.vb @@ -50,6 +50,7 @@ Partial Class AC_CatOGClasificaciones If ObjClasificaciones.GetClasificaciones() Then ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' AND CveEmpresa = " & UsuarioActual.CveEmpresa, "Codigo") GlobalDTClasificaciones = ObjClasificaciones.DtResultados + GlobalDTACClasificadorObjetoGasto = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ") Else Me.GvDatos.DataSource = Nothing End If @@ -65,6 +66,7 @@ Partial Class AC_CatOGClasificaciones Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click Dim ObjClasificaciones As New ClsClasificaciones + If LbAgregar.Text = "Agregar" Then If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TxtOGClasificacion.Text = "" @@ -90,6 +92,10 @@ Partial Class AC_CatOGClasificaciones End If RegistraScript(String.Format("$('#{0}').modal('hide');", "DivModal")) ObjClasificaciones.Dispose() + + + CargaDatos() + End Sub #Region "G V D A T O S" @@ -278,4 +284,7 @@ Partial Class AC_CatOGClasificaciones #End Region + + + End Class diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 5bda9b76c..9a8729a1a 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -27,4 +27,6 @@ Public Class CalendarEvent Public Property Prospecto As String Public Property CveTipoEvento As Integer Public Property Importe As Double + Public Property EmpresaCRM As String + End Class diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 23f649d54..bde65432e 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -4543,7 +4543,7 @@ Public Class ClsContabilidad Public Function UpdateCuenta(CveCuenta As Integer, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1, Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveConceptoAdmin As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, - Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1) As Boolean + Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1, Optional Afectable As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_UpdateCuentas") @@ -4564,6 +4564,7 @@ Public Class ClsContabilidad .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto .Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen + .Add("@Afectable", SqlDbType.Int).Value = Afectable End With Try @@ -6398,5 +6399,26 @@ Public Class ClsContabilidad #End Region + Public Function UpdateTraspasoPrepoliza(CveEmpresa As Integer, CveCuenta As Integer, CveCuentaNueva As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Conta_Traspaso_Prepolizas") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@CveCuentaNueva", SqlDbType.Int).Value = CveCuentaNueva + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener traspasar las Prepolizas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + End Class \ No newline at end of file diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 45b8f3792..8cc4b1e42 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -3571,6 +3571,26 @@ Public Class ClsInventarios Return Retorno End Function + + Public Function ReconstruirCostos(CvePS As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_ReconstruirCostos") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener al reconstruir los costos del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function #End Region #Region " INVENTARIOS - OC " diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index caef462e6..32d650303 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -979,7 +979,7 @@ Public Class ClsNominas Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, - AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Boolean + AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_ConceptosUpdate") @@ -1004,6 +1004,7 @@ Public Class ClsNominas .Add("Especie", SqlDbType.Bit).Value = Especie .Add("Imprimir", SqlDbType.Bit).Value = Imprimir .Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto + .Add("CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ef3c9b60c..b3d91f4c4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4680,6 +4680,8 @@ Public Class ClsPaginas PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688) PaginaDict.Add("/Inventarios/EntregasPorRealizar.aspx".ToUpper(), 728) PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764) + PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764) + #End Region #Region "MF" @@ -4788,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/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 0a9d5aca9..bc165de82 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -208,7 +208,7 @@ Public Class ClsProductosServicios Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, - Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean + Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProductosServiciosGet") @@ -229,6 +229,7 @@ Public Class ClsProductosServicios .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With @@ -252,7 +253,7 @@ Public Class ClsProductosServicios Oferta = Data.Rows(0)("Oferta").ToString.ToDouble IVA = Data.Rows(0)("IVA").ToString.ToDouble RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble - CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero + Me.CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString) AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True" Estado = Data.Rows(0)("Estado").ToString = "Activo" diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 720b39b81..7edc077a0 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -50,6 +50,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean Dim ObjEventos As New ClsOIEventos Dim ErrorEventos = False + Dim CveEmpresaCRM As Integer = 0 If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then If ObjEventos.DtResultados.Rows.Count > 0 Then @@ -76,6 +77,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero cevent.Prospecto = dr("Prospecto").ToString cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero + cevent.EmpresaCRM = dr("EmpresaCRM").ToString '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 437d9c1de..708bd7064 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -983,7 +983,7 @@ Partial Class Bancos_Creditos For Each gvr As GridViewRow In GvTA.Rows If Not ObjCredito.UpdateCreditosDetalle(gvr.DataKey("CveCreditoDetalle").ToString.ToEntero, gvr.FCTextBox("TxtFecha").Text.ToString.ToDate, gvr.FCTextBox("TxtCapital").Text.ToString.ToDouble, gvr.FCTextBox("TxtIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtSeguro").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVACapital").Text.ToString.ToDouble, - gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, 1) Then + gvr.FCTextBox("TxtIVAIntereses").Text.ToString.ToDouble, gvr.FCTextBox("TxtIVASeguro").Text.ToString.ToDouble, -1) Then ErrorCredito = True Exit For End If diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 7742f9710..668920538 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -85,14 +85,7 @@ @@ -104,15 +97,16 @@
-
- -
- -
- - -
-
+
+ + +
+
+
+ +
+
+
@@ -124,23 +118,47 @@
+
+ + +
+ + +
+ Seleccionado: $ + 00.00 + +
+
-
-
-
- Importe seleccionado: $00.00 +
+ + +
+ + + + + +

-
- +
+ - + @@ -200,5 +218,63 @@ + + + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 3ed466c16..6d2911286 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -21,6 +21,8 @@ Partial Class Bancos_DepositosCaja TxtFecha.Text = Now.ToShortDateString txtFechaI.Text = Now.AddDays(-1).ToShortDateString txtFechaF.Text = Now.ToShortDateString + TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);") + CargaCuentas() End If End Sub @@ -35,6 +37,10 @@ Partial Class Bancos_DepositosCaja DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectos.DataBind() DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion.DataBind() + DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) End Sub Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click @@ -56,11 +62,14 @@ Partial Class Bancos_DepositosCaja GvFacturas.DataBind() lblValorTotal.Text = "00.00" divLabelTotal.Visible = True + DivComision.Visible = True End Sub Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click Dim TotalImporte As Decimal = 0 + Dim TotalImportePrePoliza As Decimal + For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal Next @@ -70,6 +79,14 @@ Partial Class Bancos_DepositosCaja Exit Sub End If + TotalImportePrePoliza = TotalImporte + If TxtComision.Text.ToEntero > 0 Then + TotalImporte = TotalImporte - TxtComision.Text.ToEntero + If DdlSubProyectos.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then + Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If Dim OcurrioError As Boolean = False Dim ObjContabilidad As New ClsContabilidad() @@ -88,7 +105,10 @@ Partial Class Bancos_DepositosCaja Dim CveCuentaBancariaDestino As Integer = 0 Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") - + Dim CveSubProyecto As Integer = 0 + Dim CveClasificacion As Integer = 0 + Dim documentos As String = "Los Depósitos se realizaron exitósamente

" + Dim imprimirFolios As String = "" If drOrigen IsNot Nothing Then CveMoneda = drOrigen("CveMoneda").ToString.ToEntero IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero @@ -101,7 +121,9 @@ Partial Class Bancos_DepositosCaja CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero End If - NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImporte, TotalImporte, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + 'Salida de Caja Chica FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) @@ -110,42 +132,59 @@ Partial Class Bancos_DepositosCaja End If CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - 'Entrada a Bancos - FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) - If Not FolioIE > 0 Then - OcurrioError = True + If TxtComision.Text.ToEntero > 0 Then + CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero + CveClasificacion = DdlClasificacion.SelectedValue.ToEntero + If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + OcurrioError = True + End If + Else OcurrioError = True + End If + Else + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + OcurrioError = True + End If End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then 'Datos de las Nuevas PrePolizas + 'Entrada a Bancos Dim Importe As Double = Gvr.DataKey("Importe").ToDouble + Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString 'Datos de las Prepolizas A Cancelar Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero + FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) + If Not FolioIE > 0 Then + OcurrioError = True + End If + CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then + OcurrioError = True + End If + 'Asignamos la cuenta Deposito If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then OcurrioError = True End If - + Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") + documentos += String.Format("Documento {1}     ", CveIEDestino.ToString, SerieFolio) + documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) End If + Next - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then - OcurrioError = True - End If - Else OcurrioError = True - End If + If OcurrioError Then ObjContabilidad.RollBack() @@ -153,12 +192,8 @@ Partial Class Bancos_DepositosCaja Else ObjContabilidad.Commit() CargaDatos() - Dim SbMensaje As New StringBuilder() - Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - SbMensaje.Append("Los Depósitos se realizaron exitósamente

") - SbMensaje.AppendFormat("Documento     ", CveIEDestino) - SbMensaje.AppendFormat("Imprimir ", StrEncript) - Alert(SbMensaje.ToString) + + Alert(documentos.ToString) End If @@ -178,7 +213,14 @@ Partial Class Bancos_DepositosCaja End Sub Public Sub ChkFactura_Click(sender As Object, e As EventArgs) - ObtenerTotalImporta() + 'ObtenerTotalImporta() End Sub + Protected Sub GvFacturas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvFacturas.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + e.Row.FCCheckBox("ChkFactura").Attributes.Add("onclick", String.Format("FnSuma(this,{0});", e.Row.DBCampo("Importe"))) + End If + End Sub + + End Class \ No newline at end of file diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index d8f598c3d..b60f17172 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -170,6 +170,8 @@ + +
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index bed72e577..d2f2a0233 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -6674,4 +6674,8 @@ Partial Class Bancos_IE UpEliminarCotizacion.Update() End Sub + Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init + RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + Calendario.EndDate = DateTime.Now + End Sub End Class \ No newline at end of file diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index a8073a7e8..faa517849 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -528,6 +528,8 @@ + +
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 79a889d74..925566892 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1660,8 +1660,9 @@ Partial Class Bancos_PopIECompras If CveMonedaCompra <> 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then IdCtaContable = IdCtaContComplementaria CveCuenta = CveCuentaComplementaria - If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then + If ImporteMovimiento <> 0 Then + Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioCompra - ImporteMovimiento).RoundSQL + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, CveConceptoContableComplementaria, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMN, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuenta) Then MsgError = "No se pudo insertar la póliza" End If End If @@ -3644,4 +3645,11 @@ Partial Class Bancos_PopIECompras UpGuardar.Update() End Sub + Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init + RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + Calendario.EndDate = DateTime.Now + + End Sub + + End Class \ No newline at end of file diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 81291fcc3..998dd4477 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -450,6 +450,8 @@ + +
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index f9d599287..9b6ae3795 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -687,7 +687,7 @@ Partial Class Bancos_PopIEVentas 'JJMQ:20190606 Se cancela código de validacion ante el SAT por lentitud en el servicio. 'Sustituir la línea anterior por todo lo siguiente hasta donde termina el end if para que valide de nueva cuenta 'Dim Validada As Boolean = False - If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then + If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" AndAlso dr("FolioFiscal").ToString() <> "" Then Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("ClienteRFC").ToString, dr("Total").ToString.ToDecimal) @@ -3660,9 +3660,14 @@ Partial Class Bancos_PopIEVentas ObjBancos.Dispose() ' Next Return Retorno.ToString - End Function - + End Function + #End Region - - + Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init + RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + Calendario.EndDate = DateTime.Now + + End Sub + + End Class \ No newline at end of file diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index a6c1f586b..768463a0b 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -120,6 +120,9 @@ + + +
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 3195700e1..6f9274c1e 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -3388,6 +3388,12 @@ Partial Class Bancos_ProveedoresAbonar #End Region + Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init + RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + Calendario.EndDate = DateTime.Now + + End Sub + End Class diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx b/CRM/RepAcercamientosProcesosDetalle.aspx index 61d484036..5559826fa 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx +++ b/CRM/RepAcercamientosProcesosDetalle.aspx @@ -3,6 +3,7 @@ + + .chkChoice input + { + margin-right: 5px; + } + + cc Reporte Detalle de los Acercamientos Procesos @@ -55,7 +61,15 @@ -
  • +
  • + Personalizar Columnas +
  • +<%--
  • + PDF +
  • +
  • + Excel +
  • --%>
    @@ -248,7 +262,7 @@
    - + @@ -296,10 +310,53 @@ + + + + + + + + + + + +
    + + + + diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx.cs b/CRM/RepAcercamientosProcesosDetalle.aspx.cs index b33304729..16d7a879a 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx.cs +++ b/CRM/RepAcercamientosProcesosDetalle.aspx.cs @@ -196,6 +196,12 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados; ObjRepA.Dispose(); GVRepAcercamientosDetalle.DataBind(); + this.GVRepAcercamientosDetalle.Columns[9].Visible = false; + this.GVRepAcercamientosDetalle.Columns[10].Visible = false; + this.GVRepAcercamientosDetalle.Columns[11].Visible = false; + this.GVRepAcercamientosDetalle.Columns[12].Visible = false; + this.GVRepAcercamientosDetalle.Columns[13].Visible = false; + this.GVRepAcercamientosDetalle.Columns[14].Visible = false; upDatosRepA.Update(); } @@ -225,4 +231,45 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero(); cargarDatos(); } + + protected void GVRepAcercamientosDetalle_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 1) + { + e.Row.FCLabel("lblPrioridad").Text = "Baja"; + } + else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 2) + { + e.Row.FCLabel("lblPrioridad").Text = "Media"; + } + else if (e.Row.FCLabel("lblPrioridad").Text.ToEntero() == 3) + { + e.Row.FCLabel("lblPrioridad").Text = "Alta"; + } + } + } + protected void LnkEditargv_Click(object sender, EventArgs e) + { + + RegistraScript("$('#ModalEditar').modal('show')"); + } + + protected void GuardarEditargv_Click(object sender, EventArgs e) + { + foreach (ListItem item in CBLEditargv.Items) + { + if (item.Value.ToEntero() == 1) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[9].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[9].Visible = false; } } + if (item.Value.ToEntero() == 2) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[10].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[10].Visible = false; } } + if (item.Value.ToEntero() == 3) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[11].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[11].Visible = false; } } + if (item.Value.ToEntero() == 4) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[12].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[12].Visible = false; } } + if (item.Value.ToEntero() == 5) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[13].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[13].Visible = false; } } + if (item.Value.ToEntero() == 6) { if (item.Selected) { this.GVRepAcercamientosDetalle.Columns[14].Visible = true; } else { this.GVRepAcercamientosDetalle.Columns[14].Visible = false; } } + } + upDatosRepA.Update(); + RegistraScript("$('#ModalEditar').modal('hide')"); + + } + } \ No newline at end of file diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e0306b3b0..ef1b08555 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 @@ -1449,6 +1449,8 @@ Partial Class Compras_Compras DivEsNoDeducible.Visible = True DivActualizarVincular.Visible = True + + Else ViewState("CveProveedor") = -1 @@ -1824,7 +1826,7 @@ Partial Class Compras_Compras DdlTipoCompra.Items.Clear() DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1")) DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6")) - DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9")) + DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9")) DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11")) @@ -2708,9 +2710,9 @@ Partial Class Compras_Compras TmpDT.Columns.Add("CveContrato", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer)) - - - + + + If Not TmpDT.Columns.Contains("CveContratoDetalle") Then TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) End If @@ -4060,13 +4062,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 @@ -5107,7 +5111,7 @@ Partial Class Compras_Compras Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal, - RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, + RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False), CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero) Then @@ -6769,13 +6773,12 @@ Partial Class Compras_Compras Dim CveSubProyecto69 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero If CveSubProyecto69 <= 0 Then - Alert("Debe de asignar un sub proyecto o centro de constos", TipoMensaje.MsgAdvertencia) + Alert("Debe de asignar un sub proyecto o centro de costos", TipoMensaje.MsgAdvertencia) ErrorPrepoliza = True Exit For End If IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then ErrorPrepoliza = True Exit For @@ -7298,6 +7301,10 @@ Partial Class Compras_Compras importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMN = importeMovimiento If importeMovimiento <> 0 Then + + + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then ErrorPrepoliza = True Exit For @@ -7481,7 +7488,9 @@ Partial Class Compras_Compras importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMN = importeMovimiento If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + + Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -7575,7 +7584,9 @@ Partial Class Compras_Compras importeMovimiento = importeMovimiento.Abs.RoundSQL() importeMN = importeMovimiento If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True Exit For End If @@ -7671,7 +7682,8 @@ Partial Class Compras_Compras importeFluctuacion = importeFluctuacion.Abs.RoundSQL() If importeFluctuacion <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeFluctuacion, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -9033,9 +9045,14 @@ Partial Class Compras_Compras CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria End If + + + + importeFluctuacion = importeFluctuacion.Abs.RoundSQL() If importeFluctuacion <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then + Dim CveSubProyecto6465 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeFluctuacion, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto6465, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeFluctuacion, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=0, CveCuenta:=CveCuenta) Then ErrorMovtosCxP = 1 End If End If @@ -9457,8 +9474,13 @@ Partial Class Compras_Compras importeMN = ImporteMovimiento End If + + + If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then + + Dim CveSubProyecto64 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto64, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then ErrorMovtosCxP = 1 Exit For End If @@ -9481,7 +9503,8 @@ Partial Class Compras_Compras End If If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then + Dim CveSubProyecto65 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyecto65, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=0, CveCuenta:=CveCuenta) Then ErrorMovtosCxP = 1 Exit For End If @@ -17839,7 +17862,7 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto")) - Else + Else DdlProyecto.SelectedValueExist("-1") End If @@ -18043,14 +18066,12 @@ Partial Class Compras_Compras UpIVA.Update() - If DdlClasificacion.SelectedIndex = 0 Then - If PS("CveClasificacion").ToString IsNot Nothing Then - DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString) - Else - Alert("El Productos/Servicio no tiene asignada una Clasificación.") - End If - + If PS("CveClasificacion").ToString IsNot Nothing Then + DdlClasificacion.SelectedValueExist(PS("CveClasificacion").ToString) + Else + Alert("El Productos/Servicio no tiene asignada una Clasificación.") End If + UPPUM.Update() UpPSS.Update() End If @@ -19148,6 +19169,7 @@ Partial Class Compras_Compras CargaAnticipos(CveProveedor, If(ChkNCInv.Checked, "NC", "-1")) UpAnticipos.Update() End Sub + Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False) Dim SaldoAnticipo = 0.0 @@ -20198,7 +20220,7 @@ Partial Class Compras_Compras Dim drInv As DataRow = DtInvOC.FiltroPrimero("") If drInv IsNot Nothing Then 'sino existe no hay problema, porque puede ser le producto un servicio DrInvOCDiferencias("TipoCambioAjuste") = drInv("TipoCambioAjuste").ToString.ToDecimal - DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PU").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal ' + DrInvOCDiferencias("Diferencia") = ((gvr.FCTextBox("TxtPU").Text.ToDecimal * drInv("TipoCambioAjuste").ToString.ToDecimal) - drInv("PUOriginal").ToString.ToDecimal) * gvr.FCTextBox("TxtCantidad").Text.ToDecimal 'diferencia * drInv("TipoCambioAjuste").ToString.ToDecimal ' DrInvOCDiferencias("CveAlmacen") = drInv("CveAlmacen").ToString.ToEntero DrInvOCDiferencias("CveMovimiento") = drInv("CveMovimiento").ToString.ToEntero DrInvOCDiferencias("ConceptoSalida") = drInv("ConceptoSalida").ToString.ToEntero @@ -20306,20 +20328,13 @@ Partial Class Compras_Compras TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero - CveCuentaAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero - '' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero - Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero - - - If DiferenciaInvOC.RoundAD() <> 0 Then - - + If DiferenciaInvOC.RoundSQL() <> 0 Then If CveSubProyecto <= 0 Then Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 285fe20dd..b805f6633 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -204,6 +204,8 @@ + + diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 87dd131f3..dc1c9f30e 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -382,6 +382,67 @@ 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 + + 'rmf. codigo temporal + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + ValFechaDocumento = False + End If + + 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 @@ -2005,5 +2066,9 @@ Partial Class Compras_ReembolsosComprobaciones #End Region + Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init + RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + Calendario.EndDate = DateTime.Now + End Sub End Class diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index cde36d83a..9b2594e88 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -216,10 +216,20 @@ - + <%-- + + + + +
    --%> + <%----%> + + +
    + diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index b59eeb44c..0c39802b5 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -719,9 +719,15 @@ Partial Class Compras_eFacturas If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True - If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True - If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False - If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True + 'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True + 'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False + 'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True + + If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(12).Visible = True : GvD.Columns(13).Visible = True + If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(11).Visible = False + If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(6).Visible = True + + CargaGvBitacora() CargaDatos() End If @@ -913,6 +919,11 @@ Partial Class Compras_eFacturas #Region "G V D A T O S" Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound + + If e.Row.RowType = DataControlRowType.Header Then + e.Row.Cells(4).Attributes.Add("data-tipodato", "numeric") + End If + If e.Row.RowType = DataControlRowType.DataRow Then e.Row.FindControl("lnkRegenerarPDF").Visible = True ' (UsuarioActual.CveRol = 1) 'e.Row.FindControl("lnkDownPdf").Visible = (UsuarioActual.CveRol = 1) @@ -937,6 +948,13 @@ Partial Class Compras_eFacturas e.Row.Cells(2).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString) + + 'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c)) + + + + + If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then e.Row.FCLiteral("LtlXML").Text = String.Format("Ver", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML"))) If e.Row.DBCampo("TipoComprobante") = "P" Then diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad2/CatCuentas.aspx index 24cf2ec21..d4db0e496 100644 --- a/Contabilidad2/CatCuentas.aspx +++ b/Contabilidad2/CatCuentas.aspx @@ -185,13 +185,6 @@ - -
    -
    -
    - (0% - 100% ) -
    -
    @@ -222,11 +215,18 @@
    + +
    +
    +
    + (0% - 100% ) +
    +

    - + @@ -270,5 +270,21 @@ buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol') }); }); + + function Afectable(btn) { + debugger; + $('#C_nuevacuenta').attr('data-toggle', 'confirmation'); + $('#C_nuevacuenta').attr('data-popout', 'true'); + $('#C_nuevacuenta').attr('data-original-title', 'Verifique los datos para continuar.

    ¿Seguro de registrar esta cuenta nueva?
    '); + $('#C_nuevacuenta').attr('data-btn-ok-label', 'si'); + } + + function NoAfectable() { + debugger; + $('#C_nuevacuenta').attr('data-toggle', ''); + $('#C_nuevacuenta').attr('data-popout', ''); + $('#C_nuevacuenta').attr('data-original-title', ''); + $('#C_nuevacuenta').attr('data-btn-ok-label', ''); + } diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 720b93107..f114656ed 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -31,6 +31,24 @@ Partial Class Contabilidad2_CatCuentas ViewState("idsel") = value End Set End Property + + Private Property CvePadre As Integer + Get + Return ViewState("CvePadre").ToString.ToEntero() + End Get + Set(value As Integer) + ViewState("CvePadre") = value + End Set + End Property + + Private Property Afectable As Boolean + Get + Return ViewState("Afectable").ToString + End Get + Set(value As Boolean) + ViewState("Afectable") = value + End Set + End Property #Region "Contabilidadnew" Private Property CveProveedor As Integer Get @@ -168,6 +186,7 @@ Partial Class Contabilidad2_CatCuentas Protected Sub agregar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.addclick LimpiarCampos() Dim dt As New DataTable + 'IDSelected = HdnID.Value.ToEntero() "ul" + itempadre.Cve; Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem) IDSelected = obj.Cve @@ -182,6 +201,16 @@ Partial Class Contabilidad2_CatCuentas DTcuenta.SelectedValue = dr("Tipo").ToString() DcuentaMayor.SelectedValue = dr("CtaMayor").ToString LblSubCuenta.Text = dr("Nombre").ToString + Afectable = dr("Afectable").ToString + CvePadre = dr("CvePadre").ToString.ToEntero + End If + + If Afectable Then + RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID)) + Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia) + Else + RegistraScript("NoAfectable();") + End If TxtCuenta.Enabled = True @@ -298,7 +327,6 @@ Partial Class Contabilidad2_CatCuentas Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero() If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then - If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, @@ -372,19 +400,81 @@ Partial Class Contabilidad2_CatCuentas 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad -<<<<<<< HEAD - Dim ObjConta2 As ClsContPAQi -======= ->>>>>>> ee1135d888f76469fa6e3e68f0b6393f8450045a - Dim CuentaEfectivo As Integer = 0 Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable Tcuenta.Text.Replace("-", "") Dim idnew As Integer = 0 + Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero() + Dim row As DataRow = Nothing + Dim CveTipoSaldo As Integer = 0 + Dim PorcentajeIVA As Decimal = -1 + Dim drt As DataRow + Dim CveConceptoAdmin As Integer + Dim CveProveedor As Integer + Dim CveCliente As Integer + Dim CveClasificacion As Integer + Dim PorcentajeImpuesto As Decimal + Dim CveBancoCuenta As Integer + 'Dim CveAlmacen As Integer = -1 + 'Dim CvePersonal As Integer = -1 + Dim NombreCuenta As String + Dim TipoCuenta As String + Dim CuentaMayor As Integer + Dim CveMoneda As Integer + Dim DigAgrup As Integer + Dim CveAgrupadorSat As Integer + Dim NomIdioma As String If DdlAgrupadorSAT.SelectedValue.ToEntero > 0 Then - idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, - DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString) + + If CveConceptoContable > 0 Then + row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable)) + CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero() + End If + If Not IsNothing(row) Then + If CveTipoSaldo = 3 Then + PorcentajeIVA = TxtPorcentaje.ToEntero / 100 + End If + End If + + If Afectable Then + If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then + drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected)) + CveConceptoAdmin = IIf(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero) + CveProveedor = IIf(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero) + CveCliente = IIf(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero) + CveClasificacion = IIf(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero) + PorcentajeImpuesto = IIf(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero) + CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) + 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) + 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) + NombreCuenta = IIf(drt("Nombre").ToString = "", "", drt("Nombre").ToString.ToEntero) + TipoCuenta = IIf(drt("Tipo").ToString = "", "", drt("Tipo").ToString.ToEntero) + CuentaMayor = IIf(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero) + CveMoneda = IIf(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero) + DigAgrup = IIf(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero) + CveAgrupadorSat = IIf(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero) + NomIdioma = IIf(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString.ToEntero) + + idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, + CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) + If idnew > 0 Then + If Not ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then + If ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda, + DigAgrup, CveAgrupadorSat, NomIdioma) Then + ObjConta.RollBack() + ObjConta.Dispose() + Exit Sub + End If + End If + End If + End If + Else + idnew = ObjConta.AddCuenta(IDSelected, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, PorcentajeImpuesto:=PorcentajeIVA) + End If + Else Alert("Es necesario agregar el campo 'Agrupador SAT'", TipoMensaje.MsgError) End If @@ -402,14 +492,12 @@ Partial Class Contabilidad2_CatCuentas End If - Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text + codigoPadre = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text If UsuarioActual.Empresa.TipoContabilidad = 2 Then ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa) If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero - Dim IdAgrupador As Integer - + IdPadre = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero If ObjConta2.GetAgrupadoresSAT() Then IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero End If @@ -454,17 +542,21 @@ Partial Class Contabilidad2_CatCuentas End If ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) - LimpiarCampos() - updatos.Update() + CargaDatos() - Alert("La cuenta se guardo correctamente") End If - - ObjConta.Dispose() - If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() + End If + LimpiarCampos() + updatos.Update() + Alert("La cuenta se guardo correctamente") + + End If + ObjConta.Dispose() + + End Sub Private Sub LimpiarCampos() @@ -564,9 +656,10 @@ Partial Class Contabilidad2_CatCuentas Case 2 pnlOpcion2.Visible = True Case 3 + pnlOpcion2.Visible = True pnlOpcion3.Visible = True If DdlClasificacion.Items.Count < 2 Then - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1) + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataBind() End If Case 4 diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index ebbef86ba..323a90ca7 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -31,7 +31,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End Sub Private Sub CargaDatosModal() - DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa) DdlConceptoNomina.DataBind() Dim ObjConta As New ClsContabilidad @@ -76,7 +75,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero DdlCconceptosContables.SelectedValue = GvRow.DataKey("CveConceptoContable").ToEntero DdlCuenta.SelectedValue = GvRow.DataKey("CveCuenta").ToEntero - DdlConceptoNomina.SelectedValue = GvRow.DataKey("CveConceptoNomina").ToEntero + DdlConceptoNomina.SelectedValueexist(GvRow.DataKey("CveConceptoNomina").ToEntero) DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor").ToEntero DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion").ToEntero DdlAlmacen.SelectedValue = GvRow.DataKey("CveAlmacen").ToEntero diff --git a/Contabilidad2/RepAnexoCatalogo.aspx b/Contabilidad2/RepAnexoCatalogo.aspx index 492905e64..c58828168 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx +++ b/Contabilidad2/RepAnexoCatalogo.aspx @@ -96,24 +96,22 @@ Tipo Movto:
  • - - - +
  • - -
    - - - -
    -
  • + SubProyecto: + +
  • + + + +
  • Tipo:
  • @@ -124,8 +122,7 @@ -
  • Tipo de Cuentas: -
  • +
  • diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index d004923ae..b8b20b068 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -85,7 +85,7 @@
  • - Agregar PS Interno + Agregar PS Presupuesto de Control
  • @@ -94,7 +94,7 @@
  • - Agregar Presupuesto Interno + Agregar Presupuesto de Control
  • @@ -139,7 +139,7 @@
    -
    +
    @@ -171,7 +171,7 @@
    -
    +
    @@ -225,7 +225,7 @@
    -
    +
    @@ -233,7 +233,7 @@
    - Interno + Presupuesto de Control

    @@ -478,6 +478,9 @@
    + + +
    @@ -561,6 +564,108 @@
    + + +
    + +
    + + +
    + +
    + + + + + + +
    +
    +
    + +
    +
    Centros de Costo
    +
    + + +
    + + + + + + + + + + + + + + + + +
    Centro de costos + + + + + + Porcentaje + + + + + + + + Agregar
    + + + + + + + + + + + + +
    +
    + + + +
    + + +
    + + + + + + + + + + + +
    + + + +
    + + + + + +
    @@ -866,7 +971,7 @@ - + <%-- @@ -1063,8 +1168,8 @@ - - Interno + + Presupuesto de Control @@ -1329,7 +1434,7 @@ - + @@ -1535,7 +1640,7 @@
    - @@ -1797,6 +1902,135 @@ + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ContratadoAvanceFaltantePresupuesto de ControlSaldos
    ConceptoU.M.CantidadPUImporteCantidadImporteCantidadImportePresupuestoAvanceFaltanteContrato Vs Pto ControlPto Vs RealFactor Faltante
    Pavimentación tramo 1pieza$500.00$500.00$250,000.00$3.00$1,500.00$497.00$248,500.00$198,580.00$30,000.00$168,580.00$51,420.00$51,420.000.68
    Riego de liga tramo 1pieza$500.00$100.00$50,000.00$3.00$300.00$497.00$49,700.00$10,000.00$10,000.00$0.00$40,000.00$40,000.000
    Servicio de Aguapieza$5.00$100.00$500.00$0.00$0.00$5.00$500.00$100.00$100.00$0.00$400.00$400.000
    INDIRECTOS + $90,150.00$200,000.00-$109,850.00-$90,150.00-$200,000.000
    Netos$1,670.00-$108,180.00
    + + + +
    + +
    + + +
    +
    + + + @@ -3160,5 +3394,23 @@ } + function muestraCentrocosto(txt) { + + if ($('#TxtPorcentajeGastosIndirectos').val().length > 0) { + + $("#porCentrocosto").show(); + + } else { + $("#porCentrocosto").hide(); + } + + + + + + } + + + diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 7f2e52877..9cff21ef1 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -480,6 +480,9 @@ Partial Class Contratos_ContratoObra 'CargaDatosEncabezado() + CargaDLLCargaGVCentrosConsto() + tabalCentrosdecotso() + End If @@ -4970,7 +4973,7 @@ Partial Class Contratos_ContratoObra If ObjContratos.GetContratosObragGastosVeiculos(CveContrato, UsuarioActual.CveEmpresa) Then GvGastosVeiculos.DataSource = ObjContratos.DtResultados - GastosVeiculos = ObjContratos.DtResultados.SUM("Importe") + GastosVeiculos = ObjContratos.DtResultados.SUM("Importe", " CveContratoGasto > 0 ") Else GvGastosVeiculos.DataSource = Nothing @@ -5279,6 +5282,84 @@ Partial Class Contratos_ContratoObra End Sub + + Property DTCentrosCostoGB As DataTable + + Get + If ViewState("DTCentrosCosto") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTCentrosCosto"), DataTable) + End If + End Get + Set(value As DataTable) + ViewState("DTCentrosCosto") = value + End Set + + End Property + + + Private Sub tabalCentrosdecotso() + + Dim DTCentrosCosto As New DataTable + DTCentrosCosto.Columns.Add("CveSubProyecto", GetType(Integer)) + DTCentrosCosto.Columns.Add("SubProyecto", GetType(String)) + DTCentrosCosto.Columns.Add("Porcentaje", GetType(Decimal)) + DTCentrosCostoGB = DTCentrosCosto + + End Sub + + + Private Sub AddtabalCentrosdecotso(CveSubProyecto As Integer, SubProyecto As String, porcentaje As Decimal) + + Dim drow As DataRow = DTCentrosCostoGB.NewRow + + drow("CveSubProyecto") = CveSubProyecto + drow("SubProyecto") = SubProyecto + drow("Porcentaje") = porcentaje + + DTCentrosCostoGB.Rows.Add(drow) + + + + TxtCentroCostosPorcentaje.Text = "" + + CargaGVCentrosConsto() + + End Sub + Private Sub RemovetabalCentrosdecotso(Indice As Integer) + + + + CargaGVCentrosConsto() + End Sub + + + + + Private Sub CargaGVCentrosConsto() + + GVCentrosConsto.DataSource = DTCentrosCostoGB + GVCentrosConsto.DataBind() + UpGVCentrosConsto.Update() + + End Sub + + + Private Sub CargaDLLCargaGVCentrosConsto() + + DdlCentroCostos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubproyecto", "SubProyecto"}) + DdlCentroCostos.DataBind() + DdlCentroCostos.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + End Sub + + + Protected Sub LnkAgregarCentroCostosPorcentaj_Click(sender As Object, e As EventArgs) + + AddtabalCentrosdecotso(DdlCentroCostos.SelectedValue.ToEntero, DdlCentroCostos.SelectedItem.Text, TxtCentroCostosPorcentaje.Text.ToDecimal) + + End Sub End Class diff --git a/Empresas/153/Formatos/Cotizacion.rdlc b/Empresas/153/Formatos/Cotizacion.rdlc index 4d5dfc9a9..c948f37cf 100644 --- a/Empresas/153/Formatos/Cotizacion.rdlc +++ b/Empresas/153/Formatos/Cotizacion.rdlc @@ -1718,7 +1718,7 @@ Textbox5 - 7.65106cm + 8.44481cm 0.19009cm 0.05496cm 20.88652cm @@ -1791,7 +1791,7 @@ Textbox4 - 7.84713cm + 8.64088cm 0.24983cm 2.44366cm 14.88133cm @@ -1821,7 +1821,7 @@ Textbox5 - 10.47425cm + 11.268cm 0.19009cm 0.05496cm 20.88652cm @@ -1988,7 +1988,7 @@ DataSet1 - 7.84713cm + 8.64088cm 15.30755cm 0.48004cm 5.71104cm @@ -1999,14 +1999,44 @@ + + true + true + + + + + REVISAR BIEN EL PRODUCTO, UNA VEZ ENTREGADO EL MATERIAL NO SE ACEPTAN DEVOLUCIONES. + + + 2pt + 2pt + 2pt + 2pt + + - 10.69327cm + 11.48171cm