varios
This commit is contained in:
@@ -1063,25 +1063,27 @@ Public Class ClsContPAQi
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
StrSQL.Clear()
|
||||
StrSQL.Append(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ")
|
||||
StrSQL.Append(" CASE WHEN ISNUMERIC(c.Codigo) = 1 THEN FORMAT(CAST (c.Codigo AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.Codigo END + ' - ' + c.Nombre + ' ' AS CtaCodigo, ") 'Roberto 8/Nov/2014
|
||||
StrSQL.Append(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.Importe ELSE 0 END) AS Cargo, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.Importe ELSE 0 END) AS Abono, ")
|
||||
StrSQL.Append(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.ImporteME ELSE 0 END) AS CargoME, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.ImporteME ELSE 0 END) AS AbonoME, ")
|
||||
StrSQL.Append(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro ")
|
||||
StrSQL.Append(" FROM MovimientosPoliza mp ")
|
||||
StrSQL.Append(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ")
|
||||
StrSQL.Append(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ")
|
||||
StrSQL.Append(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ")
|
||||
StrSQL.Append(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
|
||||
StrSQL.Append(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ")
|
||||
StrSQL.Append(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ")
|
||||
StrSQL.Append(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ")
|
||||
StrSQL.Append(" AND (@Periodo = -1 OR mp.Periodo = @Periodo) ")
|
||||
StrSQL.Append(" AND (@TipoPol = -1 OR mp.TipoPol = @TipoPol) ")
|
||||
StrSQL.Append(" AND (@NumPol = -1 OR mp.Folio = @NumPol) ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" GROUP BY mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta, mp.TipoMovto, c.CODIGO, c.NOMBRE, T.Codigo, T.Nombre, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre, p.Fecha, p.Cargos, p.Abonos, p.Concepto, Afectable ") 'Roberto 8/Nov/2014 campo Afectable
|
||||
StrSQL.Append(" ORDER BY mp.IdPoliza, mp.NumMovto ")
|
||||
StrSQL.AppendLine(" SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ")
|
||||
StrSQL.AppendLine(" CASE WHEN ISNUMERIC(c.Codigo) = 1 THEN FORMAT(CAST (c.Codigo AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.Codigo END + ' - ' + c.Nombre + ' ' AS CtaCodigo, ") 'Roberto 8/Nov/2014
|
||||
StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.Importe ELSE 0 END) AS Cargo, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.Importe ELSE 0 END) AS Abono, ")
|
||||
StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.ImporteME ELSE 0 END) AS CargoME, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.ImporteME ELSE 0 END) AS AbonoME, ")
|
||||
StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro ")
|
||||
StrSQL.AppendLine(" FROM MovimientosPoliza mp ")
|
||||
StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ")
|
||||
StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ")
|
||||
StrSQL.AppendLine(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SIG_Resp_OIC.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ")
|
||||
StrSQL.AppendLine(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ")
|
||||
StrSQL.AppendLine(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ")
|
||||
StrSQL.AppendLine(" AND (@Periodo = -1 OR mp.Periodo = @Periodo) ")
|
||||
StrSQL.AppendLine(" AND (@TipoPol = -1 OR mp.TipoPol = @TipoPol) ")
|
||||
StrSQL.AppendLine(" AND (@NumPol = -1 OR mp.Folio = @NumPol) ")
|
||||
StrSQL.AppendLine(" ")
|
||||
StrSQL.AppendLine(" GROUP BY mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta, mp.TipoMovto, c.CODIGO, c.NOMBRE, T.Codigo, T.Nombre, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre, p.Fecha, p.Cargos, p.Abonos, p.Concepto, Afectable ") 'Roberto 8/Nov/2014 campo Afectable
|
||||
StrSQL.AppendLine(" ORDER BY mp.IdPoliza, mp.NumMovto ")
|
||||
|
||||
SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
@@ -388,7 +388,7 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
Public Function GetProveedoresAuxiliar(CveProveedor As Integer, CveConceptoContable As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer,
|
||||
Optional Opcion As Integer = 1, Optional CveTipoProveedor As Integer = -1) As Boolean
|
||||
Optional Opcion As Integer = 1, Optional CveTipoProveedor As Integer = -1, Optional Contabilizable As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_ProveedoresAuxiliar")
|
||||
@@ -402,6 +402,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||
.Add("@Contabilizable", SqlDbType.Int).Value = Contabilizable
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -342,7 +342,9 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
LblPesosTotal.Text = String.Format("$ {0}", DtDatos.SUM("SaldoPesos", "CveCompra > 0").ToString.FormatoNumero())
|
||||
|
||||
LblAcumulado.Text = String.Format("$ {0}", DtDatos.MAX("TotalProgramado", "CveCompra > 0").ToString.FormatoNumero())
|
||||
End If
|
||||
End If
|
||||
|
||||
Gv.Columns(6).Visible = (UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0)
|
||||
|
||||
Mov.Dispose()
|
||||
CargaGrid(Orden)
|
||||
@@ -434,19 +436,41 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format(" $get('{0}').readOnly = !this.checked;", e.Row.FCTextBox("TxtS").ClientID))
|
||||
'cuando estan programado, el saldo es el importe programado, para saber el total que se limite el rango, debe de ser el saldo real, saldo + importeprogramado
|
||||
e.Row.FCTextBox("TxtS").Attributes.Add("onkeyup", String.Format("FnMonedaRango(this,{0});", e.Row.DBCampo("Original").ToDouble + e.Row.DBCampo("Abonado").ToDouble))
|
||||
End If
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto
|
||||
' e.Row.FCDropDownList("DdlCuenta").Visible = True
|
||||
' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas
|
||||
' e.Row.FCDropDownList("DdlCuenta").DataBind()
|
||||
|
||||
' e.Row.FCDropDownList("DdlMov").Visible = True
|
||||
' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion
|
||||
' e.Row.FCDropDownList("DdlMov").DataBind()
|
||||
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Or UsuarioActual.Empresa.Funcionalidad(134).ToEntero > 0 Then
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendFormat("Importe Almacen: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteAlmacen").FormatoNumero, e.Row.DBCampo("ImporteAlmacenPorcentaje"))
|
||||
If e.Row.DBCampo("ImporteServicios").ToDouble > 0 Then Str.AppendFormat("Importe Servicios: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteServicios").FormatoNumero, e.Row.DBCampo("ImporteServiciosPorcentaje"))
|
||||
If e.Row.DBCampo("ImporteDevolucion").ToDouble > 0 Then Str.AppendFormat("Importe Devuelto: ${0} ({1}%) <br/>", e.Row.DBCampo("ImporteDevolucion").FormatoNumero, e.Row.DBCampo("ImporteDevolucionPorcentaje"))
|
||||
Str.AppendFormat(" <i> Importes <b> SIN</b> IVA</i>")
|
||||
|
||||
e.Row.FCLabel("LbEstatusInv").Attributes.Add("title", Str.ToString)
|
||||
Select Case e.Row.DBCampo("EstatusInventario").ToEntero
|
||||
Case 1
|
||||
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-o' aria-hidden='true'></i>"
|
||||
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Red
|
||||
Case 2
|
||||
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag-checkered' aria-hidden='true'></i>"
|
||||
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.DarkOrange
|
||||
Case 3
|
||||
e.Row.FCLabel("LbEstatusInv").Text = "<i Class='fa fa-flag' aria-hidden='true'></i>"
|
||||
e.Row.FCLabel("LbEstatusInv").ForeColor = Drawing.Color.Green
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.GralSoloProyecto Then ' solo muestar el subproyecto
|
||||
' e.Row.FCDropDownList("DdlCuenta").Visible = True
|
||||
' e.Row.FCDropDownList("DdlCuenta").DataSource = DtCuentas
|
||||
' e.Row.FCDropDownList("DdlCuenta").DataBind()
|
||||
|
||||
' e.Row.FCDropDownList("DdlMov").Visible = True
|
||||
' e.Row.FCDropDownList("DdlMov").DataSource = DtTipoTransaccion
|
||||
' e.Row.FCDropDownList("DdlMov").DataBind()
|
||||
|
||||
'End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red
|
||||
|
||||
@@ -7904,6 +7904,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'AJUSTA POLIZA
|
||||
If IdPoliza > 0 Then
|
||||
PolizaFolio = ObjContaAC.Folio
|
||||
ObjContaAC.AjustaPoliza(IdPoliza)
|
||||
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||
End If
|
||||
@@ -7914,35 +7915,43 @@ Partial Class Compras_Compras
|
||||
Msg.AppendFormat("</br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Entrada Almacen</a>", TempParametros)
|
||||
End If
|
||||
|
||||
ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0)
|
||||
|
||||
If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If EntregaDirecta Then
|
||||
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Inventarios/RecepcionAlmacen.aspx?CveCompra={CveCompra}&ED=1"">Recibir mercancía de entrega directa.</a>")
|
||||
End If
|
||||
|
||||
ObjCompras.Commit()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
|
||||
Dim CveEvaluacionProveedor As Integer = -1
|
||||
|
||||
If Me.RequiereEvaluacion Then
|
||||
Dim ObjPro As New ClsCompProveedores()
|
||||
CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, Now, "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa)
|
||||
ObjPro.Dispose()
|
||||
End If
|
||||
|
||||
'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC
|
||||
MandaCorreoOCVendedores(CveCompra)
|
||||
If Not ErrorMovInv Then
|
||||
For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen
|
||||
MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen)
|
||||
Next
|
||||
End If
|
||||
|
||||
If CveEvaluacionProveedor > 0 Then
|
||||
Msg.Append("<br/><br/>El proveedor tiene evaluaciones pendientes<br/>")
|
||||
Msg.Append("¿Desea realizar una evaluacion al proveedor?")
|
||||
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Compras/EvaluacionProveedor.aspx?CveEvaluacionProveedor={CveEvaluacionProveedor}"">Evaluar Proveedor.</a>")
|
||||
If Not TieneError Then
|
||||
ObjCompras.Commit()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
|
||||
Dim CveEvaluacionProveedor As Integer = -1
|
||||
|
||||
If Me.RequiereEvaluacion Then
|
||||
Dim ObjPro As New ClsCompProveedores()
|
||||
CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, Now, "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa)
|
||||
ObjPro.Dispose()
|
||||
End If
|
||||
|
||||
'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC
|
||||
MandaCorreoOCVendedores(CveCompra)
|
||||
If Not ErrorMovInv Then
|
||||
For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen
|
||||
MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen)
|
||||
Next
|
||||
End If
|
||||
|
||||
If CveEvaluacionProveedor > 0 Then
|
||||
Msg.Append("<br/><br/>El proveedor tiene evaluaciones pendientes<br/>")
|
||||
Msg.Append("¿Desea realizar una evaluacion al proveedor?")
|
||||
Msg.AppendFormat($"</br><a class=""Texto"" target='_blank' href=""/Compras/EvaluacionProveedor.aspx?CveEvaluacionProveedor={CveEvaluacionProveedor}"">Evaluar Proveedor.</a>")
|
||||
End If
|
||||
Else
|
||||
ObjCompras.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar)
|
||||
|
||||
@@ -1067,36 +1067,51 @@ Partial Class PopUpVerFactura
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
ObjVentas.DtResultados.Columns.Add("Importe", GetType(Decimal))
|
||||
ObjVentas.DtResultados.Rows(0)("Importe") = ObjVentas.DtResultados.Rows(0)("Total")
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Vta.DtNCVinculadas = ObjVentas.DtResultados
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
|
||||
If Vta.TipoDocto.Contiene("Dev") Then
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then
|
||||
'carga as notas de credito vinculadas
|
||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
End If
|
||||
End If
|
||||
'If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then
|
||||
' 'carga as notas de credito vinculadas
|
||||
' If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||
' Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
|
||||
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Vta.DtNCVinculadas = ObjVentas.DtResultados
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
|
||||
If Vta.TipoDocto.Contiene("Dev") Then
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
Vta.DtNCVinculadas = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
|
||||
' 'If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
' ' Vta.DtNCVinculadas = ObjVentas.DtResultados
|
||||
' 'End If
|
||||
' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
' Vta.DtNCVinculadas = ObjVentas.DtResultados
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
@@ -131,6 +131,14 @@
|
||||
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Contabilizable:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlOpcionContabilizable" CssClass="form-control input-sm select2me" Width="260px" runat="server">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contabilizable" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="No contabilizable" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@ Partial Class Compras_ProveedoresAuxiliar
|
||||
|
||||
'Falta PA
|
||||
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
|
||||
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero) Then
|
||||
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then
|
||||
If DdlOpcion.SelectedValue.ToEntero = 2 Then
|
||||
GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
|
||||
Else
|
||||
|
||||
@@ -816,8 +816,15 @@
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!RFC.Value</Value>
|
||||
<Value>GOTE811117236</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -832,7 +839,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Left>1.78362in</Left>
|
||||
<Height>0.46414in</Height>
|
||||
<Height>0.56136in</Height>
|
||||
<Width>3.96172in</Width>
|
||||
<ZIndex>5</ZIndex>
|
||||
<Style>
|
||||
@@ -1121,7 +1128,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
||||
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -1135,9 +1142,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0.46414in</Top>
|
||||
<Top>0.58914in</Top>
|
||||
<Left>1.87861in</Left>
|
||||
<Height>0.69679in</Height>
|
||||
<Height>0.6374in</Height>
|
||||
<Width>1.65152in</Width>
|
||||
<ZIndex>13</ZIndex>
|
||||
<Style>
|
||||
@@ -1172,7 +1179,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!DomicilioExpedicion.Value</Value>
|
||||
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -1186,9 +1193,9 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0.46414in</Top>
|
||||
<Top>0.58914in</Top>
|
||||
<Left>3.84822in</Left>
|
||||
<Height>0.69679in</Height>
|
||||
<Height>0.6374in</Height>
|
||||
<Width>1.786in</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Style>
|
||||
@@ -1219,8 +1226,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.28209in</Top>
|
||||
<Left>0.13897cm</Left>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>0.89901in</Width>
|
||||
<Width>0.85202in</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1294,7 +1302,6 @@
|
||||
<TextRun>
|
||||
<Value>Dirección</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1304,7 +1311,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.53208in</Top>
|
||||
<Left>0.04514in</Left>
|
||||
<Left>0.05471in</Left>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>0.85387in</Width>
|
||||
<ZIndex>17</ZIndex>
|
||||
@@ -1379,9 +1386,8 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuidad</Value>
|
||||
<Value>Ciudad</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1391,7 +1397,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.7682in</Top>
|
||||
<Left>0.04514in</Left>
|
||||
<Left>0.05471in</Left>
|
||||
<Height>0.25in</Height>
|
||||
<Width>0.85387in</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
@@ -4153,11 +4159,25 @@
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Sucursal:</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>11.66812cm</Top>
|
||||
<Left>0.10722cm</Left>
|
||||
<Height>2.31759cm</Height>
|
||||
<Height>2.54689cm</Height>
|
||||
<Width>3.426cm</Width>
|
||||
<ZIndex>54</ZIndex>
|
||||
<Style>
|
||||
@@ -4229,11 +4249,22 @@
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>7007</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>11.66812cm</Top>
|
||||
<Left>3.65968cm</Left>
|
||||
<Height>2.31759cm</Height>
|
||||
<Height>2.54689cm</Height>
|
||||
<Width>6.20467cm</Width>
|
||||
<ZIndex>55</ZIndex>
|
||||
<Style>
|
||||
|
||||
@@ -56,28 +56,28 @@
|
||||
<Width>2.54731cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.73227cm</Width>
|
||||
<Width>0.70704cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.66702cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.26144cm</Width>
|
||||
<Width>1.99686cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.46086cm</Width>
|
||||
<Width>1.96369cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.09776cm</Width>
|
||||
<Width>1.75246cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.57396cm</Width>
|
||||
<Width>0.85958cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.37522cm</Width>
|
||||
<Width>1.6398cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.23062cm</Width>
|
||||
<Width>1.77947cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -95,7 +95,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Fecha.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>dd/MM/yyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -130,7 +130,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!ConceptoContable.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -164,7 +164,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!TipoDocto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -198,7 +198,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -232,7 +232,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!FolioReferencia.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -266,7 +266,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Cargo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -301,7 +301,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Abono.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -336,7 +336,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Abreviatura.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -370,7 +370,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!CargoMN.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -404,7 +405,8 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!AbonoMN.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -435,7 +437,7 @@
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox40">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -473,7 +475,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox42">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -511,7 +513,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox44">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -549,7 +551,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox49">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -587,7 +589,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox51">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -625,7 +627,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox47">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -663,7 +665,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox4">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -701,7 +703,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -710,7 +712,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Moneda</Value>
|
||||
<Value>Mon.</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -739,7 +741,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -777,7 +779,7 @@
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<TablixHeader>
|
||||
<Size>0.8593cm</Size>
|
||||
<Size>0.59472cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox13">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -831,7 +833,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!RazonSocial.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -860,8 +862,8 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>0.75875cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>1.4593cm</Height>
|
||||
<Width>19.58715cm</Width>
|
||||
<Height>1.19472cm</Height>
|
||||
<Width>19.55393cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -2017,7 +2017,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>Contralor </Value>
|
||||
<Value>Contador</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
2548
GPS/Rastreo.aspx
2548
GPS/Rastreo.aspx
File diff suppressed because it is too large
Load Diff
@@ -127,6 +127,7 @@ Partial Class GPS_Rastreo
|
||||
CargaDispositivos()
|
||||
CargaEventos()
|
||||
CargaGrupos()
|
||||
CargaGruposPI()
|
||||
CreaTmpDTDetalle()
|
||||
IndiceGV = 0
|
||||
End If
|
||||
@@ -144,6 +145,16 @@ Partial Class GPS_Rastreo
|
||||
RegistraScript("$('#C_GvDispositivos_chkSelectAll').click(function () { $("".ChkAllEvt input"").not(this).prop('checked',$(this).is(':checked')); });", "1")
|
||||
|
||||
End Sub
|
||||
Private Sub CargaGruposPI()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.PuntoDeInteresGrupoGet(-1, 1) Then
|
||||
GvGrupos.DataSource = ObjGPS.DtResultados
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
GvGrupos.DataBind()
|
||||
|
||||
UpAgregarPuntoInteres.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEventos()
|
||||
Dim GPS As New ClsGPS
|
||||
@@ -325,41 +336,33 @@ Partial Class GPS_Rastreo
|
||||
Mensajes = Mensajes + $"{GVRow.DataKey("NoEconomico").ToString},"
|
||||
|
||||
End If
|
||||
End If
|
||||
ElseIf Opcion = "All" Then
|
||||
|
||||
'Dim CveDispositivo = GVRow.DataKey("CveDispositivo").ToEntero
|
||||
'Dim RowDispositivo As DataRow = GlobalDTDispositivos(UsuarioActual.CveCliente).FiltroPrimero($"CveDispositivo = {CveDispositivo}")
|
||||
'Dim json As JObject = GPS.GetPosicionEquipoJson(CveDispositivo, FechaI, FechaF, RowDispositivo("Icono").ToString, RowDispositivo("ColorTrazo").ToString, GVRow.DataKey("NombreVehiculo").ToString, UsuarioActual.TienePermisoProceso(200))
|
||||
'HdnJSScript.Value = json.ToString()
|
||||
'DtPosiciones = GPS.DtPosicionesResultados '.AsEnumerable().Take(1000).CopyToDataTable()
|
||||
'UpDatosMapa.Update()
|
||||
|
||||
'RegistraScript($"CargaHistorico(); PreparaDibujadoHistorico();PreparaDibujado(3);")
|
||||
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
If GPS.GetReferenciaDetalle(-1, -1, GVRow.DataKey("CveDispositivo").ToEntero, UsuarioActual.CveCliente) Then
|
||||
DtGeocercas = GPS.DtResultados.FiltraParametros("EsParada = False And Tipo='Geocerca' AND Estatus = 1")
|
||||
End If
|
||||
|
||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||
If DtGeocercas IsNot Nothing Then
|
||||
Dim SbJS As New StringBuilder
|
||||
SbJS.Append("$('#LnkMostarGeocercas').css('display', 'block'); setTimeout(function(){ ")
|
||||
For Each Dr As DataRow In DtGeocercas.Rows
|
||||
Dim CoordsParada = SQLToGmapsJArray(Dr("Coordenadas").ToString, "POLYGON")
|
||||
SbJS.AppendFormat(" creaPoligonoGeocerca({0},'{1}','{2}'); ", CoordsParada.ToString, Dr("Color").ToString, Dr("GeoReferencia").ToString)
|
||||
Next
|
||||
SbJS.Append(" VerGeocercas(); },1000);")
|
||||
RegistraScript(SbJS.ToString)
|
||||
End If
|
||||
Else
|
||||
RegistraScript("$('#LnkMostarGeocercas').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
ElseIf Opcion = "All" Then
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
If GPS.GetPosicionEquipo(GVRow.DataKey("CveDispositivo").ToEntero, FechaI, FechaF) Then
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
@@ -572,7 +575,20 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
RegistraScript($"CreaMarcador({Coord},'{row("NombreVehiculo")}', '{Info}', '{Icono}');", row("CveDispositivo").ToString)
|
||||
AddRowPosiciones(Vehiculo, Coord, row("SPD").ToString.ToDouble, Fecha, row("CveDispositivo").ToString.ToEntero, row("TiempoDetenido").ToString.ToDouble)
|
||||
Next
|
||||
Next
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"No se encontraron resultados")
|
||||
End If
|
||||
@@ -619,15 +635,16 @@ Partial Class GPS_Rastreo
|
||||
Next
|
||||
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1)
|
||||
CargaGeocercas(Dispositivos)
|
||||
MostrarGeoCercas()
|
||||
End If
|
||||
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
MostarGeoRutas()
|
||||
MostrarGeoRutas()
|
||||
End If
|
||||
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
MostrarPuntosDeInteres()
|
||||
End If
|
||||
|
||||
RegistraScript("setTimeout(function(){ $('#LnkMostarGeocercas').css('display', 'block'); },1000);")
|
||||
Else
|
||||
Alert($"No se encontraron resultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -702,29 +719,47 @@ Partial Class GPS_Rastreo
|
||||
GPS.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaGeocercas(Dispositivos As String)
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
Dim ObjGPSGeo As New ClsGPS
|
||||
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
||||
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
||||
End If
|
||||
ObjGPSGeo.Dispose()
|
||||
|
||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||
If DtGeocercas IsNot Nothing Then
|
||||
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", "", {"Color", "GeoReferencia", "Coordenadas"})
|
||||
Dim SbJS As New StringBuilder
|
||||
SbJS.Append("$('#LnkMostarGeocercas').css('display', 'block'); setTimeout(function(){ ")
|
||||
For Each Dr As DataRow In DtParadasDispositivo.Rows
|
||||
SbJS.AppendFormat(" creaPoligonoGeocerca({0},'{1}','{2}'); ", SQLToGmapsJArray(Dr("Coordenadas").ToString, "POLYGON"), Dr("Color").ToString, Dr("GeoReferencia").ToString)
|
||||
Next
|
||||
SbJS.Append(" VerGeocercas(); },1000);")
|
||||
RegistraScript(SbJS.ToString)
|
||||
End If
|
||||
Try
|
||||
Dim DtGeocercas As DataTable = Nothing
|
||||
|
||||
Dim ObjGPSGeo As New ClsGPS
|
||||
If ObjGPSGeo.GetReferenciaDetalle(-1, -1, -1, UsuarioActual.CveCliente) Then
|
||||
DtGeocercas = ObjGPSGeo.DtResultados.FiltraParametros("EsParada = False AND Tipo='Geocerca' AND Estatus = 1")
|
||||
End If
|
||||
ObjGPSGeo.Dispose()
|
||||
|
||||
'SI TIENE GEOREFERENCIAS LAS MOSTRAMOS
|
||||
If DtGeocercas IsNot Nothing Then
|
||||
Dim DtParadasDispositivo = DtGeocercas.FiltraParametros($"CveDispositivo IN({Dispositivos})", DistinctColumns:={"GeoReferencia", "Coordenadas", "Color"})
|
||||
|
||||
GvGeoCercas.DataSource = DtParadasDispositivo
|
||||
GvGeoCercas.DataBind()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||
End Try
|
||||
UpGeoCercas.Update()
|
||||
End Sub
|
||||
Private Sub MostarGeoRutas()
|
||||
Private Sub MostrarGeoCercas()
|
||||
Dim count = 0
|
||||
RegistraScript($"initGeoRutas();", count.ToString())
|
||||
Try
|
||||
RegistraScript($"NuevaConsultaGeoCercas();", count.ToString())
|
||||
For Each GvRow As GridViewRow In GvGeoCercas.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkGeo").Checked Then
|
||||
count += 1
|
||||
RegistraScript(String.Format("creaPoligonoGeocerca({0},'{1}','{2}'); ", SQLToGmapsJArray(GvRow.DataKey("Coordenadas"), "POLYGON"), GvRow.DataKey("Color"), GvRow.DataKey("GeoReferencia")), count.ToString())
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
RegistraScript("VerGeocercas();", (count + 1).ToString())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las geocercas", ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub MostrarGeoRutas()
|
||||
Dim count = 0
|
||||
RegistraScript($"NuevaConsultaGeoRutas();", count.ToString())
|
||||
|
||||
For Each GvRow As GridViewRow In GvGeorutas.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
@@ -736,6 +771,20 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MostrarPuntosDeInteres()
|
||||
RegistraScript($"NuevaConsultaPI();", "0")
|
||||
|
||||
For Each GvRow As GridViewRow In GVPuntosInteres.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkPI").Checked Then
|
||||
Dim coords = SQLToGmaps(GvRow.DataKey("Punto"), "POINT")
|
||||
RegistraScript($"CreaMarcadorPI({coords}, '{GvRow.DataKey("PuntoDeInteres").ToString}')", GvRow.RowIndex.ToString())
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -778,7 +827,6 @@ Partial Class GPS_Rastreo
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If chkTrazarLinea.Checked Then
|
||||
TrazarLineaContinuo = True
|
||||
CreaDTCoordenadas()
|
||||
@@ -1144,10 +1192,18 @@ Partial Class GPS_Rastreo
|
||||
|
||||
Protected Sub CargaOpcion(opcion As String)
|
||||
TimmerRefresh.Enabled = False
|
||||
HdnOpcion.Value = opcion
|
||||
HdnOpcion.Value = opcion
|
||||
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
|
||||
chkTrazarLinea.Checked = False
|
||||
ChkTrazarGeocercas.Checked = False
|
||||
ChkTrazarGeorutas.Checked = False
|
||||
ChkTrazarPuntosInteres.Checked = False
|
||||
|
||||
chkTrazarLinea.Visible = False
|
||||
ChkTrazarGeocercas.Visible = False
|
||||
DvPaginacion.Visible = False
|
||||
rowImpresionesKM.Visible = False
|
||||
If opcion = "All" Then
|
||||
@@ -1158,6 +1214,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
ChkTrazarGeocercas.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1172,6 +1229,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1184,6 +1242,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 AND LimiteVelocidad = 1")
|
||||
@@ -1201,6 +1260,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = True
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
@@ -1214,6 +1274,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "GrpFechas"
|
||||
@@ -1223,8 +1284,9 @@ Partial Class GPS_Rastreo
|
||||
dvFechas.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
@@ -1236,23 +1298,13 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = True
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvTrazoPI.Visible = True
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
||||
chkTrazarLinea.Visible = True
|
||||
ChkTrazarGeocercas.Visible = True
|
||||
ElseIf opcion = "Watch" Then
|
||||
dvFechas.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
dvTrazo.Visible = True
|
||||
dvTrazoGeo.Visible = True
|
||||
dvTrazoRutas.Visible = True
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
myModalLabel2.InnerHtml = "Rastreo Continuo"
|
||||
ElseIf opcion = "KM" Then
|
||||
dvFechas.Visible = True
|
||||
dvDispositivos.Visible = False
|
||||
@@ -1260,6 +1312,7 @@ Partial Class GPS_Rastreo
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
dvEventos.Visible = False
|
||||
BtnRastrear.ValidationGroup = "xx"
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
@@ -1267,7 +1320,11 @@ Partial Class GPS_Rastreo
|
||||
ElseIf opcion = "TPS" Then
|
||||
dvFechas.Visible = False
|
||||
dvDispositivos.Visible = True
|
||||
dvMinutos.Visible = False
|
||||
dvMinutos.Visible = False
|
||||
dvTrazo.Visible = False
|
||||
dvTrazoGeo.Visible = False
|
||||
dvTrazoRutas.Visible = False
|
||||
dvTrazoPI.Visible = False
|
||||
DivFechasGVBarra.Visible = False
|
||||
GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("CveModelo = 17")
|
||||
GvDispositivos.DataBind()
|
||||
@@ -1275,24 +1332,35 @@ Partial Class GPS_Rastreo
|
||||
dvEventos.Visible = False
|
||||
RegistraScript("$('#dvConsulta').modal();TerminaDibujado();")
|
||||
myModalLabel2.InnerHtml = "Contador de pasajeros"
|
||||
End If
|
||||
|
||||
If Not dvTrazoGeo.Visible Then
|
||||
RegistraScript("$('#LnkMostarGeocercas').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If dvTrazoRutas.Visible Then
|
||||
CargaGeoRutas()
|
||||
Else
|
||||
RegistraScript("$('#LnkMostarGeoRutas').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If dvTrazoPI.Visible Then
|
||||
CargaPI()
|
||||
Else
|
||||
RegistraScript("$('#LnkMostarPI').css('display', 'none');")
|
||||
End If
|
||||
|
||||
If opcion <> "Speed" AndAlso opcion <> "TPS" AndAlso Filtrado Then
|
||||
CargaDispositivos()
|
||||
Filtrado = False
|
||||
End If
|
||||
|
||||
RegistraScript("$(""#h"").modal('hide');
|
||||
$(""#ShowDiv3"").css(""line-height"", ""20px"");
|
||||
open = false;
|
||||
$(""#ShowDiv3"").html('<i class=""fa fa-angle-up"" aria-hidden=""True""></i>');", "HideDiv")
|
||||
RegistraScript("$(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', false);$('#C_GvDispositivos_chkSelectAll').click(function () { $(""input[name^='ctl00$C$GvDispositivos']"").not(this).prop('checked', this.checked); });", "chkGV")
|
||||
|
||||
|
||||
|
||||
UPConsulta.Update()
|
||||
End Sub
|
||||
|
||||
@@ -2158,12 +2226,39 @@ Partial Class GPS_Rastreo
|
||||
End Using
|
||||
Return retorno
|
||||
End Function
|
||||
#Region "G E O R U T A S"
|
||||
#Region "G E O R E F E R E N C I A S"
|
||||
Protected Sub ChkTrazarGeocercas_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkTrazarGeocercas.Checked Then
|
||||
Dim CountEquipos As Integer = 0
|
||||
Dim Equipos As New StringBuilder()
|
||||
For Each row As GridViewRow In GvDispositivos.Rows
|
||||
If row.FCCheckBox("chkDis").Checked Then
|
||||
CountEquipos += 1
|
||||
Equipos.Append($"{row.DataKey("CveDispositivo")};")
|
||||
End If
|
||||
Next
|
||||
|
||||
If CountEquipos > 0 Then
|
||||
Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1).ToString()
|
||||
CargaGeocercas(Dispositivos)
|
||||
|
||||
RegistraScript("$('#DivGeoCercas').modal('show');")
|
||||
Else
|
||||
Alert("No hay equipos seleccionados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ChkTrazarGeorutas_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkTrazarGeorutas.Checked Then
|
||||
RegistraScript("$('#DivGeoRutas').modal('show');")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ChkTrazarPI_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkTrazarPuntosInteres.Checked Then
|
||||
RegistraScript("$('#DivMostrarPI').modal('show');")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGeoRutas()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
@@ -2175,6 +2270,49 @@ Partial Class GPS_Rastreo
|
||||
|
||||
UpGeorutas.Update()
|
||||
End Sub
|
||||
Private Sub CargaPI()
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
|
||||
GVPuntosInteres.DataSource = ObjGPS.DtResultados
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
GVPuntosInteres.DataBind()
|
||||
|
||||
UpMostarPI.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvGrupos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvGrupos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Attributes.Add("onClick", $"CargaDatosSeleccionadosPI({e.Row.RowIndex}, '{e.Row.DBCampo("CvePuntoDeInteresGrupo").ToString}');")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarPunto_Click(sender As Object, e As EventArgs) Handles BtnAgregarPunto.Click
|
||||
Dim HuboError = False
|
||||
Dim ObjGPS As New ClsGPS
|
||||
ObjGPS.IniciaTransacSQL()
|
||||
Try
|
||||
Dim GEOM As String = $"POINT{GeoCerca.Value}"
|
||||
If Not ObjGPS.PuntoDeInteresAdd(TxtNombrePI.Text, UsuarioActual.CveCliente, GEOM, True, TxtDescripcion.Text, HdnGrupo.Value.ToEntero) Then
|
||||
HuboError = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
HuboError = True
|
||||
OnError("Ocurrió un error al agregar el punto de interés", ex)
|
||||
End Try
|
||||
|
||||
If HuboError Then
|
||||
ObjGPS.RollBack()
|
||||
Else
|
||||
ObjGPS.Commit()
|
||||
TxtDescripcion.Text = ""
|
||||
TxtNombre.Text = ""
|
||||
Alert("El punto de interés se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||
|
||||
RegistraScript("$('#DivAgregarPuntoInteres').modal('hide');DeleteMarkersG();", "1")
|
||||
End If
|
||||
|
||||
UpAgregarPuntoInteres.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -4,7 +4,7 @@ var polylinesGeoRutas = [];
|
||||
var polybounds = [];
|
||||
|
||||
function initGeoRutas() {
|
||||
NuevaConsultaGeoRutas();
|
||||
//NuevaConsultaGeoRutas();
|
||||
var upRutasDiv = document.createElement('div');
|
||||
var upRutas = new ControlGeoRutas(upRutasDiv, map);
|
||||
|
||||
@@ -65,6 +65,8 @@ function NuevaConsultaGeoRutas() {
|
||||
polylinesGeoRutas = [];
|
||||
polybounds = [];
|
||||
markersRutas = [];
|
||||
|
||||
$("#LnkMostarGeoRutas").css("display", "block");
|
||||
}
|
||||
|
||||
function ControlGeoRutas(controlDiv, map) {
|
||||
@@ -98,7 +100,7 @@ function ControlGeoRutas(controlDiv, map) {
|
||||
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||
ControlSub2.style.msUserSelect = 'none;';
|
||||
ControlSub2.style.fontSize = '11px'
|
||||
ControlSub2.style.display = 'block'
|
||||
ControlSub2.style.display = 'none'
|
||||
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
|
||||
ControlSub2.style.padding = '11px'
|
||||
ControlSub2.style.backgroundClip = 'padding-box'
|
||||
@@ -142,4 +144,4 @@ function CargaGeoRutas() {
|
||||
for (var j = 0; j < markersRutas.length; j++) {
|
||||
markersRutas[j].setMap(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
139
GPS/Rastreo/JS/Geocercas.js
Normal file
139
GPS/Rastreo/JS/Geocercas.js
Normal file
@@ -0,0 +1,139 @@
|
||||
//REGION GEOCERCAS
|
||||
var polygonsGeocercas = [];
|
||||
var markersGeo = [];
|
||||
var IsGeoVisibles = false;
|
||||
|
||||
|
||||
function initGeocercas() {
|
||||
//NuevaConsultaGeoCercas();
|
||||
var upGeoDiv = document.createElement('div');
|
||||
var upGeo = new ControlGeocercas(upGeoDiv, map);
|
||||
|
||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upGeoDiv);
|
||||
}
|
||||
|
||||
function NuevaConsultaGeoCercas() {
|
||||
HideGeocercas();
|
||||
DeleteGeocercas();
|
||||
|
||||
$("#LnkMostarGeocercas").css("display", "block");
|
||||
}
|
||||
|
||||
function VerGeocercas() {
|
||||
if (IsGeoVisibles) {
|
||||
HideGeocercas();
|
||||
IsGeoVisibles = false;
|
||||
} else {
|
||||
CargaGeocercas();
|
||||
IsGeoVisibles = true;
|
||||
}
|
||||
}
|
||||
function CargaGeocercas() {
|
||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||
polygonsGeocercas[i].setMap(map);
|
||||
}
|
||||
for (var j = 0; j < markersGeo.length; j++) {
|
||||
markersGeo[j].setMap(map);
|
||||
}
|
||||
}
|
||||
|
||||
function DeleteGeocercas() {
|
||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||
polygonsGeocercas[i].setMap(null);
|
||||
}
|
||||
for (var j = 0; j < markersGeo.length; j++) {
|
||||
markersGeo[j].setMap(null);
|
||||
}
|
||||
polygonsGeocercas = [];
|
||||
markersGeo = [];
|
||||
}
|
||||
function HideGeocercas() {
|
||||
for (var i = 0; i < polygonsGeocercas.length; i++) {
|
||||
polygonsGeocercas[i].setMap(null);
|
||||
}
|
||||
for (var j = 0; j < markersGeo.length; j++) {
|
||||
markersGeo[j].setMap(null);
|
||||
}
|
||||
}
|
||||
function creaPoligonoGeocerca(coords, color, Geocerca) {
|
||||
var polygon = new google.maps.Polygon({
|
||||
paths: coords,
|
||||
strokeColor: color,
|
||||
strokeOpacity: 0.8,
|
||||
strokeWeight: 2,
|
||||
fillColor: color,
|
||||
fillOpacity: 0.35
|
||||
});
|
||||
polygonsGeocercas.push(polygon);
|
||||
CreaMarcadorPoligonoGeocerca(coords, Geocerca);
|
||||
}
|
||||
function CreaMarcadorPoligonoGeocerca(coords, GeoCerca) {
|
||||
var bounds = new google.maps.LatLngBounds();
|
||||
for (i = 0; i < coords.length; i++) {
|
||||
bounds.extend(coords[i]);
|
||||
}
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: bounds.getCenter(),
|
||||
title: GeoCerca
|
||||
});
|
||||
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
content: '<h4><b>' + GeoCerca + '</b></h4>'
|
||||
});
|
||||
|
||||
marker.addListener('click', function () {
|
||||
closeLastOpenedInfoWindow();
|
||||
infowindow.open(map, marker);
|
||||
lastOpenedInfoWindow = infowindow;
|
||||
});
|
||||
|
||||
markersGeo.push(marker);
|
||||
}
|
||||
|
||||
function ControlGeocercas(controlDiv, map) {
|
||||
|
||||
// Set CSS for the control border.
|
||||
var controlUI = document.createElement('div');
|
||||
controlUI.style.marginLeft = '10px';
|
||||
controlUI.style.zIndex = '0';
|
||||
controlUI.style.cursor = 'pointer';
|
||||
// controlUI.style.position = 'absolute';
|
||||
controlUI.style.left = "0px";
|
||||
controlUI.style.width = "150px";
|
||||
controlUI.style.marginTop = "10px"
|
||||
controlUI.style.top = "0px";
|
||||
controlUI.className = 'gmnoprint';
|
||||
|
||||
controlDiv.appendChild(controlUI);
|
||||
|
||||
var ControlSub1 = document.createElement('div')
|
||||
ControlSub1.style.float = 'left';
|
||||
ControlSub1.className = 'gm-style-mtc'
|
||||
controlUI.appendChild(ControlSub1)
|
||||
|
||||
var ControlSub2 = document.createElement('div')
|
||||
ControlSub2.style.direction = 'ltr';
|
||||
ControlSub2.style.overflow = 'hidden';
|
||||
ControlSub2.id = "LnkMostarGeocercas"
|
||||
ControlSub2.style.textAlign = 'center';
|
||||
ControlSub2.style.position = 'relative';
|
||||
ControlSub2.style.color = 'rgb(0,0,0)';
|
||||
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||
ControlSub2.style.msUserSelect = 'none;';
|
||||
ControlSub2.style.fontSize = '11px'
|
||||
ControlSub2.style.display = 'none'
|
||||
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
|
||||
ControlSub2.style.padding = '11px'
|
||||
ControlSub2.style.backgroundClip = 'padding-box'
|
||||
ControlSub2.style.minWidth = '28px'
|
||||
ControlSub2.style.fontWeight = '500'
|
||||
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||
ControlSub2.innerHTML = 'Mostrar Geocercas'
|
||||
ControlSub1.appendChild(ControlSub2)
|
||||
|
||||
ControlSub1.addEventListener('click', function () {
|
||||
VerGeocercas();
|
||||
});
|
||||
}
|
||||
//END REGION
|
||||
108
GPS/Rastreo/JS/PuntosDeInteres.js
Normal file
108
GPS/Rastreo/JS/PuntosDeInteres.js
Normal file
@@ -0,0 +1,108 @@
|
||||
//REGION PUNTOS DE INTERES
|
||||
var markersPI = [];
|
||||
|
||||
function initPI() {
|
||||
//NuevaConsultaPI();
|
||||
var upRutasDiv = document.createElement('div');
|
||||
var upRutas = new ControlPI(upRutasDiv, map);
|
||||
|
||||
map.controls[google.maps.ControlPosition.TOP_LEFT].push(upRutasDiv);
|
||||
}
|
||||
|
||||
function CreaMarcadorPI(coords, nomEquipo) {
|
||||
var marker = new google.maps.Marker({
|
||||
position: coords,
|
||||
title: nomEquipo,
|
||||
map: map
|
||||
});
|
||||
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
content: '<h4><b>' + nomEquipo + '</b></h4>'
|
||||
});
|
||||
|
||||
marker.addListener('click', function () {
|
||||
closeLastOpenedInfoWindow();
|
||||
infowindow.open(map, marker);
|
||||
lastOpenedInfoWindow = infowindow;
|
||||
});
|
||||
|
||||
markersPI.push(marker);
|
||||
}
|
||||
|
||||
function NuevaConsultaPI() {
|
||||
for (var j = 0; j < markersPI.length; j++) {
|
||||
markersPI[j].setMap(null);
|
||||
}
|
||||
markersPI = [];
|
||||
$("#LnkMostarPI").css("display", "block");
|
||||
}
|
||||
|
||||
function ControlPI(controlDiv, map) {
|
||||
|
||||
// Set CSS for the control border.
|
||||
var controlUI = document.createElement('div');
|
||||
controlUI.style.marginLeft = '10px';
|
||||
controlUI.style.zIndex = '0';
|
||||
controlUI.style.cursor = 'pointer';
|
||||
// controlUI.style.position = 'absolute';
|
||||
controlUI.style.left = "0px";
|
||||
controlUI.style.width = "150px";
|
||||
controlUI.style.marginTop = "10px"
|
||||
controlUI.style.top = "0px";
|
||||
controlUI.className = 'gmnoprint';
|
||||
|
||||
controlDiv.appendChild(controlUI);
|
||||
|
||||
var ControlSub1 = document.createElement('div')
|
||||
ControlSub1.style.float = 'left';
|
||||
ControlSub1.className = 'gm-style-mtc'
|
||||
controlUI.appendChild(ControlSub1)
|
||||
|
||||
var ControlSub2 = document.createElement('div')
|
||||
ControlSub2.style.direction = 'ltr';
|
||||
ControlSub2.style.overflow = 'hidden';
|
||||
ControlSub2.id = "LnkMostarPI"
|
||||
ControlSub2.style.textAlign = 'center';
|
||||
ControlSub2.style.position = 'relative';
|
||||
ControlSub2.style.color = 'rgb(0,0,0)';
|
||||
ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||
ControlSub2.style.msUserSelect = 'none;';
|
||||
ControlSub2.style.fontSize = '11px'
|
||||
ControlSub2.style.display = 'none'
|
||||
ControlSub2.style.backgroundColor = 'rgb(255,255,255)'
|
||||
ControlSub2.style.padding = '11px'
|
||||
ControlSub2.style.backgroundClip = 'padding-box'
|
||||
ControlSub2.style.minWidth = '28px'
|
||||
ControlSub2.style.fontWeight = '500'
|
||||
ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)';
|
||||
ControlSub2.innerHTML = 'Mostrar Puntos de Interés'
|
||||
ControlSub1.appendChild(ControlSub2)
|
||||
|
||||
ControlSub1.addEventListener('click', function () {
|
||||
VerPI();
|
||||
});
|
||||
}
|
||||
|
||||
var IsPIVisible = false;
|
||||
|
||||
function VerPI() {
|
||||
if (IsPIVisible) {
|
||||
HidePI();
|
||||
IsPIVisible = false;
|
||||
} else {
|
||||
CargaPI();
|
||||
IsPIVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
function HidePI() {
|
||||
for (var j = 0; j < markersPI.length; j++) {
|
||||
markersPI[j].setMap(null);
|
||||
}
|
||||
}
|
||||
|
||||
function CargaPI() {
|
||||
for (var i = 0; i < markersPI.length; i++) {
|
||||
markersPI[i].setMap(map);
|
||||
}
|
||||
}
|
||||
@@ -584,10 +584,12 @@
|
||||
function ValidarCantidad(i) {
|
||||
var Cant = $("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val();
|
||||
var CantDisp = $("#C_Tab_TabLiberacion_GvMLiberacion_LblCantidad_" + i).text();
|
||||
if (Cant > CantDisp) {
|
||||
|
||||
if (parseFloat(Cant) > parseFloat(CantDisp)) {
|
||||
$("#C_Tab_TabLiberacion_GvMLiberacion_TxtCantidad_" + i).val(formato_numero(CantDisp, 2, '.', ','));
|
||||
}
|
||||
}
|
||||
|
||||
function formato_numero(numero, decimales, separador_decimal, separador_miles) {
|
||||
numero = parseFloat(numero);
|
||||
if (isNaN(numero)) {
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<asp:UpdatePanel ID="UpNuevoRealizar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -930,6 +930,24 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not ErrorMovInv Then
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUM("Total").ToDecimal
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -993,7 +1011,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ErrorExistencia Then
|
||||
CargaGvDatos()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -1577,6 +1595,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Folio = 0
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim TextoError = ""
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
|
||||
'' verifica que no se halla recibido previamente, si ya se recibió da salida
|
||||
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
|
||||
@@ -1648,7 +1667,23 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUM("Total").ToDecimal
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -1777,6 +1812,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Alert(TextoError, TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjInventario.Dispose()
|
||||
ObjConta.Dispose()
|
||||
CargaRecepcion()
|
||||
Else
|
||||
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -591,7 +591,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="Nombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
||||
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="CodigoNombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
||||
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
|
||||
@@ -9197,12 +9197,17 @@ Partial Class Clientes
|
||||
AgregarProductoServicio(1, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Clientes/Usados", SubTotal, 0, -1, "", DdlSubProyecto.SelectedValue.ToEntero,
|
||||
DdlSubProyecto.SelectedItem.Text, PorcentajeIVA:=PorcentajeIVA)
|
||||
|
||||
Dim Folio As Integer = 0
|
||||
Dim Folio As Integer = -1
|
||||
Dim Serie As String = ""
|
||||
|
||||
If FolioNotaCredito(Tipo) Then
|
||||
Folio = FolioNotaAcumulador
|
||||
Serie = SerieNotaAcumulador
|
||||
'If FolioNotaCredito(Tipo) Then
|
||||
' Folio = FolioNotaAcumulador
|
||||
' Serie = SerieNotaAcumulador
|
||||
'End If
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
ObjFactura = Nothing
|
||||
End If
|
||||
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Generar NC" Visible="false" >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false"></asp:CheckBox>
|
||||
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="300px">
|
||||
@@ -501,7 +501,7 @@
|
||||
var Ventas = '';
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
debugger;
|
||||
|
||||
var chkPesosBancos = $get("ChkPagarPesos");
|
||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
}
|
||||
|
||||
function SumaValores(pagoMultiple, monedaPago) {
|
||||
debugger;
|
||||
|
||||
var Importe = 0;
|
||||
var Comision = 0.00;
|
||||
var topLevelElem = document.getElementById("form1");
|
||||
@@ -614,8 +614,6 @@
|
||||
}
|
||||
|
||||
function FnCambia(chk, txt, saldo, op, pagoMultiple, monedaPago) {
|
||||
debugger;
|
||||
|
||||
if (op == 1) {
|
||||
if (txt.value != '') {
|
||||
chk.checked = true;
|
||||
@@ -650,9 +648,20 @@
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaConversion, 2) + ' MXN';
|
||||
}
|
||||
}
|
||||
function FnSeleccionaNC(chk, chkNC)
|
||||
{
|
||||
if (chk.checked) {
|
||||
chkNC.disabled = false;
|
||||
chkNC.click();
|
||||
} else {
|
||||
chkNC.disabled = true;
|
||||
if (chkNC.checked) {
|
||||
chkNC.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function FnLimites(chk, txt, limiteInferior, limiteSuperior) {
|
||||
debugger;
|
||||
if (ToDouble(txt.value) < limiteInferior) {
|
||||
txt.value = limiteInferior;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
@@ -674,11 +683,8 @@
|
||||
}
|
||||
|
||||
function CambiaPesosDolares() {
|
||||
debugger;
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
|
||||
debugger;
|
||||
if ($("#LbImporteME").length) {
|
||||
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' USD';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTC').value), 2);
|
||||
@@ -691,12 +697,12 @@
|
||||
}
|
||||
|
||||
function CambiaDolaresPesos() {
|
||||
debugger;
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
|
||||
|
||||
debugger;
|
||||
|
||||
if ($("#LbImporteMN").length) {
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTCDolares').value), 2);
|
||||
@@ -743,7 +749,7 @@
|
||||
|
||||
for (var i = 0; i < textBoxes.length; i++) {
|
||||
if (textBoxes[i].type == "checkbox") {
|
||||
debugger;
|
||||
|
||||
|
||||
if (textBoxes[i].id == "ChkAll") {
|
||||
check = !textBoxes[i].checked;
|
||||
|
||||
@@ -615,9 +615,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
||||
|
||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
||||
Else
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
||||
End If
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||
If e.Row.DBCampo("TipoDocto") = "Rem" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión
|
||||
@@ -1585,11 +1588,13 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If MsgError = "" Then
|
||||
Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaFacturasGenerarNC)
|
||||
If Resp.CveVenta > 0 Then
|
||||
NCGeneradas.Add(Resp)
|
||||
Else
|
||||
MsgError = "No se pudo generar la nota de credito"
|
||||
If ListaFacturasGenerarNC.Count > 0 Then
|
||||
Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaFacturasGenerarNC)
|
||||
If Resp.CveVenta > 0 Then
|
||||
NCGeneradas.Add(Resp)
|
||||
Else
|
||||
MsgError = "No se pudo generar la nota de credito"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1911,7 +1916,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
|
||||
ObjFacturaDevolucion.GenerarPDFFactura = True
|
||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Trasac:=Trasac, ObjContPaqTransac:=ObjConta)
|
||||
Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=Trasac, ObjContPaqTransac:=ObjConta)
|
||||
Return Resp
|
||||
|
||||
End Function
|
||||
|
||||
@@ -2333,7 +2333,6 @@
|
||||
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCPCliente" CssClass="form-control " runat="server" MaxLength="5" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="TxtCPCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCPCliente.ClientID.ToString()%>">Código Postal:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
@@ -2354,7 +2353,6 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTelefonoCliente" runat="server" ControlToValidate="TxtTelefonoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2385,8 +2383,6 @@
|
||||
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtCorreoCliente" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxtCorreoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -5323,7 +5323,7 @@ Partial Class PV
|
||||
|
||||
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
|
||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||
'TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero
|
||||
Else
|
||||
Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia)
|
||||
'cuando no está registrada, no da ajuste
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<asp:BoundField HeaderText="Utilidad" DataField="Utilidad" DataFormatString="{0:N2}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Comisión $" DataField="ComisionGanancia" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Importe Cobrado" DataField="Cobrado" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Comisión Cobrada $" DataField="ComisionCobrada" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Pendiente x Cobrar" DataField="Pendiente" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total al Dia" DataField="PendienteXDia" ItemStyle-Width="15%" DataFormatString="{0:###,###,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
@@ -191,11 +192,12 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpPorcentajeComisiones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<%-- <div class="row">
|
||||
<label class="col-md-2 truncate">Vendedor:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlVendedorPorcentaje" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DdlVendedorPorcentaje_SelectedIndexChanged" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="select2me" Width="100%">
|
||||
<asp:DropDownList ID="DdlVendedorPorcentaje" AutoPostBack="true" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="DdlVendedorPorcentaje_SelectedIndexChanged" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="-2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentajeVendedor" runat="server" ControlToValidate="DdlVendedorPorcentaje" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpPorcentajeComision"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeVendedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
@@ -208,11 +210,11 @@
|
||||
<asp:RequiredFieldValidator ID="RFVPorcentajeComision" runat="server" ControlToValidate="TxtPorcentajeComision" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario. Por favor seleccione uno." InitialValue="" ValidationGroup="GrpPorcentajeComision"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeComision" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeComision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Mes:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList ID="DdlMes" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlMes_SelectedIndexChanged" CssClass="select2me" Width="100%">
|
||||
<asp:DropDownList ID="DdlMes" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
|
||||
@@ -24,8 +24,8 @@ Partial Class Ventas_RepComisiones
|
||||
|
||||
Private Sub InicializaValores()
|
||||
txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
TxtAnio.Text = Now.Year.ToString()
|
||||
DdlMes.SelectedValueExist(Now.Month)
|
||||
|
||||
@@ -35,8 +35,8 @@ Partial Class Ventas_RepComisiones
|
||||
DdlVendedorAjuste.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedorAjuste.DataBind()
|
||||
|
||||
DdlVendedorPorcentaje.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedorPorcentaje.DataBind()
|
||||
'DdlVendedorPorcentaje.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
'DdlVendedorPorcentaje.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -205,65 +205,59 @@ Partial Class Ventas_RepComisiones
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnGuardarPorcentajeComision_Click(sender As Object, e As EventArgs)
|
||||
Dim CveVendedor As Integer = DdlVendedorPorcentaje.SelectedValue.ToEntero()
|
||||
Dim Mes As Integer = DdlMes.SelectedValue.ToEntero()
|
||||
Dim Anio As Integer = TxtAnio.Text.ToEntero()
|
||||
|
||||
Dim Porcentaje As Decimal = TxtPorcentajeComision.Text.ToDecimal() / 100
|
||||
|
||||
Dim RowCierre As DataRow = Nothing
|
||||
Dim TieneError As Boolean = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Try
|
||||
If ObjVentas.GetCierreComisionVendedor(CveVendedor, Mes, Anio, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
RowCierre = ObjVentas.DtResultados.Rows(0)
|
||||
End If
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
Dim Mes As Integer = DdlMes.SelectedValue.ToEntero()
|
||||
Dim Anio As Integer = TxtAnio.Text.ToEntero()
|
||||
|
||||
If RowCierre IsNot Nothing Then
|
||||
If ObjVentas.UpdateCierreComisionVendedor(CveVendedor, Mes, Anio, Porcentaje) Then
|
||||
Alert("El porcentaje de comisiones se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el porcentaje de comisiones.", TipoMensaje.MsgError)
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If GvRow.DataKey("CveVendedor").ToEntero() > 0 Then
|
||||
Dim Porcentaje As Decimal = GvRow.DataKey("Comision").ToDecimal() / 100
|
||||
|
||||
If ObjVentas.GetCierreComisionVendedor(GvRow.DataKey("CveVendedor").ToEntero(), Mes, Anio, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
RowCierre = ObjVentas.DtResultados.Rows(0)
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If RowCierre IsNot Nothing Then
|
||||
TieneError = Not ObjVentas.UpdateCierreComisionVendedor(GvRow.DataKey("CveVendedor").ToEntero(), Mes, Anio, Porcentaje)
|
||||
Else
|
||||
TieneError = Not ObjVentas.AddCierreComisionVendedor(GvRow.DataKey("CveVendedor").ToEntero(), Mes, Anio, Porcentaje)
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
RowCierre = Nothing
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.AddCierreComisionVendedor(CveVendedor, Mes, Anio, Porcentaje) Then
|
||||
Alert("El porcentaje de comisiones se guardo correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el porcentaje de comisiones.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
OnError("Ocurrió un error al asginar el porcentaje de la comisión", ex)
|
||||
End Try
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
UpPorcentajeComisiones.Update()
|
||||
End Sub
|
||||
Protected Sub DdlVendedorPorcentaje_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPorcentajeComisiones()
|
||||
End Sub
|
||||
Protected Sub DdlMes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPorcentajeComisiones()
|
||||
End Sub
|
||||
Protected Sub CargaPorcentajeComisiones()
|
||||
Dim CveVendedor As Integer = DdlVendedorPorcentaje.SelectedValue.ToEntero()
|
||||
Dim Mes As Integer = DdlMes.SelectedValue.ToEntero()
|
||||
Dim Anio As Integer = TxtAnio.Text.ToEntero()
|
||||
|
||||
Dim RowCierre As DataRow = Nothing
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetCierreComisionVendedor(CveVendedor, Mes, Anio, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
RowCierre = ObjVentas.DtResultados.Rows(0)
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If RowCierre IsNot Nothing Then
|
||||
TxtPorcentajeComision.Text = (RowCierre("PorcentajeComision").ToString().ToDecimal() * 100).FormatoNumero(0)
|
||||
If TieneError Then
|
||||
ObjVentas.RollBack()
|
||||
Alert("Ocurrió un error al guardar el porcentaje de comisiones.", TipoMensaje.MsgError)
|
||||
Else
|
||||
TxtPorcentajeComision.Text = "0"
|
||||
ObjVentas.Commit()
|
||||
Alert("El porcentaje de comisiones se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
UpPorcentajeComisiones.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
<asp:HyperLink ID="HLGanancia" Target="_blank" Text='<%# Eval("ComisionGanancia", "{0:N2}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Porcentaje Pagado %" DataField="PorcentajePagado" DataFormatString="{0:N2}%" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Comision Cobrada %" DataField="PorcentajeComision" DataFormatString="{0:N2}%" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Comision Cobrada" DataField="ComisionCobrada" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--<asp:BoundField HeaderText="Comision Ganancia" DataField="ComisionGanancia" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -1304,7 +1304,7 @@
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCodigosUnicos" runat="server" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePolizaVirtual,SerieLote,IdProductoPolizaVirtual,Total,Descuento,AnioVehiculo,FechaUsado,IdModeloAuto,IdMarcaAuto,IdBCI,TipoServicio,TipoPoliza,TieneUsado" ClientIDMode="Static" EmptyDataText="" GridLines="None">
|
||||
DataKeyNames="CvePolizaVirtual,SerieLote,IdProductoPolizaVirtual,Total,Descuento,AnioVehiculo,FechaUsado,IdModeloAuto,IdMarcaAuto,IdBCI,TipoServicio,TipoPoliza,TieneUsado,IdMarcaUsado" ClientIDMode="Static" EmptyDataText="" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código Único">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -9217,9 +9217,13 @@ Partial Class Ventas
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev") Or DtVentasNC IsNot Nothing Then
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta) Then
|
||||
@@ -17025,7 +17029,19 @@ Partial Class Ventas
|
||||
Dim total As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal
|
||||
|
||||
DtPagos = Nothing
|
||||
InicializaCondicionesPago()
|
||||
|
||||
DtPagos = New DataTable
|
||||
|
||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||
DtPagos.Columns.Add("TipoMovimiento", GetType(String))
|
||||
DtPagos.Columns.Add("CveCuenta", GetType(String))
|
||||
DtPagos.Columns.Add("Cuenta", GetType(String))
|
||||
DtPagos.Columns.Add("Folio", GetType(String))
|
||||
DtPagos.Columns.Add("Importe", GetType(Decimal))
|
||||
DtPagos.Columns.Add("Observaciones", GetType(String))
|
||||
DtPagos.Columns.Add("Tipo", GetType(String))
|
||||
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
|
||||
|
||||
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
|
||||
|
||||
@@ -21164,7 +21180,7 @@ Partial Class Ventas
|
||||
Into x = Group
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString.ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString.ToDecimal),
|
||||
ImporteIVA = x.Sum(Function(s) Math.Round(s("ImporteIVA").ToString.ToDecimal, 2)), ' Math.Round(s("ImporteIVA").ToString.ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString.ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString.ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString.ToDecimal, 2)),' Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString.ToDecimal, 2)),' Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString.ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeIEPS,
|
||||
@@ -21302,6 +21318,7 @@ Partial Class Ventas
|
||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
||||
Dim FiltroStr As String = ""
|
||||
Dim importePuTemp As Decimal = 0
|
||||
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto"))
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr))).ToDecimal
|
||||
@@ -21320,6 +21337,8 @@ Partial Class Ventas
|
||||
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2)
|
||||
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
|
||||
Next
|
||||
|
||||
|
||||
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
|
||||
Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
If Math.Abs(difTmp) >= 0.01 Then
|
||||
@@ -24074,7 +24093,7 @@ Partial Class Ventas
|
||||
If obj.used_product Then
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaUsado").ToString().ToDateTime()
|
||||
|
||||
obj.used_brand = Row.DataKey("IdModelo").ToString().Trim() 'MARCAR DEL USADO
|
||||
obj.used_brand = Row.DataKey("IdMarcaUsado").ToString().Trim() 'MARCAR DEL USADO
|
||||
obj.used_bci = Row.DataKey("IdBCI").ToString().Trim() 'VALOR DEL BCI
|
||||
obj.used_month = FechaUsado.Month
|
||||
obj.used_year = FechaUsado.Year
|
||||
|
||||
Reference in New Issue
Block a user