diff --git a/GPS/EntradasSalidasGR.aspx.vb b/GPS/EntradasSalidasGR.aspx.vb index 5827fa0eb..84ef503af 100644 --- a/GPS/EntradasSalidasGR.aspx.vb +++ b/GPS/EntradasSalidasGR.aspx.vb @@ -233,7 +233,7 @@ Partial Class GPS_Rastreo For Each Row As DataRow In DtDatos.Rows Try - request = WebRequest.Create(String.Format("{0}nominatim/reverse.php?format=jsonv2&lat={1}&lon={2}", ClsPaginas.UrlDirecciones, Row("Lat"), Row("Lon"))) + request = WebRequest.Create(String.Format("{0}nominatim/reverse.php?format=jsonv2&lat={1}&lon={2}", ClsPaginas.UrlDirecciones, Row("Lat"), Row("Lng"))) request.Method = "GET" ' set default credentials Dim response As WebResponse = Request.GetResponse() ' fire this puppy off Dim inputstream1 As Stream = response.GetResponseStream() ' define the stream(must be stream diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index c3b3c7a00..bedb6ca26 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -213,14 +213,14 @@ Partial Class General_SaldosIniciales End If - 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(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 @@ -294,7 +294,19 @@ Partial Class General_SaldosIniciales If Not dt.Columns(14).ColumnName = "Fecha Vencimiento" Then Alert("El nombre de la quinceava columna debe ser 'Fecha Vencimiento'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub - End If + End If + + If RblFormato.SelectedValue = "4" Then + If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then + Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + If Not dt.Columns(16).ColumnName = "Amort.Ant" Then + Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + End If ElseIf RblFormato.SelectedValue = "5" Then @@ -1309,23 +1321,25 @@ Partial Class General_SaldosIniciales Dim Folio As Integer = Row("Folio").ToString.ToEntero Dim Fecha As Date = Row("Fecha").ToString.ToDate Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate + Dim ImpuestoLocal As Double = Row("ImpuestoLocal").ToString.ToDouble + Dim Amortizacion As Double = Row("Amort.Ant").ToString.ToDouble Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal Dim IVA As Decimal = Row("IVA").ToString.ToDecimal Dim Total As Decimal = Row("Total").ToString.ToDecimal Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal - Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"Codigo = '{RFC}'").ToString.ToEntero + Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble Dim Moneda As String = Row("Moneda").ToString Dim TipoCambio As String = Row("Tipo Cambio").ToString Dim CveMoneda As Integer = 1 - Dim Vendedor As String = Row("Vendedor").ToString + Dim Vendedor As String = "" 'Row("Vendedor").ToString Dim CveVendedor As Integer = 0 - Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal - Dim CveClienteSucursal As Integer = Row("CveClienteSucursal").ToString.ToEntero - Dim ImpuestosLocales As Decimal = Row("ImpuestoLocal").ToString.ToDecimal - - GuardaLog(Sucursal + "-" + Row("Sucursal").ToString) + Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal + Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero + Dim ImpuestosLocales As Decimal = Row("ImpuestoLocal").ToString.ToDecimal + + GuardaLog(Sucursal + "-" + Row("Folio").ToString) 'Temporalmente SE BORRARA Dim Transaccion As String = "" ' Row("Transaccion2").ToString Dim Folio2 As String = "" ' Row("Folio2").ToString @@ -1333,7 +1347,7 @@ Partial Class General_SaldosIniciales 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For - TipoDocto = IIf(TipoDocto = "Ingresos", "Ing", IIf(TipoDocto = "Egresos", "Egs", "Rem")).ToString + TipoDocto = IIf(TipoDocto = "INGRESO", "Ing", IIf(TipoDocto = "EGRESO", "Egs", "Rem")).ToString 'PrePóliza Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -1367,11 +1381,11 @@ Partial Class General_SaldosIniciales If TipoDocto.Contiene("Ing", "Egs", "Rem") Then GuardaLog(Serie & "-" & Folio) - If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero, CveClienteSucursal, SubTotal, 0, 0, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble, + If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero, CveClienteSucursal, SubTotal, 0, Amortizacion, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble, 0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero, - CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS, ImpuestoLocal:=ImpuestosLocales, - ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente) Then + CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS, + ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestosLocales) Then ErrorVentas = True Exit For End If @@ -1398,7 +1412,7 @@ Partial Class General_SaldosIniciales 'Saldo If Saldo < Total Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, CveVentaAmortizacion:=CveVenta) Then ErrorVentas = True : Exit For If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio.ToString, 95, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo) Then ErrorVentas = True : Exit For End If diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index d8d27c13c..7c9f76462 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2253,6 +2253,14 @@ Partial Class OC End If End If + 'VALIDAR PORCENTAJES DE IVA + Dim PorcentajeIVA As Decimal = DdlIVA.SelectedValue.ToDecimal() - 1 + Dim PorcentajeIVADetalle As Decimal = Me.DtDetalle.MAX("IVAPorcentaje", "IVAPorcentaje > 0").ToDecimal() + + If PorcentajeIVA > 0 AndAlso (PorcentajeIVA <> PorcentajeIVADetalle) Then + Alert("El IVA de los conceptos no coincide con el IVA a facturar.", TipoMensaje.MsgAdvertencia) + TieneError = True + End If Return TieneError End Function diff --git a/Planeacion/CatFolios.aspx b/Planeacion/CatFolios.aspx index 3d8fff4b8..fe83fcb43 100644 --- a/Planeacion/CatFolios.aspx +++ b/Planeacion/CatFolios.aspx @@ -104,7 +104,7 @@
- + <%-- --%> @@ -182,12 +182,7 @@
- -
- - - -
+ <%--
diff --git a/Planeacion/CatFolios.aspx.vb b/Planeacion/CatFolios.aspx.vb index 8d68a3a32..73ea52a1b 100644 --- a/Planeacion/CatFolios.aspx.vb +++ b/Planeacion/CatFolios.aspx.vb @@ -125,7 +125,6 @@ Partial Class CatFolios HdnModalidad.Value = "U" DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto")) - TxtSerie.Text = (GvRow.DataKey("Serie")) ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False) TxtFolioInicial.Text = (GvRow.DataKey("FInicial")) TxtFolioFinal.Text = (GvRow.DataKey("FFinal")) @@ -170,12 +169,12 @@ Partial Class CatFolios If HdnModalidad.Value = "I" Then - If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero, + If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TieneError = True End If Else - If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero, + If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero, "", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then TieneError = True End If diff --git a/asmx/WSGPSApp.asmx b/asmx/WSGPSApp.asmx index 2fa5ca1ba..10120d159 100644 --- a/asmx/WSGPSApp.asmx +++ b/asmx/WSGPSApp.asmx @@ -128,7 +128,7 @@ Public Class WSGPSApp DtModulos = Nothing End If UsuarioRetorno.Modulos = UsuariosModulos - Dim DtClientes As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltraParametros("CvePlataforma = 3 AND CveCliente > 0", "Empresa") + Dim DtClientes As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltraParametros("CvePlataforma = 3 AND CveCliente IS NOT NULL", "Empresa") If DtClientes IsNot Nothing Then If DtClientes.Rows.Count > 0 Then For Each Row As DataRow In DtClientes.Rows