Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -42,6 +42,9 @@
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnDepreciacion" data-toggle="tooltip" data-placement="left" title="Generar Depreciacion" Text="<i class='fa fa-plus'></i> Generar Depreciacion"></asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
|
||||
@@ -94,7 +97,7 @@
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo, Descripcion, TasaDepreciacion" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -172,7 +175,40 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivDepreciacion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Agregar Depreciacion</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList CssClass="form-control input-sm input-medium select2me" ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="200px" ValidationGroup="GrpGuardar"> </asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProyecto" runat="server" ControlToValidate="DdlProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtSubProyecto">Proyecto:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList CssClass="form-control input-sm input-medium select2me" ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar"> </asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="TxtSubProyecto">Sub Proyecto:</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGenerarDepreciacion" runat="server" class="btn btn-success" Text="Generar Depreciacion" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -22,6 +22,76 @@ Partial Class AF_RepDepreciacion
|
||||
If GvDatos.Rows.Count = 0 Then Alert("No se encontraron Registros con los filtros actuales.", TipoMensaje.MsgAdvertencia)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarDepreciacion_Click(sender As Object, e As System.EventArgs) Handles BtnGenerarDepreciacion.Click
|
||||
|
||||
|
||||
If GvDatos.Rows.Count > 0 Then
|
||||
Dim CveActivoFijo As Integer
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim ConceptoPoliza As String = String.Format("Depreciacion - {0}", txtFechaI.Text)
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
For Each RowsDt As GridViewRow In GvDatos.Rows
|
||||
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
|
||||
If RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDouble > 0 And CveActivoFijo <> 0 Then
|
||||
|
||||
Dim MontoDepreciacion As Double = RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDouble
|
||||
Dim ConceptoPolizaDetalle As String = String.Format("Depreciacion - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, MontoDepreciacion.ToDecimal, ConceptoPolizaDetalle, 101, ConceptoPolizaDetalle, txtFechaI.Text.ToDate, 0, -1, CveActivoFijo:=CveActivoFijo, ImporteMX:=MontoDepreciacion.ToDecimal, ImporteME:=MontoDepreciacion.ToDecimal, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, MontoDepreciacion.ToDecimal, ConceptoPolizaDetalle, 51, ConceptoPolizaDetalle, txtFechaI.Text.ToDate, 0, -1, CveActivoFijo:=CveActivoFijo, ImporteMX:=MontoDepreciacion.ToDecimal, ImporteME:=MontoDepreciacion.ToDecimal, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ErrorMovInv = False Then
|
||||
ObjInventario.Commit()
|
||||
ObjInventario.Dispose()
|
||||
ObjConta.Dispose()
|
||||
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
MensajeAlert.Append("Se ha generado la depreciación")
|
||||
MensajeAlert.AppendFormat("<br/><br/><b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >ver PrePóliza</a></b>", CvePrePoliza)
|
||||
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
ObjInventario.Dispose()
|
||||
ObjConta.Dispose()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debera consultar la informacion previo a la generacion de la depreciación", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDepreciacion_Click(sender As Object, e As EventArgs) Handles BtnDepreciacion.Click
|
||||
CargaProyecto()
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivDepreciacion"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargaSubProyecto()
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF
|
||||
@@ -50,6 +120,19 @@ Partial Class AF_RepDepreciacion
|
||||
#End Region
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaProyecto()
|
||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", "", {"CveProyecto", "Proyecto"})
|
||||
DdlProyecto.DataBind()
|
||||
CargaSubProyecto()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "DDLS SELECTED INDEX CHANGED"
|
||||
|
||||
@@ -385,12 +385,13 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow-y: auto; height: 400px; width: 1200px;" runat="server">
|
||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
||||
DataKeyNames="Consecutivo,CodigoCliente,CodigoProducto,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consecutivo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoProducto" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoEnsamble" HeaderText="Código Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
@@ -408,9 +409,13 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
|
||||
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnGenerarTxt" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -255,4 +255,54 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
Protected Sub BtnGenerarTxt_Click(sender As Object, e As EventArgs)
|
||||
Dim SbTxt As New StringBuilder
|
||||
|
||||
For Each GvRow As GridViewRow In GvGarantiasDetalle.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
'1.- Consecutivo Partida-->1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Consecutivo"))
|
||||
'2.- Cliente-->100407
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoCliente"))
|
||||
'3. Codigo De Articulo --> 171402
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoProducto"))
|
||||
'4. Tipo De Uso --> A
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoUso"))
|
||||
'5. Defecto --> P
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoTipoDefecto"))
|
||||
'6. Codigo De Ensamble --> 1X
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoEnsamble"))
|
||||
'7. Codigo De Linea/Termico --> 9000
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoLinea"))
|
||||
'8. Codigo De Inspeccion --> J8K
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("CodigoInspeccion"))
|
||||
'9. Fecha De Venta --> 05/09/2009
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaVenta").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
'10. Fecha De Reclamacion --> 05/07/2010
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("FechaReclamacion").ToDateTime().ToString("dd/MM/yyyy"))
|
||||
'11. TipoComprobante --> 1
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("TipoComprobante"))
|
||||
'12. Comprobante --> N/A
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comprobante"))
|
||||
'13. Autorizo --> STAN7490
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Autorizo"))
|
||||
'14. Comentarios --> Cliente 100407
|
||||
SbTxt.AppendFormat("{0}@", GvRow.DataKey("Comentarios"))
|
||||
'15. Clave De Autorizacion / Codigo Error --> P05TRBGX
|
||||
SbTxt.AppendFormat("{0}", GvRow.DataKey("ClaveAutorizacion"))
|
||||
|
||||
SbTxt.Append(vbCrLf)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim text As String = SbTxt.ToString
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.AddHeader("Content-Length", text.Length.ToString)
|
||||
Response.ContentType = "text/plain"
|
||||
Response.AppendHeader("content-disposition", $"attachment;filename=""{LblFolio.Text}.txt""")
|
||||
Response.Write(text)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -365,6 +365,11 @@ Public Class CFDINominaOtrosPagos
|
||||
Public Property Concepto As String
|
||||
Public Property Importe As Decimal
|
||||
Public Property Subsidiocausado As Decimal
|
||||
Public Property RemanenteSalFav As Decimal
|
||||
Public Property ejercicio As Integer
|
||||
Public Property SaldoAFavor As Integer
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1437,7 +1437,7 @@ Public Class ClsMovimientos
|
||||
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
||||
Optional EsDistribuidor As Integer = -1) As Boolean
|
||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepRecuperacion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1460,7 +1460,10 @@ Public Class ClsMovimientos
|
||||
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
|
||||
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
|
||||
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -36,6 +36,8 @@ Public Class ClsPaginas
|
||||
|
||||
Public Shared Property EmpresaNotificaciones() As Empresa
|
||||
|
||||
Public Shared Property EmpresaNotificacionesGPS() As Empresa
|
||||
|
||||
|
||||
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
|
||||
@@ -221,7 +221,7 @@ Public Class ClsSisNotificaciones
|
||||
Try
|
||||
Dim ResultadoMail As Integer = 0
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then
|
||||
If ObjMail.SendMail(ClsPaginas.EmpresaNotificacionesGPS, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then
|
||||
ObjNotificacion.UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -4202,13 +4202,14 @@ Public Class ClsVentas
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer, CvePrePoliza As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
|
||||
.Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -145,8 +145,17 @@ Public Class LogicNominas
|
||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
DtPercepciones = objNomina.DtResultados.FiltraParametros("Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0")
|
||||
DtDeducciones = objNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0")
|
||||
DtDeducciones = objNomina.DtResultados.FiltraParametros("Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL)")
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
Dim disrcomp As DataRow = DtOtrosPagos.FiltroPrimero("Codigo ='D999'")
|
||||
For Each drow As DataRow In DtDeducciones.Rows
|
||||
If drow("Codigo").ToString() = "D038" Then
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
|
||||
TotalDeducciones = DtDeducciones.SUM("Importe").ToString().ToDecimal()
|
||||
Total = CType((Total + DtPercepciones.SUM("Importe")), Decimal)
|
||||
@@ -230,7 +239,7 @@ Public Class LogicNominas
|
||||
.ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()})
|
||||
End If
|
||||
'RMF, falta poner el numero de horas pagadas
|
||||
If Row("CveSATConcepto").ToString().ToEntero() = 19 AndAlso DtHorasExtras IsNot Nothing Then 'cuando son horas extras
|
||||
If Row("SATCveConcepto").ToString().ToEntero() = 19 AndAlso DtHorasExtras IsNot Nothing Then 'cuando son horas extras
|
||||
'Obtengo el desglose de horas extras
|
||||
Dim dr As DataRow = DtHorasExtras.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
@@ -256,7 +265,7 @@ Public Class LogicNominas
|
||||
|
||||
ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
.ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()})
|
||||
ElseIf Row("Importe").ToString().ToDecimal() < 0 AndAlso Row("Concepto").ToString() = "Ajuste al neto" Then
|
||||
ElseIf Row("Importe").ToString().ToDecimal() < 0 AndAlso Row("Concepto").ToString() = "Ajuste al neto" Then ' corregir
|
||||
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "999", .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
.Importe = Row("Importe").ToString().ToDecimal() * -1})
|
||||
Else
|
||||
@@ -279,12 +288,14 @@ Public Class LogicNominas
|
||||
|
||||
If DtOtrosPagos IsNot Nothing AndAlso DtOtrosPagos.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DtOtrosPagos.Rows
|
||||
If (Row("Importe").ToString().ToDecimal() > 0) OrElse (Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 2 AndAlso Row("Importe").ToString().ToDecimal() < 0) Then
|
||||
If (Row("Importe").ToString().ToDecimal() > 0) OrElse
|
||||
(Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 2 AndAlso (CveRegimenContratacion.ToEntero() = 2 OrElse Row("Importe").ToString().ToDecimal() <> 0)) OrElse
|
||||
(Row("SATCveConcepto").ToString().ToEntero().ToEntero().Contiene(2, 4) AndAlso Row("Importe").ToString().ToDecimal() < 0) Then
|
||||
|
||||
If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For
|
||||
|
||||
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
.Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteGravado").ToString().ToDecimal().Abs()})
|
||||
Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
.Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteGravado").ToString().ToDecimal().Abs()}
|
||||
ObjOtrosPagos.Add(otrp)
|
||||
|
||||
|
||||
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 7 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
|
||||
|
||||
@@ -2652,7 +2652,7 @@ Namespace Modelos
|
||||
Case 11 'Anticipo
|
||||
|
||||
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
|
||||
If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then
|
||||
If CveEstatusRefacturacion > 0 Then
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
@@ -4458,6 +4458,10 @@ Namespace Modelos
|
||||
|
||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||
|
||||
If Not EsRefacturacion Then
|
||||
CveEstatusRefacturacion = 0
|
||||
End If
|
||||
|
||||
Dim CancelacionFecha As Date
|
||||
Dim FolioFiscal As String = ObjFactura.FolioFiscal
|
||||
Dim CancelacionAcuse As String = ""
|
||||
@@ -4485,7 +4489,7 @@ Namespace Modelos
|
||||
|
||||
If CveEstatusFacturaAsignado <= 0 Then
|
||||
Try
|
||||
If ObjFactura.FolioFiscal <> "" Then
|
||||
If ObjFactura.FolioFiscal <> "" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||
|
||||
'VERIFICA SI DEBE VALIDAR ANTE EL SAT
|
||||
|
||||
@@ -1987,7 +1987,7 @@ Public Class Timbrado
|
||||
'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd")
|
||||
cfdi.Nomina12(ObjCFDITimbre.Nomina.TipoNomina, ObjCFDITimbre.Nomina.FechaPago.ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaInicio.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaFin.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.NumDiasPagados, If(ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0, ObjCFDITimbre.Nomina.TotalPercepciones, 0), If(ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0, ObjCFDITimbre.Nomina.TotalDeducciones, 0), If(ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0, ObjCFDITimbre.Nomina.TotalOtrosPagos, 0))
|
||||
|
||||
cfdi.Nomina12Emisor(ObjCFDITimbre.Emisor.CURP, If(ObjCFDITimbre.Nomina.Receptor.TipoContrato = "99", "", ObjCFDITimbre.Emisor.RegistroPatronal), ObjCFDITimbre.Emisor.RFC)
|
||||
cfdi.Nomina12Emisor(ObjCFDITimbre.Emisor.CURP, If(ObjCFDITimbre.Nomina.Receptor.TipoContrato.Contiene("09", "10", "99"), "", ObjCFDITimbre.Emisor.RegistroPatronal), ObjCFDITimbre.Emisor.RFC)
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then cfdi.Nomina12EntidadSNCF("IF", 90)
|
||||
|
||||
@@ -2029,6 +2029,11 @@ Public Class Timbrado
|
||||
Next
|
||||
End If
|
||||
|
||||
If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then
|
||||
For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras
|
||||
cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado)
|
||||
Next
|
||||
End If
|
||||
'deducciones al final
|
||||
If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then
|
||||
cfdi.Nomina12Deducciones(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2))
|
||||
@@ -2037,11 +2042,6 @@ Public Class Timbrado
|
||||
Next
|
||||
End If
|
||||
|
||||
If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then
|
||||
For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras
|
||||
cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado)
|
||||
Next
|
||||
End If
|
||||
|
||||
If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then
|
||||
For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades
|
||||
@@ -2059,6 +2059,12 @@ Public Class Timbrado
|
||||
cfdi.Nomina12SubsidioAlEmpleo(otpag.Subsidiocausado)
|
||||
End If
|
||||
|
||||
If otpag.TipoOtroPago = "004" AndAlso otpag.Importe > 0 Then
|
||||
If otpag.ejercicio > 0 Then
|
||||
cfdi.CompensacionSaldosAFavor(otpag.Importe, otpag.ejercicio, otpag.RemanenteSalFav) 'otpag.SaldoAFavor
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1162,7 +1162,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="align-items: center; vertical-align: middle;">
|
||||
<label class="col-md-4" style="max-width: 155px;">Fecha de Cancelación:</label>
|
||||
<label class="col-md-3" style="max-width: 155px;">Fecha de Cancelación:</label>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date date-picker" data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaCancelacion" runat="server" CssClass="form-control input-sm" Width="80px" CausesValidation="true" MaxLength="10" ValidationGroup="GrpCancelarIE"></asp:TextBox>
|
||||
@@ -1178,15 +1178,15 @@
|
||||
<asp:CompareValidator ID="CVFechaCancelacionMin" runat="server" ControlToCompare="TxtFechaDocumento" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpCancelarIE" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkCancelarNegativo" CssClass="md-checksd2" Text="Falta de fondos" TextAlign="Right" runat="server" Visible="false" />
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:CheckBox ID="ChkGeneraCancelacion" CssClass="md-checksd2" Text="Genera Devolución" TextAlign="Right" runat="server" AutoPostBack="true" OnCheckedChanged="ChkGeneraCancelacion_CheckedChanged" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" id="DVTipoTransacciónCancelar" runat="server" visible ="false">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="DVTipoTransacciónCancelar" runat="server" visible ="false">
|
||||
|
||||
Movimiento:
|
||||
<asp:DropDownList ID="DdlTipoTransaccionCancelacion" CssClass="form-control input-sm select2me" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpCancelarIE">
|
||||
@@ -1195,10 +1195,10 @@
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoTransaccionCancelacion" runat="server" ControlToValidate="DdlTipoTransaccionCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Transaccion''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarIE"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlTipoTransaccionCancelacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoTransaccionCancelacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3048,9 +3048,6 @@ Partial Class Bancos_IE
|
||||
Dim TCDocumento As Decimal = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'BANCOS
|
||||
IdCtaContableAplicar = If(IDCtaContable > 0, IDCtaContable, 0)
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, ReferenciaAplicar, 30, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
|
||||
@@ -3256,7 +3253,7 @@ Partial Class Bancos_IE
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
||||
|
||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||
|
||||
@@ -2132,10 +2132,10 @@ Partial Class Bancos_PopIEVentas
|
||||
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
|
||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia -= (((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia -= (((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia -= (((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= (((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
End If
|
||||
|
||||
|
||||
@@ -231,6 +231,15 @@
|
||||
<asp:Literal ID="LtlTotalIngreso" runat="server" Text='<%# Eval("TotalIngresos", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Devoluciones" runat="server" CausesValidation="false"> </asp:Label>
|
||||
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDevoluciones" runat="server" Text='<%# Eval("Devoluciones", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Total Caja" runat="server" CausesValidation="false"> </asp:Label>
|
||||
|
||||
@@ -2785,7 +2785,7 @@ Partial Class Compras_Compras
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
DdlTipoComprobante.SelectedValue = dr("TipoDocto").ToString
|
||||
If dr("TipoDocto").ToString = "Fac" Then
|
||||
If dr("TipoDocto").ToString.Contiene("Fac", "Ant") Then
|
||||
ChkAplicaNotaCredito.Enabled = True
|
||||
ImgAnticiposPendientes.Visible = True
|
||||
Else
|
||||
@@ -7082,11 +7082,11 @@ Partial Class Compras_Compras
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveCompraRefacturacion > 0 Then
|
||||
importeMovimiento = 0
|
||||
importeMN = 0
|
||||
End If
|
||||
|
||||
'If CveCompraRefacturacion > 0 Then
|
||||
' importeMovimiento = 0
|
||||
' importeMN = 0
|
||||
' End If
|
||||
|
||||
|
||||
Case 59 'Documentos
|
||||
@@ -19628,7 +19628,7 @@ Private Sub CargaNCINV()
|
||||
If DdlFletes.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim Dr As DataRow = Nothing
|
||||
If ObjInventario.GetFletes(UsuarioActual.CveEmpresa, DdlFletes.SelectedValue.ToEntero, OpcionInventario:=1) Then
|
||||
If ObjInventario.GetFletes(UsuarioActual.CveEmpresa, DdlFletes.SelectedValue.ToEntero) Then
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dr = ObjInventario.DtResultados.Rows(0)
|
||||
End If
|
||||
@@ -19877,7 +19877,7 @@ Private Sub CargaNCINV()
|
||||
ObjCompras.Dispose()
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetFletes(UsuarioActual.CveEmpresa) Then
|
||||
If ObjInv.GetFletes(UsuarioActual.CveEmpresa, OpcionInventario:=1) Then
|
||||
DdlFletes.DataSource = ObjInv.DtResultados
|
||||
DdlFletes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
@@ -1327,7 +1327,7 @@ Partial Class PopUpVerFactura
|
||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
|
||||
|
||||
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
|
||||
If CveConcepto.Contiene(2, 3, 26, 27) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
@@ -1361,7 +1361,7 @@ Partial Class PopUpVerFactura
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveMovimientoRelacionado > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
|
||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||
@@ -1393,7 +1393,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
||||
If DtFaltante.Rows.Count > 0 Then
|
||||
|
||||
@@ -980,7 +980,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If CveConcepto = 41 Then
|
||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||
Else
|
||||
If CveConcepto = 30 Then
|
||||
If CveConcepto = 30 AndAlso Importe <> 0 Then
|
||||
'Registra movimieno bancario
|
||||
If CveConcepto = 30 Then
|
||||
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="DsOC">
|
||||
@@ -1297,7 +1297,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>9.91059cm</Top>
|
||||
<Top>9.52211cm</Top>
|
||||
<Left>0.28014cm</Left>
|
||||
<Height>0.05496cm</Height>
|
||||
<Width>20.88652cm</Width>
|
||||
@@ -1345,10 +1345,10 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>10.00082cm</Top>
|
||||
<Left>2.01402cm</Left>
|
||||
<Height>0.51608cm</Height>
|
||||
<Width>19.15264cm</Width>
|
||||
<Top>9.6829cm</Top>
|
||||
<Left>1.10521cm</Left>
|
||||
<Height>0.62233cm</Height>
|
||||
<Width>9.17089cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -3858,6 +3858,50 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
<Textbox Name="Textbox27">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Acepto ajuste </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>12pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>_______________________</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>12pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>9.84123cm</Top>
|
||||
<Left>10.41721cm</Left>
|
||||
<Height>0.64039cm</Height>
|
||||
<Width>9.53276cm</Width>
|
||||
<ZIndex>44</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF((Sum(IIF(UCase(Fields!Clasificacion.Value) = "AJUSTE" , 1, 0), "DsOC") > 0),false,true)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>27.70336cm</Height>
|
||||
<Style />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link href="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.css" rel="stylesheet" />
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
@@ -26,6 +27,138 @@
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
#showdiv1 {
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#ShowDiv3:hover {
|
||||
line-height: 34px !important;
|
||||
-webkit-transition: line-height ease 1s;
|
||||
-moz-transition: line-height ease 1s;
|
||||
-o-transition: line-height ease 1s;
|
||||
transition: line-height ease 1s;
|
||||
}
|
||||
|
||||
.ADScroller-body {
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
#iw-container {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#iw-container .iw-title {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
padding: 10px;
|
||||
background-color: #48b5e9;
|
||||
color: white;
|
||||
margin: 0;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
|
||||
#iw-container .iw-content {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
font-weight: 400;
|
||||
margin-right: 1px;
|
||||
padding: 15px 5px 20px 15px;
|
||||
max-height: 140px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.iw-content img {
|
||||
float: right;
|
||||
margin: 0 5px 5px 10px;
|
||||
}
|
||||
|
||||
.iw-subTitle {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.iw-bottom-gradient {
|
||||
position: absolute;
|
||||
width: 326px;
|
||||
height: 25px;
|
||||
bottom: 10px;
|
||||
right: 18px;
|
||||
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, 0, 0);
|
||||
transform: translate3d(-25%, 0, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, 0, 0);
|
||||
transform: translate3d(25%, 0, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom .modal-dialog {
|
||||
-webkit-transform: translate3d(0, 25%, 0);
|
||||
transform: translate3d(0, 25%, 0);
|
||||
}
|
||||
|
||||
/* Alternative Angles */
|
||||
.modal.fade:not(.in).top-left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, -25%, 0);
|
||||
transform: translate3d(-25%, -25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).top-right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, -25%, 0);
|
||||
transform: translate3d(25%, -25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom-left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, 25%, 0);
|
||||
transform: translate3d(-25%, 25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom-right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, 25%, 0);
|
||||
transform: translate3d(25%, 25%, 0);
|
||||
}
|
||||
|
||||
.minicolors {
|
||||
position: relative;
|
||||
MARGIN-TOP: 10PX;
|
||||
WIDTH: 20%;
|
||||
}
|
||||
|
||||
table.dataTable,
|
||||
table.dataTable th,
|
||||
table.dataTable td {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody > .dataTable > thead {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
tr td:nth-child(4) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-horizontal .control-label {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -66,8 +199,11 @@
|
||||
<asp:GridView ID="GvPuntos" runat="server" GridLines="None" DataKeyNames="Punto,PuntoDeInteres,CvePuntoDeInteres" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-height="150" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickGR" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkGR" />
|
||||
<asp:CheckBox runat="server" ID="chkGR" CssClass="ChkAllGR" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="45%" HeaderText="Punto De Interés" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -83,8 +219,11 @@
|
||||
<asp:GridView ID="GvDispositivos" runat="server" GridLines="None" DataKeyNames="CveDispositivo,SerieVehiculo,DevID,NoEconomico,NombreVehiculo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="800" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickDisp" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkDis" />
|
||||
<asp:CheckBox runat="server" ID="chkDis" CssClass="ChkAllDisp" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="25%" HeaderText="Número Económico" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -148,6 +287,43 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal fade bottom in" style="bottom: unset; z-index: 539" id="h">
|
||||
<div class="modal-dialog" style="position: fixed; bottom: 0; margin: 0px,0px,0px,0px; width: 100%; padding: 0px, 0px, 0px, 0px; border-style: solid; border-color: rgb(68, 77, 88); z-index: 539;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" style="padding: 5px;">
|
||||
<asp:UpdatePanel runat="server" ID="UPGV" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="rowImpresiones" class="row" style="margin: 0px 10px 10px 0px; text-align: right;">
|
||||
<a onclick="doScaledCLick('#C_btnImprimir');;" class="btn btn-circle btn-sm grey"><i class='fa fa-print' aria-hidden='true'></i></a>
|
||||
<a onclick="doScaledCLick('#C_BtnImprimirEX');" class="btn btn-circle btn-sm green"><i class='fa fa-file-excel-o' aria-hidden='true'></i></a>
|
||||
</div>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaBarra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaBarra','{0}')", GvBarra.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaBarra','{0}')", GvBarra.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvBarra" runat="server" GridLines="None" PageSize="1000" AllowPaging="true" AllowCustomPaging="true" CssClass="table table-striped table-advance table-hover Widthall" data-sort="true" data-height="150px;" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Vehiculo" ItemStyle-Width="30%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="30%" HeaderText="Punto De Interes" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Visitas" ItemStyle-Width="20%" DataFormatString="{0} Visitas" HeaderText="Visitas" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="UltimaVisita" ItemStyle-Width="20%" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Ultima Visita" ItemStyle-HorizontalAlign="Center" />
|
||||
</Columns>
|
||||
<PagerSettings Mode="NextPrevious" Visible="true" Position="Top" />
|
||||
</asp:GridView>
|
||||
<asp:HiddenField ID="HdnIndexGvBarra" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField ID="HdnTextFilter" runat="server" ClientIDMode="Static" Value="" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" class="row" style="margin: 0px 0px 10px 0px; display: none">
|
||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="btnImprimir" CommandArgument="PDF" ToolTip="Imprimir en PDF" CssClass="btn btn-circle btn-sm grey" Text="<i class='fa fa-print' aria-hidden='true'></i>"></asp:Button>
|
||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="BtnImprimirEX" CommandArgument="EXCEL" ToolTip="Imprimir en EXCEL" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-file-excel-o' aria-hidden='true'></i>"></asp:Button>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
@@ -158,18 +334,36 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
function doScaledCLick(boton) {
|
||||
|
||||
setTimeout(function () {
|
||||
$(boton).click();
|
||||
}, 250);
|
||||
}
|
||||
|
||||
var markers = [];
|
||||
var lastOpenedInfoWindow;
|
||||
var geocoder;
|
||||
var map;
|
||||
var circles = [];
|
||||
|
||||
$('body').on('click', '.ChkAllClickGR input', function () { $(".ChkAllGR input").not(this).prop('checked', $('.ChkAllClickGR input').is(':checked')); });
|
||||
$('body').on('click', '.ChkAllClickDisp input', function () { $(".ChkAllDisp input").not(this).prop('checked', $('.ChkAllClickDisp input').is(':checked')); });
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: { lat: 19.4326, lng: -99.13329 },
|
||||
zoom: 8
|
||||
});
|
||||
|
||||
var ShowDiv1 = document.createElement('div');
|
||||
var ShowDivControl = new ShowDiv(ShowDiv1, map);
|
||||
|
||||
ShowDiv1.index = 1;
|
||||
ShowDiv1.id = "showdiv1"
|
||||
|
||||
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
||||
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(function (position) {
|
||||
var pos = {
|
||||
@@ -201,6 +395,178 @@
|
||||
//service = new google.maps.DistanceMatrixService;
|
||||
// map.addListener('click', addLatLng);
|
||||
}
|
||||
|
||||
//$(document).ready(function () {
|
||||
// GvBarraPaginator();
|
||||
// initMap();
|
||||
// Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
|
||||
// function EndRequestHandler(sender, args) {
|
||||
// $("#C_GvBarra_filter > div > input").on("keypress", function (e) {
|
||||
// HdnTextFilter.value = $(this).val() + String.fromCharCode(e.which);
|
||||
// });
|
||||
// }
|
||||
//});
|
||||
|
||||
function GvBarraPaginator() {
|
||||
$('.table.PaginarGV').each(function () {
|
||||
var Tthis = $(this);
|
||||
if (!$.fn.DataTable.isDataTable(Tthis) && Tthis.find("th").length > 0) {
|
||||
Tthis.prepend(("<thead></thead>"));
|
||||
Tthis.find('thead').append($("#C_GvBarra").find("tr:first"));
|
||||
var table = Tthis.DataTable({
|
||||
//data: datasource,
|
||||
//columns: [
|
||||
// { title: "Vehiculo" },
|
||||
// { title: "Fecha" },
|
||||
// { title: "TiempoDetenido" },
|
||||
// { title: "Extn." },
|
||||
// { title: "Start date" },
|
||||
// { title: "Salary" }
|
||||
//],
|
||||
deferRender: true,
|
||||
deferLoading: 100,
|
||||
scrollY: 130,
|
||||
scrollCollapse: true,
|
||||
scroller: {
|
||||
displayBuffer: 20
|
||||
},
|
||||
ordering: true
|
||||
});
|
||||
var tkeys = new $.fn.dataTable.KeyTable(table, {
|
||||
// options
|
||||
});
|
||||
var parent = Tthis.parent().parent().parent();
|
||||
$('.dataTables_scrollHeadInner > .table.ADScrollPaginator2').find('th').addClass('importantth');
|
||||
parent.find(".dataTables_paginate").css("display", "none");
|
||||
parent.find(".dataTables_length").css("display", "none");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ShowDiv(controlDiv, map) {
|
||||
// Set CSS for the control border.
|
||||
var controlUI = document.createElement('div');
|
||||
controlUI.style.backgroundColor = '#444d58';
|
||||
controlUI.style.border = '2px solid #444d58';
|
||||
controlUI.style.borderRadius = '3px';
|
||||
controlUI.style.width = '100%'
|
||||
controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)';
|
||||
controlUI.style.cursor = 'pointer';
|
||||
controlUI.style.marginRight = '5px';
|
||||
controlUI.style.marginTop = '5px';
|
||||
controlUI.style.marginBottom = '0px';
|
||||
controlUI.style.textAlign = 'center';
|
||||
// controlUI.title = 'Click para borrar el último punto dibujado';
|
||||
controlDiv.appendChild(controlUI);
|
||||
|
||||
// Set CSS for the control interior.
|
||||
var controlText = document.createElement('div');
|
||||
controlText.style.color = '#ebebeb';
|
||||
controlText.id = "ShowDiv3"
|
||||
controlText.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||
controlText.style.fontSize = '14px';
|
||||
controlText.style.lineHeight = '20px';
|
||||
controlText.style.paddingLeft = '5px';
|
||||
controlText.style.paddingRight = '5px';
|
||||
controlText.innerHTML = '<i class="fa fa-angle-up" aria-hidden="true"></i>';
|
||||
controlUI.appendChild(controlText);
|
||||
|
||||
// Setup the click event listeners: simply set the map to Chicago.
|
||||
controlUI.addEventListener('click', function () {
|
||||
FNShowDiv();
|
||||
});
|
||||
}
|
||||
|
||||
function FNShowDiv() {
|
||||
if (open === false) {
|
||||
//$("#ChkSeguimiento").appendTo("#DivSeguimiento");
|
||||
//$("#ChkSeguimiento").appendTo("#DivSeguimiento");
|
||||
$("#h").modal()
|
||||
$("#ShowDiv3").css("line-height", "34px")
|
||||
open = true
|
||||
$("#ShowDiv3").html('<i class="fa fa-angle-down" aria-hidden="true"></i>')
|
||||
setTimeout(function () {
|
||||
$('.table.ADScrollPaginator2').DataTable().draw();
|
||||
}, 150);
|
||||
if ($("#HdnOpcion").val() === 'All' || $("#HdnOpcion").val() === 'Idle' || $("#HdnOpcion").val() === 'Ralenti') {
|
||||
$('#btnPlay').css('display', '');
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$('#btnPrintPDF').css('display', '');
|
||||
$("#btnPlay").click(function () {
|
||||
pause = !pause;
|
||||
if (pause) {
|
||||
stopTimeout();
|
||||
} else {
|
||||
if (startPlay) {
|
||||
startPlay = false;
|
||||
Play();
|
||||
} else {
|
||||
Play();
|
||||
}
|
||||
}
|
||||
if ($('#btnPlay > i').hasClass("fa-pause")) {
|
||||
$('#btnPlay > i').removeClass("fa-pause").addClass("fa-play");
|
||||
} else if ($('#btnPlay > i').hasClass("fa-play")) {
|
||||
$('#btnPlay > i').removeClass("fa-play").addClass("fa-pause");
|
||||
}
|
||||
|
||||
});
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX")
|
||||
});
|
||||
$("#btnPrintPDF").click(function () {
|
||||
var s = "";
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_btnImprimir")
|
||||
});
|
||||
} else if ($("#HdnOpcion").val() === 'Speed') {
|
||||
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$('#btnPrintPDF').css('display', '');
|
||||
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX")
|
||||
});
|
||||
$("#btnPrintPDF").click(function () {
|
||||
var s = "";
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_btnImprimir")
|
||||
});
|
||||
} else if ($("#HdnOpcion").val() === 'Last') {
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$("#h").modal('hide')
|
||||
$("#ShowDiv3").css("line-height", "20px")
|
||||
open = false
|
||||
$("#ShowDiv3").html('<i class="fa fa-angle-up" aria-hidden="true"></i>')
|
||||
}
|
||||
}
|
||||
|
||||
function CargaDivs(Tipo) {
|
||||
if (Tipo === "PointGroup") {
|
||||
$("#C_TxtNombre").val("")
|
||||
@@ -356,6 +722,8 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", "AIzaSyDsZ4ATb_hVSEpRbBSlS46ZHEOn-0bNIFI") %>"></script>
|
||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class GPS_RepPuntosDeInteres
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "P R O P I E D A D E S "
|
||||
Private Property DispositivosLista As List(Of String)
|
||||
Get
|
||||
@@ -13,29 +15,34 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
Set(value As List(Of String))
|
||||
ViewState("DispositivosLista") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property DtDatosReporte As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("DtDatosReporte")), Nothing, CType(ViewState("DtDatosReporte"), DataTable))
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatosReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = Now.AddDays(-7).ToString("dd/MM/yyyy")
|
||||
|
||||
CargaDispositivos()
|
||||
Dim gps As New ClsGPS
|
||||
'If gps.PuntoDeInteresGrupoGet(-1, 1) Then
|
||||
' GvGrupos.DataSource = gps.DtResultados
|
||||
'Else
|
||||
' GvGrupos.DataSource = Nothing
|
||||
'End If
|
||||
If gps.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
|
||||
GvPuntos.DataSource = gps.DtResultados
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.PuntoDeInteresGet(-1, UsuarioActual.CveCliente, 1, -1) Then
|
||||
GvPuntos.DataSource = ObjGPS.DtResultados
|
||||
Else
|
||||
GvPuntos.DataSource = Nothing
|
||||
End If
|
||||
gps.Dispose()
|
||||
'GvGrupos.DataBind()
|
||||
ObjGPS.Dispose()
|
||||
GvPuntos.DataBind()
|
||||
End Sub
|
||||
|
||||
@@ -58,8 +65,8 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
RegistraScript("$('#dvConsulta').modal('hide');", "00")
|
||||
End Sub
|
||||
|
||||
Private Sub ReportePuntos(Dispositivos As String)
|
||||
Dim GPS As New ClsGPS
|
||||
Private Sub ReportePuntos(Dispositivos As String)
|
||||
|
||||
Dim FechaI, FechaF As Date
|
||||
Dim SBBody As New StringBuilder
|
||||
Dim CoordsPoligono = ""
|
||||
@@ -70,35 +77,48 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
Dim GeoCercas = ""
|
||||
Dim Color = ""
|
||||
FechaI = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.Trim.ToDate)
|
||||
FechaF = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.Trim.ToDate)
|
||||
For Each row As GridViewRow In GvPuntos.Rows
|
||||
SBBody.Clear()
|
||||
If row.FCCheckBox("chkGR").Checked Then
|
||||
If GPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then
|
||||
Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT")
|
||||
SBBody.Append($"<div>")
|
||||
SBBody.Append($"<div><h5><b> Punto: {row.DataKey("PuntoDeInteres")}</b></h5></div>")
|
||||
FechaF = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.Trim.ToDate)
|
||||
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Try
|
||||
For Each row As GridViewRow In GvPuntos.Rows
|
||||
SBBody.Clear()
|
||||
If row.FCCheckBox("chkGR").Checked Then
|
||||
If ObjGPS.RepPuntosGet(row.DataKey("CvePuntoDeInteres").ToEntero, Dispositivos, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, UsuarioActual.CveCliente) Then
|
||||
|
||||
DtDatosReporte = ObjGPS.DtResultados.Copy()
|
||||
GvBarra.DataSource = DtDatosReporte
|
||||
|
||||
Coords = SQLToGmaps(row.DataKey("Punto").ToString, "POINT")
|
||||
SBBody.Append($"<div>")
|
||||
SBBody.Append($"<div><h5><b> Punto: {row.DataKey("PuntoDeInteres")}</b></h5></div>")
|
||||
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
Color = "#26C281"
|
||||
SBBody.Append($"<div><table>")
|
||||
For Each Cve As String In DispositivosLista
|
||||
If ObjGPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then
|
||||
SBBody.Append($"<tr><td><b>{ObjGPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}:</b> <a onclick=""CargaGV({Cve}, {row.DataKey("CvePuntoDeInteres")} )"">{ObjGPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas<a></td></tr>")
|
||||
SBBody.Append($"<tr><td>Última Visita: {ObjGPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")}</td></tr>")
|
||||
End If
|
||||
Next
|
||||
SBBody.Append($"</table></div>")
|
||||
Else
|
||||
Color = "#e82929"
|
||||
SBBody.Append($"<tr><td><b>Este punto de interés no fue visitado en las fechas seleccionadas.</b></td></tr>")
|
||||
End If
|
||||
SBBody.Append($"</div>")
|
||||
RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres"))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar los puntos de interes", ex)
|
||||
End Try
|
||||
|
||||
If GPS.DtResultados.Rows.Count > 0 Then
|
||||
Color = "#26C281"
|
||||
SBBody.Append($"<div><table>")
|
||||
For Each Cve As String In DispositivosLista
|
||||
If GPS.DtResultados.FiltraParametros($"CveDispositivo = {Cve} ").Rows.Count > 0 Then
|
||||
SBBody.Append($"<tr><td><b>{GPS.DtResultados.FiltroPrimeroValor("Vehiculo", $"CveDispositivo = {Cve}")}:</b> <a onclick=""CargaGV({Cve}, {row.DataKey("CvePuntoDeInteres")} )"">{GPS.DtResultados.FiltroPrimeroValor("Visitas", $"CveDispositivo = {Cve}")} visitas<a></td></tr>")
|
||||
SBBody.Append($"<tr><td>Última Visita: {GPS.DtResultados.FiltroPrimeroValor("UltimaVisita", $"CveDispositivo = {Cve}")}</td></tr>")
|
||||
End If
|
||||
Next
|
||||
SBBody.Append($"</table></div>")
|
||||
Else
|
||||
Color = "#e82929"
|
||||
SBBody.Append($"<tr><td><b>Este punto de interés no fue visitado en las fechas seleccionadas.</b></td></tr>")
|
||||
End If
|
||||
SBBody.Append($"</div>")
|
||||
RegistraScript($"CreaCirculo({Coords},'{Color}');CreaMarcador({Coords},'{row.DataKey("PuntoDeInteres")}','{SBBody.ToString}');", row.DataKey("CvePuntoDeInteres"))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
GPS.Dispose()
|
||||
ObjGPS.Dispose()
|
||||
GvBarra.DataBind()
|
||||
UPGV.Update()
|
||||
End Sub
|
||||
|
||||
'If GPS.GeoReferenciasEntradasSalidas(GVRow.DataKey("CveDispositivo").ToString.ToEntero, row.DataKey("CveGeoReferencia").ToString.ToEntero, FechaI, FechaF) Then
|
||||
@@ -152,5 +172,41 @@ Partial Class GPS_RepPuntosDeInteres
|
||||
GVHistorico.DataBind()
|
||||
UpdatePanel3.Update()
|
||||
RegistraScript("$('#dvHistorico').modal()")
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvBarra_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBarra.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' Dim RowID As String = $"row{e.Row.RowIndex}"
|
||||
' e.Row.Attributes("id") = RowID
|
||||
' Dim IndexGvBarra As Integer = If(String.IsNullOrEmpty(HdnIndexGvBarra.Value), -1, HdnIndexGvBarra.Value.ToEntero)
|
||||
|
||||
' RegistraScript($"GetDireccionesGV({e.Row.DBCampo("Posicion").ToString}, {e.Row.RowIndex}, 1);", $"{RowID}")
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Protected Sub btnImprimir_Click(sender As Object, e As EventArgs)
|
||||
Dim Btn As Button = CType(sender, Button)
|
||||
Dim Format = Btn.CommandArgument
|
||||
EnviarReporteProgramado(Format)
|
||||
|
||||
End Sub
|
||||
Public Sub EnviarReporteProgramado(Format As String)
|
||||
Dim RutaReporte = "Empresas/Grales/ReportesProgramados/RPTPuntosInteres.rdlc"
|
||||
Dim NombreReporte = "ReportePuntosInteres"
|
||||
|
||||
Try
|
||||
Dim RptParametro As New List(Of ReportParameter)
|
||||
RptParametro.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
|
||||
RptParametro.Add(New ReportParameter("FechaFin", txtFechaF.Text))
|
||||
RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString))
|
||||
|
||||
Dim retorno = StreamPDF(RutaReporte, DtDatosReporte, RptParametro, $"{NombreReporte}{Date.Now.ToShortDateString}", Format, MR:=Nothing, RDSName:="DsOC")
|
||||
|
||||
ImprimirbytesPDF(retorno, $"{NombreReporte}{Date.Now.ToShortDateString}", Format)
|
||||
Catch ex As Exception
|
||||
GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex))
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -620,6 +620,9 @@
|
||||
Dim EmpresaNotificaciones As New Empresa With {.SendMail = "signotificaciones@adssistemas.mx", .SendMailPassword = "sig123987", .SendMailServer = "mail.adssistemas.mx", .SendMailPuerto = 587}
|
||||
ClsPaginas.EmpresaNotificaciones = EmpresaNotificaciones
|
||||
|
||||
Dim EmpresaNotificacionesGPS As New Empresa With {.SendMail = "ALERTAS@SIGNALSGPS.com", .SendMailPassword = "STJ180705IV42021ad", .SendMailServer = "mail.signalsgps.com", .SendMailPuerto = 587}
|
||||
ClsPaginas.EmpresaNotificacionesGPS = EmpresaNotificacionesGPS
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'I M P U E S T O S L O C A L E S
|
||||
|
||||
@@ -174,9 +174,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
If Lista.ContainsKey(CvePS) Then
|
||||
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||
End If
|
||||
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
@@ -447,9 +447,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION
|
||||
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True)
|
||||
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
' ErrorMovInv = True
|
||||
'End If
|
||||
If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -882,7 +882,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenVirtualEntrada)
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
@@ -934,7 +934,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
'VIRTUAL ENTRADA
|
||||
If RealizarMovimientoVirtual Then
|
||||
If RealizarMovimientoVirtual AndAlso CveAlmacenVirtualEntrada > 0 Then
|
||||
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
@@ -963,6 +963,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
If Concepto = "" Then Concepto = "Traspaso"
|
||||
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||
@@ -1743,14 +1744,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
TextoError = "Ocurrió un error al cancelar el traspaso"
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
End If
|
||||
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
' CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
'End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -1841,7 +1842,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim RealizarMovimientoVirtual As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
RealizarMovimientoVirtual = True
|
||||
End If
|
||||
|
||||
@@ -1925,10 +1926,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -2857,7 +2858,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
@@ -2967,7 +2968,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Else
|
||||
Str = String.Format(" AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
|
||||
End If
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,27,28) AND Estatus = 'Activo' {0} ", Str))
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND Estatus = 'Activo' {0} ", Str))
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText ="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
@@ -46,7 +46,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText ="Clasificacion">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClasificacion" runat="server" Text='<%# Eval("Clasificacion", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlClasificacion" runat="server" Text='<%# Eval("Clasificacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtClasificacion" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Clasificacion") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
@@ -56,7 +56,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText ="Marca" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMarca" runat="server" Text='<%# Eval("Marca", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMarca" runat="server" Text='<%# Eval("Marca", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMarca" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Marca") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
@@ -66,7 +66,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText ="MesAño">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMesAño" runat="server" Text='<%# Eval("MesAño", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMesAño" runat="server" Text='<%# Eval("MesAño", "{0:mm/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMesAño" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("MesAño") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
@@ -76,7 +76,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText ="Meta Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMetaCantidad" runat="server" Text='<%# Eval("MetaCantidad", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMetaCantidad" runat="server" Text='<%# Eval("MetaCantidad", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMetaCantidad" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("MetaCantidad") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
@@ -86,7 +86,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText ="Meta Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMetaImporte" runat="server" Text='<%# Eval("MetaImporte", " {0}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMetaImporte" runat="server" Text='<%# Eval("MetaImporte", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMetaImporte" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("MetaImporte") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||
|
||||
@@ -42,13 +42,14 @@ Partial Class CatMetasVendedores
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionSup.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionSup.DataBind()
|
||||
DdlClasificacionSup.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificacionSup.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionSup.DataBind()
|
||||
DdlClasificacionSup.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click
|
||||
@@ -100,8 +101,10 @@ Partial Class CatMetasVendedores
|
||||
CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero
|
||||
DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor")
|
||||
TxtFechaI.Text = GvRow.DataKey("MesAño")
|
||||
DdlClasificacionSup.SelectedValue = GvRow.DataKey("CveClasificacionSup")
|
||||
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion")
|
||||
|
||||
DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup"))
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
|
||||
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
|
||||
TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad")
|
||||
TxtMetaImporte.Text = GvRow.DataKey("MetaImporte")
|
||||
|
||||
@@ -1336,10 +1336,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
If FuncionalidadFluctuacionImpuestos Then
|
||||
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||
|
||||
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia -= (((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
End If
|
||||
|
||||
|
||||
@@ -154,6 +154,11 @@
|
||||
<asp:Label ID="lblRealMes" runat="server" Target="_blank" Text='<%# Eval("RealMes").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Real Mes %" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRealMesPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealMesPorcentaje").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Venta Mes Año Anterior" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVtaMesAA" runat="server" Target="_blank" Text='<%# Eval("VtaMesAA").ToString() %>'> </asp:Label>
|
||||
@@ -164,14 +169,24 @@
|
||||
<asp:Label ID="lblObjMes" runat="server" Target="_blank" Text='<%# Eval("ObjMes").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Var Mes A.A" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVarMesAA" runat="server" Target="_blank" Text='<%# Eval("VarMesAA").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Var Mes Obj" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVarMesObj" runat="server" Target="_blank" Text='<%# Eval("VarMesObj").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Real Acumulado" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRealAcumulado" runat="server" Target="_blank" Text='<%# Eval("RealAcumulado").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Real Mes Porcentaje" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Real Acumulado %" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRealMesPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealMesPorcentaje").ToString() %>'> </asp:Label>
|
||||
<asp:Label ID="lblRealAcumuladoPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealAcumuladoPorcentaje").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="A. Ant. Acumulado" ItemStyle-HorizontalAlign="Center">
|
||||
@@ -184,11 +199,11 @@
|
||||
<asp:Label ID="lblObjAcumulado" runat="server" Target="_blank" Text='<%# Eval("ObjAcumulado").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="%Var vs AA" ItemStyle-HorizontalAlign="Center">
|
||||
<%-- <asp:TemplateField HeaderText="%Var vs AA" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVarVSAAPerc" runat="server" Target="_blank" Text='<%# Eval("VarVSAAPerc").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Var vs AA" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVarVSAA" runat="server" Target="_blank" Text='<%# Eval("VarVSAA").ToString() %>'> </asp:Label>
|
||||
|
||||
@@ -37,17 +37,17 @@ Partial Class MetasVendedores
|
||||
|
||||
DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedorFiltro.DataBind()
|
||||
DdlVendedorFiltro.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
DdlVendedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
DdlCategoria.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||
DdlCategoria.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificaciones.DataBind()
|
||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlClasificacion2.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion2.DataBind()
|
||||
DdlClasificacion2.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
@@ -75,8 +75,10 @@ Partial Class MetasVendedores
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%")
|
||||
e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%")
|
||||
e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%")
|
||||
e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text, "%")
|
||||
'e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%")
|
||||
|
||||
Select Case e.Row.DataKey("Etiqueta")
|
||||
Case "GrupoSuperior"
|
||||
e.Row.CssClass = "GrupoSuperior"
|
||||
|
||||
@@ -178,6 +178,37 @@
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Inicio: </div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioAplicadoI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAplicadoI" runat="server" TargetControlID="TxtFechaAplicadoI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaAplicadoI" PopupButtonID="imgCalendarioAplicadoI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaAplicadoI" runat="server" ControlToValidate="TxtFechaAplicadoI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaAplicadoI" runat="server" ControlToValidate="TxtFechaAplicadoI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Fecha Fin: </div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioAplicadoF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAplicadoF" runat="server" TargetControlID="TxtFechaAplicadoF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaAplicadoF" PopupButtonID="imgCalendarioAplicadoF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaAplicadoF" runat="server" ControlToValidate="TxtFechaAplicadoF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaAplicadoF" runat="server" ControlToValidate="TxtFechaAplicadoF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -121,16 +121,21 @@ Partial Class Ventas_RepRecuperacion
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
|
||||
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
||||
|
||||
|
||||
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
|
||||
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
|
||||
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero()) Then
|
||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF) Then
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
Else
|
||||
|
||||
@@ -3493,7 +3493,9 @@
|
||||
</tr>
|
||||
<tr align="left" id="TrKilometraje" runat="server" visible="false">
|
||||
<td>Kilometraje
|
||||
<asp:TextBox ID="TxtKilometraje" runat="server" Width="250px" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||
<asp:TextBox ID="TxtKilometraje" runat="server" Width="250px" CssClass="form-control input-sm" MaxLength="6" CausesValidation="true" Text="000000"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEEKilometraje" runat="server" TargetControlID="TxtKilometraje" ClearMaskOnLostFocus="false" MaskType="Number" Mask="999999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="trCorreoNotif1" runat="server" visible="false">
|
||||
<td id="Td1" runat="server">Correo Notificación Usuario Final: </td>
|
||||
|
||||
@@ -1290,6 +1290,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveVentaUsadoDevolucionEfectivo As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveVentaUsadoDevolucionEfectivo")), 0, CType(ViewState("CveVentaUsadoDevolucionEfectivo"), Integer))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVentaUsadoDevolucionEfectivo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades PuntoVenta"
|
||||
@@ -7236,6 +7245,13 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 AndAlso TrKilometraje.Visible Then
|
||||
If TxtKilometraje.Text.Length < 6 Then
|
||||
Alert("El kilometraje debe tener 6 digitos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'CUANDO ES COTIZACION Y SE VA A FACTURAR SE HACE INGRESO
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso BtnEmitirImprimir.Text = "Facturar" Then
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
@@ -7481,8 +7497,8 @@ Partial Class Ventas
|
||||
|
||||
If TxtKilometraje.Text.ToEntero() = 0 Then
|
||||
'cuando es la clasificacion de llantas
|
||||
Dim FaltaObservacion As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20342").ToEntero()
|
||||
If FaltaObservacion = 20342 Then
|
||||
Dim FaltaObservacion As Integer = TmpDT.MAX("CveClasificacion", "Clasificacion like '%Llanta%'").ToEntero '.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20342").ToEntero()
|
||||
If FaltaObservacion > 0 Then 'sino se ha especificado km cuando tiene al clasif llanta
|
||||
Alert("No se ha especificado el <strong>kilometraje</strong>.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -10774,6 +10790,13 @@ Partial Class Ventas
|
||||
Me.AplicaRelacionManual = False
|
||||
End If
|
||||
|
||||
'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Me.CveVentaUsadoDevolucionEfectivo > 0 Then
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVentaUsadoDevolucionEfectivo) Then
|
||||
ErrorList.Add("Ocurrió un error al relacionar la venta de devolución de efectivo entre si.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(280) = "1" And RblPaqueteria.SelectedValue = "1" And Not factura.TipoDocto.Contiene("Rem", "Ped") Then
|
||||
NotificarPaqueteria()
|
||||
End If
|
||||
@@ -12728,7 +12751,7 @@ Partial Class Ventas
|
||||
|
||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa, ObjFactura.CvePrePoliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -19123,7 +19146,7 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||
Dim sb As New StringBuilder()
|
||||
|
||||
If Not String.IsNullOrEmpty(FolioFiscal) Then
|
||||
If Not String.IsNullOrEmpty(FolioFiscal) AndAlso Not (UsuarioActual.Empresa.Funcionalidad(529) = "1") Then
|
||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||
|
||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||
@@ -24675,9 +24698,14 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then
|
||||
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
|
||||
Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
End If
|
||||
|
||||
Else
|
||||
AplicarNotaCreditoDesdeVenta()
|
||||
End If
|
||||
@@ -24694,6 +24722,8 @@ Partial Class Ventas
|
||||
Private Sub AplicarNotaCreditoDesdeVenta(Optional AplicaNuevoDocumento As Boolean = False)
|
||||
RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC")
|
||||
|
||||
CveVentaUsadoDevolucionEfectivo = -1
|
||||
|
||||
DdlTipoComprobante.SelectedValue = "Egs"
|
||||
Dim AplicaImpuestosLocales As Boolean = False
|
||||
|
||||
@@ -24722,6 +24752,11 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso AplicaNuevoDocumento AndAlso DdlVentaUsado.SelectedValue.ToEntero() > 0 AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then
|
||||
CveVentaUsadoDevolucionEfectivo = DdlVentaUsado.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento, AplicoNCFacturaActual:=True)
|
||||
|
||||
End Sub
|
||||
@@ -26625,6 +26660,7 @@ Partial Class Ventas
|
||||
If Not DtCotizaciones.Columns.Contains("Aplicado") Then
|
||||
DtCotizaciones.Columns.Add("Aplicado", Type.GetType("System.Boolean"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
GvCotPS.DataSource = DtCotizaciones.FiltraParametros("Cantidad > 0 AND EsAcumulador = False")
|
||||
Else
|
||||
@@ -26687,6 +26723,9 @@ Partial Class Ventas
|
||||
Dim Cves As New StringBuilder
|
||||
Dim CveMetodoPago As Integer = -1
|
||||
Dim MetodoPagoDif As Boolean = False
|
||||
|
||||
Dim ListaVentaDetalleCotizacion As List(Of MVentaDetalleCotizacion) = Nothing
|
||||
|
||||
If ChkCotProductos.Checked Then
|
||||
For Each row As DataRow In DTSeleccionadas.Rows
|
||||
If CveMetodoPago <> -1 And row("CveMetodoPago33").ToString().ToEntero() <> CveMetodoPago Then
|
||||
@@ -26699,8 +26738,9 @@ Partial Class Ventas
|
||||
CotizacionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
Next
|
||||
|
||||
'CARGA LOS USADOS RELACIONADOS A LOS PRODUCTOS SELECCIONADOS DE LA COTIZACION
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones)
|
||||
ListaVentaDetalleCotizacion = CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones)
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -26726,6 +26766,18 @@ Partial Class Ventas
|
||||
ObjClientes.Dispose()
|
||||
Cves.Clear()
|
||||
|
||||
'SI SE CALCULARON USADOS LA CANTIDAD DEBE ASIGNARSE A PARTIR DEL CALCULO
|
||||
If ListaVentaDetalleCotizacion IsNot Nothing AndAlso ListaVentaDetalleCotizacion.Count > 0 Then
|
||||
|
||||
For Each Dr As DataRow In DtCotizacionesPS.Rows
|
||||
Dim VentaDetalle = ListaVentaDetalleCotizacion.FirstOrDefault(Function(cot) cot.CveVentaDetalle = Dr("CveVentaDetalle").ToString().ToEntero())
|
||||
If VentaDetalle IsNot Nothing Then
|
||||
Dr("Cantidad") = VentaDetalle.Cantidad
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If Not AgregaPSCotizacion() Then
|
||||
Alert("Ocurrió un error validar las partidas de las cotizaciones seleccionadas. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -26747,14 +26799,29 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
UpParametros.Update()
|
||||
End Sub
|
||||
Private Class MVentaDetalleCotizacion
|
||||
Public Property CveVentaDetalle As Integer
|
||||
Public Property Cantidad As Decimal
|
||||
End Class
|
||||
|
||||
Private Function CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable) As List(Of MVentaDetalleCotizacion)
|
||||
Dim Retorno As New List(Of MVentaDetalleCotizacion)
|
||||
|
||||
Private Sub CalculaUsadosCotizacion(ByRef SbVentasDetalle As StringBuilder, ByVal DTSeleccionadas As DataTable, ByVal DtCotizaciones As DataTable)
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
|
||||
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||
|
||||
Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
|
||||
For Each Dr As DataRow In DTSeleccionadas.Rows
|
||||
Dim tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal
|
||||
Dr("Cantidad") = tCantidad
|
||||
|
||||
Retorno.Add(New MVentaDetalleCotizacion() With {.CveVentaDetalle = Dr("CveVentaDetalle").ToString().ToEntero(), .Cantidad = tCantidad})
|
||||
|
||||
Next
|
||||
|
||||
Dim TmpDTCalculo As DataRow() = DTSeleccionadas.Rows.Cast(Of DataRow).ToArray()
|
||||
|
||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||
@@ -26810,11 +26877,15 @@ Partial Class Ventas
|
||||
Dim CveVentaDetalleUsado = DtCotizaciones.FiltroPrimeroValor("CveVentaDetalle", $"CveVenta = {drowPsTamaños("CveVenta")} AND CvePS = {drowPsTamaños("CvePS")}").ToEntero()
|
||||
SbVentasDetalle.AppendFormat("{0},", CveVentaDetalleUsado)
|
||||
|
||||
Retorno.Add(New MVentaDetalleCotizacion() With {.CveVentaDetalle = CveVentaDetalleUsado, .Cantidad = drowPsTamaños("Cantidad").ToString().ToDecimal()})
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub VerificaCotizaciones(ByRef dt As DataTable)
|
||||
If ChkCotProductos.Checked Then
|
||||
For Each Gvr As GridViewRow In GvCotPS.Rows
|
||||
@@ -26860,7 +26931,12 @@ Partial Class Ventas
|
||||
If DtCotizacionesPS IsNot Nothing Then
|
||||
Dim tCantidad As Decimal = 0
|
||||
For Each Dr As DataRow In DtCotizacionesPS.Select()
|
||||
tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
tCantidad = Dr("Cantidad").ToString().ToDecimal()
|
||||
Else
|
||||
tCantidad = If(ChkCotProductos.Checked, GvCotPS.Rows(IndiceGVCotDataKey(GvCotPS, Dr("CveVentaDetalle").ToString())).FCTextBox("TxtCantidadCot").Text.ToDecimal, Dr("Cantidad")).ToString().ToDecimal
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
|
||||
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
|
||||
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
|
||||
|
||||
Reference in New Issue
Block a user