This commit is contained in:
2025-01-24 06:05:57 -07:00
29 changed files with 3173 additions and 223 deletions

View File

@@ -199,7 +199,8 @@ Public Class ClsCompras
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1, Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Decimal = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1, Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Decimal = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Integer = 0, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Decimal = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1, Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Integer = 0, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Decimal = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1) As Boolean Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1,
Optional CveCompraRelacionada As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -255,6 +256,7 @@ Public Class ClsCompras
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados .Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@CveCompraRelacionada", SqlDbType.Int).Value = CveCompraRelacionada
End With End With
Try Try

View File

@@ -376,7 +376,8 @@ Public Class ClsInventarios
End Function End Function
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1) As Boolean Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1,
Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1, Optional AlmacenAbreviatura As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
CveAlmacenAgregado = -1 CveAlmacenAgregado = -1
@@ -394,6 +395,7 @@ Public Class ClsInventarios
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza .Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
.Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual .Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual
.Add("@AlmacenAbreviatura", SqlDbType.VarChar).Value = AlmacenAbreviatura
.Add("@CveAlmacenAgregado", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveAlmacenAgregado", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
@@ -414,7 +416,8 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1) As Boolean Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Orden As Integer = -1,
Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1, Optional AlmacenAbreviatura As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesUpdate") DataAdapter("PA_Inv_AlmacenesUpdate")
@@ -432,6 +435,7 @@ Public Class ClsInventarios
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza .Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
.Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual .Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual
.Add("@AlmacenAbreviatura", SqlDbType.VarChar).Value = AlmacenAbreviatura
End With End With

View File

@@ -2700,6 +2700,32 @@ Public Class ClsNominas
End Try End Try
Return retorno Return retorno
End Function End Function
Public Function ReporteVacaciones(CveProyecto As Integer, CveSubProyecto As Integer, cveEmpresa As Integer, fechaInicio As String, fechaFin As String) As Boolean
Dim retorno As Boolean = False
Try
DTSet = New DataSet()
DataAdapter("PA_Nom_ReporteVacaciones", CommandType.StoredProcedure)
SqlAdapter.SelectCommand.CommandTimeout = 2400
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@FechaInicio", SqlDbType.Date).Value = fechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = fechaFin
End With
SqlAdapter.Fill(DTSet)
retorno = True
Catch sqEx As SqlException
retorno = False
OnError("Ocurrió un error al realizar el reporte de vacaciones.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al realizar el reporte de vacaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function GetNominasSinTimbrar(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean Public Function GetNominasSinTimbrar(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
Try Try

View File

@@ -8452,7 +8452,7 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString)) RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo)) RptParametro.Add(New ReportParameter("Periodo", ObjNomina.TipoPeriodo))
RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString)) RptParametro.Add(New ReportParameter("DiasPagados", ObjNomina.DiasPagados.ToString))
RptParametro.Add(New ReportParameter("MetodoPago", ObjNomina.MetodoPago)) '"""PUE"" (Pago en una sola exhibición)"- RptParametro.Add(New ReportParameter("MetodoPago", """PUE"" (Pago en una sola exhibición)")) 'ObjNomina.MetodoPago
RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)")) RptParametro.Add(New ReportParameter("FormaPago", """99"" (Por definir)"))
RptParametro.Add(New ReportParameter("Cantidad", "1")) RptParametro.Add(New ReportParameter("Cantidad", "1"))
RptParametro.Add(New ReportParameter("Unidad", "ACT")) RptParametro.Add(New ReportParameter("Unidad", "ACT"))
@@ -9852,6 +9852,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Documentacion/TableroMaterialidadDetalle.aspx".ToUpper(), 965) PaginaDict.Add("/Documentacion/TableroMaterialidadDetalle.aspx".ToUpper(), 965)
PaginaDict.Add("/RH/DiasFestivos.aspx".ToUpper(), -1) PaginaDict.Add("/RH/DiasFestivos.aspx".ToUpper(), -1)
PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/FiniquitoB.aspx".ToUpper(), -1)
PaginaDict.Add("/Nomina/ReporteVacaciones.aspx".ToUpper(), -1)
'------------ Páginas agregadas recientemente (Implementación Metronic) ------------ '------------ Páginas agregadas recientemente (Implementación Metronic) ------------
PaginaDict.Add("/Default2.aspx".ToUpper(), -1) PaginaDict.Add("/Default2.aspx".ToUpper(), -1)

View File

@@ -2482,7 +2482,8 @@ Public Class ClsVentas
#Region " PROMOCIONES " #Region " PROMOCIONES "
Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer, Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1, Optional CvePS As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesGet") DataAdapter("PA_Vta_PromocionesGet")
@@ -2496,6 +2497,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
.Add("@CvePS", SqlDbType.Int).Value = CvePS
End With End With
Try Try
@@ -7568,6 +7570,28 @@ Public Class ClsVentas
#End Region #End Region
Public Function GetRepVentasBiosistemas(CveEmpresa As Integer, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasBiosistemasGetRep")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"

View File

@@ -37,9 +37,9 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>
<asp:HyperLink ID="HplImprimirPDF" runat="server" Target="_blank" Visible="true" ><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:HyperLink> <asp:HyperLink ID="HplImprimirPDF" runat="server" Target="_blank" Visible="true"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:HyperLink>
</li> </li>
<%-- <li> <%-- <li>
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton> <asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>--%> </li>--%>
@@ -152,8 +152,8 @@
</div> </div>
<div class="col-md-2" runat="server"> <div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None" <asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"> ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
</asp:RequiredFieldValidator> </asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
@@ -179,19 +179,19 @@
<div class="col-md-1" runat="server" id="divTipoPago1"> <div class="col-md-1" runat="server" id="divTipoPago1">
<label style="width: 100px;">Forma de Pago:</label> <label style="width: 100px;">Forma de Pago:</label>
</div> </div>
<div class="col-md-1" runat="server" id="divTipoPago" > <div class="col-md-1" runat="server" id="divTipoPago">
<asp:DropDownList ID="DdlTipoDeposito" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me" > <asp:DropDownList ID="DdlTipoDeposito" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem> <asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem> <asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem> <asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
<asp:ListItem Value="11" Text="Tarjeta de Débito"></asp:ListItem> <asp:ListItem Value="11" Text="Tarjeta de Débito"></asp:ListItem>
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem> <asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
<asp:ListItem Value="8" Text="Transferencia"></asp:ListItem> <asp:ListItem Value="8" Text="Transferencia"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoDeposito" runat="server" ControlToValidate="DdlTipoDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None" <asp:RequiredFieldValidator ID="RfvDdlTipoDeposito" runat="server" ControlToValidate="DdlTipoDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma de Pgo''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"> ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma de Pgo''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
</asp:RequiredFieldValidator> </asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoDeposito" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1" runat="server" id="divFolio" visible="false"> <div class="col-md-1" runat="server" id="divFolio" visible="false">
@@ -220,7 +220,7 @@
<asp:UpdatePanel ID="UpComisiones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpComisiones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row rowcheck truncate " id="DivComisioncheck" style="padding:0px!important;margin:0px!important"> <div class="row rowcheck truncate " id="DivComisioncheck" style="padding: 0px!important; margin: 0px!important">
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style="width: 155px;"> <div class="col-md-1 truncate" runat="server" id="DivFaltante" style="width: 155px;">
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox" /> <asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox" />
</div> </div>
@@ -257,65 +257,65 @@
</div> </div>
<div class="row rowcheck truncate" id="DivDescuentocheck" runat="server" style="padding:0px!important;margin:0px!important" > <div class="row rowcheck truncate" id="DivDescuentocheck" runat="server" style="padding: 0px!important; margin: 0px!important">
<div class="col-md-1" runat="server" id="Div1" style="width: 155px"> <div class="col-md-1" runat="server" id="Div1" style="width: 155px">
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" /> <asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" />
</div> </div>
<div class="col-md-1 DivDescuento" style="display:none" > <div class="col-md-1 DivDescuento" style="display: none">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtDescuento" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox> <asp:TextBox runat="server" ID="TxtDescuento" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox>
<label for="<%= TxtDescuento.ClientID.ToString()%>">Importe:</label> <label for="<%= TxtDescuento.ClientID.ToString()%>">Importe:</label>
</div> </div>
</div> </div>
<div class="col-md-1 DivDescuento" style="display:none" > <div class="col-md-1 DivDescuento" style="display: none">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoDescuento" Width="100px" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me" > <asp:DropDownList ID="DdlSubProyectoDescuento" Width="100px" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSubProyectoDescuento.ClientID.ToString()%>">SubProyecto:</label> <label for="<%= DdlSubProyectoDescuento.ClientID.ToString()%>">SubProyecto:</label>
</div> </div>
</div> </div>
<div class="col-md-2 DivDescuento" style="display:none"> <div class="col-md-2 DivDescuento" style="display: none">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacionDescuento" Width="100%" AutoPostBack="false" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control select2me"> <asp:DropDownList ID="DdlClasificacionDescuento" Width="100%" AutoPostBack="false" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlClasificacionDescuento.ClientID.ToString()%>">Clasificación:</label> <label for="<%= DdlClasificacionDescuento.ClientID.ToString()%>">Clasificación:</label>
</div> </div>
</div> </div>
<div class="col-md-2 DivDescuento" style="display:none"> <div class="col-md-2 DivDescuento" style="display: none">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" AutoPostBack="false" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control select2me"> <asp:DropDownList ID="DdlPersonal" AutoPostBack="false" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlPersonal.ClientID.ToString()%>">Emp:</label> <label for="<%= DdlPersonal.ClientID.ToString()%>">Emp:</label>
</div> </div>
</div> </div>
</div> </div>
<div class="row rowcheck truncate" id="DivIntercheck" runat="server" style="padding:0px!important;margin:0px!important"> <div class="row rowcheck truncate" id="DivIntercheck" runat="server" style="padding: 0px!important; margin: 0px!important">
<div class="col-md-1" runat="server" id="Div2" style="width: 155px"> <div class="col-md-1" runat="server" id="Div2" style="width: 155px">
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" /> <asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" />
</div> </div>
<div class="col-md-10 rowcheckCampos xspadding" id="DivInter" style="display: none"> <div class="col-md-10 rowcheckCampos xspadding" id="DivInter" style="display: none">
<div class="col-md-1" id="dd" > <div class="col-md-1" id="dd">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProveedorIntermediario" CssClass="form-control select2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:DropDownList> <asp:DropDownList ID="DdlProveedorIntermediario" CssClass="form-control select2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:DropDownList>
<label for="<%= DdlProveedorIntermediario.ClientID.ToString()%>">Intermediario:</label> <label for="<%= DdlProveedorIntermediario.ClientID.ToString()%>">Intermediario:</label>
</div> </div>
</div> </div>
<div class="col-md-1" id="DivinterImporte" > <div class="col-md-1" id="DivinterImporte">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox> <asp:TextBox runat="server" ID="TxtComisionIntermediario" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox>
<label for="<%= TxtComisionIntermediario.ClientID.ToString()%>">Importe:</label> <label for="<%= TxtComisionIntermediario.ClientID.ToString()%>">Importe:</label>
</div> </div>
</div> </div>
<div class="col-md-1" id="DivIVA"> <div class="col-md-1" id="DivIVA">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtIVA" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox> <asp:TextBox runat="server" ID="TxtIVA" Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="form-control Numeros"></asp:TextBox>
<label for="<%= TxtIVA.ClientID.ToString()%>">IVA:</label> <label for="<%= TxtIVA.ClientID.ToString()%>">IVA:</label>
</div> </div>
@@ -323,43 +323,42 @@
<div class="col-md-1" id="dd2" style="margin-right: 100px;"> <div class="col-md-1" id="dd2" style="margin-right: 100px;">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class=" form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion"> <asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class=" form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlClasificacionIntermediario.ClientID.ToString()%>"><label id="LblClasificacion3">Gasto:</label></label> <label for="<%= DdlClasificacionIntermediario.ClientID.ToString()%>">
<label id="LblClasificacion3">Gasto:</label></label>
</div> </div>
</div> </div>
<div class="col-md-2" id="divSubProyectoIntermediario"> <div class="col-md-2" id="divSubProyectoIntermediario">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me" > <asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSubProyectoIntermediario.ClientID.ToString()%>"><label id="LblSubproyectoIntermediario">SubProyecto:</label></label> <label for="<%= DdlSubProyectoIntermediario.ClientID.ToString()%>">
<label id="LblSubproyectoIntermediario">SubProyecto:</label></label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row rowcheck truncate" id="DivRowCuenta" style="padding:0px!important;margin:0px!important" runat="server" visible="false" > <div class="row rowcheck truncate" id="DivRowCuenta" style="padding: 0px!important; margin: 0px!important" runat="server" visible="false">
<div class="col-md-1" runat="server" id="Div3" style="width: 155px"> <div class="col-md-1" runat="server" id="Div3" style="width: 155px">
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" /> <asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" />
</div> </div>
<div class="col-md-2 DivRowCuenta2" id="DivCuentaImporte" style="display:none"> <div class="col-md-2 DivRowCuenta2" id="DivCuentaImporte" style="display: none">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtCuentaRetorno" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox> <asp:TextBox runat="server" ID="TxtCuentaRetorno" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox>
<label for="<%= TxtCuentaRetorno.ClientID.ToString()%>">Importe:</label> <label for="<%= TxtCuentaRetorno.ClientID.ToString()%>">Importe:</label>
</div> </div>
</div> </div>
<div class="col-md-6 DivRowCuenta2" style="display:none"> <div class="col-md-6 DivRowCuenta2" style="display: none">
<div class="form-group form-md-line-input input-iconright" > <div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtCuentaRetornoObs" Width="100%" CssClass=" form-control" ></asp:TextBox> <asp:TextBox runat="server" ID="TxtCuentaRetornoObs" Width="100%" CssClass=" form-control"></asp:TextBox>
<label for="<%= TxtCuentaRetornoObs.ClientID.ToString()%>">Obs:</label> <label for="<%= TxtCuentaRetornoObs.ClientID.ToString()%>">Obs:</label>
</div> </div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -664,21 +663,13 @@
} }
function txtSumaCuentaRetorno(txt) { function txtSumaCuentaRetorno(txt) {
debugger;
var comision2 = ToDouble($('#C_TxtCuentaRetorno').val()); var comision2 = ToDouble($('#C_TxtCuentaRetorno').val());
//if (comision2 > ValorTotalSeleccionado) {
// $('#C_TxtCuentaRetorno').val(descuento)
// alert("No es posible poner un IVA superior a lo seleccionado")
//} else {
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
descuento = ToDouble($('#C_TxtCuentaRetorno').val())
//}
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
} }
function txtSumaIVA(txt) { function txtSumaIVA(txt) {
var comision2 = ToDouble($('#C_TxtIVA').val()); var comision2 = ToDouble($('#C_TxtIVA').val());
if (comision2 > ValorTotalSeleccionado) { if (comision2 > ValorTotalSeleccionado) {
@@ -689,7 +680,6 @@
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
IVA = ToDouble($('#C_TxtIVA').val()); IVA = ToDouble($('#C_TxtIVA').val());
} }
} }
function txtSumaTntermediario(txt) { function txtSumaTntermediario(txt) {
@@ -759,7 +749,7 @@
$('#DivRowCuenta').removeClass("truncate"); $('#DivRowCuenta').removeClass("truncate");
} else { } else {
$('#C_TxtCuentaRetorno').val(0);
Recalcular(); Recalcular();
$('.DivRowCuenta2').css("display", "none"); $('.DivRowCuenta2').css("display", "none");
$('#DivRowCuenta').addClass("truncate"); $('#DivRowCuenta').addClass("truncate");
@@ -767,17 +757,20 @@
} }
function Recalcular() { function Recalcular() {
debugger; let Comision = ToDouble($('#C_TxtComision').val());
var Comision = ToDouble($('#C_TxtComision').val()); let Descuento = 0;
var Descuento = ToDouble($('#C_TxtDescuento').val()); let ImporteInter = 0;
var IVA = ToDouble($('#C_TxtIVA').val()); let IVA = 0;
var ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
var ImporteCuentaRetorno= ToDouble($('#C_TxtCuentaRetorno').val());
var total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter - ImporteCuentaRetorno if ('<%= If(UsuarioActual.CveEmpresa = 189, "0", "1") %>' == '1') {
Descuento = ToDouble($('#C_TxtDescuento').val());
ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
IVA = ToDouble($('#C_TxtIVA').val());
}
let ImporteCuentaRetorno = ToDouble($('#C_TxtCuentaRetorno').val());
let total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter + ImporteCuentaRetorno;
$('#C_lblValorTotal').text(FormatoNumero(total, 2)); $('#C_lblValorTotal').text(FormatoNumero(total, 2));
debugger;
} }
function Depositar() { function Depositar() {

View File

@@ -34,6 +34,7 @@ Partial Class Bancos_DepositosCaja
End If End If
CargaCuentas() CargaCuentas()
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);") ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);") ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);") ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
@@ -222,7 +223,7 @@ Partial Class Bancos_DepositosCaja
End If End If
If CuentaRetorno <> 0 Then If CuentaRetorno <> 0 Then
TotalImporte = TotalImporte - CuentaRetorno TotalImporte = TotalImporte + CuentaRetorno
'Descuento = -(Descuento) ' se inverte el valor, va cargada 'Descuento = -(Descuento) ' se inverte el valor, va cargada
'If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then 'If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then
' Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia) ' Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia)
@@ -364,7 +365,7 @@ Partial Class Bancos_DepositosCaja
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
If Comision <> 0 Then If Comision <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - FALTANTE/SOBRANTE - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -387,7 +388,7 @@ Partial Class Bancos_DepositosCaja
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco) FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco)
Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Retorno Depósito Bancario - {tSubProyectoDeposito}", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Retorno Depósito Bancario - {tSubProyectoDeposito}", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - CAJA - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If

View File

@@ -343,9 +343,9 @@
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" /> <asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" /> <asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" /> <asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:CheckBox Text="Descuento Masivo" ID="chkaplicaDescuentoMasivo" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuentoMasivo_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox> <asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" /> <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
<asp:CheckBox Text="Generar Remisión" ID="ChkGeneraRNC" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
</td> </td>
</tr> </tr>
@@ -609,14 +609,27 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
var Facturas = '';
function FnSuma(t, txt, importe) { var Facturas = '';
var RNCAutocheck = true;
function FnSuma(t, txt, importe, idTxtDescuento) {
var chkPesosBancos = $get("ChkPagarPesos"); var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares"); var chkDolaresBancos = $get("ChkPagarDolares");
if (t.checked) { if (t.checked) {
txt.value = FormatoNumero(importe, 2); txt.value = FormatoNumero(importe, 2);
let txtDescuento = $("#" + idTxtDescuento)
if (typeof txtDescuento.val() === "string"){
let descuentoValue = $("#" + idTxtDescuento).val().trim();
if (descuentoValue.length > 0) {
calculaDescuentoEscalonado(importe, idTxtDescuento, txt, t, 'El Importe no debe de exceder el saldo',1);
}
}
} else { } else {
txt.value = ""; txt.value = "";
} }
@@ -645,46 +658,50 @@
if (textBoxes[i].id.indexOf('C_GvCxP_TxtAbonar') >= 0) { if (textBoxes[i].id.indexOf('C_GvCxP_TxtAbonar') >= 0) {
if (textBoxes[i].value != '') { if (textBoxes[i].value != '') {
idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', ''); idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', '');
Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText; let chk = $('#C_GvCxP_Chk_'+idd) //C_GvCxP_Chk_
let importeFactura = 0;
if (cveMonedaPago == 0) { if(chk.is(':checked')){
if (aplicaTC && $get('TxtTC') != null) { Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText;
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
let importeFactura = 0;
if (cveMonedaPago == 0) {
if (aplicaTC && $get('TxtTC') != null) {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
} else {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
} else { } else {
importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
}
} else {
let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
switch (cveMonedaPago) { switch (cveMonedaPago) {
case 1: //PAGO CON PESOS case 1: //PAGO CON PESOS
//SI SON DOLARES MULTIPLICAR POR TC
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
//MISMA MONEDA DEBE SOLO SUMAR
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
break;
case 2: //PAGO CON DOLARES
//SI SON DOLARES MULTIPLICAR POR TC
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
//MISMA MONEDA DEBE SOLO SUMAR //MISMA MONEDA DEBE SOLO SUMAR
} else if (cveMonedaCompra == '1') { if (cveMonedaCompra == '2') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join('')); importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
} //SI SON PESOS DIVIDIR ENTRE EL TC
} else if (cveMonedaCompra == '1') {
break; importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
case 2: //PAGO CON DOLARES }
break;
//MISMA MONEDA DEBE SOLO SUMAR }
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
//SI SON PESOS DIVIDIR ENTRE EL TC
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
}
break;
} }
Importe = parseFloat(Importe) + importeFactura;
} }
Importe = parseFloat(Importe) + importeFactura;
} }
} }
if (textBoxes[i].id.indexOf('C_GvCxP_TxtComision') >= 0) { if (textBoxes[i].id.indexOf('C_GvCxP_TxtComision') >= 0) {
@@ -715,12 +732,14 @@
} }
function FnCambia(chk, txt, saldo, op, text, Tipo) { function FnCambia(chk, txt, saldo, op, text, Tipo) {
debugger;
var chkPesosBancos = $get("ChkPagarPesos"); var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares"); var chkDolaresBancos = $get("ChkPagarDolares");
if (op == 1) { if (op == 1) {
if (txt.value != '') { if (txt.value != '') {
chk.checked = true; if( RNCAutocheck){
chk.checked = true;
}
} else { } else {
chk.checked = false; chk.checked = false;
} }
@@ -832,7 +851,7 @@
var TipoCambioActual = 0.0; var TipoCambioActual = 0.0;
function CambiaTC(txt) { function CambiaTC(txt) {
debugger;
//let TipoCambioTxt = ToDouble(txt.value) //let TipoCambioTxt = ToDouble(txt.value)
//if (TipoCambioActual != TipoCambioTxt) { //if (TipoCambioActual != TipoCambioTxt) {
$get("BtnCambiaTipoMoneda").click(); $get("BtnCambiaTipoMoneda").click();
@@ -840,8 +859,8 @@
//} //}
} }
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk, Text, Tipo) { function calculaDescuentoEscalonado(saldo, idTxtDescuento, TxtAbonar, chk, Text, Tipo) {
let idTxtDescuento = TxtDescuento.id; //let idTxtDescuento = TxtDescuento.id;
let idTxtAbonar = TxtAbonar.id; let idTxtAbonar = TxtAbonar.id;
let descuentoValue = $("#" + idTxtDescuento).val().trim(); let descuentoValue = $("#" + idTxtDescuento).val().trim();
@@ -871,6 +890,8 @@
function DescuenoMasivo(txt) { function DescuenoMasivo(txt) {
RNCAutocheck = false;
$(".selDescuento").val(txt.value); $(".selDescuento").val(txt.value);
$(".selDescuento").trigger("keyup"); $(".selDescuento").trigger("keyup");
} }

File diff suppressed because it is too large Load Diff

View File

@@ -22354,6 +22354,8 @@ Partial Class Compras_Compras
TmpDTProrrateoGasolina.Columns.Add("RetISR", GetType(Decimal)) TmpDTProrrateoGasolina.Columns.Add("RetISR", GetType(Decimal))
TmpDTProrrateoGasolina.Columns.Add("Total", GetType(Decimal)) TmpDTProrrateoGasolina.Columns.Add("Total", GetType(Decimal))
TmpDTProrrateoGasolina.Columns.Add("PorcentajeIVA", GetType(Decimal)) TmpDTProrrateoGasolina.Columns.Add("PorcentajeIVA", GetType(Decimal))
TmpDTProrrateoGasolina.Columns.Add("RetISRPorcentaje", GetType(Decimal))
TmpDTProrrateoGasolina.Columns.Add("RetIVAPorcentaje", GetType(Decimal))
TmpDTProrrateoGasolina.Columns.Add("CveUM", GetType(Integer)) TmpDTProrrateoGasolina.Columns.Add("CveUM", GetType(Integer))
TmpDTProrrateoGasolina.Columns.Add("CveClasificacion", GetType(Integer)) TmpDTProrrateoGasolina.Columns.Add("CveClasificacion", GetType(Integer))
@@ -22368,7 +22370,7 @@ Partial Class Compras_Compras
Protected Sub LnkProrrateoGasolina_Click(sender As Object, e As EventArgs) Protected Sub LnkProrrateoGasolina_Click(sender As Object, e As EventArgs)
InicializaDTProrrateoGasolina() 'InicializaDTProrrateoGasolina()
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoProrrateoGasolina,) CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoProrrateoGasolina,)
GvProrrateoGasolina.Columns(0).HeaderText = LblSubProyectoProrrateoGasolina.Text GvProrrateoGasolina.Columns(0).HeaderText = LblSubProyectoProrrateoGasolina.Text
LblRiruloProrrareo.Text = $"Prorratear por { LblSubProyectoProrrateoGasolina.Text}" LblRiruloProrrareo.Text = $"Prorratear por { LblSubProyectoProrrateoGasolina.Text}"
@@ -22517,15 +22519,15 @@ Partial Class Compras_Compras
nRow("CveSubProyecto") = CveSubProyecto nRow("CveSubProyecto") = CveSubProyecto
nRow("SubProyecto") = SubProyecto nRow("SubProyecto") = SubProyecto
If CveFactura > 0 Then 'If CveFactura > 0 Then
nRow("IVA") = ivaParcial.RoundSQL(4) nRow("IVA") = ivaParcial.RoundSQL(4)
nRow("RetIVA") = retIvaParcial.RoundSQL(4) nRow("RetIVA") = retIvaParcial.RoundSQL(4)
nRow("RetISR") = retIsrParcial.RoundSQL(4) nRow("RetISR") = retIsrParcial.RoundSQL(4)
Else 'Else
nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4) 'nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4) 'nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4)
nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4) 'nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4)
End If 'End If
nRow("SubTotal") = subtotalParcial.RoundSQL(4) nRow("SubTotal") = subtotalParcial.RoundSQL(4)
@@ -22533,6 +22535,8 @@ Partial Class Compras_Compras
nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4) nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
nRow("Porcentaje") = ((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2) nRow("Porcentaje") = ((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2)
nRow("RetIVAPorcentaje") = (retIvaParcial / subtotalParcial).RoundSQL(4)
nRow("RetISRPorcentaje") = (retIsrParcial / subtotalParcial).RoundSQL(4)
nRow("CveUM") = CveUM nRow("CveUM") = CveUM
nRow("UM") = UM nRow("UM") = UM
@@ -22584,7 +22588,8 @@ Partial Class Compras_Compras
TmpDT.Rows.Clear() TmpDT.Rows.Clear()
For Each dRow As DataRow In DTProrrateoGasolina.Rows For Each dRow As DataRow In DTProrrateoGasolina.Rows
AddPS(1, dRow("CveUM").ToString.ToEntero, dRow("UM").ToString, dRow("CveClasificacion").ToString.ToEntero, dRow("Clasificacion").ToString, dRow("CvePS").ToString.ToEntero, dRow("PS").ToString, 1, dRow("CveSubProyecto").ToString, dRow("SubProyecto").ToString, "", AddPS(1, dRow("CveUM").ToString.ToEntero, dRow("UM").ToString, dRow("CveClasificacion").ToString.ToEntero, dRow("Clasificacion").ToString, dRow("CvePS").ToString.ToEntero, dRow("PS").ToString, 1, dRow("CveSubProyecto").ToString, dRow("SubProyecto").ToString, "",
"-1", "", dRow("SubTotal").ToString.ToDecimal, dRow("Total").ToString.ToDecimal, dRow("PorcentajeIVA").ToString.ToDecimal, dRow("RetIVA").ToString.ToDecimal, dRow("RetISR").ToString.ToDecimal, 0, 0, 0, PorcentajeIVA:=dRow("PorcentajeIVA").ToString.ToDecimal) "-1", "", dRow("SubTotal").ToString.ToDecimal, dRow("Total").ToString.ToDecimal, dRow("IVA").ToString.ToDecimal, dRow("RetIVA").ToString.ToDecimal, dRow("RetISR").ToString.ToDecimal, 0, 0, 0, PorcentajeIVA:=dRow("PorcentajeIVA").ToString.ToDecimal,
CargaXml:=True, PorcentajeRetIVA:=dRow("RetIVAPorcentaje").ToString.ToDecimal, PorcentajeRetISR:=dRow("RetISRPorcentaje").ToString.ToDecimal)
Next Next
AddPS2() AddPS2()

View File

@@ -115,9 +115,10 @@ Partial Class Compras_RepProductosServiciosDetalle
txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text) txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text)
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text) txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
If CveCultivo.ToEntero() > 0 AndAlso FechaI = "-1" AndAlso Anio = "-1" AndAlso Mes = "-1" AndAlso AnioMes = "-1" Then If CveCultivo.Length > 0 AndAlso FechaI = "-1" AndAlso Anio = "-1" AndAlso Mes = "-1" AndAlso AnioMes = "-1" Then
txtFechaI.Text = "01/01/1900" txtFechaI.Text = "01/01/1900"
End If End If
If Fecha <> "-1" Then If Fecha <> "-1" Then
txtFechaI.Text = Fecha txtFechaI.Text = Fecha
txtFechaF.Text = Fecha txtFechaF.Text = Fecha

View File

@@ -151,18 +151,20 @@
</div> </div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta,CveUsuarioAutoriza,CveAlmacenVirtual" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta,CveUsuarioAutoriza,CveAlmacenVirtual,AlmacenAbreviatura"
EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="20%" HeaderText="Almacen"> <asp:TemplateField ItemStyle-Width="20%" HeaderText="Almacen">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlAlmacen" runat="server" Text='<%# Eval("Almacen") %>'></asp:Literal> &nbsp;<asp:Literal ID="LtlAlmacen" runat="server" Text='<%# Eval("Almacen") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%-- <asp:TemplateField ItemStyle-Width="10%" HeaderText="Sucursal">
<asp:TemplateField ItemStyle-Width="20%" HeaderText="Abreviatura">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("Sucursal", "{0}") %>'></asp:Literal> &nbsp;<asp:Literal ID="LtlAlmacenAbreviatura" runat="server" Text='<%# Eval("AlmacenAbreviatura") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField>--%> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="10%" HeaderText="SubProyecto"> <asp:TemplateField ItemStyle-Width="10%" HeaderText="SubProyecto">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal> &nbsp;<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
@@ -230,11 +232,19 @@
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel ID="UpBodyAlmacen" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpBodyAlmacen" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAlmacen" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtAlmacen" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAlmacen" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacén''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAlmacen" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacén''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<asp:Label AssociatedControlID="TxtAlmacen" runat="server" Text="Almacén:"></asp:Label> <asp:Label AssociatedControlID="TxtAlmacen" runat="server" Text="Almacén:"></asp:Label>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAlmacenAbreviatura" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50" ></asp:TextBox>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAlmacen" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacén''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>--%>
<asp:Label AssociatedControlID="TxtAlmacenAbreviatura" runat="server" Text="Abreviatura:"></asp:Label>
</div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<%-- <div class="form-group form-md-line-input input-iconright"> <%-- <div class="form-group form-md-line-input input-iconright">

View File

@@ -260,7 +260,7 @@ Partial Class Inventarios_CatAlmacenes
If HdnModalidad.Value = "A" Then If HdnModalidad.Value = "A" Then
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero,
CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero()) Then CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero(), AlmacenAbreviatura:=TxtAlmacenAbreviatura.Text) Then
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update() UpDatos.Update()
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -270,7 +270,9 @@ Partial Class Inventarios_CatAlmacenes
Else Else
TieneError = True TieneError = True
End If End If
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, Estatus, HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, Estatus, HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero,
UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero,
AlmacenAbreviatura:=TxtAlmacenAbreviatura.Text) Then
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion) Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update() UpDatos.Update()
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -295,6 +297,7 @@ Partial Class Inventarios_CatAlmacenes
BtnAgregarAlmacen.Text = "Agregar" BtnAgregarAlmacen.Text = "Agregar"
myModalLabel.InnerText = "Agregar Almacén" myModalLabel.InnerText = "Agregar Almacén"
TxtAlmacen.Text = "" TxtAlmacen.Text = ""
TxtAlmacenAbreviatura.Text = ""
TxtOrden.Text = "" TxtOrden.Text = ""
ChkEstatus.Checked = True ChkEstatus.Checked = True
divEstatus.Visible = False divEstatus.Visible = False
@@ -335,6 +338,7 @@ Partial Class Inventarios_CatAlmacenes
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen")) DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen"))
TxtAlmacen.Text = GvRow.DataKey("Almacen") TxtAlmacen.Text = GvRow.DataKey("Almacen")
TxtAlmacenAbreviatura.Text = GvRow.DataKey("AlmacenAbreviatura")
TxtOrden.Text = GvRow.DataKey("Orden") TxtOrden.Text = GvRow.DataKey("Orden")
DdlUsuariosAutoriza.SelectedValueExist(If(GvRow.DataKey("CveUsuarioAutoriza").ToEntero > 0, GvRow.DataKey("CveUsuarioAutoriza"), "-1")) DdlUsuariosAutoriza.SelectedValueExist(If(GvRow.DataKey("CveUsuarioAutoriza").ToEntero > 0, GvRow.DataKey("CveUsuarioAutoriza"), "-1"))
DdlAlmacenesVirtuales.SelectedValueExist(GvRow.DataKey("CveAlmacenVirtual")) DdlAlmacenesVirtuales.SelectedValueExist(GvRow.DataKey("CveAlmacenVirtual"))

View File

@@ -117,9 +117,8 @@
</div> </div>
</div> </div>
<div class="row" style="max-width: 780px;"> <div class="row" style="max-width: 780px;">
<div class="col-md-12" style="display: flex; justify-content: flex-end"> <div class="col-md-12" style="display: flex;">
<table style="width:100%">
<table>
<tr> <tr>
<td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td> <td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td>
<td id="DivListasPrecios" visible="false" runat="server"> <td id="DivListasPrecios" visible="false" runat="server">
@@ -130,9 +129,23 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>
<div class="row" id="DivListaPrecios" runat="server" visible="false">
<div class="col-md-12">
<asp:GridView ID="GvPLMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-hover" data-sort="true" EmptyDataText="No se encontraron registros">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:BoundField DataField="Precio" HeaderText="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Precio8" HeaderText="Neto al 8%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Precio16" HeaderText="Neto al 16%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
</div>
</td>
<td id="DivListasPreciosRow2" visible="false" runat="server"></td> <td id="DivListasPreciosRow2" visible="false" runat="server"></td>
<td style="text-align: right;"> <td style="text-align: right; justify-content: flex-end;vertical-align: bottom;">
<asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink>
</td> </td>
</tr> </tr>

View File

@@ -154,6 +154,10 @@ Partial Class Inventarios_Default
ObjInventarios.Dispose() ObjInventarios.Dispose()
GV.DataBind() GV.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
CargaListaPrecios(CvePS)
End If
UPDatos.Update() UPDatos.Update()
Else Else
@@ -161,6 +165,18 @@ Partial Class Inventarios_Default
End If End If
End Sub End Sub
Private Sub CargaListaPrecios(CvePS As Integer)
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados.FiltraParametros("Precio > 0")
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvPLMultiple.DataBind()
End If
End Sub
Private Sub CargaPS(CvePS As Integer) Private Sub CargaPS(CvePS As Integer)
If CvePS <= 0 Then Exit Sub If CvePS <= 0 Then Exit Sub

View File

@@ -2735,6 +2735,8 @@ Partial Class Inventarios_RecepcionUsados
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT Return TmpDT
End Function End Function

View File

@@ -0,0 +1,154 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ReporteVacaciones.aspx.cs" Inherits="Nomina_ReporteVacaciones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
/*.text-right {
text-align:right
}*/
td.borderleft,th.borderleft{
border-left:1px solid black !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte Vacaciones
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpContenido" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1 mediocol">Inicio:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupButtonID="LnkRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 mediocol">Fin:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
<asp:Label ID="LblProyecto" CssClass="col-md-1 compoonenlabel" runat="server" Text="Proyecto:" Style="max-width: 100px;"></asp:Label>
<div runat="server" id="divddlproyeto" class="col-md-2">
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label ID="LblSubProyeccto" CssClass="col-md-1 compoonenlabel" runat="server" Text="SubProyecto:" Style="max-width: 103px;"></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100% !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
</div>
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
<div>
<table id="gvReporteVacaciones" class="table table-striped table-advance table-hover ScrollAD Widthall gvReporteVacaciones" data-rows="2" data-heighterror="360">
<%-- <thead>
</thead>--%>
<tbody>
<tr>
<th></th>
<th></th>
<th></th>
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="RepeaterEjerciciosH1" runat="server">
<ItemTemplate>
<th class="borderleft" colspan="3"><%# Eval("Ejercicio") %></th>
</ItemTemplate>
</asp:Repeater>
</tr>
<tr>
<th>Código</th>
<th>Nombre Completo</th>
<th>Fecha Inicio</th>
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="RepeaterEjerciciosH2" runat="server">
<ItemTemplate>
<th class="borderleft">Antigüedad</th>
<th>Días Vacaciones</th>
<th>Días Pagados</th>
</ItemTemplate>
</asp:Repeater>
</tr>
<asp:Repeater ID="RepeaterPrincipal" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr>
<%--<td><%# Eval("CvePersonal") %></td>--%>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td><%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %></td>
<%-- Subrepeater para los ejercicios --%>
<asp:Repeater ID="RepeaterEjercicios" runat="server" DataSource='<%# Eval("Ejercicios") %>'>
<ItemTemplate>
<td class="text-right borderleft"><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("Antiguedad") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasVacaciones") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasPagados") : "" %></td>
</ItemTemplate>
</asp:Repeater>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,171 @@
using ADSNetLibrary.Helpers;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Nomina_ReporteVacaciones : ClsPaginas
{
#region "Propiedades"
protected int FiltCveProyecto
{
get
{
if (ViewState["FiltCveProyecto"] == null) { return -1; }
else { return ViewState["FiltCveProyecto"].ToString().ToEntero(); }
}
set { ViewState["FiltCveProyecto"] = value; }
}
protected int FiltCveSubProyecto
{
get
{
if (ViewState["FiltCveSubProyecto"] == null) { return -1; }
else { return ViewState["FiltCveSubProyecto"].ToString().ToEntero(); }
}
set { ViewState["FiltCveSubProyecto"] = value; }
}
protected string FiltFechaInicio
{
get
{
string fecha = $"{DateTime.Now.Year - 3}-01-01";
if (ViewState["FiltFechaInicio"] == null) { return fecha ; }
else { return ViewState["FiltFechaInicio"].ToString(); }
}
set { ViewState["FiltFechaInicio"] = value; }
}
protected string FiltFechaFin
{
get
{
string fecha = $"{DateTime.Now.Year}-12-31";
if (ViewState["FiltFechaFin"] == null) { return fecha; }
else { return ViewState["FiltFechaFin"].ToString(); }
}
set { ViewState["FiltFechaFin"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TxtRpdFechaInicio.Text = $"{FiltFechaInicio.ToDateTime():dd/MM/yyyy}";
TxtRpdFechaFin.Text = $"{FiltFechaFin.ToDateTime():dd/MM/yyyy}";
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto);
divddlproyeto.Visible = DdlProyecto.Visible;
getinfo();
}
}
public void getinfo()
{
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.ReporteVacaciones(FiltCveProyecto, FiltCveSubProyecto, UsuarioActual.CveEmpresa, FiltFechaInicio, FiltFechaFin))
{
DataTable tabla1 = objnom.DTSetResultados.Tables[0]; // Simula tu tabla 1
DataTable tabla2 = objnom.DTSetResultados.Tables[1]; // Simula tu tabla 2
DataTable tabla3 = objnom.DTSetResultados.Tables[2]; // Simula tu tabla 3
RepeaterEjerciciosH1.DataSource= tabla3;
RepeaterEjerciciosH2.DataSource= tabla3;
RepeaterEjerciciosH1.DataBind();
RepeaterEjerciciosH2.DataBind();
// Convertir Tabla 1 a Enumerable con un campo extra
List<Registro> resultado = tabla1.AsEnumerable().Select(row1 => new Registro()
{
CvePersonal = row1.Field<int>("CvePersonal"),
Codigo = row1.Field<string>("Codigo"),
NombreCompleto = row1.Field<string>("NombreCompleto"),
//FechaFin = (row1("FechaFin")).ToString().,
FechaInicio = row1.Field<DateTime>("FechaInicio"),
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = row1.Field<int>("Antiguedad"),
// Campo extra: Enumerable para cada Ejercicio de Tabla 3
Ejercicios = tabla3.AsEnumerable().Select(row3 =>
{
var ejercicio = row3.Field<int>("Ejercicio");
// Buscar en Tabla 2 si existe el registro para CvePersonal y Ejercicio
var registro = tabla2.AsEnumerable().FirstOrDefault(row2 =>
row2.Field<int>("CvePersonal") == row1.Field<int>("CvePersonal") &&
row2.Field<int>("EJercicio") == ejercicio);
// Si no existe, crear un nuevo registro
if (registro == null)
{
return new EjercicioInfo()
{
Ejercicio = ejercicio,
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = 0,
DiasVacaciones = 0, // Valor predeterminado
DiasPagados = 0, // Valor predeterminado
DiasDisfrutados = 0 // Valor predeterminado
};
}
else
{
// Si existe, devolver los datos de la Tabla 2
return new EjercicioInfo()
{
Ejercicio = registro.Field<int>("EJercicio"),
FechaAntiguedad = registro.Field<DateTime>("FechaAntiguedad"),
Antiguedad = registro.Field<int>("Antiguedad"),
DiasVacaciones = registro.Field<int>("DiasVacaciones"),
DiasPagados = registro.Field<int>("DiasPagados"),
DiasDisfrutados = registro.Field<int>("DiasDisfrutados")
};
}
}).ToList()
}).ToList();
RepeaterPrincipal.DataSource = resultado;
RepeaterPrincipal.DataBind();
}
}
}
protected void LnkConsultar_Click(object sender, EventArgs e)
{
FiltFechaInicio = $"{TxtRpdFechaInicio.Text.ToDateTime():yyyy-MM-dd}";
FiltFechaFin = $"{TxtRpdFechaFin.Text.ToDateTime():yyyy-MM-dd}";
getinfo();
}
}
public class Registro
{
public int CvePersonal { get; set; }
public string Codigo { get; set; }
public string NombreCompleto { get; set; }
public DateTime FechaInicio { get; set; }
public DateTime FechaFin { get; set; }
public DateTime FechaAntiguedad { get; set; }
public int Antiguedad { get; set; }
public List<EjercicioInfo> Ejercicios { get; set; }
}
public class EjercicioInfo
{
public int Ejercicio { get; set; }
public DateTime FechaAntiguedad { get; set; }
public int Antiguedad { get; set; }
public int DiasVacaciones { get; set; }
public int DiasPagados { get; set; }
public int DiasDisfrutados { get; set; }
}

View File

@@ -217,7 +217,7 @@
</a> </a>
</li> </li>
<li id="tdBExi" runat="server" visible="false"> <li id="tdBExi" runat="server" visible="false">
<a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,597,'N');"> <a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,700,'N');">
<i class="fa fa-cubes"></i> <i class="fa fa-cubes"></i>
Buscar Existencias Buscar Existencias
</a> </a>

View File

@@ -28,25 +28,61 @@
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;"> <div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="tools"> <div class="tools">
<asp:Button Text="Consultar" ID="BtnConsultar" CssClass="btn btn-primary" OnClick="BtnConsultar_Click" runat="server" /> <asp:Button Text="Consultar" ID="BtnConsultar" CssClass="btn btn-primary" OnClick="BtnConsultar_Click" runat="server" />
<a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row" style="padding-top: 10px;"> <div class="row" style="padding-top: 10px;">
<label class="col-md-1 truncate">Sucursal:</label>
<div class="col-md-1">
<asp:Label runat="server" ID="LblSubProyecto" class="truncate"></asp:Label>:
</div>
<div class="col-md-2 "> <div class="col-md-2 ">
<%-- <asp:DropDownList ID="DdlSucursal" runat="server" CssClass="select2me" DataTextField="Sucursal" DataValueField="CveSucursal" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>--%>
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2"> <asp:Label runat="server" ID="Label1" class="col-md-1 truncate">Cliente:</asp:Label>
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar"> <div class="col-md-2 ">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width:100%;">
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem> </ADS:Dropdownlost>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
</asp:DropDownList>
</div> </div>
<asp:Label runat="server" ID="Label2" class="col-md-1 truncate">Vendedor:</asp:Label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlVendedor" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="Label3" class="col-md-1 truncate">Marca:</asp:Label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
</div>
<asp:Label runat="server" ID="Label4" class="col-md-1 truncate">Producto:</asp:Label>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" Enabled="true" ID="DdlPS" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</div>
</div>
</div> </div>
</asp:Panel> </asp:Panel>
</ContentTemplate> </ContentTemplate>
@@ -69,6 +105,10 @@
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink> <asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente" />
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" />
<asp:BoundField DataField="Marca" HeaderText="Marca" />
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="80px" /> <asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="80px" />
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="80px" /> <asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="80px" />
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="125px" /> <asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="125px" />

View File

@@ -22,21 +22,57 @@ Partial Class Ventas_CatPromociones
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
InicializaControles()
'ImgAddPromocion.Attributes.Add("OnClick", "window.location = '/Ventas/Promociones.aspx'")
'CARGA SUCURSALES
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
Private Sub InicializaControles()
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
GvDatos.Columns(6).HeaderText = LblSubProyecto.Text
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarca.DataSource = ObjPS.DtResultados
End If
ObjPS.Dispose()
DdlMarca.DataBind()
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClientes.setEsWebService(True)
'CARGA PS
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
DdlPS.IncluyeTodos = True
If Not DdlPS.UsaWebService AndAlso CType(DdlPS.DataSource, DataTable) Is Nothing Then
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
DdlPS.DataBind()
End If
End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromociones(-1, MinFecha, -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, CveUsuario:=UsuarioActual.CveUsuario) Then Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
Dim CvePS As Integer = If(DdlPS.SelectedValue.ToEntero > 0, DdlPS.SelectedValue.ToEntero, -1)
If ObjVentas.GetPromociones(-1, MinFecha, DdlVendedor.SelectedValue.ToEntero, CveCliente, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, CveUsuario:=UsuarioActual.CveUsuario,
CveMarca:=DdlMarca.SelectedValue.ToEntero, CvePS:=CvePS) Then
DtDatos = ObjVentas.DtResultados DtDatos = ObjVentas.DtResultados
Else Else
DtDatos = Nothing DtDatos = Nothing

View File

@@ -5643,7 +5643,7 @@ Partial Class Clientes
TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveMetodoPago", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveMetodoPago33", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String")) TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String"))
TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String")) TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String"))
TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal")) TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal"))
@@ -9423,6 +9423,8 @@ Partial Class Clientes
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT Return TmpDT
End Function End Function

View File

@@ -2101,7 +2101,8 @@ Partial Class Ventas_ClientesAbonar
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean)) TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String)) TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT Return TmpDT
End Function End Function
Private Function InicializaDTVentasNC() As DataTable Private Function InicializaDTVentasNC() As DataTable

View File

@@ -4703,6 +4703,9 @@ Partial Class PV
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
TmpDT.Columns.Add("CveMarca", GetType(Integer)) TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
End Sub End Sub

View File

@@ -2501,7 +2501,7 @@ Partial Class Ventas_PVCobranza
Msg = Msg & "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" & CveVentaCancelacion & "&NuevaFactura=1'> Refacturar</a>" Msg = Msg & "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" & CveVentaCancelacion & "&NuevaFactura=1'> Refacturar</a>"
End If End If
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion:="Enviar", TextoSegundoBoton:="Cancelar") Alert(Msg, TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnEnviarMailCancelacion()", TextoConfirmacion:="Enviar", TextoSegundoBoton:="Cancelar", ShowCloseButton:=False)
Else Else
Msg = resp.Mensaje Msg = resp.Mensaje

View File

@@ -101,9 +101,20 @@
<li> <li>
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton> <asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" /> <asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>

View File

@@ -153,6 +153,12 @@ Partial Class Ventas_RepVentas
PrePersonalizacion() PrePersonalizacion()
CargaPersonalizacion() CargaPersonalizacion()
If UsuarioActual.CveEmpresa = 199 Then
LnkGeneraXLS1.Visible = True
LnkGeneraXLS2.Visible = True
End If
End If End If
End Sub End Sub
@@ -1058,4 +1064,41 @@ Partial Class Ventas_RepVentas
End Sub End Sub
Protected Sub LnkGeneraXLS1_Click(sender As Object, e As EventArgs)
RepVentasBioSistemas(1)
End Sub
Protected Sub LnkGeneraXLS2_Click(sender As Object, e As EventArgs)
RepVentasBioSistemas(2)
End Sub
Private Sub RepVentasBioSistemas(OpcionReporte As Integer)
Dim ObjVentas As New ClsVentas
Dim DTResultados As New DataTable
If ObjVentas.GetRepVentasBiosistemas(UsuarioActual.CveEmpresa, OpcionReporte) Then
DTResultados = ObjVentas.DtResultados
End If
Dim NombreReporte As String = "Reporte 1"
Dim TituloReporte As String = "Reporte 1"
DTResultados.TableName = "Reporte1"
If OpcionReporte = 2 Then
NombreReporte = "Reporte 2"
TituloReporte = "Reporte1 2"
DTResultados.TableName = "Reporte2"
End If
DTResultados.ExportToExcelG(NombreReporte, TituloReporte, UsuarioActual, "")
End Sub
End Class End Class

View File

@@ -9299,7 +9299,14 @@
<div class="modal-body"> <div class="modal-body">
<asp:UpdatePanel runat="server" ID="UPExist" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UPExist" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall"> <asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
<Columns>
<asp:TemplateField HeaderText="Producto">
<ItemTemplate >
<span style="width:400px; display:flex;"> <asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal>&nbsp;</span>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -10494,10 +10494,16 @@ Partial Class Ventas
Protected Sub EmitirImprimirNew(Optional TipoDoctoViejo As String = "") Protected Sub EmitirImprimirNew(Optional TipoDoctoViejo As String = "")
OrdenarPS(Reeordenar:=False, RecargarGV:=False)
If Not ValidaVentaContratoObra() Then If Not ValidaVentaContratoObra() Then
Exit Sub Exit Sub
End If End If
If Not ValidaPorcentajeIVA() Then
Exit Sub
End If
If ValidaPagosContado(TipoDoctoViejo:=TipoDoctoViejo) Then If ValidaPagosContado(TipoDoctoViejo:=TipoDoctoViejo) Then
Exit Sub Exit Sub
End If End If
@@ -25322,6 +25328,21 @@ Partial Class Ventas
Return Retorno Return Retorno
End Function End Function
Private Function ValidaPorcentajeIVA() As Boolean
Dim Retorno As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
Dim DtIVA As DataTable = TmpDT.FiltraParametros("PorcentajeIVA > 0", "", {"PorcentajeIVA"})
'SOLO DEBE TENER PORCENTAJE DE 8 o 16 no ambos
If DtIVA.Rows.Count > 1 Then
Retorno = False
Alert("No se puede tener porcentajes de IVA de 8 y 16% en una sola factura", TipoMensaje.MsgAdvertencia)
End If
End If
Return Retorno
End Function
#End Region #End Region
#Region " SERIE ALMACEN " #Region " SERIE ALMACEN "
@@ -26525,7 +26546,7 @@ Partial Class Ventas
End If End If
End Sub End Sub
Private Sub OrdenarPS(Optional Reeordenar As Boolean = True) Private Sub OrdenarPS(Optional Reeordenar As Boolean = True, Optional RecargarGV As Boolean = True)
If Reeordenar Then If Reeordenar Then
For Each row As GridViewRow In GvPS.Rows For Each row As GridViewRow In GvPS.Rows
@@ -26544,8 +26565,10 @@ Partial Class Ventas
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
GvPS.DataSource = TmpDT If RecargarGV Then
GvPS.DataBind() GvPS.DataSource = TmpDT
GvPS.DataBind()
End If
End Sub End Sub
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs) Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
OrdenarPS() OrdenarPS()
@@ -33904,7 +33927,7 @@ Partial Class Ventas
Next Next
Return Nothing Return Nothing
End Function End Function
Private Function AgregaPSCotizacion(Optional RecalculaImpustosLocales As Boolean = True) As Boolean Private Function AgregaPSCotizacion(Optional RecalculaImpustosLocales As Boolean = True, Optional DtOrden As DataTable = Nothing) As Boolean
'Dim ObjFactCotizacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa) 'Dim ObjFactCotizacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
'Dim TotalCotizacion As Decimal = ObjFactCotizacion.Total 'TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal() 'Dim TotalCotizacion As Decimal = ObjFactCotizacion.Total 'TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
@@ -33925,11 +33948,17 @@ Partial Class Ventas
' Dr("PorcentajeIVA").ToString().ToDecimal, Dr("IVA").ToString().ToDecimal, ' Dr("PorcentajeIVA").ToString().ToDecimal, Dr("IVA").ToString().ToDecimal,
' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(), ' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True) ' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
Dim OrdenManual As Integer = 0
If DtOrden IsNot Nothing Then
OrdenManual = DtOrden.FiltroPrimeroValor("Orden", $"CveVentaDetalle = {Dr("CveVentaDetalle")}").ToEntero()
End If
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(), AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString.ToEntero(), Dr("PS").ToString, Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal, Dr("CvePS").ToString.ToEntero(), Dr("PS").ToString, Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString, Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(), Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString, Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True,
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal, CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero()) PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal, CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), OrdenManual:=OrdenManual)
Next Next
'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal() 'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
@@ -33940,6 +33969,10 @@ Partial Class Ventas
' LastRow("ImporteIVA") = LastRow("ImporteIVA").ToString().ToDecimal() - Diferencia ' LastRow("ImporteIVA") = LastRow("ImporteIVA").ToString().ToDecimal() - Diferencia
'End If 'End If
If DtOrden IsNot Nothing Then
OrdenarPS(Reeordenar:=False, RecargarGV:=False)
End If
CalculaTotalesVenta(RecalculaImpuestosLocales:=RecalculaImpustosLocales) CalculaTotalesVenta(RecalculaImpuestosLocales:=RecalculaImpustosLocales)
Return True Return True
Else Else
@@ -33954,6 +33987,12 @@ Partial Class Ventas
'LIMPIAMOS 'LIMPIAMOS
'Dim TotalCotizacion As Decimal = TxtTotal.Text.Replace(",", "").ToDecimal() 'Dim TotalCotizacion As Decimal = TxtTotal.Text.Replace(",", "").ToDecimal()
Dim DtOrden As DataTable = Nothing
'SI ES UNA VENTA EXISTENTE, CONSEVAR EL ORDEN
If CveVenta > 0 Then
DtOrden = TmpDT.FiltraParametros("", "Orden", {"CveVentaDetalle", "Orden"})
End If
TmpDT.Rows.Clear() TmpDT.Rows.Clear()
TxtSubTotal.Text = "0.00" TxtSubTotal.Text = "0.00"
@@ -33978,7 +34017,7 @@ Partial Class Ventas
End If End If
ObjClientes.Dispose() ObjClientes.Dispose()
If Not AgregaPSCotizacion(RecalculaImpustosLocales:=False) Then If Not AgregaPSCotizacion(RecalculaImpustosLocales:=False, DtOrden:=DtOrden) Then
Alert("Ocurrió un error al agregar los conceptos de la cotización. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("Ocurrió un error al agregar los conceptos de la cotización. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Return False Return False
End If End If
@@ -34487,7 +34526,7 @@ Partial Class Ventas
Return Valido Return Valido
End Function End Function
Private Sub CargaConceptosRemisionPorFacturar(CveRemisiones As String, TipoCargas As Integer) Private Sub CargaConceptosRemisionPorFacturar(CveRemisiones As String, TipoCargas As Integer, Optional DtOrden As DataTable = Nothing)
Dim ObjClientes As New ClsClientes Dim ObjClientes As New ClsClientes
If ObjClientes.GetVentasRemisionesTotales(CveCliente, CveRemisiones, TipoCargas, UsuarioActual.CveEmpresa) Then If ObjClientes.GetVentasRemisionesTotales(CveCliente, CveRemisiones, TipoCargas, UsuarioActual.CveEmpresa) Then
DtRemisionesPS = ObjClientes.DtResultados DtRemisionesPS = ObjClientes.DtResultados
@@ -34530,11 +34569,16 @@ Partial Class Ventas
End If End If
tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal
Dim OrdenManual As Integer = 0
If DtOrden IsNot Nothing Then
OrdenManual = DtOrden.FiltroPrimeroValor("Orden", $"CveVentaDetalle = {Dr("CveVentaDetalle")}").ToEntero()
End If
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(), AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal, Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
CveProyecto, Proyecto, CveSubProyecto, SubProyecto, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(),
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), RegeneraIEPS:=True) CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), RegeneraIEPS:=True, OrdenManual:=OrdenManual)
Next Next
If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then
@@ -34628,6 +34672,13 @@ Partial Class Ventas
Private Function PreparaFacturarRemision() As Boolean Private Function PreparaFacturarRemision() As Boolean
'LIMPIAMOS 'LIMPIAMOS
Dim DtOrden As DataTable = Nothing
'SI ES UNA VENTA EXISTENTE, CONSEVAR EL ORDEN
If CveVenta > 0 Then
DtOrden = TmpDT.FiltraParametros("", "Orden", {"CveVentaDetalle", "Orden"})
End If
TmpDT.Rows.Clear() TmpDT.Rows.Clear()
TxtSubTotal.Text = "0.00" TxtSubTotal.Text = "0.00"
TxtSubTotal2.Text = "0.00" TxtSubTotal2.Text = "0.00"
@@ -34649,7 +34700,7 @@ Partial Class Ventas
If RemisionesLista IsNot Nothing Then If RemisionesLista IsNot Nothing Then
RemisionesLista.Clear() RemisionesLista.Clear()
RemisionesLista.Add(CveVenta) RemisionesLista.Add(CveVenta)
CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1) CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1, DtOrden:=DtOrden)
End If End If
If TmpDT.Rows.Count = 0 Then If TmpDT.Rows.Count = 0 Then
@@ -35281,8 +35332,6 @@ Partial Class Ventas
End Function End Function
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String) Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -35419,6 +35468,7 @@ Partial Class Ventas
End If End If
If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO
EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO
End If End If
@@ -39137,7 +39187,11 @@ Partial Class Ventas
Dim PuedeAplicarDevolucion As Boolean = False Dim PuedeAplicarDevolucion As Boolean = False
'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales. 'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales.
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then SaldoAlmacen = -1 If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then
SaldoAlmacen = -1
DevolucionAlmacen = 0
End If
If SaldoAlmacen < 0 Then If SaldoAlmacen < 0 Then
If DevolucionAlmacen = 0 Then If DevolucionAlmacen = 0 Then
PuedeAplicarDevolucion = True PuedeAplicarDevolucion = True
@@ -40776,9 +40830,9 @@ Partial Class Ventas
GvExist.DataSource = DtExistencias GvExist.DataSource = DtExistencias
GvExist.DataBind() GvExist.DataBind()
'GvExist.Columns(0).ItemStyle.Width = New Unit(200, UnitType.Pixel)
'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE 'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE
For index As Integer = 1 To DtExistencias.Columns.Count - 1 'EL GV TIENE UNA COLUMNA EXTRA DEBE TENER UN INDICE MAYOR
For index As Integer = 1 To DtExistencias.Columns.Count
For Each gvr As GridViewRow In GvExist.Rows For Each gvr As GridViewRow In GvExist.Rows
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
Next Next
@@ -40791,7 +40845,7 @@ Partial Class Ventas
Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound
If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Attributes.Add("colspan", "3") e.Row.Cells(1).Visible = False
End If End If
End Sub End Sub