diff --git a/.gitignore b/.gitignore index fc8032bc3..a3e8e0702 100644 --- a/.gitignore +++ b/.gitignore @@ -259,6 +259,7 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml +*.sln # CodeRush .cr/ diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 31a25e690..16d5a2652 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -154,7 +154,7 @@ Public Class ClsContabilidad Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero Catch ex As Exception - If ex.Message.Contains("50005;") Then + If ex.Message.Contains("50015;") Then OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) @@ -500,7 +500,12 @@ Public Class ClsContabilidad SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al eliminar el movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If ex.Message.Contains("50015;") Then + OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Else + OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If End Try Return Retorno diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 8220a8417..ebb998e18 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -50,9 +50,9 @@ Refacturar Complemento
  • - Cancelar Complemento + Cancelar - <%--data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"> + <%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;">
  • @@ -962,7 +962,7 @@ - + diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index fffc527d3..73a07f5c1 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -408,12 +408,52 @@ Partial Class Bancos_IE Set(value As Integer) ViewState("IdCtaAnticipoExtranjera") = value End Set - End Property - - - + End Property + + Private Property CveEstatusIE As Integer + Get + If ViewState("CveEstatusIE") Is Nothing Then + Return -1 + Else + Return ViewState("CveEstatusIE").ToString.ToEntero + End If + End Get + Set(value As Integer) + ViewState("CveEstatusIE") = value + End Set + + End Property + + Private Property CuentaOld As String + Get + Return CType(ViewState("CuentaOld"), String) + End Get + Set(value As String) + ViewState("CuentaOld") = value + End Set + End Property + Private Property FechaOld As String + Get + Return CType(ViewState("FechaOld"), String) + End Get + Set(value As String) + ViewState("FechaOld") = value + End Set + End Property + + Private Property FolioOld As String + Get + Return CType(ViewState("FolioOld"), String) + End Get + Set(value As String) + ViewState("FolioOld") = value + End Set + End Property + + + #Region "CANCELACIÓN COMPLEMENTO MODAL V2" - + Property CveComplementoPagoCancelar As Integer Get If ViewState("CveComplementoPagoCancelar") Is Nothing Then @@ -855,6 +895,8 @@ Partial Class Bancos_IE LblRegistroFecha.Text = ObjIE.FechaIng.ToShortDateString LblRegistroUsuario.Text = ObjIE.Usuario + CveEstatusIE = ObjIE.CveEstatusIE + Select Case ObjIE.CveEstatusIE Case 1 If Not ObjIE.FueConciliado Then @@ -954,6 +996,7 @@ Partial Class Bancos_IE LnkComplementoPago.Visible = True + If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then 'cuando es cheque devuelto TabCancelacion.Visible = True @@ -1060,16 +1103,18 @@ Partial Class Bancos_IE If Not ChkConciliado.Checked Then - - If Not VerificaComplementos(True) Then + If (Not VerificaComplementos(True)) And UsuarioActual.TienePermisoProceso(99) And ObjIE.CveEstatusIE <> 2 Then BtnEditar.Visible = True End If UpGuardar.Update() - End If + ' DATOS PARA LA BITACORA + CuentaOld = LblCuenta.Text + FechaOld = TxtFechaDocumento.Text + FolioOld = TxtFolio.Text End If @@ -3667,20 +3712,46 @@ Partial Class Bancos_IE Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click Dim IE As New ClsBancos + IE.IniciaTransacSQL() + Dim ObjGral As New ClsGenerales + ObjGral.IniciaTransacSQL() Dim FechaAplicado As DateTime? = Nothing - + Dim OcurrioError As Boolean = False Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero) If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, - Observaciones:=TxtObservaciones.Text) Then - Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""") - End If - + Observaciones:=TxtObservaciones.Text) Then + 'Agrega a la Bitacora + If CuentaOld <> DdlCuenta.SelectedItem.Text Then + If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, DdlCuenta.SelectedItem.Text, CuentaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Cuenta", "Banco", TxtFolio.Text + " / " + Cuenta) Then + OcurrioError = True + End If + End If + If FechaOld <> TxtFechaDocumento.Text.Trim Then + If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFechaDocumento.Text.Trim, FechaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Fecha", "Banco", TxtFolio.Text + " / " + Cuenta) Then + OcurrioError = True + End If + End If + If FolioOld <> TxtFolio.Text.Trim Then + If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFolio.Text.Trim, FolioOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Número", "Banco", TxtFolio.Text + " / " + Cuenta) Then + OcurrioError = True + End If + End If + Else + OcurrioError = True + End If + + If OcurrioError Then + IE.RollBack() + ObjGral.RollBack() + Else + IE.Commit() + ObjGral.Commit() + Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""") + End If IE.Dispose() - - - + ObjGral.Dispose() End Sub Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs) @@ -4757,31 +4828,31 @@ Partial Class Bancos_IE End If ObjOI.Dispose() Return "" - End Function + End Function #End Region - + #Region " COMPLEMENTOS PAGO " - Private Sub CargaComplementosPago() - + Private Sub CargaComplementosPago() + + + + Dim ObjBancos As New ClsBancos If UsuarioActual.CveRol = 1 Then GvComplementoPagos.Columns(7).Visible = True - End If - + End If + + DVGenerarComplementoModal.Visible = False If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then GvComplementoPagos.DataSource = ObjBancos.DtResultados - If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 Then - DVGenerarComplementoModal.Visible = True - Else - - DVGenerarComplementoModal.Visible = False + If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 And CveEstatusIE <> 2 Then + DVGenerarComplementoModal.Visible = True End If - Else - DVGenerarComplementoModal.Visible = False + Else GvComplementoPagos.DataSource = Nothing End If @@ -4801,8 +4872,8 @@ Partial Class Bancos_IE Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE")))) - e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE")))) + e.Row.Cells(3).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE")))) + e.Row.Cells(4).Text = String.Format("", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE")))) If e.Row.DataKey("Estatus").Contiene("1", "3") Then e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True @@ -4830,8 +4901,8 @@ Partial Class Bancos_IE If ObjBanco.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, FolioFiscalPadre, EsRegeneracion:=True) Then ObjBanco.Commit() Str.AppendFormat("Folio: {0}  ", ObjBanco.ComplementoSerieFolio) - Str.AppendFormat("XML    ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%")))) - Str.AppendFormat("PDF   ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%")))) + Str.AppendFormat("XML    ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%")))) + Str.AppendFormat("PDF   ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%")))) 'Str.Append($"{gvr.DataKey("Folio")}   {gvr.DataKey("NombreCliente")}
    ") PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False) Alert(Str.ToString, TipoMensaje.MsgInformacion) diff --git a/Empresas/1/Formatos/Cotizacion.rdlc b/Empresas/1/Formatos/Cotizacion.rdlc index 9a1a0fd22..07b679160 100644 --- a/Empresas/1/Formatos/Cotizacion.rdlc +++ b/Empresas/1/Formatos/Cotizacion.rdlc @@ -1,8120 +1,8126 @@ - - - - - - - - - - - 0.88283in - - - 0.53922in - - - 3.70966in - - - 0.83848in - - - 1.03236in - - - 1.03703in - - - - - 0.1652in - - - - - true - true - - - - - NO.P - - - - - - - Textbox22 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CANT. - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - T.E. - - - - - - - Textbox21 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P.U. - - - - - - - Textbox23 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - SUBTOTAL - - - - - - - Textbox1 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.17561in - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TiempoEntrega.Value - - - - - - - TiempoEntrega1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 0.02778in - 0.00139in - 0.34081in - 8.03958in - - - - - - true - - - - - SUBTOTAL: - - - - - - - Textbox19 - 0.56593in - 5.89776in - 0.21875in - 1.04574in - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!SubTotal.Value= 0 ,"-",Parameters!SubTotal.Value) - - - - - - - Textbox42 - 0.54093in - 6.9435in - 0.21875in - 1.0787in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 0.99232in - 6.9435in - 0.21875in - 1.0787in - 3 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - true - - - - - TOTAL: - - - - - - - Textbox19 - 1.01732in - 5.89776in - 0.21875in - 1.04574in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - IVA: - - - - - - - Textbox19 - 0.79857in - 5.89776in - 0.21875in - 1.04574in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =iif(Parameters!IVA.Value = 0,"-",Parameters!IVA.Value) - - - - - - - Textbox42 - 0.77357in - 6.9435in - 0.21875in - 1.0787in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - Embedded - CINTILLOLOGOTIPOS - FitProportional - 1.50802cm - 0.06704cm - 1.69361cm - 14.91328cm - 9 - - - - - - true - true - - - - - ="Son: " & UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 1.31604in - 2.66493in - 0.18861in - 5.37603in - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 0.127cm - 0.07058cm - 3.9023cm - 20.42407cm - - - - - - 4.33815cm - - - - - - true - true - - - - - - - - - - - - - Cotización - - - - - - - - No. - - - - - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - - - - Textbox4 - 0.04298in - 3.51392in - 0.29178in - 4.55343in - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - =Parameters!SucursalCliente.Value - - - - - - - - - Atención: - - - - =Parameters!ClienteContacto.Value - - - - - - - - - Tel: - - - - =Parameters!ClienteTelefono.Value - - - - - - - - - E-Mail: - - - - =Parameters!ClienteContactoMail.Value - - - - - - - - - Fecha: - - - - =Parameters!FechaSolicitud.Value - - - - - - - Textbox18 - 0.86792cm - 11.06848cm - 3.27899cm - 9.4226cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.66868cm - 11.36047cm - 0cm - 1.7247cm - 3 - - 1.5pt - - - - - true - true - - - - - Compuproveedores, S.A DE C.V. - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - www - - - - . - - - - compuproveedores - - - - . - - - - com - - - - - - - Textbox2 - 1.1557cm - 4.03176cm - 0.74402cm - 6.70687cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - =IIF(Parameters!Sucursal.Value="MATRIZ","(662) 214 2200", -IIF(Parameters!Sucursal.Value="Tijuana","(664) 645 1814", -IIF(Parameters!Sucursal.Value="Culiacán","(667) 715 8533", -IIF(Parameters!Sucursal.Value="Aguascalientes","(449) 913 4418","")))) - - - - - - - Textbox3 - 0.66868cm - 4.03176cm - 0.45527cm - 6.70687cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 7.63292cm - true - true - - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 17.72297cm - 0.41981cm - 2.5cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 6.92679cm - 0.07937cm - 0.56854cm - 20.42759cm - - - - - - - - true - true - - - - - =Parameters!VendedorNombre.Value - - - - - - - - - - =Parameters!VendedorTelefono.Value - - - - - - - =Parameters!VendedorCelular.Value - - - - - - - =Parameters!VendedorMail.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - BannerChilo - Fit - 3.92835cm - 0.13228cm - 2.57528cm - 20.21765cm - 1 - - - - - - true - true - - - - - Precios unitarios, no incluyen IVA - - - - - - - - - No devolución, no cancelación una vez hecho el pedido - - - - - - - - - Todo pedido requiere Orden de Compra - - - - - - - - - Precios sujetos a cambio sin previo aviso - - - - - - - - - Cotización sujeta a disponibilidad - - - - - - - - - Vigencia de cotización: - - - - =Parameters!Vigencia.Value - - - - - - - - - Condiciones de pago: - - - - =Parameters!CondicionPago.Value - - - - - - - - - Forma de entrega: - - - - =Parameters!FormaEntrega.Value - - - - - - - Textbox20 - 0.62794cm - 12.53405cm - 3.36038cm - 7.87937cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Precios cotizados en Moneda Nacional - - - - - - - Textbox6 - 0.3175cm - 13.22197cm - 0.31044cm - 7.19145cm - 3 - - =IIF(Parameters!CveMoneda.Value = "1",TRUE,FALSE) - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!FirmaVendedor.Value - FitProportional - 0.37747cm - 0.50093cm - 1.35889cm - 5.74406cm - 4 - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 0.10718cm - 6.39645cm - 19.863cm - 5 - - = iif(Globals!PageNumber=Globals!TotalPages, true,false) - - - - - - - true - 0.09525cm - 0.07411cm - 6.57948cm - 20.46108cm - 1 - - = iif(Globals!PageNumber=Globals!TotalPages, false,true) - - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 0cm - 0cm - 1.27cm - + + + + + + Textbox22 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CANT. + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + T.E. + + + + + + + Textbox21 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P.U. + + + + + + + Textbox23 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SUBTOTAL + + + + + + + Textbox1 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.17561in + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TiempoEntrega.Value + + + + + + + TiempoEntrega1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 0.02778in + 0.00139in + 0.34081in + 8.03958in + + + + + + true + + + + + SUBTOTAL: + + + + + + + Textbox19 + 0.56593in + 5.89776in + 0.21875in + 1.04574in + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =IIF(Parameters!SubTotal.Value= 0 ,"-",Parameters!SubTotal.Value) + + + + + + + Textbox42 + 0.54093in + 6.9435in + 0.21875in + 1.0787in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 0.99232in + 6.9435in + 0.21875in + 1.0787in + 3 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + true + + + + + TOTAL: + + + + + + + Textbox19 + 1.01732in + 5.89776in + 0.21875in + 1.04574in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + IVA: + + + + + + + Textbox19 + 0.79857in + 5.89776in + 0.21875in + 1.04574in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =iif(Parameters!IVA.Value = 0,"-",Parameters!IVA.Value) + + + + + + + Textbox42 + 0.77357in + 6.9435in + 0.21875in + 1.0787in + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + Embedded + CINTILLOLOGOTIPOS + FitProportional + 1.50802cm + 0.06704cm + 1.69361cm + 14.91328cm + 9 + + + + + + true + true + + + + + ="Son: " & UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 1.31604in + 2.66493in + 0.18861in + 5.37603in + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 0.127cm + 0.07058cm + 3.9023cm + 20.42407cm + + + + + + 4.33815cm + + + + + + true + true + + + + + + + + + + + + + Cotización + + + + + + + + No. + + + + + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + + + + Textbox4 + 0.04298in + 3.51392in + 0.29178in + 4.55343in + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + =Parameters!SucursalCliente.Value + + + + + + + + + Atención: + + + + =Parameters!ClienteContacto.Value + + + + + + + + + Tel: + + + + =Parameters!ClienteTelefono.Value + + + + + + + + + E-Mail: + + + + =Parameters!ClienteContactoMail.Value + + + + + + + + + Fecha: + + + + =Parameters!FechaSolicitud.Value + + + + + + + Textbox18 + 0.86792cm + 11.06848cm + 3.27899cm + 9.4226cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.66868cm + 11.36047cm + 0cm + 1.7247cm + 3 + + 1.5pt + + + + + true + true + + + + + Compuproveedores, S.A DE C.V. + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + www + + + + . + + + + compuproveedores + + + + . + + + + com + + + + + + + Textbox2 + 1.1557cm + 4.03176cm + 0.74402cm + 6.70687cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tel. + + + + =IIF(Parameters!Sucursal.Value="MATRIZ","(662) 214 2200", +IIF(Parameters!Sucursal.Value="Tijuana","(664) 645 1814", +IIF(Parameters!Sucursal.Value="Culiacán","(667) 715 8533", +IIF(Parameters!Sucursal.Value="Aguascalientes","(449) 913 4418","")))) + + + + + + + Textbox3 + 0.66868cm + 4.03176cm + 0.45527cm + 6.70687cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 7.63292cm + true + true + + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 17.72297cm + 0.41981cm + 2.5cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 6.92679cm + 0.07937cm + 0.56854cm + 20.42759cm + + + + + + + + true + true + + + + + =Parameters!VendedorNombre.Value + + + + + + + + + + =Parameters!VendedorTelefono.Value + + + + + + + =Parameters!VendedorCelular.Value + + + + + + + =Parameters!VendedorMail.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + BannerChilo + Fit + 3.92835cm + 0.13228cm + 2.57528cm + 20.21765cm + 1 + + + + + + true + true + + + + + Precios unitarios, no incluyen IVA + + + + + + + + + No devolución, no cancelación una vez hecho el pedido + + + + + + + + + Todo pedido requiere Orden de Compra + + + + + + + + + Precios sujetos a cambio sin previo aviso + + + + + + + + + Cotización sujeta a disponibilidad + + + + + + + + + Vigencia de cotización: + + + + =Parameters!Vigencia.Value + + + + + + + + + Condiciones de pago: + + + + =Parameters!CondicionPago.Value + + + + + + + + + Forma de entrega: + + + + =Parameters!FormaEntrega.Value + + + + + + + Textbox20 + 0.62794cm + 12.53405cm + 3.36038cm + 7.87937cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Precios cotizados en Moneda Nacional + + + + + + + Textbox6 + 0.3175cm + 13.22197cm + 0.31044cm + 7.19145cm + 3 + + =IIF(Parameters!CveMoneda.Value = "1",TRUE,FALSE) + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!FirmaVendedor.Value + FitProportional + 0.37747cm + 0.50093cm + 1.35889cm + 5.74406cm + 4 + + + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 0.10718cm + 6.39645cm + 19.863cm + 5 + + = iif(Globals!PageNumber=Globals!TotalPages, true,false) + + + + + + + true + 0.09525cm + 0.07411cm + 6.57948cm + 20.46108cm + 1 + + = iif(Globals!PageNumber=Globals!TotalPages, false,true) + + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0cm + 0cm + 1.27cm + - - - Catálogo de Shipments - - - - -
  • - - - Crear Shipment - - -
  • -
    - - - - - -
    -
    -
    - Shipments -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - - - -
    - +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Shipments.aspx.cs" EnableEventValidation="false" Inherits="GPS_Shipments" %> + + + + + + + + Catálogo de Shipments + + + + +
  • + + + Crear Shipment + + +
  • +
    + + + + + +
    +
    +
    + Shipments +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + + +
    + - - - + +
    + diff --git a/GPS/Shipments.aspx.cs b/GPS/Shipments.aspx.cs index 2e6a3ada3..dc27aa9ba 100644 --- a/GPS/Shipments.aspx.cs +++ b/GPS/Shipments.aspx.cs @@ -154,34 +154,41 @@ public partial class GPS_Shipments : ClsPaginas } protected void LnkAddStop_Click(object sender, EventArgs e) { - if (DtStops != null) - { - var Row = DtStops.NewRow(); - Row["StopSequence"] = DtStops.Rows.Count + 1; - Row["Name"] = TxtLocName.Text.Trim(); - Row["LocationID"] = TxtLocID.Text.Trim(); - Row["StopType"] = DdlStopType.SelectedValue; - Row["StopRole"] = DdlStopRole.SelectedValue; - Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime(); - Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime(); - - Row["Address"] = TxtAddress.Text.Trim(); - Row["City"] = TxtCity.Text.Trim(); - Row["State"] = TxtState.Text.Trim(); - Row["PostalCode"] = TxtPostalCode.Text.Trim(); - Row["Country"] = TxtContry.Text.Trim(); - - var latlon = TxtLatLong.Text.Trim().Split(','); - - Row["Lat"] = latlon[0]; - Row["Lon"] = latlon[1]; - - DtStops.Rows.Add(Row); + try + { + if (DtStops != null) + { + var Row = DtStops.NewRow(); + Row["StopSequence"] = DtStops.Rows.Count + 1; + Row["Name"] = TxtLocName.Text.Trim(); + Row["LocationID"] = TxtLocID.Text.Trim(); + Row["StopType"] = DdlStopType.SelectedValue; + Row["StopRole"] = DdlStopRole.SelectedValue; + Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime(); + Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime(); + + Row["Address"] = TxtAddress.Text.Trim(); + Row["City"] = TxtCity.Text.Trim(); + Row["State"] = TxtState.Text.Trim(); + Row["PostalCode"] = TxtPostalCode.Text.Trim(); + Row["Country"] = TxtContry.Text.Trim(); + + var latlon = TxtLatLong.Text.Trim().Split(','); + + Row["Lat"] = latlon[0]; + Row["Lon"] = latlon[1]; + + DtStops.Rows.Add(Row); + } + GvStops.DataSource = DtStops; + GvStops.DataBind(); + + UpShipment.Update(); + } + catch (Exception ex) + { + this.OnError("Ocurrió un error al registrar la parada (stop)", ex); } - GvStops.DataSource = DtStops; - GvStops.DataBind(); - - UpShipment.Update(); this.RegistraScript("$('#DivStop').modal('hide');"); } diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index cb02b6f95..3fbfc4bca 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -121,6 +121,20 @@ Partial Class General_SaldosIniciales Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If + If RblFormato.SelectedValue = "1" Then + If Not dt.Columns(14).ColumnName = "Vendedor" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(15).ColumnName = "Clasificación" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(16).ColumnName = "Es distribuidor" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + End If ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then If Not dt.Columns(0).ColumnName = "Sucursal" Then @@ -489,16 +503,17 @@ Partial Class General_SaldosIniciales Dim Codigo As String = Row("Codigo").ToString Dim Descripcion As String = Row("Descripcion").ToString Dim TipoPS As String = Row("Tipo").ToString.Trim.ToUpper - Dim CodigoBarras As String = Row("Codigo Barras").ToString + Dim CodigoBarras As String = Row("Código Barras").ToString Dim UnidadMedida As String = Row("Unidad Medida").ToString.Trim Dim Clasificacion As String = Row("Clasificacion").ToString.Trim Dim Marca As String = Row("Marca").ToString.Trim - Dim RinTamaño As String = Row("Tamaño de Rin").ToString.Trim - Dim Medida As String = Row("Medida").ToString.Trim - Dim SATClavePS As String = Row("Codigo SAT").ToString.Trim - Dim SATClaveUnidadMedida As String = Row("Clave Unidad").ToString.Trim - Dim Linea As String = Row("Linea").ToString.Trim - Dim Modelo As String = Row("Modelo").ToString.Trim + Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "") + Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "") + Dim SATClavePS As String = Row("Código SAT").ToString.Trim + Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "") + Dim Linea As String = If(Row.Table.Columns.Contains("Linea"), Row("Linea").ToString.Trim, "") + Dim Modelo As String = If(Row.Table.Columns.Contains("Modelo"), Row("Modelo").ToString.Trim, "") + Dim Tamaño As String = Row("Tamaño").ToString.Trim Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{Codigo}'").ToString.ToEntero @@ -506,6 +521,7 @@ Partial Class General_SaldosIniciales Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}'").ToString.ToEntero Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero + Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}'").ToString.ToEntero If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", @@ -587,16 +603,20 @@ Partial Class General_SaldosIniciales If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveModelo:=CveModelo) Then + 'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, + ' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then ErrorPS = True - Codigo.GuardaLog - Exit For - Else - Contador += 1 + Codigo.GuardaLog + Exit For + Else + Contador += 1 End If Else If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, - CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, + CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveModelo:=CveModelo) <= 0 Then + 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, + ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then ErrorPS = True Codigo.GuardaLog Exit For @@ -711,8 +731,14 @@ Partial Class General_SaldosIniciales Dim Telefono As String = Row("Teléfono").ToString Dim Contacto As String = Row("Contacto").ToString Dim CelularContacto As String = Row("Celular Contacto").ToString + Dim Vendedor As String = Row("Vendedor").ToString + Dim Clasificacion As String = Row("Clasificación").ToString Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero + Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString.ToEntero + Dim CveClasificación As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero + Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False) + If CveCliente > 0 Then ExisteCliente = True Contador = Contador + 1 @@ -723,8 +749,8 @@ Partial Class General_SaldosIniciales ' Exit For 'End If Else - If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1, - "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1) Then + If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, -1, -1, + "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación) Then ErrorClientes = True RFC.GuardaLog Exit For @@ -763,11 +789,11 @@ Partial Class General_SaldosIniciales Dim Encontrados As Integer = 0 DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) Dim RFC As String = "" -Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") Dim CvePS As Integer = drr("CvePS").ToString.ToEntero Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString.ToEntero Dim CveClasificacion As Integer = drr("CveClasificacion").ToString.ToEntero - Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) + Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows @@ -783,7 +809,7 @@ Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal Dim TipoDocto As String = Row("Tipo Documento").ToString Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero - GuardaLog(Sucursal + " - " + Row("Sucursal").ToString) + GuardaLog(Sucursal + " - " + Row("Sucursal").ToString) Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal diff --git a/PortalGPS/InicioGPS.aspx.vb b/PortalGPS/InicioGPS.aspx.vb index 96fa525fa..17d5eccd0 100644 --- a/PortalGPS/InicioGPS.aspx.vb +++ b/PortalGPS/InicioGPS.aspx.vb @@ -34,8 +34,8 @@ Partial Class GPS_PruebaMaster If UsuarioActual.Contraseña = (ContraseñaPredeterminadaEncriptada) OrElse UsuarioActual.ActCambiarContraseña Then Response.Redirect("/Sistemas/CatContrasenia.aspx") Else + CargaZonasHorarias() CargaDispositivos() - CargaZonasHorarias() End If End If End Sub diff --git a/Ventas/ActualizarPrecios.aspx b/Ventas/ActualizarPrecios.aspx index e9c55c3cd..4b2761db4 100644 --- a/Ventas/ActualizarPrecios.aspx +++ b/Ventas/ActualizarPrecios.aspx @@ -160,7 +160,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -186,7 +186,8 @@ - + + @@ -199,7 +200,7 @@