local
This commit is contained in:
@@ -138,29 +138,29 @@
|
|||||||
<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
|
<asp:Literal ID="LblTipoFolio" runat="server" Text='<%# Eval("tipoFolio") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Límite">
|
<asp:TemplateField HeaderText="Límite" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
|
<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="SubProyecto" ItemStyle-Width="150px">
|
<asp:TemplateField HeaderText="SubProyecto" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="150px">
|
<asp:TemplateField HeaderText="Estatus" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="AreaTexto" ItemStyle-Width="100px" HeaderText="Área" />
|
<asp:BoundField DataField="AreaTexto" HeaderText="Área" />
|
||||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
|
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Total">
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
|
<asp:Literal ID="lblTotal" runat="server" Text='<%# Eval("NumRegistros") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -170,23 +170,16 @@
|
|||||||
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="CveMovimiento" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
|
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||||
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='fa fa-bars'></i>" />
|
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='fa fa-bars'></i>" />
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="80px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -189,7 +189,6 @@
|
|||||||
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Garantía de Mes</asp:Literal></h4>
|
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Garantía de Mes</asp:Literal></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||||
<asp:DropDownList ID="DdlMarcaM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveMarca" DataTextField="Marca" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
<asp:DropDownList ID="DdlMarcaM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveMarca" DataTextField="Marca" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlMarcaM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlMarcaM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||||
@@ -197,27 +196,19 @@
|
|||||||
<label for="<%= DdlMarcaM.ClientID.ToString()%>">Marca:</label>
|
<label for="<%= DdlMarcaM.ClientID.ToString()%>">Marca:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||||
<asp:DropDownList ID="DdlTipoUsoM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveTipoUso" DataTextField="TipoUso" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
<asp:DropDownList ID="DdlTipoUsoM" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveTipoUso" DataTextField="TipoUso" Class="table-group-action-input form-control input-inline input-small input-sm" Width="250px" AutoPostBack="true"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" InitialValue="-1" runat="server" ControlToValidate="DdlTipoUsoM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" InitialValue="-1" runat="server" ControlToValidate="DdlTipoUsoM" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
<label for="<%= DdlTipoUsoM.ClientID.ToString()%>">Tipo Uso:</label>
|
<label for="<%= DdlTipoUsoM.ClientID.ToString()%>">Tipo Uso:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||||
<asp:TextBox ID="TxtMes" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
<asp:TextBox ID="TxtMes" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtMes" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mes''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTxtCargo" runat="server" ControlToValidate="TxtMes" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Mes''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtMes.ClientID.ToString()%>">Mes:</label>
|
<label for="<%= TxtMes.ClientID.ToString()%>">Mes:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
|
||||||
<asp:TextBox ID="TxtValor" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
<asp:TextBox ID="TxtValor" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtBonificacion" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTamanio"></asp:RequiredFieldValidator>
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
|||||||
DdlMarca.DataBind()
|
DdlMarca.DataBind()
|
||||||
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
DdlMarca.SelectedValue = "-1"
|
DdlMarca.SelectedValue = "-1"
|
||||||
|
DdlMarcaM.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
|
DdlMarcaM.DataBind()
|
||||||
|
|
||||||
DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa)
|
DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
|
|||||||
@@ -2293,6 +2293,23 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Public Function ValidaFechaFinPersonal(CvePersonal As Integer, CveEmpresa As Integer, FechaFin As String)
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_ValidaFechaFinPersonal")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
|
'.Add("@Limpiar", SqlDbType.Int).Value = Limpiar
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al validar el finiquito.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function GetFiniquitosPersonal(CvePersonal As Integer, CveEmpresa As Integer, Optional Limpiar As Integer = 0, Optional diasindemnizacion As Integer = 90) As Boolean
|
Public Function GetFiniquitosPersonal(CvePersonal As Integer, CveEmpresa As Integer, Optional Limpiar As Integer = 0, Optional diasindemnizacion As Integer = 90) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_FiniquitosGET")
|
DataAdapter("PA_Nom_FiniquitosGET")
|
||||||
|
|||||||
@@ -7651,10 +7651,10 @@ Public Class ClsPaginas
|
|||||||
ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL
|
||||||
End If
|
End If
|
||||||
'movimiento de pago proveedor
|
'movimiento de pago proveedor
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, ConPreP.CveConcepto, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||||
'movimiento de pago proveedor Complementaria
|
'movimiento de pago proveedor Complementaria
|
||||||
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, ConPreP.CveConceptoComplementario, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto, CveVenta:=Pago.CveVentaRelacionada) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
If Pago.AplicaAcreditable Then
|
If Pago.AplicaAcreditable Then
|
||||||
'si tiene iva y su proporcion
|
'si tiene iva y su proporcion
|
||||||
@@ -7739,12 +7739,12 @@ Public Class ClsPaginas
|
|||||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago.Contiene("NC", "DEV") AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
If Pago.TipoPago.Contiene("NC", "DEV") AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||||
@@ -7760,22 +7760,21 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
||||||
'Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(17, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor)
|
||||||
'Dim Ret As New ConceptosRetenciones
|
|
||||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
|
||||||
' If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
|
||||||
' If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
|
||||||
'End If
|
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If Pago.TipoPago = "Venta" AndAlso Not ErrorMovtos Then ' V E N T A
|
||||||
|
TCValuacionPago = TCValuacionCompra
|
||||||
|
tImportePago = tImporteCompra
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ErrorMovtos AndAlso TCValuacionCompra <> TCValuacionPago Then
|
If Not ErrorMovtos AndAlso TCValuacionCompra <> TCValuacionPago Then
|
||||||
Dim ConceptoContable, IdCtaContable As Integer
|
Dim ConceptoContable, IdCtaContable As Integer
|
||||||
@@ -7820,7 +7819,9 @@ Public Class ClsPaginas
|
|||||||
Public Property CveCompraAmortizacion As Integer = 0
|
Public Property CveCompraAmortizacion As Integer = 0
|
||||||
Public Property OtroGastoIngreso As Decimal = 0
|
Public Property OtroGastoIngreso As Decimal = 0
|
||||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||||
|
Public Property CveProveedor As Integer = -1
|
||||||
Public Property CveCreditoDetalle As Integer = -1
|
Public Property CveCreditoDetalle As Integer = -1
|
||||||
|
Public Property CveVentaRelacionada As Integer = -1
|
||||||
Public Property Referencia As String = ""
|
Public Property Referencia As String = ""
|
||||||
Public Property AplicaAcreditable As Boolean = True
|
Public Property AplicaAcreditable As Boolean = True
|
||||||
End Class
|
End Class
|
||||||
@@ -7994,6 +7995,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 342, 344)
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 342, 344)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 235, 235)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 235, 235)
|
||||||
End Select
|
End Select
|
||||||
|
Case 17 ' deudores
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 37, 37)
|
||||||
|
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
Else 'cuando es la provisión
|
Else 'cuando es la provisión
|
||||||
Select Case CveTipoSaldo
|
Select Case CveTipoSaldo
|
||||||
@@ -8021,6 +8030,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = If(CveTipoProveedor = 1, 341, 343)
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 341, 343)
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 234, 234)
|
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 234, 234)
|
||||||
End Select
|
End Select
|
||||||
|
Case 17 ' deudores
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = If(CveTipoProveedor = 1, 43, 43)
|
||||||
|
Retorno.CveConceptoComplementario = If(CveTipoProveedor = 1, 256, 256)
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -8246,6 +8263,7 @@ Public Class ClsPaginas
|
|||||||
Public Property OtroGastoIngreso As Decimal = 0
|
Public Property OtroGastoIngreso As Decimal = 0
|
||||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||||
Public Property CveCreditoDetalle As Integer = -1
|
Public Property CveCreditoDetalle As Integer = -1
|
||||||
|
Public Property CveCompraRelacionada As Integer = -1
|
||||||
Public Property AplicaTraslado As Boolean = True
|
Public Property AplicaTraslado As Boolean = True
|
||||||
Public Property Referencia As String
|
Public Property Referencia As String
|
||||||
Public Property ImporteFluctuacionAdicional As Decimal = 0
|
Public Property ImporteFluctuacionAdicional As Decimal = 0
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer, Optional VerificaAlmacen As Boolean = True) As Boolean
|
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer, Optional VerificaAlmacen As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_VentasGet")
|
DataAdapter("PA_VentasGet")
|
||||||
|
|
||||||
|
|||||||
@@ -1472,38 +1472,9 @@ Partial Class Bancos_IE
|
|||||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If e.Row.DBCampo("TipoDocto") = "Egsc" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
|
||||||
' e.Row.CssClass = "Totales TextCenter"
|
|
||||||
' e.Row.Cells(1).Text = "Egreso Por Comprobar"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If e.Row.DBCampo("TipoDocto") = "Ant" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
|
||||||
' e.Row.CssClass = "Totales TextCenter"
|
|
||||||
' e.Row.Cells(1).Text = "Anticipos"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If e.Row.DBCampo("TipoDocto") = "NC" AndAlso e.Row.DataKey("CveCompra").ToString.ToEntero > 0 Then
|
If e.Row.DBCampo("TipoDocto") = "NC" AndAlso e.Row.DataKey("CveCompra").ToString.ToEntero > 0 Then
|
||||||
e.Row.FCCheckBox("Chk").InputAttributes.Add("data-saldo", e.Row.DataKey("Saldo"))
|
e.Row.FCCheckBox("Chk").InputAttributes.Add("data-saldo", e.Row.DataKey("Saldo"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If e.Row.DBCampo("TipoDocto") = "DEV" AndAlso e.Row.DBCampo("SerieFolio") = "" Then
|
|
||||||
' e.Row.CssClass = "Totales TextCenter"
|
|
||||||
' e.Row.Cells(0).Text = "Devolución"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If e.Row.DBCampo("CveProveedor") = "" Then
|
|
||||||
' e.Row.BackColor = Drawing.Color.LightGray
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If UsuarioActual.TienePermisoProceso(273) Then
|
|
||||||
' If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
|
||||||
' Dim Parametros = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
|
||||||
' e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
|
||||||
' e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1562,15 +1533,18 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
#Region " CARGA PERSONAL "
|
#Region " CARGA PERSONAL "
|
||||||
Protected Sub CargaDDLPersonal()
|
Protected Sub CargaDDLPersonal()
|
||||||
Dim ObjPersonal As New ClsRH
|
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||||
If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
DdlPersonal.DataBind()
|
||||||
If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
'Dim ObjPersonal As New ClsRH
|
||||||
DdlPersonal.DataBind()
|
'If ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
' If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||||
End If
|
' DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||||
End If
|
' DdlPersonal.DataBind()
|
||||||
ObjPersonal.Dispose()
|
' DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1"))
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'ObjPersonal.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
{
|
{
|
||||||
decimal ImporteBanco = TxtImporte.Text.ToDecimal();
|
decimal ImporteBanco = TxtImporte.Text.ToDecimal();
|
||||||
decimal ImporteMNBanco = ImporteBanco;
|
decimal ImporteMNBanco = ImporteBanco;
|
||||||
decimal ImporteComplementaria = 0;
|
decimal ImporteComplementaria = 0;
|
||||||
decimal TCPago = TxtTCPago.Text.ToDecimal();
|
decimal TCPago = TxtTCPago.Text.ToDecimal();
|
||||||
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||||
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||||
@@ -328,6 +328,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
decimal ImporteComision;
|
decimal ImporteComision;
|
||||||
decimal ImporteComisionMN;
|
decimal ImporteComisionMN;
|
||||||
decimal AcumImporteMN = 0;
|
decimal AcumImporteMN = 0;
|
||||||
|
decimal ImportePago, ImporteAcreedor;
|
||||||
bool TipoMovtoComision = false;
|
bool TipoMovtoComision = false;
|
||||||
int IdCtaContableOtrosGastos = 0;
|
int IdCtaContableOtrosGastos = 0;
|
||||||
int CveConceptoDiferenciaCambiaria = 0;
|
int CveConceptoDiferenciaCambiaria = 0;
|
||||||
@@ -338,8 +339,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
Importe = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
Importe = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||||
ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal();
|
ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal();
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
|
ImporteAcreedor = Importe; ImportePago = Importe;
|
||||||
ImporteComisionMN = ImporteComision;
|
ImporteComisionMN = ImporteComision;
|
||||||
ImporteComplementaria = 0;
|
ImporteComplementaria = 0;
|
||||||
|
|
||||||
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0)
|
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0)
|
||||||
{
|
{
|
||||||
@@ -352,7 +354,6 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
{
|
{
|
||||||
TipoMovtoComision = false;
|
TipoMovtoComision = false;
|
||||||
IdCtaContableOtrosGastos = UsuarioActual.Empresa.Funcionalidad(266).ToEntero();
|
IdCtaContableOtrosGastos = UsuarioActual.Empresa.Funcionalidad(266).ToEntero();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Decimal TC = gvr.DataKey("TipoCambio").ToDecimal();
|
Decimal TC = gvr.DataKey("TipoCambio").ToDecimal();
|
||||||
@@ -364,24 +365,26 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
|
|
||||||
if (gvr.FCCheckBox("Chk").Checked)
|
if (gvr.FCCheckBox("Chk").Checked)
|
||||||
{
|
{
|
||||||
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
||||||
if (CveMonedaPago == 1 && tCveMoneda == 1)
|
if (CveMonedaPago == 1 && tCveMoneda == 1)
|
||||||
{
|
{
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
ImporteComisionMN = ImporteComision;
|
ImporteComisionMN = ImporteComision;
|
||||||
|
ImportePago = Importe;
|
||||||
}
|
}
|
||||||
else if (CveMonedaPago == 1 && tCveMoneda == 2)
|
else if (CveMonedaPago == 1 && tCveMoneda == 2)
|
||||||
{
|
{
|
||||||
ImporteComisionMN = ImporteComision;
|
ImporteComisionMN = ImporteComision;
|
||||||
|
ImportePago = (Importe * TCPago).RoundSQL();
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria)
|
||||||
{
|
{
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImporteMN = Importe * TC;
|
ImporteMN = Importe * TC;
|
||||||
ImporteComplementaria = 0;
|
ImporteComplementaria = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (CveMonedaPago == 2 && tCveMoneda == 1)
|
else if (CveMonedaPago == 2 && tCveMoneda == 1)
|
||||||
@@ -389,6 +392,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
|
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
ImporteComisionMN = ImporteComision;
|
ImporteComisionMN = ImporteComision;
|
||||||
|
ImporteComplementaria = 0;
|
||||||
}
|
}
|
||||||
else if (CveMonedaPago == 2 && tCveMoneda == 2)
|
else if (CveMonedaPago == 2 && tCveMoneda == 2)
|
||||||
{
|
{
|
||||||
@@ -422,37 +426,37 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria && tCveMoneda > 1 && MsgError == "")
|
||||||
{
|
{
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContablePrestamoComplementario, Conc, DateTime.Now, IDCtaContableAcreedorComplementaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
MsgError = "No se pudo insertar concepto de acreedor complementaria";
|
MsgError = "No se pudo insertar concepto de acreedor complementaria";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TCPago != TC)
|
if (ImportePago != ImporteAcreedor && MsgError == "")
|
||||||
{
|
{
|
||||||
bool TipoMovto = false;
|
bool TipoMovto = false;
|
||||||
int IdCtaContableDiferenciaCambiaria = 0;
|
int IdCtaContableDiferenciaCambiaria = 0;
|
||||||
if (TCPago > TC)
|
if (TCPago > TC)
|
||||||
{
|
{
|
||||||
CveConceptoDiferenciaCambiaria = 65;
|
CveConceptoDiferenciaCambiaria = 65;
|
||||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
|
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria;
|
||||||
TipoMovto = false;
|
TipoMovto = false;
|
||||||
Importe = (Importe * TCPago) - (Importe * TC);
|
Importe = (Importe * TCPago) - (Importe * TC);
|
||||||
}
|
|
||||||
else if (TCPago < TC)
|
|
||||||
{
|
|
||||||
CveConceptoDiferenciaCambiaria = 64;
|
|
||||||
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
|
|
||||||
TipoMovto = true;
|
|
||||||
Importe = (Importe * TC) - (Importe * TCPago);
|
|
||||||
}
|
|
||||||
ImporteMN = Importe;
|
|
||||||
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
|
||||||
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
|
||||||
}
|
}
|
||||||
|
else if (TCPago < TC)
|
||||||
|
{
|
||||||
|
CveConceptoDiferenciaCambiaria = 64;
|
||||||
|
IdCtaContableDiferenciaCambiaria = UsuarioActual.Empresa.IdCuentaGananciaCambiaria;
|
||||||
|
TipoMovto = true;
|
||||||
|
Importe = (Importe * TC) - (Importe * TCPago);
|
||||||
|
}
|
||||||
|
ImporteMN = Importe;
|
||||||
|
|
||||||
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Ref, CveConceptoDiferenciaCambiaria, Conc, DateTime.Now, IdCtaContableDiferenciaCambiaria, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
|
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
||||||
|
}
|
||||||
|
|
||||||
if (ImporteComisionMN > 0)
|
if (ImporteComisionMN > 0 && MsgError == "")
|
||||||
{
|
{
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, Ref, 255, Conc, DateTime.Now, IdCtaContableOtrosGastos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComisionMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, Ref, 255, Conc, DateTime.Now, IdCtaContableOtrosGastos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComisionMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
@@ -477,10 +481,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
|
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 30, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteMNBanco, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
|
||||||
|
|
||||||
//movimiento de ajuste por sino se aplicó en el proceso anterior
|
//movimiento de ajuste por sino se aplicó en el proceso anterior
|
||||||
if (CveMonedaPago != 1 && UsaComplementaria )
|
if (MsgError == "" && CveMonedaPago != 1 && UsaComplementaria )
|
||||||
{
|
{
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, Ref, 204, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||||
|
|
||||||
@@ -499,7 +503,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
tCveConceptoOtIngresos = 64; TipoMovtoOt = true;
|
tCveConceptoOtIngresos = 64; TipoMovtoOt = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOt, Dif.Abs(), Ref, tCveConceptoOtIngresos, Conc, DateTime.Now, 0, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: Dif.Abs(), ImporteME: Dif.Abs(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de ajuste en redondeo";
|
MsgError = "No se pudo insertar concepto de ajuste en redondeo";
|
||||||
}
|
}
|
||||||
@@ -517,7 +521,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
//VALIDA QUE CUADRE LA PREPOLIZA
|
//VALIDA QUE CUADRE LA PREPOLIZA
|
||||||
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
|
if (MsgError == "" && ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
|
||||||
{
|
{
|
||||||
if (ObjMov.ValorPolizaDescuadre > 0)
|
if (ObjMov.ValorPolizaDescuadre > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -237,7 +237,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,CveTipoConcepto"
|
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,CveTipoConcepto,TipoCambio"
|
||||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<asp:UpdatePanel ID="UpDeudores" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDeudores" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,IdCtaContDeudor"
|
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,IdCtaContDeudor,TipoCambio"
|
||||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -379,7 +379,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<asp:UpdatePanel ID="UpAcreedores" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpAcreedores" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvAcreedores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda,IdCtaContAcreedor"
|
<asp:GridView ID="GvAcreedores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda,IdCtaContAcreedor,TipoCambio"
|
||||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2864,7 +2864,7 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GVAnticipos" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,TipoDocto,CveIE,Fecha,CvePrePoliza,CveMoneda,TCCompra" EmptyDataText="No se encontraron Anticipos/NC del Proveedor" CssClass="table table-striped table-hover table-advance Widthall">
|
<asp:GridView ID="GVAnticipos" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCompra,TipoDocto,CveIE,Fecha,CvePrePoliza,CveMoneda,TCCompra,CveProveedor" EmptyDataText="No se encontraron Anticipos/NC del Proveedor" CssClass="table table-striped table-hover table-advance Widthall">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="30px">
|
<asp:TemplateField ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -8736,6 +8736,7 @@ Partial Class Compras_Compras
|
|||||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||||
Pago.CveMonedaPago = CveMonedaAnticipo
|
Pago.CveMonedaPago = CveMonedaAnticipo
|
||||||
Pago.TCPago = TipoCambioAnt
|
Pago.TCPago = TipoCambioAnt
|
||||||
|
Pago.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||||
|
|
||||||
Select Case gvr.DataKey("TipoDocto")
|
Select Case gvr.DataKey("TipoDocto")
|
||||||
Case "NC", "DEV"
|
Case "NC", "DEV"
|
||||||
@@ -8750,6 +8751,7 @@ Partial Class Compras_Compras
|
|||||||
CveConceptoCompraComplementaria = 266
|
CveConceptoCompraComplementaria = 266
|
||||||
IdCtaContable = If(CveMonedaAnticipo = 1, CtaProveedorAnticipos, CtaProveedorAnticiposExtranjera)
|
IdCtaContable = If(CveMonedaAnticipo = 1, CtaProveedorAnticipos, CtaProveedorAnticiposExtranjera)
|
||||||
IdCtaContableComp = CtaProveedorAnticiposComplementaria
|
IdCtaContableComp = CtaProveedorAnticiposComplementaria
|
||||||
|
|
||||||
'vinculo la compra actual, y no la compra como si fuera nota de credito
|
'vinculo la compra actual, y no la compra como si fuera nota de credito
|
||||||
CveCompraNC = -1
|
CveCompraNC = -1
|
||||||
CveIE = gvr.DataKey("CveIE").ToEntero
|
CveIE = gvr.DataKey("CveIE").ToEntero
|
||||||
|
|||||||
@@ -3941,12 +3941,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=Contabilizable) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1478,7 +1478,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCCheckBox("cbInv").Enabled = True
|
e.Row.FCCheckBox("cbInv").Enabled = True
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(345) Then 'carga la cantidad con el rol AD
|
If UsuarioActual.TienePermisoProceso(345) Then 'carga la cantidad con el rol AD
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal().ToString("{#,###.##}")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
@@ -1105,18 +1106,32 @@ public partial class Nomina_Finiquito : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool continuar = false;
|
bool continuar = true;
|
||||||
|
|
||||||
using (ClsRH ObjPersonal = new ClsRH())
|
using (ClsRH ObjPersonal = new ClsRH())
|
||||||
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
|
||||||
{
|
{
|
||||||
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"));
|
||||||
|
if (onom.DtResultados.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
continuar = false;
|
||||||
|
StringBuilder strbuild = new StringBuilder();
|
||||||
|
strbuild.Append("No es posible guardar el finiquito ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.");
|
||||||
|
foreach (DataRow drow in onom.DtResultados.Rows)
|
||||||
|
{
|
||||||
|
strbuild.AppendFormat("<br/> {0}", drow["PeriodoTexto"]);
|
||||||
|
}
|
||||||
|
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (continuar && ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
DataRow da = ObjPersonal.DtResultados.Rows[0];
|
||||||
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
|
||||||
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
|
||||||
// Alert(string.Format("{0}: {1}", CvePeriodoIndemnizacion, CvePeriodoFiniquito));
|
// Alert(string.Format("{0}: {1}", CvePeriodoIndemnizacion, CvePeriodoFiniquito));
|
||||||
}
|
}
|
||||||
|
else { continuar = false; }
|
||||||
if (continuar)
|
if (continuar)
|
||||||
{
|
{
|
||||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
|
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
|
||||||
@@ -1160,7 +1175,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
|||||||
dtempleadosConceptos = null;
|
dtempleadosConceptos = null;
|
||||||
dtempleados = null;
|
dtempleados = null;
|
||||||
LnkAutorizar.Visible = true;
|
LnkAutorizar.Visible = true;
|
||||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal,Neto:1) && objnom.DTSetResultados.Tables.Count > 1)
|
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal, Neto: 1) && objnom.DTSetResultados.Tables.Count > 1)
|
||||||
{
|
{
|
||||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
|
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
|
||||||
|
|||||||
@@ -5783,7 +5783,7 @@ Partial Class RH_Personal
|
|||||||
ViewState("FilesMoveimgNew") = filemove
|
ViewState("FilesMoveimgNew") = filemove
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||||
Next
|
Next
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
||||||
@@ -7480,9 +7480,28 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If continuar Then
|
||||||
|
|
||||||
|
Using onom As ClsNominas = New ClsNominas()
|
||||||
|
onom.ValidaFechaFinPersonal(CvePersonal, UsuarioActual.CveEmpresa, fecha.ToString("yyyy/MM/dd"))
|
||||||
|
|
||||||
|
If onom.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
continuar = False
|
||||||
|
Dim strbuild As StringBuilder = New StringBuilder()
|
||||||
|
strbuild.Append("No es posible desactivar con esta fecha ya que existen asistencias posteriores a la fecha fin con nominas autorizadas, es necesario desautorizar la siguientes nominas para reintentar el proceso.")
|
||||||
|
|
||||||
|
For Each drow As DataRow In onom.DtResultados.Rows
|
||||||
|
strbuild.AppendFormat("<br/> {0}", drow("PeriodoTexto"))
|
||||||
|
Next
|
||||||
|
Alert(strbuild.ToString(), TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
If continuar Then
|
If continuar Then
|
||||||
Using objrh As New ClsRH
|
Using objrh As New ClsRH
|
||||||
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(),)
|
continuar = objrh.estatusPersonalUp(fecha, CvePersonal, estatus, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlMotivoBaja.SelectedValue.ToEntero(), Txobservacionesbaja.Text)
|
||||||
End Using
|
End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -3356,8 +3356,9 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="TipoDispositivoDisplay" ItemStyle-Width="15%" HeaderText="Tipo Dispositivo" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="TipoDispositivoDisplay" ItemStyle-Width="15%" HeaderText="Tipo Dispositivo" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Display" ItemStyle-Width="15%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Display" ItemStyle-Width="15%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="AsignadoEn" ItemStyle-Width="15%" HeaderText="Asignación" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Modelo" ItemStyle-Width="10%" HeaderText="Modelo" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Modelo" ItemStyle-Width="10%" HeaderText="Modelo" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Serie" ItemStyle-Width="15%" HeaderText="Serie" ItemStyle-HorizontalAlign="Left" />
|
<%--<asp:BoundField DataField="Serie" ItemStyle-Width="15%" HeaderText="Serie" ItemStyle-HorizontalAlign="Left" />--%>
|
||||||
<asp:BoundField DataField="IMEI" ItemStyle-Width="20%" HeaderText="IMEI" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="IMEI" ItemStyle-Width="20%" HeaderText="IMEI" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="NumeroTelefono" ItemStyle-Width="20%" HeaderText="Número Teléfono" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="NumeroTelefono" ItemStyle-Width="20%" HeaderText="Número Teléfono" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" HeaderText="Fecha Ing" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|||||||
@@ -122,13 +122,13 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
<asp:GridView ID="GvLAPO" Width="100%" runat="server" GridLines="None" Visible="false"
|
<asp:GridView ID="GvLAPO" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||||
DataKeyNames="CveLineaAdicional,LineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveLineaAdicionalEstatus,LineaAdicionalComprobante,CveVenta,CveCliente"
|
DataKeyNames="CveLineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveLineaAdicionalEstatus,LineaAdicionalComprobante,CveVenta,CveCliente,CveProveedor"
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
||||||
OnRowCommand="GvLAPO_RowCommand"
|
OnRowCommand="GvLAPO_RowCommand"
|
||||||
OnRowDataBound="GvLAPO_RowDataBound">
|
OnRowDataBound="GvLAPO_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="Agrupador" HeaderText="Agrupador" />
|
<asp:BoundField DataField ="Agrupador" HeaderText="Agrupador" />
|
||||||
<asp:BoundField DataField="LineaAdicional" HeaderText="PO" />
|
<asp:BoundField DataField="LineaAdicional" HeaderText="PO" />
|
||||||
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
||||||
@@ -151,12 +151,12 @@
|
|||||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
|
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
|
||||||
ToolTip="Descargar Comprobante" />
|
ToolTip="Descargar Comprobante" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="max-width:26px!important" title="Cambiar esatatus a Enviado">
|
<div class="col-md-4" style="max-width:26px!important" title="Cambiar estatus a Enviado">
|
||||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
|
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
|
||||||
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
|
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
|
||||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
|
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
|
||||||
ToolTip="Cambiar esatatus a Enviado" />
|
ToolTip="Cambiar estatus a Enviado" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
|
|
||||||
string RutaArchivoTemp = "";
|
string RutaArchivoTemp = "";
|
||||||
foreach (Archivo fileItem in filesgral)
|
foreach (Archivo fileItem in filesgral)
|
||||||
{
|
|
||||||
{
|
{
|
||||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||||
filemove = fileItem.filename;
|
filemove = fileItem.filename;
|
||||||
@@ -266,8 +265,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
}
|
}
|
||||||
File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
||||||
errorCargaComprobante = false;
|
errorCargaComprobante = false;
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
errorCargaComprobante = true;
|
errorCargaComprobante = true;
|
||||||
@@ -295,28 +293,22 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
UpAddComprobancte.Update();
|
UpAddComprobancte.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||||
{
|
|
||||||
{
|
{
|
||||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
|
||||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
|
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
||||||
bool errorCambioEstatus = false;
|
|
||||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||||
bool errorCambioEstatus = false;
|
bool errorCambioEstatus = false;
|
||||||
ClsVentas objVentas = new ClsVentas();
|
ClsVentas objVentas = new ClsVentas();
|
||||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, "",2,UsuarioActual.CveEmpresa))
|
|
||||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, "", 2, UsuarioActual.CveEmpresa))
|
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, "", 2, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
errorCambioEstatus = true;
|
errorCambioEstatus = true;
|
||||||
}
|
}
|
||||||
if (!errorCambioEstatus)
|
if (!errorCambioEstatus)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
}
|
}
|
||||||
}
|
objVentas.Dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||||
@@ -329,8 +321,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
}
|
}
|
||||||
else if(TipoLinea == 2)
|
else if(TipoLinea == 2)
|
||||||
{
|
{
|
||||||
GridView gvTemp = GvLAPO;
|
GridView gvTemp = GvLAPO;
|
||||||
gvTemp.Columns[12].Visible = false;
|
|
||||||
gvTemp.Columns[12].Visible = false;
|
gvTemp.Columns[12].Visible = false;
|
||||||
//gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
//gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||||
gvTemp.ExportToExcelGembox( "ReportePO", UsuarioActual, "Reporte PO ", AnchoImagen:150);
|
gvTemp.ExportToExcelGembox( "ReportePO", UsuarioActual, "Reporte PO ", AnchoImagen:150);
|
||||||
@@ -346,7 +337,11 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||||
|
|
||||||
if (e.Row.DataKey("CveLineaAdicional")=="")
|
if (e.Row.DataKey("CveLineaAdicional")=="")
|
||||||
|
{
|
||||||
|
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "")
|
||||||
|
{
|
||||||
|
e.Row.CssClass = "SubTotales2";
|
||||||
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "")
|
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "")
|
||||||
{
|
{
|
||||||
e.Row.Cells[0].Text = "<a href='/Compras/Proveedores.aspx?CveProveedor="+ e.Row.DBCampo("CveProveedor") + "' >"+ e.Row.DBCampo("Proveedor") +"</a>";
|
e.Row.Cells[0].Text = "<a href='/Compras/Proveedores.aspx?CveProveedor="+ e.Row.DBCampo("CveProveedor") + "' >"+ e.Row.DBCampo("Proveedor") +"</a>";
|
||||||
@@ -374,8 +369,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
|
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
|
||||||
|
|
||||||
if (fi.Exists)
|
if (fi.Exists)
|
||||||
{
|
{
|
||||||
LnkDescargaComprobante.Visible = true;
|
|
||||||
LnkDescargaComprobante.Visible = true;
|
LnkDescargaComprobante.Visible = true;
|
||||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
||||||
}
|
}
|
||||||
@@ -410,8 +404,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
int CveLineaAdicionalActualizarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
int CveLineaAdicionalActualizarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||||
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||||
|
|
||||||
bool errorCambioEstatus = false;
|
bool errorCambioEstatus = false;
|
||||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
|
||||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
||||||
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
ClsVentas objVentas = new ClsVentas();
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ Partial Class Ventas_RepVentas
|
|||||||
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
|
DdlGrupo.Items.Insert(2, New ListItem("Año/Mes", "3"))
|
||||||
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
|
DdlGrupo.Items.Insert(3, New ListItem("Fecha", "4"))
|
||||||
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
|
DdlGrupo.Items.Insert(4, New ListItem("Cliente", "5"))
|
||||||
DdlGrupo.Items.Insert(4, New ListItem("SubProyecto", "6"))
|
DdlGrupo.Items.Insert(4, New ListItem(LblSubProyecto.Text, "6"))
|
||||||
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
|
DdlGrupo.Items.Insert(5, New ListItem("Corte", "16"))
|
||||||
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
|
DdlGrupo.Items.Insert(6, New ListItem("Vendedor", "7"))
|
||||||
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
|
DdlGrupo.Items.Insert(7, New ListItem("Usuario", "8"))
|
||||||
|
|||||||
@@ -242,8 +242,8 @@
|
|||||||
OnClick="LnkAplicarRNCDevolucion_Click" />
|
OnClick="LnkAplicarRNCDevolucion_Click" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBAplicaDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Devolución"
|
<asp:LinkButton ID="LBAplicaDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Devolución" OnClick="LBAplicaDevolucion_Click"
|
||||||
data-toggle="modal" data-target="#DivAplicaDevolucion" Visible="false" />
|
Visible="false" />
|
||||||
</li>
|
</li>
|
||||||
<%--TERMINA: CANCELAR - NC - DEVOLUCION [NEW]--%>
|
<%--TERMINA: CANCELAR - NC - DEVOLUCION [NEW]--%>
|
||||||
|
|
||||||
@@ -1675,7 +1675,12 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabAlmacen" runat="server" HeaderText="Almacén">
|
<ajax:TabPanel ID="TabAlmacen" runat="server">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<span onclick="CargaMovimientosInventario();" id="spanAlmacen" runat="server">
|
||||||
|
Almacen
|
||||||
|
</span>
|
||||||
|
</HeaderTemplate>
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<%--<asp:UpdatePanel ID="UpInvDev" UpdateMode="Conditional" runat="server">
|
<%--<asp:UpdatePanel ID="UpInvDev" UpdateMode="Conditional" runat="server">
|
||||||
@@ -1719,6 +1724,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpINV" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpINV" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnCargarInventario" runat="server" ClientIDMode="Static" Text="" Style="display: none;" OnClick="BtnCargarInventario_Click" />
|
||||||
<div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server">
|
<div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@@ -9402,6 +9408,7 @@
|
|||||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function CalculaTotalPagoContado() {
|
function CalculaTotalPagoContado() {
|
||||||
|
|
||||||
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||||
@@ -9822,6 +9829,10 @@
|
|||||||
$('#BtnAplicaNuevaNC').click();
|
$('#BtnAplicaNuevaNC').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CargaMovimientosInventario() {
|
||||||
|
$('#BtnCargarInventario').click();
|
||||||
|
}
|
||||||
|
|
||||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
$('.DdlPSPyME').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||||
|
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ Partial Class Ventas
|
|||||||
Return IfNull(ViewState("MailCC"), "").ToString()
|
Return IfNull(ViewState("MailCC"), "").ToString()
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private ReadOnly Property CveVenta As Integer
|
Public ReadOnly Property CveVenta As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveVenta").ToString().ToEntero()
|
Return ViewState("CveVenta").ToString().ToEntero()
|
||||||
End Get
|
End Get
|
||||||
@@ -2078,22 +2078,6 @@ Partial Class Ventas
|
|||||||
ViewState("DiasVencidosCliente") = value
|
ViewState("DiasVencidosCliente") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property VentaSaldoAlmacen As Decimal
|
|
||||||
Get
|
|
||||||
Return ViewState("VentaSaldoAlmacen").ToString().ToDecimal
|
|
||||||
End Get
|
|
||||||
Set(value As Decimal)
|
|
||||||
ViewState("VentaSaldoAlmacen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property VentaSaldoAlmacenNC As Decimal
|
|
||||||
Get
|
|
||||||
Return IfNull(ViewState("VentaSaldoAlmacenNC"), 0, ViewState("VentaSaldoAlmacenNC").ToString().ToDecimal()).ToString().ToDecimal()
|
|
||||||
End Get
|
|
||||||
Set(value As Decimal)
|
|
||||||
ViewState("VentaSaldoAlmacenNC") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property SeCancelaRemisionProceso As Boolean
|
Private Property SeCancelaRemisionProceso As Boolean
|
||||||
Get
|
Get
|
||||||
Return CBool(ViewState("SeCancelaRemisionProceso").ToString())
|
Return CBool(ViewState("SeCancelaRemisionProceso").ToString())
|
||||||
@@ -2816,14 +2800,6 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'CargaDetalle de Almacen
|
'CargaDetalle de Almacen
|
||||||
If Not LblAlertRefacInv.Visible Then
|
|
||||||
If CveVentaPadre > 0 Then
|
|
||||||
InventarioMov(CveVentaPadre)
|
|
||||||
Else
|
|
||||||
InventarioMov()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'PERMISO PARA CANCELAR PEDIDO
|
'PERMISO PARA CANCELAR PEDIDO
|
||||||
If GvInv.Rows.Count = 0 Then
|
If GvInv.Rows.Count = 0 Then
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ped") And Not CveEstatus = 14 Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ped") And Not CveEstatus = 14 Then
|
||||||
@@ -2867,6 +2843,15 @@ Partial Class Ventas
|
|||||||
ViewState("CveOS") = Request("CveOS")
|
ViewState("CveOS") = Request("CveOS")
|
||||||
CargaOS(CveOS)
|
CargaOS(CveOS)
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
'SI ES VENTA NUEVA, NO RECARGAR TAB DE ALMACEN
|
||||||
|
If CveVenta <= 0 Then
|
||||||
|
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||||
|
spanAlmacen.Attributes.Remove("onclick")
|
||||||
|
Tab.ActiveTabIndex = 1
|
||||||
|
Updatetabs.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
'Modalidad Devoluciones y Refacturacion
|
'Modalidad Devoluciones y Refacturacion
|
||||||
If Request("CveDevolucion") IsNot Nothing AndAlso IsNumeric(Request("CveDevolucion")) AndAlso Request("CveDevolucion").ToEntero() > 0 Then
|
If Request("CveDevolucion") IsNot Nothing AndAlso IsNumeric(Request("CveDevolucion")) AndAlso Request("CveDevolucion").ToEntero() > 0 Then
|
||||||
ViewState("CveDevolucion") = Request("CveDevolucion")
|
ViewState("CveDevolucion") = Request("CveDevolucion")
|
||||||
@@ -3113,7 +3098,7 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'CargaDetalle de Almacen
|
'CargaDetalle de Almacen
|
||||||
InventarioMov()
|
'InventarioMov()
|
||||||
|
|
||||||
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
@@ -4594,7 +4579,7 @@ Partial Class Ventas
|
|||||||
'CARGA DTs DE VENTAS
|
'CARGA DTs DE VENTAS
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 Then
|
||||||
Using ObjVentas As New ClsVentas()
|
Using ObjVentas As New ClsVentas()
|
||||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
DbRowVenta = ObjVentas.DtResultados.Copy().Rows(0)
|
DbRowVenta = ObjVentas.DtResultados.Copy().Rows(0)
|
||||||
Else
|
Else
|
||||||
@@ -4772,15 +4757,6 @@ Partial Class Ventas
|
|||||||
ViewState("SaldoVenta") = DbRowVenta("Saldo").ToString()
|
ViewState("SaldoVenta") = DbRowVenta("Saldo").ToString()
|
||||||
AplicaCancelarRemision = CBool(DbRowVenta("AplicaCancelarRemision").ToString())
|
AplicaCancelarRemision = CBool(DbRowVenta("AplicaCancelarRemision").ToString())
|
||||||
If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True
|
If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True
|
||||||
VentaSaldoAlmacen = DbRowVenta("SaldoAlmacen").ToString().ToDecimal
|
|
||||||
|
|
||||||
If DbRowVenta("TipoDocto").ToString().Contiene("Rem", "Dev") AndAlso VentaSaldoAlmacen <> 0 Then
|
|
||||||
ChkDevAlm.Checked = True
|
|
||||||
LiDevolucionAlmacen.Visible = True
|
|
||||||
If DbRowVenta("TipoDocto").ToString() = "Dev" Then
|
|
||||||
LblDevAlm.Text = "Salida de almacen"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If CveEstatus = 5 Then LbCancelarDocumento.Enabled = False
|
If CveEstatus = 5 Then LbCancelarDocumento.Enabled = False
|
||||||
@@ -5673,21 +5649,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ObjUsados.Dispose()
|
ObjUsados.Dispose()
|
||||||
|
|
||||||
Dim SaldoAlmacenExA As Decimal = 0
|
BtnsFacturar.Visible = True
|
||||||
'Dim SaldoAlmacenUsados As Decimal = 0
|
|
||||||
|
|
||||||
Using ObjInventarios As New ClsInventarios
|
|
||||||
'VERIFICA SI HACE FALTA DEVOLVER PRODUCTOS Y USADOS EN ESPECIFICO
|
|
||||||
If ObjInventarios.GetSaldoVentaDetalleAlmacen(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
SaldoAlmacenExA = ObjInventarios.DtResultados.SUMD("SaldoAlmacen", $"CveTipoAlmacen = 10")
|
|
||||||
'SaldoAlmacenUsados = ObjInventarios.DtResultados.SUMD("SaldoAlmacen", $"CveTipoAlmacen = 22")
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
|
|
||||||
'Si ya se surtió y recibió
|
|
||||||
If SaldoAlmacenExA > 0 OrElse TmpDT.MAX("CveTipoPS") = "1" Then
|
|
||||||
BtnsFacturar.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
||||||
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
||||||
@@ -7767,7 +7729,6 @@ Partial Class Ventas
|
|||||||
If DTFacNC IsNot Nothing AndAlso DTFacNC.Rows.Count > 0 Then
|
If DTFacNC IsNot Nothing AndAlso DTFacNC.Rows.Count > 0 Then
|
||||||
Me.CveEstatusRefacturacion = DTFacNC.Rows(0)("CveEstatusRefacturacion").ToString().ToEntero()
|
Me.CveEstatusRefacturacion = DTFacNC.Rows(0)("CveEstatusRefacturacion").ToString().ToEntero()
|
||||||
Me.DevolucionAlmacenNC = DTFacNC.Rows(0)("EsDevolucionVenta").ToString().ToEntero()
|
Me.DevolucionAlmacenNC = DTFacNC.Rows(0)("EsDevolucionVenta").ToString().ToEntero()
|
||||||
Me.VentaSaldoAlmacenNC = DTFacNC.Rows(0)("SaldoAlmacen").ToString().ToDecimal
|
|
||||||
HdnRFCVenta.Value = DTFacNC.Rows(0)("ClienteRFC").ToString()
|
HdnRFCVenta.Value = DTFacNC.Rows(0)("ClienteRFC").ToString()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -21767,6 +21728,23 @@ Partial Class Ventas
|
|||||||
If RefacturarCancelada Then
|
If RefacturarCancelada Then
|
||||||
Response.Redirect($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
|
Response.Redirect($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
|
||||||
Else
|
Else
|
||||||
|
'si es la empresa 119, Candado, no permite refacturar, si no se ha surtido y que no sea refacturación, para que cancele la factura mejor.
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso LkRefacturacion.Visible AndAlso CveVentaPadre <= 0 Then
|
||||||
|
Dim PermiteRefacturarar As Boolean = True
|
||||||
|
Using ObjInv As New ClsInventarios
|
||||||
|
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
|
PermiteRefacturarar = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If Not PermiteRefacturarar Then
|
||||||
|
Alert("La factura no se puede refacturar si no ha sido surtida previamente", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Dim script As String = ""
|
Dim script As String = ""
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||||
Dim sb As New StringBuilder()
|
Dim sb As New StringBuilder()
|
||||||
@@ -23541,22 +23519,22 @@ Partial Class Ventas
|
|||||||
#Region " INVENTARIO POR ENTREGA"
|
#Region " INVENTARIO POR ENTREGA"
|
||||||
Private Sub InventarioMov(Optional CveVentaPadre As Integer = -1)
|
Private Sub InventarioMov(Optional CveVentaPadre As Integer = -1)
|
||||||
If CveVentaPadre > 0 Then
|
If CveVentaPadre > 0 Then
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim RowVentas As DataRow = Nothing
|
||||||
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
Using ObjVentas As New ClsVentas
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 AndAlso ObjVentas.DtResultados.Rows(0)("TipoDocto").ToString() = "Ing" AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||||
' Dim CveEstatusRefacturacion As Integer = ObjVentas.DtResultados.Rows(0)("CveEstatusRefacturacion").ToString().ToEntero()
|
RowVentas = ObjVentas.DtResultados.Copy().Rows(0)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
' If CveEstatusRefacturacion = 2 Then
|
If RowVentas IsNot Nothing Then
|
||||||
CargaInventario(Me.CveVenta)
|
If RowVentas("TipoDocto").ToString().Contiene("Ing") AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
CargaInventario(Me.CveVenta)
|
CargaInventario(Me.CveVenta)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
|
||||||
Else
|
Else
|
||||||
CargaInventario(Me.CveVenta)
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Dev") Then
|
||||||
|
CargaInventario(Me.CveVenta)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaInventario(CveVenta As Integer)
|
Private Sub CargaInventario(CveVenta As Integer)
|
||||||
@@ -23572,14 +23550,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|
||||||
'si es la empresa 119, Candado, no permite refacturar, si no se ha surtido y que no sea refacturación, para que cancele la factura mejor.
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso LkRefacturacion.Visible AndAlso VentaSaldoAlmacen = 0 And CveVentaPadre <= 0 Then
|
|
||||||
LkRefacturacion.Visible = False
|
|
||||||
End If
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveVenta = 620098 Then
|
|
||||||
LkRefacturacion.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGVInv(DtTemporal As DataTable)
|
Private Sub CargaGVInv(DtTemporal As DataTable)
|
||||||
|
|
||||||
@@ -23645,9 +23615,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#Region " DEVOLUCION ALMACEN "
|
#Region " DEVOLUCION ALMACEN "
|
||||||
Private Sub InicializaDevolucionAlmacen()
|
Private Sub InicializaDevolucionAlmacen()
|
||||||
If Not GvInv.Rows.Count > 0 Then
|
'If Not GvInv.Rows.Count > 0 Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
||||||
|
|
||||||
@@ -23667,17 +23637,17 @@ Partial Class Ventas
|
|||||||
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
|
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If VentaSaldoAlmacen < 0 Then
|
'If VentaSaldoAlmacen < 0 Then
|
||||||
If DevolucionAlmacen = 0 Then
|
' If DevolucionAlmacen = 0 Then
|
||||||
LBAplicaDevolucion.Visible = True
|
' LBAplicaDevolucion.Visible = True
|
||||||
ElseIf DevolucionAlmacen.Contiene(1, 2) Then
|
' ElseIf DevolucionAlmacen.Contiene(1, 2) Then
|
||||||
LBAplicaDevolucion.Visible = False
|
' LBAplicaDevolucion.Visible = False
|
||||||
End If
|
' End If
|
||||||
ElseIf VentaSaldoAlmacen >= 0 Then
|
'ElseIf VentaSaldoAlmacen >= 0 Then
|
||||||
LBAplicaDevolucion.Visible = False
|
' LBAplicaDevolucion.Visible = False
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Dev" AndAlso VentaSaldoAlmacen <> 0 Then
|
If DdlTipoComprobante.SelectedValue = "Dev" Then
|
||||||
LiDevolucionAlmacen.Visible = False
|
LiDevolucionAlmacen.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -23687,14 +23657,22 @@ Partial Class Ventas
|
|||||||
'UpInvDev.Update()
|
'UpInvDev.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim SaldoAlmacen As Decimal = 0
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=True) Then
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||||
Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString().ToEntero()
|
Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString().ToEntero()
|
||||||
|
SaldoAlmacen = DbRowVenta("SaldoAlmacen").ToString().ToDecimal()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If SaldoAlmacen >= 0 Then
|
||||||
|
Alert("El movimiento ya fue devuelto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If Me.DevolucionAlmacen.Contiene(2) Then
|
If Me.DevolucionAlmacen.Contiene(2) Then
|
||||||
InicializaDevolucionAlmacen()
|
InicializaDevolucionAlmacen()
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
@@ -24677,10 +24655,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MostrarCondicionesCancelacion(Optional Extra As String = "")
|
Private Sub MostrarCondicionesCancelacion(Optional Extra As String = "", Optional SaldoAlmacen As Decimal = 0)
|
||||||
Dim SbCondiciones As New StringBuilder()
|
Dim SbCondiciones As New StringBuilder()
|
||||||
|
|
||||||
If VentaSaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
|
If SaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
|
||||||
SbCondiciones.Append("<b>*Se realizará una devolución en automatico al realizar la cancelación.</b>")
|
SbCondiciones.Append("<b>*Se realizará una devolución en automatico al realizar la cancelación.</b>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -24705,11 +24683,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim sb As New StringBuilder()
|
Dim sb As New StringBuilder()
|
||||||
Dim sbExtra As New StringBuilder()
|
Dim sbExtra As New StringBuilder()
|
||||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||||
|
|
||||||
|
|
||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
|
|
||||||
Dim RFCReceptor As String = ""
|
Dim RFCReceptor As String = ""
|
||||||
|
|
||||||
If String.IsNullOrEmpty(Me.RFCReceptorVenta) Then
|
If String.IsNullOrEmpty(Me.RFCReceptorVenta) Then
|
||||||
@@ -24723,6 +24699,36 @@ Partial Class Ventas
|
|||||||
RFCReceptor = Me.RFCReceptorVenta
|
RFCReceptor = Me.RFCReceptorVenta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim SaldoAlmacen As Decimal = 0
|
||||||
|
|
||||||
|
Dim PermiteCancelar As Boolean = True
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=True) Then
|
||||||
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim RowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||||
|
|
||||||
|
SaldoAlmacen = RowVenta("SaldoAlmacen").ToString().ToDecimal()
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Dev") AndAlso SaldoAlmacen <> 0 Then
|
||||||
|
ChkDevAlm.Checked = True
|
||||||
|
LiDevolucionAlmacen.Visible = True
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Dev" Then
|
||||||
|
LblDevAlm.Text = "Salida de almacen"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
PermiteCancelar = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
PermiteCancelar = False
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If Not PermiteCancelar Then
|
||||||
|
Alert("La venta no se puede cancelar si no ha sido surtida previamente", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
@@ -24827,7 +24833,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
LblCancelarDocumento.Text = sb.ToString()
|
LblCancelarDocumento.Text = sb.ToString()
|
||||||
MostrarCondicionesCancelacion(sbExtra.ToString())
|
MostrarCondicionesCancelacion(sbExtra.ToString(), SaldoAlmacen)
|
||||||
|
|
||||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||||
UpCancelarDocumento.Update()
|
UpCancelarDocumento.Update()
|
||||||
@@ -30142,12 +30148,14 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
LBAplicaDevolucion.Visible = True
|
||||||
|
|
||||||
'SOLO APLICA DEVOLUCION SI TIENE MOVIMIENTOS DE ALMACEN
|
'SOLO APLICA DEVOLUCION SI TIENE MOVIMIENTOS DE ALMACEN
|
||||||
If VentaSaldoAlmacen < 0 Then
|
'If VentaSaldoAlmacen < 0 Then
|
||||||
LBAplicaDevolucion.Visible = True
|
' LBAplicaDevolucion.Visible = True
|
||||||
ElseIf VentaSaldoAlmacen >= 0 Then
|
'ElseIf VentaSaldoAlmacen >= 0 Then
|
||||||
LBAplicaDevolucion.Visible = False
|
' LBAplicaDevolucion.Visible = False
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim SeEsconde As Boolean = False
|
Dim SeEsconde As Boolean = False
|
||||||
|
|
||||||
@@ -30197,7 +30205,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
'VALIDACIONES
|
|
||||||
Dim Selecciono As Boolean = False
|
Dim Selecciono As Boolean = False
|
||||||
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
For Each Gv As GridViewRow In GvAplicaDevolucion.Rows
|
||||||
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDouble > 0 Then
|
If Gv.FCCheckBox("Chk").Checked And Gv.FCTextBox("TxtCantidadAplicaDevolucion").Text.ToDouble > 0 Then
|
||||||
@@ -32813,6 +32821,11 @@ Partial Class Ventas
|
|||||||
DivAdjuntar.Visible = True
|
DivAdjuntar.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||||
|
spanAlmacen.Attributes.Remove("onclick")
|
||||||
|
Tab.ActiveTabIndex = 1
|
||||||
|
Updatetabs.Update()
|
||||||
|
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
@@ -32919,6 +32932,30 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim TieneSoloServicios As Boolean = TmpDT.MAX("CveTipoPS") = "1"
|
||||||
|
'SI ES REMISION Y TIENE PRODUCTOS, DEBE VERIFICAR EL ALMACEN
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not TieneSoloServicios AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" AndAlso Not TmpDT.MAX("CveTipoPS") = "1" Then
|
||||||
|
Dim SaldoAlmacenExA As Decimal = 0
|
||||||
|
'Dim SaldoAlmacenUsados As Decimal = 0
|
||||||
|
|
||||||
|
Using ObjInventarios As New ClsInventarios
|
||||||
|
'VERIFICA SI HACE FALTA DEVOLVER PRODUCTOS Y USADOS EN ESPECIFICO
|
||||||
|
If ObjInventarios.GetSaldoVentaDetalleAlmacen(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
SaldoAlmacenExA = ObjInventarios.DtResultados.SUMD("SaldoAlmacen", $"CveTipoAlmacen = 10")
|
||||||
|
'SaldoAlmacenUsados = ObjInventarios.DtResultados.SUMD("SaldoAlmacen", $"CveTipoAlmacen = 22")
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'Si ya se surtió y recibió
|
||||||
|
If SaldoAlmacenExA <= 0 Then
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
Alert("No se puede facturar hasta que se haya surtido la remisión", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
@@ -36467,8 +36504,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Using ObjVentas As New ClsVentas
|
Using ObjVentas As New ClsVentas
|
||||||
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), Me.CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", -1, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Se actualizo la linea adicional de crédito de la venta")
|
Alert("Se actualizó la linea adicional de crédito de la venta")
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
End Sub
|
End Sub
|
||||||
@@ -36488,5 +36525,50 @@ Partial Class Ventas
|
|||||||
|
|
||||||
UpComercioExterior.Update()
|
UpComercioExterior.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub BtnCargarInventario_Click(sender As Object, e As EventArgs)
|
||||||
|
If Not LblAlertRefacInv.Visible Then
|
||||||
|
If CveVentaPadre > 0 Then
|
||||||
|
InventarioMov(CveVentaPadre)
|
||||||
|
Else
|
||||||
|
InventarioMov()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'REMOVER EVENTO PARA RECARGAR ALMACEN
|
||||||
|
spanAlmacen.Attributes.Remove("onclick")
|
||||||
|
Tab.ActiveTabIndex = 1
|
||||||
|
Updatetabs.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim SaldoAlmacen As Decimal = 0
|
||||||
|
|
||||||
|
Dim PermiteCancelar As Boolean = True
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=True) Then
|
||||||
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim RowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||||
|
SaldoAlmacen = RowVenta("SaldoAlmacen").ToString().ToDecimal()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Dim PuedeAplicarDevolucion As Boolean = False
|
||||||
|
|
||||||
|
If SaldoAlmacen < 0 Then
|
||||||
|
If DevolucionAlmacen = 0 Then
|
||||||
|
PuedeAplicarDevolucion = True
|
||||||
|
ElseIf DevolucionAlmacen.Contiene(1, 2) Then
|
||||||
|
Alert("No se puede aplicar una devolución sobre el documento actual", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
ElseIf SaldoAlmacen >= 0 Then
|
||||||
|
Alert("No se puede aplicar una devolución sobre el documento actual", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PuedeAplicarDevolucion Then
|
||||||
|
RegistraScript("$('#DivAplicaDevolucion').modal('show');")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user