This commit is contained in:
Oscar Irigoyen
2023-02-20 20:20:25 -07:00
70 changed files with 3191 additions and 2355 deletions

View File

@@ -43,7 +43,7 @@
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
</li>
<li>
<asp:LinkButton runat="server" ID="BtnDepreciacion" data-toggle="tooltip" data-placement="left" title="Generar Depreciacion" Text="<i class='fa fa-plus'></i> Generar Depreciacion"></asp:LinkButton>
<asp:LinkButton runat="server" ID="BtnDepreciacion" data-toggle="tooltip" data-placement="left" title="Generar Depreciación" Text="<i class='fa fa-plus'></i> Generar Depreciación"></asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
@@ -97,7 +97,7 @@
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo, Descripcion, TasaDepreciacion" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciación" DataKeyNames="CveActivoFijo, TipoActivoFijo, Descripcion, TasaDepreciacion" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
@@ -203,7 +203,7 @@
</div>
<div class="modal-footer">
<asp:Button ID="BtnGenerarDepreciacion" runat="server" class="btn btn-success" Text="Generar Depreciacion" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnGenerarDepreciacion" runat="server" class="btn btn-success" Text="Generar Depreciación" ValidationGroup="GrpGuardar" />
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -30,17 +30,15 @@ Partial Class AF_RepDepreciacion
Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
Dim ErrorMovInv As Boolean = False
Dim ConceptoPoliza As String = String.Format("Depreciacion - {0}", txtFechaI.Text)
Dim ConceptoPoliza As String = String.Format("Depreciación - {0}", txtFechaI.Text)
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
For Each RowsDt As GridViewRow In GvDatos.Rows
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
Dim MontoDepreciacion As Decimal = RowsDt.FCLiteral("LtlDepreciacionMensual").Text.ToDecimal
If MontoDepreciacion > 0 And CveActivoFijo <> 0 Then
Dim ConceptoPolizaDetalle As String = String.Format("Depreciacion - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
Dim ConceptoPolizaDetalle As String = String.Format("Depreciación - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
If CvePrePoliza > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -MontoDepreciacion, -MontoDepreciacion, 270, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then

View File

@@ -244,7 +244,7 @@
</ajax:TabContainer>--%>
<div id="DivAgregarFolioGarantia" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<div class="modal-dialog" style="width: 500px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalFolioGarantia" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
@@ -253,63 +253,76 @@
<asp:Literal ID="LtlTituloModalFolioGarantia" runat="server">Agregar Folio Garantia</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style="padding-top:0px!important">
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label></br>
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="100%" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
<i></i>
</div>
</div>
</div>
<%--<br />--%>
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label></br>
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="50%" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
<i></i>
</div>
<%--<br />--%>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlEstatusEditar.ClientID.ToString()%>">Estatus:</label>
<asp:DropDownList ID="DdlEstatusEditar" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
</asp:DropDownList>
<i></i>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTipoFolio" for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</asp:Label></br>
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="general" Selected="True">General</asp:ListItem>
<asp:ListItem Value="optima">Optima</asp:ListItem>
<asp:ListItem Value="motobateria">Motobateria</asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblArea" for="<%= DdlArea.ClientID.ToString()%>">Área:</asp:Label></br>
<asp:DropDownList ID="DdlArea" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="1" Selected="True">Piso</asp:ListItem>
<asp:ListItem Value="2">Almacén</asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlEstatusEditar.ClientID.ToString()%>" style="margin-bottom:0px">Estatus:</label></br>
<asp:DropDownList ID="DdlEstatusEditar" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTipoFolio" for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</asp:Label></br>
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="general" Selected="True">General</asp:ListItem>
<asp:ListItem Value="optima">Optima</asp:ListItem>
<asp:ListItem Value="motobateria">Motobateria</asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
<%--<br />--%>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtLimite" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvLimite" runat="server" ControlToValidate="TxtLimite" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<label for="<%= TxtLimite.ClientID.ToString()%>">Límite:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblArea" for="<%= DdlArea.ClientID.ToString()%>">Área:</asp:Label></br>
<asp:DropDownList ID="DdlArea" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="1" Selected="True">Piso</asp:ListItem>
<asp:ListItem Value="2">Almacén</asp:ListItem>
</asp:DropDownList>
<i></i>
<%--<br />--%>
<div class="col-md-6">
</br>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtLimite" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvLimite" runat="server" ControlToValidate="TxtLimite" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<label for="<%= TxtLimite.ClientID.ToString()%>">Límite:</label>
<i></i>
</div>
</div>
</div>
<%-- <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:TextBox ID="TxtCargo" CssClass="form-control " Width="150px" runat="server" MaxLength="10" CausesValidation="true" Style="text-align: right!important; margin-right: 10px!important" OnKeyup="FormatoMoneda(this);"></asp:TextBox>

View File

@@ -30,12 +30,16 @@
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1 ">Marcas:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlMarcas" runat="server" DataValueField="CveMarca" DataTextField="Marca" class="select2me" Width="100%"></asp:DropDownList>
</div>
<label class="col-md-1 ">Clasificación:</label>
<div class="col-md-2">
<div class="col-md-1">
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="100%"></asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1" Text="SubProyecto"></asp:Label>
<div class="col-md-2">
<div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
</div>
<label class="col-md-1 ">Fecha Inicial:</label>
@@ -92,7 +96,7 @@
<asp:BoundField DataField="Codigo" HeaderText="Código" />
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
<asp:BoundField DataField="Serie" HeaderText="Serie" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha" />
<asp:BoundField DataField="Fecha" DataFormatString="{0:d}" HeaderText="Fecha Compra" />
<asp:BoundField DataField="mesestranscurridos" HeaderText="M.Transc." />
</Columns>
</asp:GridView>

View File

@@ -61,10 +61,14 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
private void CargaCombos()
{
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("Categoria = 'ACUMULADORES'");
DdlClasificaciones.DataBind();
DdlClasificaciones.Items.Insert(0, new ListItem("Todos", "-1"));
}
DdlMarcas.DataSource = get_GlobalDTGralMarcas(UsuarioActual.CveEmpresa);
DdlMarcas.DataBind();
DdlMarcas.Items.Insert(0, new ListItem("Todas", "-1"));
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
@@ -76,7 +80,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{
ClsAcumuladores ObjAcum = new ClsAcumuladores();
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlMarcas.SelectedValue.ToEntero(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
{
GvAcum.DataSource = ObjAcum.DtResultados;
}

View File

@@ -1315,11 +1315,12 @@ Public Class ClsAcumuladores
End Function
#Region "VIGENCIA ACUMULADORES"
Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
Public Function GetVigencias(FechaInicio As Date, FechaFin As Date, CveMarca As Integer, CveClasificacion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Inv_ProductosFechasComprasSerie")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaIni", SqlDbType.Date).Value = FechaInicio

View File

@@ -89,7 +89,6 @@ Public Class ClsBancos
Public Property DepositoRefCrediProveedor As String
Public Property CuentaDepositado As String
Public Property CveEstatusIE As Integer
Public Property CveProveedorIntermediario As Integer
Public Property EstatusIE As String
Public Property IDPoliza As Integer
'Public Property IdCtaContDepreciacion As Integer
@@ -717,30 +716,7 @@ Public Class ClsBancos
With SqlAdapter.SelectCommand.Parameters
.Add("@CveIE", SqlDbType.Int).Value = CveIE
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@TipoMovimiento", SqlDbType.VarChar).Value = TipoMovimiento
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
.Add("@Folio", SqlDbType.VarChar).Value = Folio
.Add("@PagueseA", SqlDbType.NVarChar).Value = PagueseA
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EsAbonoEnCuenta", SqlDbType.Int).Value = EsAbonoEnCuenta
.Add("@FueConciliado", SqlDbType.Int).Value = FueConciliado
.Add("@CveEstatusIE", SqlDbType.Int).Value = CveEstatusIE
.Add("@FechaI", SqlDbType.Date).Value = IfNull(FechaInicio, DBNull.Value, FechaInicio)
.Add("@FechaF", SqlDbType.Date).Value = IfNull(FechaFin, DBNull.Value, FechaFin)
.Add("@FechaAplicacionI", SqlDbType.Date).Value = IfNull(FechaAplicacionInicio, DBNull.Value, FechaAplicacionInicio)
.Add("@FechaAplicacionF", SqlDbType.Date).Value = IfNull(FechaAplicacionFin, DBNull.Value, FechaAplicacionFin)
.Add("@CveUsuarioConcilio", SqlDbType.Int).Value = CveUsuarioConcilio
.Add("@FechaConciliadoI", SqlDbType.Date).Value = IfNull(FechaConciliadoInicio, DBNull.Value, FechaConciliadoInicio)
.Add("@FechaConciliadoF", SqlDbType.Date).Value = IfNull(FechaConciliadoFin, DBNull.Value, FechaConciliadoFin)
.Add("@TImporte", SqlDbType.Float).Value = TImporte
.Add("@CveEstatusNotificacion", SqlDbType.Int).Value = CveEstatusNotificacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With
Try
@@ -769,7 +745,7 @@ Public Class ClsBancos
Me.FueConciliado = CBool(Data.Rows(0)("FueConciliado").ToString)
Me.FechaAplicado = Data.Rows(0)("FechaAplicado").ToString.ToDate
Me.CveEstatusIE = Data.Rows(0)("CveEstatusIE").ToString.ToEntero
Me.CveProveedorIntermediario = Data.Rows(0)("CveProveedorIntermediario").ToString.ToEntero
' Me.CveProveedorIntermediario = Data.Rows(0)("CveProveedorIntermediario").ToString.ToEntero
BancoNumCuentaMoneda = Data.Rows(0)("BancoNumCuentaMoneda").ToString
IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
IdCtaContableComplementaria = Data.Rows(0)("IdCtaContableComplementaria").ToString.ToEntero
@@ -825,6 +801,53 @@ Public Class ClsBancos
Return Retorno
End Function
Public Function GetBancosRepIE(CveBanco As Integer, CveCuenta As Integer, TipoMovimiento As String, CveTipoTransaccion As Integer, Folio As String, PagueseA As String, Importe As Double,
CveMoneda As Integer, EsAbonoEnCuenta As Integer, FueConciliado As Integer, CveEstatusIE As Integer,
FechaInicio As Date, FechaFin As Date, FechaAplicacionInicio As Date, FechaAplicacionFin As Date,
FechaConciliadoInicio As Date, FechaConciliadoFin As Date, CveUsuarioConcilio As Integer, TImporte As Double, CveEmpresa As Integer,
Optional CveEstatusNotificacion As Integer = -1, Optional CveCuentaTarjeta As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_IERepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@TipoMovimiento", SqlDbType.VarChar).Value = TipoMovimiento
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
.Add("@Folio", SqlDbType.VarChar).Value = Folio
.Add("@PagueseA", SqlDbType.NVarChar).Value = PagueseA
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EsAbonoEnCuenta", SqlDbType.Int).Value = EsAbonoEnCuenta
.Add("@FueConciliado", SqlDbType.Int).Value = FueConciliado
.Add("@CveEstatusIE", SqlDbType.Int).Value = CveEstatusIE
.Add("@FechaI", SqlDbType.Date).Value = IfNull(FechaInicio, DBNull.Value, FechaInicio)
.Add("@FechaF", SqlDbType.Date).Value = IfNull(FechaFin, DBNull.Value, FechaFin)
.Add("@FechaAplicacionI", SqlDbType.Date).Value = IfNull(FechaAplicacionInicio, DBNull.Value, FechaAplicacionInicio)
.Add("@FechaAplicacionF", SqlDbType.Date).Value = IfNull(FechaAplicacionFin, DBNull.Value, FechaAplicacionFin)
.Add("@CveUsuarioConcilio", SqlDbType.Int).Value = CveUsuarioConcilio
.Add("@FechaConciliadoI", SqlDbType.Date).Value = IfNull(FechaConciliadoInicio, DBNull.Value, FechaConciliadoInicio)
.Add("@FechaConciliadoF", SqlDbType.Date).Value = IfNull(FechaConciliadoFin, DBNull.Value, FechaConciliadoFin)
.Add("@TImporte", SqlDbType.Float).Value = TImporte
.Add("@CveEstatusNotificacion", SqlDbType.Int).Value = CveEstatusNotificacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Catálogo de Ingresos y Egresos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetPrePolizasDetalle(CvePrePoliza As Integer, CveEmpresa As Integer, Optional CveIE As Integer = -1, Optional CveOC As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleGet")

View File

@@ -136,6 +136,7 @@ Public Class ClsInventarios
Public Property Modulo As String
Public Property ConAplicacion As Boolean
Public Property CveInventarioFisicoPadre As Integer
Public Property CveFolioGarantia As Integer
@@ -875,7 +876,7 @@ Public Class ClsInventarios
ResponsableCarga = dr("ResponsableCarga").ToString
ResponsableRecibio = dr("ResponsableRecibio").ToString
Modulo = dr("Modulo").ToString
CveFolioGarantia = dr("CveFolioGarantia").ToString.ToEntero
Retorno = True
End If
@@ -985,7 +986,7 @@ Public Class ClsInventarios
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional CveCamion As Integer = -1, Optional Placa As String = "",
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1, Optional CveFolioGarantia As Integer = -1) As Integer
Dim Retorno As Integer = -1
@@ -1045,6 +1046,7 @@ Public Class ClsInventarios
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
End With
Try

View File

@@ -1649,7 +1649,7 @@ Public Class ClsOC
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer,
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OC_OrdenesCompraRep")
@@ -1678,6 +1678,7 @@ Public Class ClsOC
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
End With

View File

@@ -101,33 +101,33 @@ Public Class ClsPaginas
#End Region
#Region "GlobalDTs"
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Public Shared Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
Application("GlobalTipoCambio") = 0
HttpContext.Current.Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return Application("GlobalTipoCambio").ToString.ToDouble
Return HttpContext.Current.Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
Application("GlobalTipoCambio") = value
HttpContext.Current.Application("GlobalTipoCambio") = value
End Set
End Property
Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As MTipoCambioFluctuacion
Public Shared ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As MTipoCambioFluctuacion
Get
If Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambioUltimaFluctuacion(-1, Now) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy()
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy()
Else
Application("GlobalTipoCambioUltimaFluctuacion") = Nothing
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing
End If
ObjGral.Dispose()
End If
@@ -137,9 +137,9 @@ Public Class ClsPaginas
}
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
If Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
Dim dr = DirectCast(Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
Dim dr = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
If dr IsNot Nothing Then
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
@@ -174,30 +174,29 @@ Public Class ClsPaginas
Application("GlobalTipoCambioEuro") = value
End Set
End Property
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
Public Shared Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTUsuarios-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then Application(AppNombre) = ObjUsuarios.DtResultados
If ObjUsuarios.GetUsuariosEmpresas(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsuarios.DtResultados
End Using
End If
Dim Str As New StringBuilder
If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
'If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If CveUsuario <> -1 Then filtros.Add($"CveUsuario = {CveUsuario}")
If CveCliente <> -1 Then filtros.Add($"CveCliente = {CveCliente}")
If CveProveedor <> -1 Then filtros.Add($"CveProveedor = {CveProveedor}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUsuarios = DirectCast(Application(AppNombre), DataTable)
GlobalDTUsuarios = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTUsuarios-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable
@@ -220,14 +219,11 @@ Public Class ClsPaginas
Dim AppNombre As String = $"GlobalDTTiposGastos-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjCompra As New ClsCompras()
If ObjCompra.GetTipoGasto(-1, -1) Then Application(AppNombre) = ObjCompra.DtResultados Else Application(AppNombre) = Nothing
If ObjCompra.GetTipoGasto(-1, CveEmpresa) Then Application(AppNombre) = ObjCompra.DtResultados Else Application(AppNombre) = Nothing
ObjCompra.Dispose()
End If
If CveEmpresa <> -1 Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", Estatus)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
If Estatus <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), $"CveEstatus = {Estatus}", "", DataViewRowState.CurrentRows)
GlobalDTTiposGastos = Dv.ToTable
Dv.Dispose()
Else
@@ -423,25 +419,25 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
Public Shared Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable
Get
Dim AppNombre As String = "GlobalDTGralEstados"
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados
If ObjGrales.GetSATEstado("-1") Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
Dim Filtro As New StringBuilder
Filtro.Append(" 1 = 1 ")
If ClaveSATPais <> "-1" Then Filtro.AppendFormat(" AND ClaveSATPais = '{0}' ", ClaveSATPais)
If CvePais > 0 Then Filtro.AppendFormat(" AND CvePais = {0} ", CvePais)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
GlobalDTGralEstados = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTGralEstados"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralMunicipios(ClaveSATEstado As String, Optional CveEstado As Integer = -1) As DataTable
@@ -493,13 +489,13 @@ Public Class ClsPaginas
Application("GlobalDTLocalidad") = value
End Set
End Property
Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
Public Shared Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String,
Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable
Get
Dim AppNombre As String = "GlobalDTGralColonias"
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados
If ObjGrales.GetSATColonia("-1", "-1", "-1") Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
Dim Filtro As New StringBuilder
@@ -510,14 +506,14 @@ Public Class ClsPaginas
If CveMunicipio > 0 Then Filtro.AppendFormat(" AND CveMunicipio = {0} ", CveMunicipio)
If CodigoPostal > 0 Then Filtro.AppendFormat(" AND CP = {0} ", CodigoPostal)
If CveColonia > 0 Then Filtro.AppendFormat(" AND CveColonia = {0} ", CveColonia)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Filtro.ToString, "", DataViewRowState.CurrentRows)
GlobalDTGralColonias = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTGralColonias"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
@@ -561,10 +557,9 @@ Public Class ClsPaginas
End Using
End If
'Dim Str As New StringBuilder
''If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
'If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
'If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
'If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
'If CveUsuario <> -1 OrElse CveCliente <> -1 OrElse CveProveedor <> -1
' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
' GlobalDTUsuarios = Dv.ToTable
' Dv.Dispose()
@@ -577,21 +572,37 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable
Property GlobalDTProveedoresCuentas(CveEmpresa As Integer, CveProveedor As Integer, Optional CveCuentaDeposito As Integer = -1) As DataTable
Get
GlobalDTProveedoresCuentas = DirectCast(Application("GlobalDTProveedoresCuentas"), DataTable)
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjProveedoresBancos As New ClsGenerales
If ObjProveedoresBancos.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveProveedor:=-1, CveCliente:=-2, CvePersonal:=-2) Then Application(AppNombre) = ObjProveedoresBancos.DtResultados
End Using
End If
Dim filtros As New List(Of String)
If CveProveedor <> -1 Then filtros.Add($"CveProveedor = {CveProveedor}")
If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTProveedoresCuentas = Dv.ToTable
Dv.Dispose()
Else
GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTProveedoresCuentas") = value
Dim AppNombre As String = $"GlobalDTProveedoresCuentas-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim P As New ClsGenerales
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-1, CveProveedor:=-2, CvePersonal:=-2) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
Dim Str As New StringBuilder
@@ -617,13 +628,7 @@ Public Class ClsPaginas
If P.GetProveedorClasificacion(CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa ={0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTProveedorClasificacion = Dv.ToTable
Dv.Dispose()
Else
GlobalDTProveedorClasificacion = DirectCast(Application(AppNombre), DataTable)
End If
GlobalDTProveedorClasificacion = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTProveedorClasificacion-{CveEmpresa}"
@@ -633,7 +638,6 @@ Public Class ClsPaginas
Property GlobalDTProveedorSucursales(CveProveedor As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTProveedorSucursales-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim P As New ClsCompProveedores
If P.GetSucursales(-1, CveEmpresa) Then Application(AppNombre) = P.DtResultados
@@ -654,16 +658,19 @@ Public Class ClsPaginas
End Property
Property GlobalDTRoles(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTRoles"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTRoles = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRoles = DirectCast(Application("GlobalDTRoles"), DataTable)
Dim AppNombre As String = $"GlobalDTRoles-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Using ObjRoles As New ClsSisRoles
If ObjRoles.GetRoles(-1, CveEmpresa) Then Application(AppNombre) = ObjRoles.DtResultados
End Using
End If
GlobalDTRoles = DirectCast(Application(AppNombre), DataTable)
End Get
Set(ByVal value As DataTable)
Application("GlobalDTRoles") = value
Dim AppNombre As String = $"GlobalDTRoles-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTNomSatBancos() As DataTable
@@ -684,16 +691,22 @@ Public Class ClsPaginas
End Property
Property GlobalDTNomSatRegimenContratacion() As DataTable
Get
GlobalDTNomSatRegimenContratacion = DirectCast(Application("GlobalDTNomSatRegimenContratacion"), DataTable)
Dim AppNombre As String = "GlobalDTNomSatRegimenContratacion"
If Application(AppNombre) Is Nothing Then
Dim ObjNom As New ClsNominas
If ObjNom.GetRegimenContratacion Then Application(AppNombre) = ObjNom.DtResultados
ObjNom.Dispose()
End If
GlobalDTNomSatRegimenContratacion = DirectCast(Application(AppNombre), DataTable)
End Get
Set(ByVal value As DataTable)
Application("GlobalDTNomSatRegimenContratacion") = value
Dim AppNombre As String = "GlobalDTNomSatRegimenContratacion"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRegimenesFiscales(Optional TipoPersona As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTRegimenesFiscales")
'sino existe, recarga los datos
Dim AppNombre As String = "GlobalDTRegimenesFiscales"
If Application(AppNombre) Is Nothing Then
Dim ObjGral As New ClsSisEmpresas
If ObjGral.GetRegimenFiscal(-1) Then Application(AppNombre) = ObjGral.DtResultados
@@ -732,6 +745,7 @@ Public Class ClsPaginas
Application("GlobalDTNomSatTipoIncapacidad") = value
End Set
End Property
'Este GlobalDT no estoy seguro si se deba segmentar por empresa, se usa mucho en todos lados
Public Shared Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
Get
Dim AppNombre As String = "GlobalDTEmpresas"
@@ -750,7 +764,7 @@ Public Class ClsPaginas
End Using
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveEmpresa = {CveEmpresa}", "", DataViewRowState.CurrentRows)
GlobalDTEmpresas = Dv.ToTable
Dv.Dispose()
Else
@@ -813,19 +827,17 @@ Public Class ClsPaginas
Public Shared Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTClasificaciones-{CveEmpresa}"
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados
ObjClasificaciones.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion)
If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If CveCategoria <> -1 Then filtros.Add($"CveCategoria = {CveCategoria}")
If UsoClasificacion <> -1 Then filtros.Add($"UsoClasificacion IN ({UsoClasificacion},3) ")
If CveClasificacion <> -1 Then filtros.Add($"CveClasificacion = {CveClasificacion}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose()
Else
@@ -846,16 +858,7 @@ Public Class ClsPaginas
If ObjRH.GetActividades(CveEmpresa) Then Application(AppNombre) = ObjRH.DtResultados
ObjRH.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTRHActividades = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRHActividades = DirectCast(Application(AppNombre), DataTable)
End If
GlobalDTRHActividades = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTRHActividades-{CveEmpresa}"
@@ -871,11 +874,8 @@ Public Class ClsPaginas
If ObjClasificaciones.GetClasificaciones(CveEmpresa, Tipo:=4) Then Application(AppNombre) = ObjClasificaciones.DtResultados
ObjClasificaciones.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
If CveCategoria <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), $"CveCategoria = {CveCategoria}", "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones2 = Dv.ToTable
Dv.Dispose()
Else
@@ -889,35 +889,48 @@ Public Class ClsPaginas
End Property
Property GlobalDTClasificacionesSubProyectos(Optional CveClasificacion As Integer = -1, Optional CveEmpresa As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
Dim AppNombre As String = $"GlobalDTClasificacionesSubProyectos-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetDTClasificacionesSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
ObjClasificaciones.Dispose()
End If
Dim filtros As New List(Of String)
If CveClasificacion <> -1 Then filtros.Add($"CveCategoria = {CveClasificacion}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTClasificacionesSubProyectos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClasificacionesSubProyectos = DirectCast(Application("GlobalDTClasificacionesSubProyecto"), DataTable)
GlobalDTClasificacionesSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTClasificacionesSubProyecto") = value
Dim AppNombre As String = $"GlobalDTClasificacionesSubProyectos-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTACClasificadorObjetoGasto(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
Dim Dv As New DataView(DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
Dim AppNombre As String = $"GlobalDTACClasificadorObjetoGasto-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
ObjClasificaciones.Dispose()
End If
Dim filtros As New List(Of String)
If CveCategoria <> -1 Then filtros.Add($"CveCategoria = {CveCategoria}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTACClasificadorObjetoGasto = Dv.ToTable
Dv.Dispose()
Else
GlobalDTACClasificadorObjetoGasto = DirectCast(Application("GlobalDTACClasificadorObjetoGasto"), DataTable)
GlobalDTACClasificadorObjetoGasto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTACClasificadorObjetoGasto") = value
Dim AppNombre As String = $"GlobalDTACClasificadorObjetoGasto-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTClasificacionesDetalle(Optional CveEmpresa As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
@@ -977,7 +990,6 @@ Public Class ClsPaginas
Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados
@@ -993,7 +1005,6 @@ Public Class ClsPaginas
Property GlobalDTChoferes(CveEmpresa As Integer, Optional CveChofer As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTChoferes-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(-1, CveEmpresa, 1, -1) Then
@@ -1041,12 +1052,29 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTModulos() As DataTable
Property GlobalDTModulos(Optional CveModulo As Integer = -1) As DataTable
Get
GlobalDTModulos = DirectCast(Application("GlobalDTModulos"), DataTable)
Dim AppNombre As String = "GlobalDTModulos"
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Using ObjModulos As New ClsModulos
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then Application(AppNombre) = ObjModulos.DtResultados
End Using
End If
Dim filtros As New List(Of String)
If CveModulo <> -1 Then filtros.Add($"CveModulo = {CveModulo}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTModulos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTModulos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Application("GlobalDTModulos") = value
Dim AppNombre As String = "GlobalDTModulos"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTMonedas() As DataTable
@@ -1114,13 +1142,7 @@ Public Class ClsPaginas
If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUnidadesMedida.DtResultados
ObjUnidadesMedida.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
GlobalDTUnidadesMedida = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTUnidadesMedida-{CveEmpresa}"
@@ -1136,20 +1158,11 @@ Public Class ClsPaginas
If ObjUnidadesMedida.GetUnidadesMedidaAlias(CveEmpresa, -1) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados
ObjUnidadesMedida.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTUnidadesMedidaAlias = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUnidadesMedidaAlias = DirectCast(Application(AppNombre), DataTable)
End If
GlobalDTUnidadesMedidaAlias = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTUnidadesMedidaAlias-{CveEmpresa}"
Application(AppNombre) = value
'Dim ObjUnidadesMedida As New ClsUnidadesMedida()
'If ObjUnidadesMedida.GetUnidadesMedidaAlias(CveEmpresa, -1) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados
'ObjUnidadesMedida.Dispose()
End Set
End Property
Public Shared Property GlobalDTSATMotivosCancelacion(Optional CveSATMotivoCancelacion As Integer = -1, Optional CodigoSAT As String = "-1") As DataTable
@@ -1324,13 +1337,13 @@ Public Class ClsPaginas
If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados
ObjSubProyectos.Dispose()
End If
If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEstatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If CveProyecto <> -1 Then filtros.Add($"CveProyecto = {CveProyecto}")
If CveSubProyecto <> -1 Then filtros.Add($"CveSubProyecto = {CveSubProyecto}")
If CveUsuario <> -1 Then filtros.Add($"CveUsuario = {CveUsuario}")
If CveEstatus <> -1 Then filtros.Add($"CveEstatus = {CveEstatus}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectosUsuarios = Dv.ToTable
Dv.Dispose()
Else
@@ -1350,12 +1363,12 @@ Public Class ClsPaginas
If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"})
ObjSubProyectos.Dispose()
End If
If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEstatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If CveProyecto <> -1 Then filtros.Add($"CveProyecto = {CveProyecto}")
If CveUsuario <> -1 Then filtros.Add($"CveUsuario = {CveUsuario}")
If CveEstatus <> -1 Then filtros.Add($"CveEstatus = {CveEstatus}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTProyectosUsuarios = Dv.ToTable
Dv.Dispose()
Else
@@ -1536,19 +1549,19 @@ Public Class ClsPaginas
ObjPS.Dispose()
End Get
End Property
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
Public Shared Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1", Optional CodigoSATPS As String = "-1") As DataTable
Get
Dim AppNombre As String = $"GlobalDTPSSimplificado-{CveEmpresa}"
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
If ObjPS.GetPSSimplificado(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
End If
Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
Dim Cons = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow))
'Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
@@ -1564,12 +1577,12 @@ Public Class ClsPaginas
GlobalDTPSSimplificado = New DataTable
End Try
Else
GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTPSSimplificado-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTProductosServiciosAlias(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable
@@ -1582,11 +1595,8 @@ Public Class ClsPaginas
ObjPS.Dispose()
End If
If CveEmpresa <> -1 Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstado = {0} ", Estatus)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
If Estatus >= 0 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), $"CveEstado = {Estatus}", "", DataViewRowState.CurrentRows)
GlobalDTProductosServiciosAlias = Dv.ToTable
Dv.Dispose()
Else
@@ -1640,19 +1650,14 @@ Public Class ClsPaginas
Property GlobalDTPSAdicionales(CvePS As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTPSAdicionales-{CveEmpresa}"
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSAdicionales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
ObjPS.Dispose()
End If
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSAdicionales(-1, CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados
ObjPS.Dispose()
End If
Dim Str As New StringBuilder
If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS)
If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa)
If CvePS > 0 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), $"CvePS = {CvePS}", "", DataViewRowState.CurrentRows)
GlobalDTPSAdicionales = Dv.ToTable
Dv.Dispose()
Else
@@ -1915,30 +1920,28 @@ Public Class ClsPaginas
'Fin Periodos
'Fin Ruta
'Cliente
Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable
Public Shared Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCliente-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then Application(AppNombre) = ObjClientes.DtResultados.Copy()
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa:=CveEmpresa, Estatus:=-1) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy()
ObjClientes.Dispose()
End If
If CveEmpresa <> -1 Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus)
If CveCliente >= 0 Then StrSQL.AppendFormat(" AND CveCliente = {0} ", CveCliente)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If Estatus >= 0 Then filtros.Add($"EstatusBool = {Estatus}")
If CveCliente >= 0 Then filtros.Add($"CveCliente = {CveCliente}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
Else
GlobalDTCliente = DirectCast(Application(AppNombre), DataTable)
GlobalDTCliente = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCliente-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTClienteClasificaciones(CveEmpresa As Integer) As DataTable
@@ -1950,13 +1953,7 @@ Public Class ClsPaginas
If ObjClientes.GetClienteClasificacion(CveEmpresa) Then Application(AppNombre) = ObjClientes.DtResultados
ObjClientes.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTClienteClasificaciones = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClienteClasificaciones = DirectCast(Application(AppNombre), DataTable)
End If
GlobalDTClienteClasificaciones = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTClienteClasificaciones-{CveEmpresa}"
@@ -1980,82 +1977,86 @@ Public Class ClsPaginas
End Set
End Property
'Variables para Ventas
Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable
Public Shared Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTVendedores-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(CveEmpresa) Then Application(AppNombre) = ObjVendedores.DtResultados
If ObjVendedores.GetVendedores(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVendedores.DtResultados
ObjVendedores.Dispose()
End If
If CveEmpresa <> -1 Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If VendedorTipo >= 0 Then StrSQL.AppendFormat(" AND VendedorTipo = {0} ", VendedorTipo)
If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", If(Estatus = 1, True, False))
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If VendedorTipo >= 0 Then filtros.Add($"VendedorTipo = {VendedorTipo}")
If Estatus >= 0 Then filtros.Add($"CveEstatus = {Estatus}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTVendedores = Dv.ToTable
Dv.Dispose()
Else
GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable)
GlobalDTVendedores = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTVendedores-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
Public Shared Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTClientesCorporativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTClientesCorporativo = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClientesCorporativo = DirectCast(Application("GlobalDTClientesCorporativo"), DataTable)
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjCorporativo As New ClsClientes
If ObjCorporativo.GetCorporativo(CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjCorporativo.DtResultados
End Using
End If
GlobalDTClientesCorporativo = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTClientesCorporativo") = value
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional RFC As String = "-1") As DataTable
Public Shared Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1, Optional RFC As String = "-1") As DataTable
Get
Dim AppNombre As String = $"GlobalDTCompProveedores-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then Application(AppNombre) = ObjProveedores.DtResultados
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjProveedores.DtResultados
ObjProveedores.Dispose()
End If
If CveEmpresa <> -1 AndAlso Application(AppNombre) IsNot Nothing Then
If HttpContext.Current.Application(AppNombre) IsNot Nothing Then
Dim StrSQL As New StringBuilder
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
StrSQL.Append("1 = 1")
If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor)
If RFC <> "-1" Then StrSQL.AppendFormat(" AND RFC = '{0}' ", RFC)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTCompProveedores = Dv.ToTable
Dv.Dispose()
Else
GlobalDTCompProveedores = DirectCast(Application(AppNombre), DataTable)
GlobalDTCompProveedores = Nothing
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCompProveedores-{CveEmpresa}"
Application(AppNombre) = value
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then Application(AppNombre) = ObjProveedores.DtResultados
'ObjProveedores.Dispose()
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'EstatusFactura
Property GlobalDTCompEstatusFactura() As DataTable
Public Shared Property GlobalDTCompEstatusFactura() As DataTable
Get
GlobalDTCompEstatusFactura = DirectCast(Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'")
Dim AppNombre As String = "GlobalDTCompEstatusFactura"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjEstatusFacturaCompra As New ClsCompEstatusFactura
If ObjEstatusFacturaCompra.GetEstatusFactura Then HttpContext.Current.Application(AppNombre) = ObjEstatusFacturaCompra.DtResultados
End Using
End If
GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application(AppNombre), DataTable).FiltraParametros("Estatus = 'Activo'")
End Get
Set(value As DataTable)
Application("GlobalDTCompEstatusFactura") = value
Dim AppNombre As String = "GlobalDTCompEstatusFactura"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTContratosSecciones() As DataTable
@@ -2066,26 +2067,25 @@ Public Class ClsPaginas
Application("GlobalDTContratosSecciones") = value
End Set
End Property
Property GlobalDTContratos(CveEmpresa As Integer, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable
Public Shared Property GlobalDTContratos(CveEmpresa As Integer, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTContratos-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjContratos As New ClsContratos
If ObjContratos.GetContratos(-1, CveEmpresa) Then Application(AppNombre) = ObjContratos.DtResultados Else Application(AppNombre) = Nothing
If ObjContratos.GetContratos(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContratos.DtResultados
End Using
End If
Dim StrSQL As New StringBuilder
StrSQL.Append(" 1 = 1 ")
If CveContrato >= 0 Then StrSQL.AppendFormat(" AND CveContrato = {0} ", CveContrato)
If CveSubProyecto >= 0 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTContratos = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTContratos-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
@@ -2336,17 +2336,17 @@ Public Class ClsPaginas
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
Property GlobalDTTiposEventos() As DataTable
Get
Dim AppNombre As String = $"GlobalDTTiposEventos"
Dim AppNombre As String = "GlobalDTTiposEventos"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjTiposEventos As New ClsTiposEventos
If ObjTiposEventos.GetTiposEventos() Then HttpContext.Current.Application(AppNombre) = ObjTiposEventos.DtResultados
ObjTiposEventos.Dispose()
Using ObjTiposEventos As New ClsTiposEventos
If ObjTiposEventos.GetTiposEventos() Then HttpContext.Current.Application(AppNombre) = ObjTiposEventos.DtResultados
End Using
End If
GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTTiposEventos"
Dim AppNombre As String = "GlobalDTTiposEventos"
Application(AppNombre) = value
End Set
End Property
@@ -3263,23 +3263,18 @@ Public Class ClsPaginas
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjOC As New ClsOC
If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then
If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa:=CveEmpresa) Then
Application(AppNombre) = ObjOC.DtResultados
Else
Application(AppNombre) = Nothing
End If
ObjOC.Dispose()
End If
If CveEmpresa <> -1 Then
Dim filtro As New StringBuilder
filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
If CveUsuario > 0 Then
filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
End If
If Tipo <> "" Then
filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
End If
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
Dim filtros As New List(Of String)
If CveUsuario > 0 Then filtros.Add($"CveUsuario = {CveUsuario}")
If Tipo <> "" Then filtros.Add($"Tipo = '{Tipo}'")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTOCEstatusUsuarios = Dv.ToTable
Dv.Dispose()
Else
@@ -3413,20 +3408,19 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
Public Shared Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados
If ObjPersonal.GetPersonal(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPersonal.DtResultados
ObjPersonal.Dispose()
End If
GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable)
GlobalDTRHPersonal = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
Application(AppNombre) = value
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTDepartamentos(CveEmpresa As Integer) As DataTable
@@ -6659,18 +6653,18 @@ Public Class ClsPaginas
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
End If
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
Dim ObjCuentasBancos As New ClsGenerales()
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'")
Dim CuentasStr As New StringBuilder("")
For Each CuentasBancarios As DataRow In CuentasActivas.Rows
Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString)
Dim infoCuenta As String = String.Format("<br>{0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe)
CuentasStr.AppendFormat(infoCuenta)
Next
params.Add(New ReportParameter("Cuentas", CuentasStr.ToString))
End If
ObjCuentasBancos.Dispose()
'Dim ObjCuentasBancos As New ClsGenerales()
'If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
Dim CuentasActivas As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=ObjOC.CveProveedor).FiltraParametros("EstatusTexto = 'Activo'")
Dim CuentasStr As New StringBuilder("")
For Each CuentasBancarios As DataRow In CuentasActivas.Rows
Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString)
Dim infoCuenta As String = String.Format("<br>{0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe)
CuentasStr.AppendFormat(infoCuenta)
Next
params.Add(New ReportParameter("Cuentas", CuentasStr.ToString))
'End If
'ObjCuentasBancos.Dispose()
End If
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol)
@@ -7968,10 +7962,10 @@ Public Class ClsPaginas
End If
If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta
'movimiento de pago cliente
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
'movimiento de pago cliente Complementaria
If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
End If
If Pago.AplicaTraslado Then
'si tiene iva y su proporcion
@@ -7979,10 +7973,10 @@ Public Class ClsPaginas
ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL
ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL
If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
End If
End If
'si tiene RET IVA y su proporcion
@@ -7990,20 +7984,20 @@ Public Class ClsPaginas
ImporteMovimiento = (PorcentajePago * VentaActual.RetIVA).RoundSQL
ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL
If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
End If
'si tiene Ret ISR y su proporcion
If Not ErrorMovtos AndAlso VentaActual.RetISR > 0 Then
ImporteMovimiento = (PorcentajePago * VentaActual.RetISR).RoundSQL
ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL
If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
End If
'si tiene IEPS y su proporcion
If Not ErrorMovtos AndAlso VentaActual.IEPS > 0 Then
@@ -8015,10 +8009,10 @@ Public Class ClsPaginas
If ObjConta.GetRetCuenta(38, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero
If ObjConta.GetRetCuenta(39, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
End If
'concepto pago
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)

View File

@@ -1471,6 +1471,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Public Property ClaveEstado As String
Public Property Telefono As String
Public Property TelefonoEmergencia As String
Public Property Beneficiario As String
Public Property Celular As String
Public Property LugarNacimiento As String
Public Property CredencialElector As String
@@ -1684,6 +1685,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Me.ClaveEstado = Data.Rows(0)("ClaveEstado").ToString
Me.Telefono = Data.Rows(0)("Telefono").ToString
Me.TelefonoEmergencia = Data.Rows(0)("NombreTelEmergencia").ToString
Me.Beneficiario = Data.Rows(0)("Beneficiario").ToString
Me.Celular = Data.Rows(0)("Celular").ToString
Me.RFC = Data.Rows(0)("RFC").ToString
Me.CURP = Data.Rows(0)("CURP").ToString
@@ -1860,6 +1862,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Me.Estado = Data.Rows(0)("Estado").ToString
Me.Telefono = Data.Rows(0)("Telefono").ToString
Me.TelefonoEmergencia = Data.Rows(0)("NombreTelEmergencia").ToString
Me.Beneficiario = Data.Rows(0)("Beneficiario").ToString
Me.Celular = Data.Rows(0)("Celular").ToString
Me.RFC = Data.Rows(0)("RFC").ToString
Me.CURP = Data.Rows(0)("CURP").ToString
@@ -1939,7 +1942,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
CveEstadoCivil As Integer, CveGenero As Integer, CveMotivoBaja As Integer, FechaBaja As String, CveEstatusPersonal As Integer, FechaNacimiento As Date, LugarNacimiento As String,
Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, TelefonoEmergencia As String, Celular As String, RFC As String, CURP As String, CredencialElector As String,
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1,
Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1) As Boolean
@@ -2016,6 +2019,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@CtaContPrestamos", SqlDbType.VarChar).Value = CtaContPrestamos
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Beneficiario", SqlDbType.VarChar).Value = Beneficiario
.Add("@CveUsuarioNomina", SqlDbType.VarChar).Value = CveUsuarioNomina
.Add("@CveSubProyectoZona", SqlDbType.Int).Value = CveSubProyectoZona
.Add("@CveUniforme", SqlDbType.Int).Value = CveUniforme '
@@ -2073,7 +2077,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
CveEstadoCivil As Integer, CveGenero As Integer, CveMotivoBaja As Integer, FechaBaja As String, CveEstatusPersonal As Integer, FechaNacimiento As Date, LugarNacimiento As String,
Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, TelefonoEmergencia As String, Celular As String, RFC As String, CURP As String, CredencialElector As String,
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1,
Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1, Optional CveTipoTrabajador As Integer = -1) As Boolean
@@ -2152,6 +2156,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@IdCtaContPrestamos", SqlDbType.Int).Value = IdCtaContPrestamos
.Add("@CtaContPrestamos", SqlDbType.VarChar).Value = CtaContPrestamos
.Add("@CveUsuarioNomina", SqlDbType.VarChar).Value = CveUsuarioNomina
.Add("@Beneficiario", SqlDbType.VarChar).Value = Beneficiario
.Add("@CveSubProyectoZona", SqlDbType.Int).Value = CveSubProyectoZona
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUniforme", SqlDbType.Int).Value = CveUniforme

View File

@@ -326,47 +326,6 @@ Namespace Modelos
IniciaValores()
End Sub
'Public Sub New(ObjsClsPaginas As ClsPaginas, Optional Row As Data.DataRow = Nothing)
' If Row IsNot Nothing Then
' setValues(Row)
' Else
' IniciaValores()
' End If
' SetMetodoPago()
' Timbre = New CFDITimbre
' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
'End Sub
'Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer)
' Me.CveEmpresa = CveEmpresa
' Dim ObjVentas As New ClsVentas()
' If ObjVentas.GetVenta(CveVenta, CveEmpresa) Then
' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
' setValues(ObjVentas.DtResultados.Rows(0))
' SetMetodoPago()
' SetMoneda()
' End If
' End If
' ObjVentas.Dispose()
' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
'End Sub
'Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
' Me.UsuarioActual = UsuarioActual
' Me.ErrorList = New List(Of String)
' Me.RemisionesLista = New List(Of Integer)
' Me.ListaMensajes = New List(Of String)
' If Row IsNot Nothing Then
' setValues(Row)
' Else
' IniciaValores()
' End If
' SetMetodoPago()
' SetMoneda()
' SetSubProyecto(ObjsClsPaginas)
' SetSubProyectoMatriz(ObjsClsPaginas)
' Timbre = New CFDITimbre
' DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
'End Sub
Public Sub New(UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
Me.UsuarioActual = UsuarioActual
Me.ErrorList = New List(Of String)
@@ -1306,7 +1265,7 @@ Namespace Modelos
Dim tmpcon As DataTable = DtDetalle.Clone
tmpcon.Clear()
Dim drpss As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506").FiltroPrimero("SATClavePS = '84111506'")
Dim drpss As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506").FiltroPrimero("SATClavePS = '84111506'")
If drpss IsNot Nothing Then
Dim ii As Integer = 1
@@ -2381,7 +2340,7 @@ Namespace Modelos
If ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio > 0 Then
tipoCambio = ObjFactura.TipoCambio
ElseIf ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio <= 1 Then
tipoCambio = GlobalTipoCambio(ObjFactura.Fecha).ToString.ToDecimal
tipoCambio = ClsPaginas.GlobalTipoCambio(ObjFactura.Fecha).ToString.ToDecimal
Else
tipoCambio = 1
End If
@@ -2411,9 +2370,9 @@ Namespace Modelos
SeContabiliza = False
End If
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
IdCtaIVAXTrasladar = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
IdCtaIVATrasladado = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
End If
Dim UsaComplementariaClientes As Boolean = True
@@ -2441,7 +2400,7 @@ Namespace Modelos
Dim TCFluctuacion As Decimal = tipoCambio
'TOMA EL TC DE LA ULTIMA FLUCTUACION
If ValorMultiplicador = -1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now)
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion <= Now Then
@@ -2705,7 +2664,7 @@ Namespace Modelos
If tipoCambio > 1 Then
TipoCambioNC = tipoCambio
Else
TipoCambioNC = GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
TipoCambioNC = ClsPaginas.GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
End If
'APLICA NC SALDOS DIRECTOS
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
@@ -2775,7 +2734,7 @@ Namespace Modelos
Dim TCFluctuacion As Decimal = Dr("TCCambioValuacion").ToString.ToDecimal
If TCFluctuacion = 1 AndAlso TipoCambioNC > 1 Then
TCFluctuacion = GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
TCFluctuacion = ClsPaginas.GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
End If
If TipoCambioNC <> TCFluctuacion AndAlso TCFluctuacion > 1 AndAlso TipoCambioNC > 1 Then
Dim difFluctuacion As Decimal = TipoCambioNC - TCFluctuacion
@@ -3099,7 +3058,7 @@ Namespace Modelos
Dim TCFluctuacion As Decimal = row2("TCCambioValuacion").ToString.ToDecimal
If TCFluctuacion = 1 AndAlso tipoCambio > 1 Then
TCFluctuacion = GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
TCFluctuacion = ClsPaginas.GlobalTipoCambio(ObjFactura.Fecha).ToDecimal
End If
If ObjFactura.CveMoneda = 2 AndAlso Not row2("TCCambioValuacion").ToString.ToDecimal > 1 Then
@@ -3318,8 +3277,8 @@ Namespace Modelos
If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933") Then
'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
If ObjFactura.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = ObjFactura.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
End If
End If
@@ -3383,8 +3342,8 @@ Namespace Modelos
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "20242") Then
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
End If
End If
@@ -4633,7 +4592,7 @@ Namespace Modelos
If factura.CveMoneda = 2 AndAlso factura.TipoCambio > 0 Then
tipoCambio = factura.TipoCambio
ElseIf factura.CveMoneda = 2 AndAlso factura.TipoCambio <= 1 Then
tipoCambio = GlobalTipoCambio(factura.Fecha).ToString.ToDecimal
tipoCambio = ClsPaginas.GlobalTipoCambio(factura.Fecha).ToString.ToDecimal
Else
tipoCambio = 1
End If
@@ -7380,75 +7339,6 @@ Namespace Modelos
#Region "G L O B A L - D T"
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambio") = value
End Set
End Property
Public Property GlobalTipoCambioEuro(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambioEuro <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambioEuro") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambioEuro").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambioEuro") = value
End Set
End Property
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
Get
Dim Str As New StringBuilder
If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTUsuarios"), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTUsuarios") = value
End Set
End Property
Property DtFacturaDefault() As DataTable
Get
DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable)
@@ -7466,214 +7356,6 @@ Namespace Modelos
End Set
End Property
'Property GlobalDTEmpresas(Optional CveEmpresa As Integer = -1) As DataTable
' Get
' If CveEmpresa <> -1 Then
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
' GlobalDTEmpresas = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTEmpresas = DirectCast(HttpContext.Current.Application("GlobalDTEmpresas"), DataTable)
' End If
' End Get
' Set(ByVal value As DataTable)
' HttpContext.Current.Application("GlobalDTEmpresas") = value
' End Set
'End Property
'Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
' Get
' Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
' 'sino existe, recarga los datos
' If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
' Dim P As New ClsSubProyectos
' If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
' P.Dispose()
' Dim msg As String = "aqui no se carga subproyectos"
' If HttpContext.Current.Request IsNot Nothing Then
' msg = msg & HttpContext.Current.Request.ServerVariables("URL")
' End If
' msg.GuardaLog()
' End If
' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
' Dim StrSQL As New StringBuilder
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
' GlobalDTSubProyectos = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
' End If
' End Get
' Set(ByVal value As DataTable)
' Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
' HttpContext.Current.Application(AppNombre) = value
' End Set
'End Property
'Property GlobalDTSubProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
' Get
' If HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") Is Nothing Then
' Dim ObjSubProyectos As New ClsSubProyectos()
' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados Else Alert("Ocurrió un error al cargar los SubProyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
' ObjSubProyectos.Dispose()
' End If
' If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
' Dim StrSQL As New StringBuilder
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
' If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
' If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", CveEstatus)
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
' GlobalDTSubProyectosUsuarios = Dv.ToTable
' Dv.Dispose()
' Dim ObjSubProyectos As New ClsSubProyectos()
' If ObjSubProyectos.GetSubProyectosUsuarios(CveUsuario:=CveUsuario, CveProyecto:=CveProyecto, CveSubProyecto:=CveSubProyecto, CveEstatus:=CveEstatus, CveEmpresa:=CveEmpresa) Then
' GlobalDTSubProyectosUsuarios = ObjSubProyectos.DtResultados
' Else
' GlobalDTSubProyectosUsuarios = Nothing
' End If
' ObjSubProyectos.Dispose()
' Else
' GlobalDTSubProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTSubProyectosUsuarios"), DataTable)
' End If
' End Get
' Set(ByVal value As DataTable)
' If value Is Nothing OrElse value.Rows.Count = 0 Then
' End If
' HttpContext.Current.Application("GlobalDTSubProyectosUsuarios") = value
' End Set
'End Property
'Property GlobalDTProyectosUsuarios(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, CveEstatus As Integer) As DataTable
' Get
' If HttpContext.Current.Application("GlobalDTProyectosUsuarios") Is Nothing AndAlso DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable).Rows.Count = 0 Then
' Dim ObjSubProyectos As New ClsSubProyectos()
' If ObjSubProyectos.GetSubProyectosUsuarios Then HttpContext.Current.Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError)
' ObjSubProyectos.Dispose()
' GuardaLog("Se Cargo GlobalDTProyectosUsuarios")
' End If
' If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then
' Dim StrSQL As New StringBuilder
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
' If CveUsuario <> -1 Then StrSQL.AppendFormat(" AND CveUsuario = {0}", CveUsuario)
' If CveEstatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatusProyecto = {0}", CveEstatus)
' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
' GlobalDTProyectosUsuarios = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTProyectosUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTProyectosUsuarios"), DataTable)
' End If
' End Get
' Set(ByVal value As DataTable)
' If value Is Nothing OrElse value.Rows.Count = 0 Then
' End If
' HttpContext.Current.Application("GlobalDTProyectosUsuarios") = value
' End Set
'End Property
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
Get
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta) Then
GlobalDTPS = ObjPS.DtResultados
Else
GlobalDTPS = Nothing
End If
ObjPS.Dispose()
End Get
End Property
Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion
Get
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambioUltimaFluctuacion(-1, Now) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy()
Else
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing
End If
ObjGral.Dispose()
End If
Dim fluctuacion = New ClsPaginas.MTipoCambioFluctuacion() With {
.TCFluctuacion = 0,
.FechaFluctuacion = MinFecha
}
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
Dim dr = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha <= '{0}'", Fecha), Orderby:="Fecha DESC")
If dr IsNot Nothing Then
fluctuacion.TCFluctuacion = dr("TCFluctuacion").ToString().ToDecimal()
fluctuacion.FechaFluctuacion = dr("FechaFluctuacion").ToString().ToDateTime()
End If
Return fluctuacion
Else
Return fluctuacion
End If
End Get
End Property
Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
Optional PorcentajeIVA As Double = -1) As DataTable
Get
Dim Str As StringBuilder = New StringBuilder()
If CveEmpresa <> -1 Or CveClasicacionPorcentaje <> -1 Or CveClasicacion <> -1 Or PorcentajeIVA <> -1 Then
If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTClasificacionPorcentaje = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClasificacionPorcentaje = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value
End Set
End Property
Public Property CveContratoSecciones As String
Public Property CveEstatus As Integer
Public Property GenerarPDFFactura As Boolean = False

View File

@@ -59,206 +59,6 @@ Public Class E141 : Implements IHttpHandler
End Get
End Property
#Region "GLOBAL DT"
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
P.Dispose()
End If
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable
Get
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then
GlobalDTPS = ObjPS.DtResultados
Else
GlobalDTPS = Nothing
End If
ObjPS.Dispose()
End Get
End Property
Public Property GlobalDTPSSimplificado(Optional CveClasificacion As Integer = -1, Optional Codigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
End If
Dim Cons = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow))
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
Codigo = Codigo.ToUpper()
If Codigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!Codigo).ToUpper() = Codigo))
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
Try
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
Catch ex As Exception
GlobalDTPSSimplificado = New DataTable
End Try
Else
GlobalDTPSSimplificado = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTMonedas() As DataTable
Get
GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTMonedas") = value
End Set
End Property
Public Property GlobalDTVtaFormaPago() As DataTable
Get
GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
End Set
End Property
Property GlobalDTVtaMetodoPago() As DataTable
Get
GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
End Set
End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
Get
If EsPersonaFisica <> -1 Then
Dim Tipo As String = ""
If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable)
End If
End Get
Set(ByVal value As DataTable)
HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value
End Set
End Property
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjUsr As New ClsInventarios
If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
ObjUsr.Dispose()
End If
Dim Str As New StringBuilder
Str.Append("1=1 AND ")
If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAlmacen = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
'Get
' Dim Str As New StringBuilder
' Str.Append("1=1 AND ")
' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
' GlobalDTAlmacen = Dv.ToTable
' Dv.Dispose()
'End Get
'Set(value As DataTable)
' Application("GlobalDTAlmacen") = value
'End Set
End Property
Property GlobalDTEstado(ClaveSATPais As String) As DataTable
Get
If HttpContext.Current.Application("GlobalDTEstado") Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATEstado("-1") Then HttpContext.Current.Application("GlobalDTEstado") = ObjGrales.DtResultados Else HttpContext.Current.Application("GlobalDTEstado") = Nothing
ObjGrales.Dispose()
End If
If ClaveSATPais <> "-1" Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows)
GlobalDTEstado = Dv.ToTable
Dv.Dispose()
Else
GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable)
End If
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTEstado") = value
End Set
End Property
#End Region
#Region "V A L I D A - D A T O S"
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
Dim UsuarioActual As Usuario = Nothing
@@ -852,7 +652,7 @@ Public Class E141 : Implements IHttpHandler
End If
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
If CveEstado <= 0 Then
@@ -936,8 +736,8 @@ Public Class E141 : Implements IHttpHandler
ObjFactura.TipoCambio = 1
ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = CveMoneda
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.TipoDocto = TipoDocto
ObjFactura.RefDocto = ""
'ObjFactura.CveMesa = -1
@@ -965,8 +765,8 @@ Public Class E141 : Implements IHttpHandler
ObjFactura.CveSubProyecto = CveSubProyecto
ObjFactura.CveSubProyectoCobranza = CveSubProyecto
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
ObjFactura.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
ObjFactura.SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
'CLIENTE
ObjFactura.CveCliente = CveCliente
@@ -978,16 +778,16 @@ Public Class E141 : Implements IHttpHandler
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago33 = ObjClientes.CveFormaPago33
ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.CveMetodoPago33 = ObjClientes.CveMetodoPago33
ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.CveUsoCFDI = ObjClientes.CveUsoCFDI
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI))
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI))
End If
End If
@@ -1002,7 +802,7 @@ Public Class E141 : Implements IHttpHandler
End If
If Not String.IsNullOrEmpty(JsonRequest("invoice_way_to_pay").ToString()) Then
Dim RowFormaPago As DataRow = GlobalDTVtaFormaPago.FiltroPrimero(String.Format("ClaveFormaPagoSAT = '{0}'", JsonRequest("invoice_way_to_pay").ToString()))
Dim RowFormaPago As DataRow = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimero(String.Format("ClaveFormaPagoSAT = '{0}'", JsonRequest("invoice_way_to_pay").ToString()))
If RowFormaPago IsNot Nothing Then
ObjFactura.CveFormaPago33 = RowFormaPago("CveFormaPago").ToString().ToEntero()
ObjFactura.FormaPago33 = RowFormaPago("FormaPago").ToString()
@@ -1026,7 +826,7 @@ Public Class E141 : Implements IHttpHandler
End If
If Not String.IsNullOrEmpty(JsonRequest("invoice_use").ToString()) Then
Dim RowUsoCFDi As DataRow = GlobalDTSATUsosCFDI.FiltroPrimero(String.Format("UsoCFDI = '{0}'", JsonRequest("invoice_use").ToString()))
Dim RowUsoCFDi As DataRow = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimero(String.Format("UsoCFDI = '{0}'", JsonRequest("invoice_use").ToString()))
If RowUsoCFDi IsNot Nothing Then
ObjFactura.CveUsoCFDI = RowUsoCFDi("CveUsoCFDI").ToString().ToEntero()
ObjFactura.UsoCFDI = RowUsoCFDi("Descripcion").ToString()
@@ -1050,7 +850,7 @@ Public Class E141 : Implements IHttpHandler
End If
If Not String.IsNullOrEmpty(JsonRequest("invoice_payment_method").ToString()) Then
Dim RowMetodoPago As DataRow = GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", JsonRequest("invoice_payment_method").ToString()))
Dim RowMetodoPago As DataRow = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", JsonRequest("invoice_payment_method").ToString()))
If RowMetodoPago IsNot Nothing Then
ObjFactura.CveMetodoPago33 = RowMetodoPago("CveMetodoPago").ToString().ToEntero()
ObjFactura.MetodoPago33 = RowMetodoPago("MetodoPago").ToString()
@@ -1114,7 +914,7 @@ Public Class E141 : Implements IHttpHandler
End If
If Not String.IsNullOrEmpty(ObjFactura.Cliente.Estado) Then
CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{ObjFactura.Cliente.Estado.Trim}'").ToEntero()
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{ObjFactura.Cliente.Estado.Trim}'").ToEntero()
'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
If CveEstado <= 0 Then
@@ -1133,7 +933,7 @@ Public Class E141 : Implements IHttpHandler
End If
ObjFactura.CveAlmacen = GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
ObjFactura.CveAlmacen = ClsPaginas.GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
'DETALLES
ObjFactura.DtDetalle = CreaDTDetalle(ObjInventario, ObjFactura, Resp, UsuarioActual, JsonRequest)
@@ -1436,9 +1236,9 @@ Public Class E141 : Implements IHttpHandler
For Each JsonPS As JObject In ListaPS
Dim Cantidad As Decimal = JsonPS("quantity").ToString.ToDecimal()
Dim CvePS As Integer = GlobalDTPSSimplificado(Codigo:=JsonPS("product_sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
Dim CvePS As Integer = ClsPaginas.GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Codigo:=JsonPS("product_sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
Dim DrPS As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then
Retorno.TieneError = True
@@ -1471,7 +1271,7 @@ Public Class E141 : Implements IHttpHandler
Dim PorcentajeIVADefault As Decimal = 0.16D
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, JsonRequest("branch_office_id").ToEntero(), CveEmpresa:=CveEmpresa).Rows(0)
Dim DrSubProyecto As DataRow = ClsPaginas.GlobalDTSubProyectos(-1, JsonRequest("branch_office_id").ToEntero(), CveEmpresa:=CveEmpresa).Rows(0)
If DrSubProyecto IsNot Nothing Then
PorcentajeIVADefault = DrSubProyecto("IVA").ToString().ToDecimal()
@@ -1523,7 +1323,7 @@ Public Class E141 : Implements IHttpHandler
Optional ClienteRetIVA As Double = 0, Optional ClienteRetISR As Double = 0, Optional ClienteDesglosaIEPS As Boolean = True) As DataRow
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
Dim DrPS As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then
Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.")
@@ -1560,7 +1360,7 @@ Public Class E141 : Implements IHttpHandler
Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Dim DrSubProyecto As DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Row = TmpDT.NewRow()
Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero()
@@ -1738,7 +1538,7 @@ Public Class E141 : Implements IHttpHandler
Dim data As New JArray
Dim DtSucursales As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltraParametros("EsSucursal = True")
Dim DtSucursales As DataTable = ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltraParametros("EsSucursal = True")
If DtSucursales IsNot Nothing Then
Try
For Each Row As DataRow In DtSucursales.Rows

View File

@@ -20,31 +20,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Retorno As Boolean = False
Try
'If context.Request.InputStream IsNot Nothing Then
' Using reader As New StreamReader(context.Request.InputStream)
' Dim json = reader.ReadToEnd
' If Not String.IsNullOrEmpty(json) Then
' Dim JsonRequest As JObject = JObject.Parse(json)
' If JsonRequest IsNot Nothing Then
' Dim Metodo = JsonRequest("Metodo").ToString()
' If Metodo = "FactMasivaRemisiones" Then
' Dim pCveEmpresa = JsonRequest("CveEmpresa").ToString()
' Dim pFechaI As String = ""
' Dim pFechaF As String = ""
' If JsonRequest("FechaI") IsNot Nothing AndAlso JsonRequest("FechaF") IsNot Nothing Then
' pFechaI = JsonRequest("FechaI")
' pFechaF = JsonRequest("FechaF")
' End If
' IniciaFacturacionMasiva(context, CveEmpresaFacturar, pFechaI, pFechaF)
' End If
' End If
' End If
' End Using
'End If
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
If Metodo = "FactMasivaRemisiones" Then
@@ -951,55 +926,6 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ArchivoW.Dispose()
End Sub
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambio") = value
End Set
End Property
Public Property GlobalTipoCambioEuro(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambioEuro <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambioEuro") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambioEuro").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambioEuro") = value
End Set
End Property

View File

@@ -139,7 +139,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
End If
If Row("Observaciones").ToString().Contains("{TC}") Then
Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", ClsPaginas.GlobalTipoCambio(Now).FormatoNumero)
End If
Dim Resp = EmitirImprimir(UsuarioActual, Row)
@@ -290,9 +290,9 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}")
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, GlobalTipoCambio(Now))
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}")
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now))
ObjFactura.TipoDocto = "Ing"
ObjFactura.RefDocto = ""
ObjFactura.Folio = -1
@@ -335,8 +335,8 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero
ObjFactura.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", ObjFactura.CveSubProyecto)))
ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
ObjFactura.SubProyecto = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero(String.Format("CveSubProyecto = {0}", ObjFactura.CveSubProyecto)))
ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
SubProyecto = DR("SubProyectoContrato").ToString
@@ -359,7 +359,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
ObjFactura.Total = ObjFactura.SubTotal + ObjFactura.IVA + ObjFactura.IEPS - (ObjFactura.RetIVA + ObjFactura.RetISR)
For Each row As DataRow In DtDetalle.Rows
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row("CvePS").ToString().ToEntero()).FiltroPrimero("")
Dim drPS As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row("CvePS").ToString().ToEntero()).FiltroPrimero("")
DtR = TmpDT.NewRow
DtR("CveVenta") = -1
@@ -414,16 +414,16 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
If ObjCliente.GetClientes(ObjFactura.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
@@ -584,126 +584,4 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
End Function
#End Region
#Region "G L O B A L - D T"
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
HttpContext.Current.Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return HttpContext.Current.Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
HttpContext.Current.Application("GlobalTipoCambio") = value
End Set
End Property
Property GlobalDTMonedas() As DataTable
Get
GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTMonedas") = value
End Set
End Property
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable
Get
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then
GlobalDTPS = ObjPS.DtResultados
Else
GlobalDTPS = Nothing
End If
ObjPS.Dispose()
End Get
End Property
Public Property GlobalDTVtaFormaPago() As DataTable
Get
GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTVtaFormaPago") = value
End Set
End Property
Property GlobalDTVtaMetodoPago() As DataTable
Get
GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value
End Set
End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
Get
If EsPersonaFisica <> -1 Then
Dim Tipo As String = ""
If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable)
End If
End Get
Set(ByVal value As DataTable)
HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value
End Set
End Property
Property GlobalDTMetodosPago() As DataTable
Get
GlobalDTMetodosPago = DirectCast(HttpContext.Current.Application("GlobalDTMetodosPago"), DataTable)
End Get
Set(value As DataTable)
HttpContext.Current.Application("GlobalDTMetodosPago") = value
End Set
End Property
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
P.Dispose()
End If
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
End Class

View File

@@ -555,7 +555,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
sr.Close()
Catch ex As Exception
ex.ToString().GuardaLog()
'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}")
End Try
Return resultado
@@ -768,23 +767,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTCliente-{0}", CveEmpresa)
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1, CveClienteClasificacion:=cveclienteclasificacion) Then
context.Application(AppNombre) = ObjClientes.DtResultados
End If
ObjClientes.Dispose()
End If
'Dim ObjClientes As New ClsClientes
'If ObjClientes.GetClientes(-1, Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
' DtRetorno = ObjClientes.DtResultados
'End If
'ObjClientes.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
Dim dt As DataTable = ClsPaginas.GlobalDTCliente(CveEmpresa)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
If EsDistribuidor <> -1 Then
dt = dt.FiltraParametros(String.Format("EsDistribuidor = {0} ", CBool(EsDistribuidor)))
@@ -832,22 +816,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjProveedores As New ClsCompProveedores
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
context.Application(AppNombre) = ObjProveedores.DtResultados
End If
ObjProveedores.Dispose()
End If
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
' DtRetorno = ObjProveedores.DtResultados
'End If
'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
Dim dt As DataTable = ClsPaginas.GlobalDTCompProveedores(CveEmpresa)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name))
End If
@@ -1000,17 +970,17 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If UsaGlobal Then
'se recarga el global, y el clspaginas, son los unicos 2 lugares
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If context.Application(String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then context.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
'Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
'If context.Application(String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)) Is Nothing Then
' Dim ObjPS As New ClsProductosServicios
' If ObjPS.GetPSSimplificado(CveEmpresa) Then context.Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
' ObjPS.Dispose()
End If
'End If
Dim DTPS = DirectCast(context.Application(AppNombre), EnumerableRowCollection(Of DataRow))
'Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable
'Dim DTPS = DirectCast(context.Application(AppNombre), EnumerableRowCollection(Of DataRow))
Dim DTPS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa).AsEnumerable
If DTPS IsNot Nothing Then
@@ -1078,10 +1048,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
DTPS = Nothing
End If
If (usuario.TienePermisoProceso(300) Or usuario.TienePermisoProceso(301)) And (DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0) Then
Dim ObjClasificaciones As New ClsClasificaciones()
@@ -1129,11 +1095,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id"
DtPSRetorno.Columns(PSCodigoDescripcion).ColumnName = "text"
If PSCodigoDescripcion = "PSCodigo" Then
@@ -1156,16 +1119,12 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End Function
#End Region
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
#Region "Funciones"
Public Function GetJson(ByVal dt As DataTable) As String
Dim Retorno As String = ""
@@ -1198,15 +1157,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Private Function GETPSSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
'Dim DTPS = DirectCast(context.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow))
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
'If Name <> "-1" Then
' DTPS = DTPS.Where((Function(a) a!SATClaveProductoServicio.ToString.ToLower Like ($"*{Name.ToLower}*")))
'End If
'DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!SATClavePS).CopyToDataTable).ToTable(True, {"CveSATPS", "SATClaveProductoServicio"})
DtPSRetorno = ClsPaginas.GlobalDTPSATPS(Name.ToLower)
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
@@ -1232,7 +1186,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Private Function GETUMSAT(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DTUM = ClsPaginas.GlobalDTPSATUM 'DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
Dim DTUM = ClsPaginas.GlobalDTPSATUM
Dim DtPSRetorno As DataTable
Dim Name = IfNull(context.Request("Name"), "-1").ToString
@@ -1459,22 +1413,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa)
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveEmpresa) Then
context.Application(AppNombre) = ObjPersonal.DtResultados
End If
ObjPersonal.Dispose()
End If
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
' DtRetorno = ObjProveedores.DtResultados
'End If
'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
Dim dt As DataTable = ClsPaginas.GlobalDTRHPersonal(CveEmpresa)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'")
End If
@@ -1540,56 +1480,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'xmlCFDI.comprobante.xmlns_cfdi = xtr.Value
Case "XMLNS:XSI"
'xmlCFDI.comprobante.xmlns_xsi = xtr.Value
'Case "XSI:SCHEMALOCATION"
' xmlCFDI.comprobante.xsi_schemaLocation = xtr.Value
'Case "VERSION"
' xmlCFDI.comprobante.Version = xtr.Value
'Case "SERIE"
' xmlCFDI.comprobante.Serie = xtr.Value
'Case "FOLIO"
' xmlCFDI.comprobante.Folio = xtr.Value
Case "FECHA"
fecha = xtr.Value
'Case "MONEDA"
' xmlCFDI.comprobante.Moneda = xtr.Value
'Case "SUBTOTAL"
' Dim SubTotal As Decimal = 0
' Decimal.TryParse(xtr.Value, SubTotal)
' xmlCFDI.comprobante.SubTotal = SubTotal
'Case "TOTAL"
' Dim Total As Decimal = 0
' Decimal.TryParse(xtr.Value, Total)
' xmlCFDI.comprobante.Total = Total
'Case "DESCUENTO"
' Dim Descuento As Decimal = 0
' Decimal.TryParse(xtr.Value, Descuento)
' xmlCFDI.comprobante.Descuento = Descuento
'Case "TIPOCAMBIO"
' Dim TipoCambio As Decimal = 0
' Decimal.TryParse(xtr.Value, TipoCambio)
' xmlCFDI.comprobante.TipoCambio = TipoCambio
'Case "TIPODECOMPROBANTE"
' xmlCFDI.comprobante.TipoDeComprobante = xtr.Value
'Case "FORMAPAGO"
' xmlCFDI.comprobante.FormaPago = xtr.Value
'Case "FORMADEPAGO"
' xmlCFDI.comprobante.FormaPago = xtr.Value
'Case "METODOPAGO"
' xmlCFDI.comprobante.MetodoPago = xtr.Value
'Case "METODODEPAGO"
' xmlCFDI.comprobante.MetodoPago = xtr.Value
'Case "CONDICIONESDEPAGO"
' xmlCFDI.comprobante.CondicionesDePago = xtr.Value
'Case "LUGAREXPEDICION"
' xmlCFDI.comprobante.LugarExpedicion = xtr.Value
'Case "CONFIRMACION"
' xmlCFDI.comprobante.Confirmacion = xtr.Value
'Case "NOCERTIFICADO"
' xmlCFDI.comprobante.NoCertificado = xtr.Value
'Case "SELLO"
' xmlCFDI.comprobante.Sello = xtr.Value
'Case "CERTIFICADO"
' xmlCFDI.comprobante.Certificado = xtr.Value
End Select
cont = xtr.MoveToNextAttribute()
@@ -1663,17 +1556,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Private Function getSATColonias(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim dt As DataTable = DirectCast(context.Application("GlobalDTColonia"), DataTable)
Dim dt As DataTable = ClsPaginas.GlobalDTGralColonias("-1", "-1", "-1")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"ClaveSATColoniaCP like '%{Name}%'")
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveColonia").ColumnName = "id"
DtRetorno.Columns("ClaveSATColoniaCP").ColumnName = "text"
@@ -1701,7 +1590,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim dt As DataTable = DirectCast(context.Application("GlobalDTContratos"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
Dim dt As DataTable = ClsPaginas.GlobalDTContratos(CveEmpresa)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros(String.Format("NumeroContrato like '%{0}%'", Name))
End If

View File

@@ -1146,20 +1146,17 @@ Partial Class Bancos_IE
Else
If DdlTipoTransaccion.SelectedValue = "9" Then
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
If Dep.DtResultados.Rows.Count > 0 Then
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
'ElseIf Dep.DtResultados.Rows.Count = 1 Then
' TrCuentaDepositado.Visible = True
' LitTextoDepositado.Text = "Cuenta Depósito"
' LitDepositado.Text = Dep.DtResultados.Rows(0)("CuentaDeposito").ToString
'End If
End If
End If
Dep.Dispose()
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
End If
@@ -1167,9 +1164,6 @@ Partial Class Bancos_IE
End If
LnkComplementoPago.Visible = True
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
'cuando es cheque devuelto
TabCancelacion.Visible = True
@@ -1185,8 +1179,6 @@ Partial Class Bancos_IE
End If
'DATOS DE CANCELACION
If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then
TabCancelacion.Visible = True
@@ -1327,8 +1319,6 @@ Partial Class Bancos_IE
End If
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjIE2.Dispose()
UPPP.Update()
@@ -3968,7 +3958,6 @@ Partial Class Bancos_IE
End If
Msg.Clear()
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
If ObjComp IsNot Nothing Then ObjComp.Dispose()
@@ -5206,15 +5195,23 @@ Partial Class Bancos_IE
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim dtc As DataTable = Nothing
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
If CveProveedor > 0 Then
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
ElseIf CveCliente > 0 Then
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
End If
' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -5223,10 +5220,9 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
@@ -5242,15 +5238,14 @@ Partial Class Bancos_IE
UpGuardar.Update()
Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
@@ -5265,9 +5260,8 @@ Partial Class Bancos_IE
UpGuardar.Update()
End If
Dep.Dispose()
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
' BtnIEGuardar.Enabled = False
@@ -5280,7 +5274,7 @@ Partial Class Bancos_IE
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
RecargaGlobalCuentasBancarias()
UpCuentaDeposito.Update()
UpDatos.Update()
End Sub
@@ -5305,17 +5299,6 @@ Partial Class Bancos_IE
End Sub
'Recaga CuentasBancarias de Proveedor
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If
End Sub
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
@@ -6639,7 +6622,6 @@ Partial Class Bancos_IE
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Enabled = True
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
@@ -6650,15 +6632,12 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Dep.Dispose()
DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update()
End If
End Sub

View File

@@ -277,7 +277,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePago = 42;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
int CvePlantillaPoliza = 21;
int CvePlantillaPoliza = 43;
int CvePrePoliza = 0;
int CveMonedaPago = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;
@@ -704,7 +704,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
int CveConceptoContablePrestamo = 41;
int CveConceptoContableBancoComplementario = 204;
int CveConceptoContablePrestamoComplementario = 202;
int CvePlantillaPoliza = 45;
int CvePlantillaPoliza = 44;
int CvePrePoliza = 0;
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuentaPrestamo.SelectedValue.ToEntero()}").ToEntero();
int FolioFijo = 0;

View File

@@ -83,18 +83,7 @@ Partial Class Bancos_PopUpBuscarCuentasProveedor
ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos()
RecargaGlobalCuentasBancarias()
End Sub
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If
End Sub
Private Sub CargaPSGridCuentasBancos()

View File

@@ -73,11 +73,11 @@ Partial Class Bancos_PopUpBuscarIE
If ValidarFiltrosSeleccionado() Then
Dim ObjBancosIE As New ClsBancos
If ObjBancosIE.GetBancosIE(-1, -1, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate,
If ObjBancosIE.GetBancosRepIE(-1, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate,
MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then
DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados)
Else
Alert("Ocurrió un error al consultar los Anticipos", TipoMensaje.MsgError)
Alert("Ocurrió un error al consultar bancos", TipoMensaje.MsgError)
DtDatos = Nothing
End If

View File

@@ -650,16 +650,14 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub
End If
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
Dep.Dispose()
Exit Sub
End If
End If
Dep.Dispose()
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then
@@ -1310,22 +1308,22 @@ Partial Class Bancos_ProveedoresAbonar
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
' If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
If Dep.DtResultados.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
@@ -1335,45 +1333,28 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
trCuentaDeposito.Visible = True
BtnIEGuardar.ToolTip = ""
Else
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
DdlCuentaDeposito.DataBind()
'If DdlCuentaDeposito.Items.Count > 1 Then
' DdlCuentaDeposito.SelectedIndex = 1
'End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
@@ -1382,17 +1363,11 @@ Partial Class Bancos_ProveedoresAbonar
BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = ""
End If
UpGuardar.Update()
End If
Else
If DdlTipoTransaccion.SelectedValue = "17" Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
@@ -1402,11 +1377,8 @@ Partial Class Bancos_ProveedoresAbonar
End If
UpGuardar.Update()
End If
Dep.Dispose()
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
@@ -1428,28 +1400,27 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
TrReferenciaCIE.Visible = True
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString
TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
TxtConceptoCIE.Text = dtc.Rows(0)("ConceptoCIE").ToString
OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString
OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
OriReferenciaCIE = dtc.Rows(0)("Referencia").ToString
OriConceptoCIE = dtc.Rows(0)("ConceptoCIE").ToString
Else
TrReferenciaCIE.Visible = False
End If
If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
If Boolean.Parse(dtc.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso dtc.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia)
BtnIEGuardar.Enabled = False
@@ -1466,25 +1437,11 @@ Partial Class Bancos_ProveedoresAbonar
TrReferenciaCIE.Visible = False
End If
Dep.Dispose()
UpCuentaDeposito.Update()
UpGuardar.Update()
End Sub
#End Region
'ESTO NO DEBERIA ESTAR AQUI
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If
End Sub
Protected Sub DdllOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged
If DdlOtrosPagos.SelectedValue <> "-1" Then
@@ -2047,17 +2004,15 @@ Partial Class Bancos_ProveedoresAbonar
Dim Transferencia = "", Banco = "", CLABE = "", Cuenta = "", Correo = ""
If DdlTipoTransaccion.SelectedValue.Contiene("2", "8") Then Transferencia = "Si" Else Transferencia = "No"
If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
Dim ObjGral As New ClsGenerales
If ObjGral.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) Then
If ObjGral.DtResultados.Rows.Count > 0 Then
Banco = ObjGral.DtResultados.Rows(0)("BancoNombre").ToString
CLABE = ObjGral.DtResultados.Rows(0)("CLABE").ToString
Cuenta = ObjGral.DtResultados.Rows(0)("Cuenta").ToString
Correo = ObjGral.DtResultados.Rows(0)("Correo").ToString
End If
Dim dtt As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero)
If dtt.Rows.Count > 0 Then
Banco = dtt.Rows(0)("BancoNombre").ToString
CLABE = dtt.Rows(0)("CLABE").ToString
Cuenta = dtt.Rows(0)("Cuenta").ToString
Correo = dtt.Rows(0)("Correo").ToString
End If
ObjGral.Dispose()
End If
params.Add(New ReportParameter("Transferencia", Transferencia))
params.Add(New ReportParameter("Banco", Banco))
params.Add(New ReportParameter("CLABE", CLABE))

View File

@@ -690,11 +690,7 @@ Partial Class Bancos_ProveedoresCreditos
LblPagueseA.Text = "Beneficiario"
End Select
'RecargaCuentas
CargaCuenta()
RecargaCuentasDepositos()
UpDatos.Update()
End Sub
@@ -1369,7 +1365,6 @@ Partial Class Bancos_ProveedoresCreditos
Alert(Msg.ToString, TipoMensaje.MsgInformacion, String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery))
End If
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
ObjComp.Dispose()
@@ -1555,7 +1550,6 @@ Partial Class Bancos_ProveedoresCreditos
trCuentaDeposito.Visible = False
DdlCuentaDeposito.Items.Clear()
End If
RecargaGlobalCuentasBancarias()
UpCuentaDeposito.Update()
UpDatos.Update()
End Sub
@@ -1573,18 +1567,6 @@ Partial Class Bancos_ProveedoresCreditos
End If
End Sub
'Recaga CuentasBancarias de Proveedor
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If
End Sub
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then

View File

@@ -149,7 +149,7 @@ Partial Class Bancos_RepIE
Dim ObjBancosIE As New ClsBancos
If ObjBancosIE.GetBancosIE(-1, -1, Cuenta, DdlTipo.SelectedValue, DdlTipoTransaccion.SelectedValue.ToEntero, Folio, PagueseA, -1, DdlMoneda.SelectedValue.ToEntero,
If ObjBancosIE.GetBancosRepIE(-1, Cuenta, DdlTipo.SelectedValue, DdlTipoTransaccion.SelectedValue.ToEntero, Folio, PagueseA, -1, DdlMoneda.SelectedValue.ToEntero,
If(ChkEsAbonoEnCuenta.Checked.ToEntero = 0, -1, 1),
DdlConciliado.SelectedValue.ToEntero, DdlEstatusIE.SelectedValue.ToEntero, FechaI, FechaF, FechaAplicacionI, FechaAplicacionF,
FechaConciliadoI, FechaConciliadoF, DdlUsuarioConcilio.SelectedValue.ToEntero, Importe, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=DdlTarjeta.SelectedValue.ToEntero) Then

View File

@@ -19,7 +19,7 @@
Return -1
End If
End Get
Set(value As Integer)
Set(value As Integer)
ViewState("CveEstatus") = value
End Set
End Property

View File

@@ -897,16 +897,17 @@
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Total</HeaderTemplate>
<ItemTemplate>
<ItemTemplate >
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="80px"></ItemStyle>
<ItemStyle Width="80px" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Anticipo/NC</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
<ItemStyle Width="80px" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Mon</HeaderTemplate>

View File

@@ -3053,7 +3053,7 @@ Partial Class Compras_Compras
End If
If ObjCompra.GetComprasNotasCredito(-1, CveCompra) Then
dtnc = ObjCompra.DtResultados
GvAnticiposSel.Caption = "<table width='100%'><tr><td style='text-align:center'>Compras Aplicadas</td></tr></table>"
LtlGvAnticiposSel.Text = "<table width='100%'><tr><td style='text-align:center'>Compras Aplicadas</td></tr></table>"
End If
End If
@@ -6634,7 +6634,12 @@ Partial Class Compras_Compras
End If
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
Dim tTipoMovto As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then ' empresa llantera
tTipoMovto = False
SumatoriaOCINV = -SumatoriaOCINV
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
ErrorPrepoliza = True
Exit For
End If

View File

@@ -3629,67 +3629,97 @@
<h4 class="modal-title" id="H2" runat="server">Cuenta Bancaria</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroCuenta" runat="server" CssClass="form-control" CausesValidation="true" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroCuenta" FilterType="Numbers" />
<label for="<%= TxtNumeroCuenta.ClientID.ToString()%>">Numero de Cuenta:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCLABE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="18" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCLABE" FilterType="Numbers" />
<label for="<%= TxtCLABE.ClientID.ToString()%>">CLABE:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSWIFT" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtSWIFT.ClientID.ToString()%>">SWIFT:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPlaza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtPlaza.ClientID.ToString()%>">Plaza:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConvenioCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="8" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">CIE:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtReferencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtReferencia" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
<label for="<%= TxtReferencia.ClientID.ToString()%>">Referencia:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilAlfanumerico" runat="server" TargetControlID="TxtConceptoCIE" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
<label for="<%= TxtReferencia.ClientID.ToString()%>">Concepto CIE:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRefCrediProveedor" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtRefCrediProveedor.ClientID.ToString()%>">Credito Proveedor:</label>
</div>
</div>
</div> <div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCorreoCuenta" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">Correo:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtBBVAAlias" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">BBVA Alias:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">

View File

@@ -506,6 +506,7 @@ Partial Class Compras_Proveedores
CargaAnticipos(CveProveedorSucursal)
CargaBancos(CveProveedorSucursal)
CargaProveedorSucursales()
CargaCuentasBancarias()
CargaOC()
CargaDocs()
@@ -1729,7 +1730,7 @@ Partial Class Compras_Proveedores
''Agregar Cuentas Bancarias
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero,
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, UsuarioActual.CveEmpresa,
CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString,
EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), CveSATBanco:=row("CveSATBanco").ToString.ToEntero) Then
ErrorBancos = True
@@ -3091,37 +3092,30 @@ Partial Class Compras_Proveedores
' CargaCuentasBancarias()
'End Sub
Private Sub CargaCuentasBancarias()
Dim ObjCuentasBancos As New ClsGenerales
ViewState("OrdenCuentasBancos") = ""
DTCuentasBancos = New DataTable
TempDTCuentasBancos = New DataTable
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor) Then
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
Else
Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor, CveCliente:=-2, CvePersonal:=-2, CveEmpresa:=UsuarioActual.CveEmpresa) Then
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados)
Else
Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia)
End If
ObjCuentasBancos.Dispose()
End If
If CveProveedor < 0 Then
'Alert("No hay proveedor", TipoMensaje.MsgInformacion)
TempDTCuentasBancos = DTCuentasBancos.Clone
'Esconde columna estatus
'THEstatus.Visible = False
'THEstatusTexto.Visible = False
'GvBancosCuentas.Columns(11).Visible = False 'Es la columna estatus CheckBox
'Mexicanada para acomadar las columnas'
'TDEstatusLayout.Visible = False
'TDEstatusTexto.Visible = False
End If
ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
RecargaGlobalCuentasBancarias()
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
@@ -3213,21 +3207,22 @@ Partial Class Compras_Proveedores
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer,
ConceptoCIE As String)
Dim ObjCuentasBancos As New ClsGenerales
If Modalidad = "A" Then
If CveProveedor > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor,
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
CargaCuentasBancarias()
Else
Alert("Error al registrar la cuenta bancaria. Por favor intente nuevamente", TipoMensaje.MsgError)
End If
ObjCuentasBancos.Dispose()
Else
Dim Row As DataRow
Row = TempDTCuentasBancos.NewRow
@@ -3261,7 +3256,7 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
ConceptoCIE:=ConceptoCIE) Then
@@ -3269,9 +3264,11 @@ Partial Class Compras_Proveedores
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
CargaCuentasBancarias()
Else
Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
End If
ObjCuentasBancos.Dispose()
Else
@@ -3301,7 +3298,7 @@ Partial Class Compras_Proveedores
End If
End If
ObjCuentasBancos.Dispose()
LimpiaCuentasBancarias()
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
RecargaGlobalCuentasBancarias()
@@ -3387,160 +3384,6 @@ Partial Class Compras_Proveedores
End If
End Sub
''Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing
'' Dim id As Integer = e.NewEditIndex
'' GvBancosCuentas.EditIndex = id
'' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
'' 'Dim x As String = GvBancosCuentas.SelectedRowStyle("EstatusPagoElectronico")
'' 'If CBool(e.Row.DBCampo("EstatusPagoElectronico")) AndAlso e.Row.DBCampo("Referencia").ToString <> "" Then
'' 'End If
''End Sub
'Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit
' GvBancosCuentas.EditIndex = -1
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
'End Sub
'Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
' Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
' Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
' Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
' Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
' Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
' Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
' Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
' Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
' Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
' Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero
' Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
' Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
' Dim EsBancomer = False
' If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
' EsBancomer = True
' End If
' ''COMENTADO PARA PERMITIR ENTRADA DE UNA CUENTA A PROVEEDOR, 22 DE SEPTIEMBRE, ISRAEL PIÑA
' 'If EsBancomer AndAlso (CLABE.Length <> 18 AndAlso Not CLABE.Substring(0, 3) = "012") Then
' ' Alert("La CLABE ingresada no pertenece a BANCOMER.", TipoMensaje.MsgAdvertencia)
' ' Exit Sub
' 'End If
' ''CLABE SIEMPRE OBLIGATORIA CUANDO NO ES BANCOMER CON CIE
' 'If (CLABE.Trim.Length <> 18 And Not EsBancomer) Or (EsBancomer And ConvenioCIE.Trim.Length <> 6 And CLABE.Trim.Length <> 18) Then
' ' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' ' Exit Sub
' 'End If
' 'QUE TENGA ALGUN DATO DE TIPO DE CUENTA
' If NumeroCuenta.Length = 0 AndAlso CLABE.Length = 0 AndAlso SWIFT.Length = 0 AndAlso ConvenioCIE.Length = 0 Then
' Alert("Debe especificar al menos un numero de cuenta.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
' If CLABE.Trim.Length <> 0 AndAlso CLABE.Trim.Length <> 18 Then
' Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' If UsuarioActual.CveEmpresa = 66 Then
' 'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
' If CLABE.Trim.Length <> 18 And CLABE.Trim.Length = 0 And Not EsBancomer And SWIFT.Length = 0 Then
' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
' If NumeroCuenta.Trim.Length <> 0 AndAlso NumeroCuenta.Trim.Length <> 10 AndAlso EsBancomer Then
' Alert("El número de cuenta debe tener una longitud de 10 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'SI CIE TIENE ALGO REFERENCIA OBLIGATORIA
' If ConvenioCIE.Trim.Length <> 0 And Referencia.Trim.Length < 3 Then
' Alert("Cuando se ingresa Convenio CIE se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' 'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
' If EsBancomer AndAlso Not (NumeroCuenta.Trim.Length = 10 Or ConvenioCIE.Trim.Length <> 0) Then
' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' Else
' 'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
' If ConvenioCIE.Trim.Length <> 0 And ConvenioCIE.Trim.Length < 5 Then
' Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' End If
' Dim ObjCuentasBancos As New ClsGenerales
' If CveProveedor > 0 Then
' If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda) Then
' DTCuentasBancos.Clear()
' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
' Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
' Else
' Alert("Error al actualizar la cuenta bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
' End If
' Else
' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
' Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
' Row("BancoNombre") = NombreBanco
' Row("Sucursal") = NumeroSucursal
' Row("CLABE") = CLABE
' Row("SWIFT") = SWIFT
' Row("Plaza") = Plaza
' Row("Cuenta") = NumeroCuenta
' Row("CIE") = ConvenioCIE
' Row("Referencia") = Referencia
' Row("RefCrediProveedor") = RefCrediProveedor
' Row("CveMoneda") = CveMoneda
' Row("Moneda") = Moneda
' Row("Estatus") = Estatus
' TempDTCuentasBancos.AcceptChanges()
' End If
' ObjCuentasBancos.Dispose()
' GvBancosCuentas.EditIndex = -1
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
' RecargaGlobalCuentasBancarias()
'End Sub
'Protected Sub GvBancosCuentas_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvBancosCuentas.RowDeleting
' Dim ObjCuentasBancos As New ClsGenerales
' If CveProveedor > 0 Then
' If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero) Then
' DTCuentasBancos.Clear()
' DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
' Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
' Else
' Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
' End If
' Else
' Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString.ToEntero - 1
' TempDTCuentasBancos.Rows.RemoveAt(index)
' End If
' If ObjCuentasBancos.GetCuentasDepositos Then
' GlobalDTProveedoresCuentas(CveProveedor, True) = ObjCuentasBancos.DtResultados
' End If
' CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
' ObjCuentasBancos.Dispose()
' RecargaGlobalCuentasBancarias()
'End Sub
Public Sub Delete_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjCuentasBancos As New ClsGenerales
@@ -3560,22 +3403,14 @@ Partial Class Compras_Proveedores
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
End If
If ObjCuentasBancos.GetCuentasDepositos Then
GlobalDTProveedoresCuentas(CveProveedor, True) = ObjCuentasBancos.DtResultados
End If
CargaPSGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
ObjCuentasBancos.Dispose()
RecargaGlobalCuentasBancarias()
End Sub
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
If ObjCuentasBancos.GetCuentasDepositos() Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If
End Sub

View File

@@ -126,14 +126,12 @@
</div>
</div>
<div class="row ">
<div class="col-md-1">
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
</div>
<div class="col-md-2">
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-2">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList>

View File

@@ -85,7 +85,7 @@ Partial Class Compras_RepComprasAF
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
DdlActivoFijo.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
CargaPS(-1)

View File

@@ -168,14 +168,13 @@
<div class="row ">
<div class="col-md-1"><asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label></div>
<div class="col-md-2">
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-2">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="95%">
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList>

View File

@@ -160,7 +160,7 @@ Partial Class Compras_RepComprasAFDetalle
Private Sub CargaCombos()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()

View File

@@ -36,7 +36,7 @@ public partial class Compras_RepPagado : ClsPaginas
private void InicializaValores()
{
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto);
//Carga Moneda
DdlMoneda.DataSource = GlobalDTMonedas;

View File

@@ -41,7 +41,7 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas
private void InicializaValores()
{
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto);
//Carga Moneda
DdlMoneda.DataSource = GlobalDTMonedas;

View File

@@ -78,7 +78,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas
TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{DateTime.Now.Year}";
TxtFechaFCompra.Text = DateTime.Now.ToShortDateString();
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto);
}
private void CargaCuentasBancarias()
{

View File

@@ -28,7 +28,7 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas
private void InicializaValores()
{
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, null, LblSubProyecto);
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto);
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
DdlPlantillaPoliza.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);

View File

@@ -5,6 +5,7 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Impresión Masiva de pólizas
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>

View File

@@ -28,7 +28,7 @@ Partial Class Contabilidad_PolizasImpresion
If Not IsPostBack Then
ContabilidadSIG = UsuarioActual.Empresa.TipoContabilidad = 1
ContabilidadSIG = UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119
TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString
TxtFechaFin.Text = Now.ToShortDateString
@@ -88,7 +88,7 @@ Partial Class Contabilidad_PolizasImpresion
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, CveSubProyecto:=DdlSegmentoNeg.SelectedValue.ToEntero,
CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CvePlantillaPoliza:=DdlGrupoPlantilla.SelectedValue.ToEntero,
CveTipoProveedor:=DdlTipoProveedor.SelectedValue.ToEntero) Then
If ObjConta.DtResultados.Rows.Count < 10000 Then
If ObjConta.DtResultados.Rows.Count < 12000 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
@@ -125,7 +125,7 @@ Partial Class Contabilidad_PolizasImpresion
Private Sub CargaDdlPolizasSIG()
Dim objcont As New ClsContabilidad
If objcont.GetTiposPoliza(-1, "-1", UsuarioActual.CveEmpresa) Then
If objcont.GetTiposPoliza(-1, "-1", 1) Then
ddlTipoPoliza.DataSource = objcont.DtResultados
ddlTipoPoliza.DataBind()
ddlTipoPoliza.Items.Insert(0, New ListItem("Todos", "-1"))

File diff suppressed because it is too large Load Diff

View File

@@ -179,16 +179,20 @@
<div class="portlet-body formnombottom">
<asp:GridView ID="GvCompProductores" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True">
AutoGenerateColumns="False" AllowPaging="False">
<Columns>
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataField="GPO" HeaderText="Prod/Serv" />
<asp:BoundField DataFormatString="{0:n}" DataField="Cantidad" ItemStyle-CssClass="margenbound" HeaderText="Cantidad(kg)" />
<asp:BoundField DataFormatString="{0:c}" DataField="SubTotal" ItemStyle-CssClass="margenbound" HeaderText="Importe" />
<asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="Promedio/kg" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
<%--TODO: Esto se puede meter en el stored procedured, pero me da cosa moverle :S--%>
<asp:TemplateField ItemStyle-CssClass="margenbound" HeaderText="P. Promedio">
<ItemTemplate>
<%--TODO: Esto puede tronar si el valor es DBNull --%>
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataFormatString="{0:c}" DataField="PUPromedioKG" ItemStyle-CssClass="margenbound" HeaderText="Promedio/kg" />--%>
</Columns>
<FooterStyle CssClass="Totales"/>
</asp:GridView>
</div>
</ContentTemplate>
@@ -343,6 +347,7 @@
<Columns>
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
<asp:BoundField DataFormatString="{0:c}" DataField="Abonado" ItemStyle-CssClass="margenbound" HeaderText="Abonado" />
</Columns>
</asp:GridView>
</div>

View File

@@ -32,7 +32,6 @@ Partial Class General_RepIndicadorResumen
Dim ObjVentas As New ClsVentas
Dim ObjCompras As New ClsCompras
Dim ObjMovtos As New ClsMovimientos
Dim ObjCitrus As New ClsCGame
Dim Grupo As Integer = 28 'Clasificación - PS
@@ -41,9 +40,14 @@ Partial Class General_RepIndicadorResumen
GvVxP.DataSource = ObjVentas.DtResultados
End If
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
GvCompProductores.DataSource = ObjCompras.DtResultados.FiltraParametros("", "Cantidad DESC")
End If
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
'Compras Productores
GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC")
'GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC")
'CxP Productores
GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(1).FiltraParametros("", "CveMoneda,Saldo DESC")
'CxP NO productores
@@ -55,6 +59,7 @@ Partial Class General_RepIndicadorResumen
End If
ObjVentas.Dispose()
ObjCompras.Dispose()
ObjCitrus.Dispose()
GvVxP.DataBind()
@@ -167,28 +172,11 @@ Partial Class General_RepIndicadorResumen
End Sub
Dim CompProductoresTotales As Decimal() = New Decimal(5 - 1) {}
Protected Sub GvCompProductores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompProductores.RowDataBound
'Esto tambien se podría meter en el Stored Procedure
If e.Row.RowType = DataControlRowType.DataRow Then
CompProductoresTotales(0) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Cantidad"), 0))
CompProductoresTotales(1) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "SubTotal"), 0))
CompProductoresTotales(2) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "PUPromedioKG"), 0))
CompProductoresTotales(3) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Saldo"), 0))
CompProductoresTotales(4) += Convert.ToDecimal(IfNull(DataBinder.Eval(e.Row.DataItem, "Abonado"), 0))
ElseIf e.Row.RowType = DataControlRowType.Footer Then
'Movemos el pie a la primera fila de la tabla
Dim footerRow As GridViewRow = e.Row
GvCompProductores.Controls(0).Controls.Remove(footerRow)
GvCompProductores.Controls(0).Controls.AddAt(1, footerRow)
'Ahora se registran los datos
e.Row.Cells(0).Text = "Totales"
e.Row.Cells(1).Text = CompProductoresTotales(0).ToString("N")
e.Row.Cells(2).Text = CompProductoresTotales(1).ToString("C")
e.Row.Cells(3).Text = (CompProductoresTotales(2) / GvCompProductores.Rows.Count).ToString("C") 'Promedio
e.Row.Cells(4).Text = CompProductoresTotales(3).ToString("C")
e.Row.Cells(5).Text = CompProductoresTotales(4).ToString("C")
For i As Integer = 1 To e.Row.Cells.Count - 1
e.Row.Cells(i).CssClass = "margenbound"
Next
If e.Row.DBCampo("Orden") = "00ND" Then
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Moneda")
End If
End If
End Sub
Protected Sub GvComprasAcreed_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompAcreed.RowDataBound
@@ -257,13 +245,15 @@ Partial Class General_RepIndicadorResumen
DtCompProductores.Columns.Add("UnidadC")
DtCompProductores.Columns.Add("UnidadI")
For Each Dr As DataRow In GvCompProductores.DataSource.Rows
Dim Row = DtCompProductores.NewRow()
Row("Texto") = Dr("RazonSocial").ToString
Row("Cantidad") = Dr("Cantidad").ToString.FormatoNumero
Row("Importe") = Dr("SubTotal").ToString.FormatoNumero
Row("UnidadC") = "Kg"
Row("UnidadI") = "MXN"
DtCompProductores.Rows.Add(Row)
If Not Dr("Orden").ToString = "00ND" Then
Dim Row = DtCompProductores.NewRow()
Row("Texto") = Dr("GPO").ToString
Row("Cantidad") = Dr("Cantidad").ToString.FormatoNumero
Row("Importe") = Dr("SubTotal").ToString.FormatoNumero
Row("UnidadC") = "Kg"
Row("UnidadI") = "MXN"
DtCompProductores.Rows.Add(Row)
End If
Next
Dim comp_productores = From s In DtCompProductores.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Cantidad = s("Cantidad").ToString().ToDouble(), .Importe = s("Importe").ToString().ToDouble(), .UnidadC = s("UnidadC").ToString(), .UnidadI = s("UnidadI").ToString()}
Dim group_comp_productores = comp_productores.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {

View File

@@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales
If Not ErrorCuentaDeposito Then
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then
'ErrorProv = True
End If
End If
@@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If
If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
End If
Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows
@@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales
ErrorAF = True
End If
End If
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then
Row("CveCuentaContableDepreciacion") = CveCuentaContable
Else
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
ErrorAF = True
End If
End If
Next
If Not ErrorAF Then
@@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales
End If
Dim ObjAF As New ClsAF
ObjAF.IniciaTransacSQL()
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
Try
ObjAF.IniciaTransacSQL()
Dim Contador As Integer = 0
Dim NumRow As Integer = 0
@@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
@@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales
If CveAF > 0 Then
If CveCuentaContable > 0 Then
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If
If CveCuentaContableDepreciacion > 0 Then
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If
Else
ErrorAF = True
Exit For
End If
End If
NumRow = NumRow + 1
Next
If Not ErrorAF Then
If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente. <br>Se Omitieron: <b>{1}</b> Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
@@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales
Finally
ObjAF.Dispose()
ObjConta.Dispose()
End Try
#End Region
' C U E N T A S C O N T A B L E S
ElseIf RblFormato.SelectedValue = "8" Then
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
ObjConta.IniciaTransacSQL()
Try
Dim TieneError As Boolean = False
Dim ContadorUpdate As Integer = 0
Dim ContadorError As Integer = 0
@@ -3581,7 +3596,7 @@ Partial Class General_SaldosIniciales
If Not ObjRH.AddPersonal(Codigo, ApellidoPaterno, ApellidoMaterno, Nombre, CorreoElectronico, FechaIn, CveTipoPeriodo, NumeroSS, CBool(AltaIMSS), SalarioDiario.ToDouble, SalarioDiario.ToDouble, SDI.ToDouble, SDI.ToDouble,
-1, -1, -1, CveMetodoPago, FechaIn, FechaFn.ToString(), CveTipoContrato, Direccion, CveTurno, CvePuesto, CveDepartamento, -1, CveEscolaridad, CveEstadoCivil, CveGenero, -1, FechaBaja, CveEstatusPersonal, FechaNac,
LugarNacimiento, Direccion, "", "", "", CodigoPostal, Ciudad, CveEstado, Telefono, "", Celular, RFC, CURP, "", NombrePadre, NombreMadre, -1, CveSATRiesgoPuesto, CveSATRegimenContratacion, -1, CveSubProyecto, "", -1,
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina, CveRegistroPatronal:=CveRegistroPatronal, CveTipoTrabajador:=CveTipoTrabajador) Then
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina, "", CveRegistroPatronal:=CveRegistroPatronal, CveTipoTrabajador:=CveTipoTrabajador) Then
If (ObjRH.noguardoXcurpb) Then
Else
ErrorRH = True

View File

@@ -94,7 +94,7 @@
If ObjNom.GetPeriodos(-1, -1, -1, -1, -1) Then Application("GlobalDTNominasPeriodos") = ObjNom.DtResultados Else Application("GlobalDTNominasPeriodos") = Nothing
If ObjNom.GetBancos Then Application("GlobalDTNomSatBancos") = ObjNom.DtResultados Else Application("GlobalDTNomSatBancos") = Nothing
If ObjNom.GetConceptos Then Application("GlobalDTNomSatConceptos") = ObjNom.DtResultados Else Application("GlobalDTNomSatConceptos") = Nothing
If ObjNom.GetRegimenContratacion Then Application("GlobalDTNomSatRegimenContratacion") = ObjNom.DtResultados Else Application("GlobalDTNomSatRegimenContratacion") = Nothing
'If ObjNom.GetRegimenContratacion Then Application("GlobalDTNomSatRegimenContratacion") = ObjNom.DtResultados Else Application("GlobalDTNomSatRegimenContratacion") = Nothing
If ObjNom.GetRiesgoPuesto Then Application("GlobalDTNomSatRiesgoPuesto") = ObjNom.DtResultados Else Application("GlobalDTNomSatRiesgoPuesto") = Nothing
If ObjNom.GetTipoIncapacidad Then Application("GlobalDTNomSatTipoIncapacidad") = ObjNom.DtResultados Else Application("GlobalDTNomSatTipoIncapacidad") = Nothing
End Using
@@ -128,42 +128,11 @@
End Using
GuardaLogAsax(String.Format("Globalasax 11:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'G E N E R A L E S
'Using ObjGenerales As New ClsGenerales
' 'If ObjGenerales.GetGralPaises Then Application("GlobalDTGralPaises") = ObjGenerales.DtResultados Else Application("GlobalDTGralPaises") = Nothing
' 'If ObjGenerales.GetGralEstados Then Application("GlobalDTGralEstados") = ObjGenerales.DtResultados Else Application("GlobalDTGralEstados") = Nothing
' 'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
' 'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
' 'If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
' 'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
' 'If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
' 'If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
' 'If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
' 'If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTGralColectivas") = Nothing
' 'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
' 'If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
' 'If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
'End Using
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'C L A S I F I C A C I O N E S
Using ObjClasificaciones As New ClsClasificaciones()
If ObjClasificaciones.GetClasificaciones() Then
Application("GlobalDTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo is null OR Codigo = '' ")
Application("GlobalDTACClasificadorObjetoGasto") = ObjClasificaciones.DtResultados.FiltraParametros("Codigo <> '' ")
Else
Application("GlobalDTClasificaciones") = Nothing
Application("GlobalDTACClasificadorObjetoGasto") = Nothing
End If
If ObjClasificaciones.GetDTClasificacionesSubProyectos() Then
Application("GlobalDTClasificacionesSubProyecto") = ObjClasificaciones.DtResultados
Else
Application("GlobalDTClasificacionesSubProyecto") = Nothing
End If
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'F A M I L I A S
@@ -179,55 +148,6 @@
End Using
GuardaLogAsax(String.Format("Globalasax 20:{0}", DateTime.Now))
'Using ObjVenta As New ClsVentas
' If ObjVenta.GetClasificacionDetalle(-1, CveClasificacion:=-1) Then
' Application("GlobalDTClasificacionesDetalle") = ObjVenta.DtResultados
' End If
'End Using
'GuardaLogAsax(String.Format("Globalasax 21:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'T I P O S - D E - E V E N T O S
Using ObjTiposEventos As New ClsTiposEventos
If ObjTiposEventos.GetTiposEventos() Then Application("GlobalDTTiposEventos") = ObjTiposEventos.DtResultados Else Application("GlobalDTTiposEventos") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 27:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'P R O V E E D O R E S C U E N T A S
Using ObjProveedoresBancos As New ClsGenerales
If ObjProveedoresBancos.GetCuentasDepositos() Then Application("GlobalDTProveedoresCuentas") = ObjProveedoresBancos.DtResultados Else Application("GlobalDTProveedoresCuentas") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 30:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'V E N D E D O R E S
Using ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then Application("GlobalDTVendedores") = ObjVendedores.DtResultados Else Application("GlobalDTVendedores") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 31:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'C O R P O R A T I V O
Using ObjCorporativo As New ClsClientes
If ObjCorporativo.GetCorporativo(-1, -1) Then Application("GlobalDTClientesCorporativo") = ObjCorporativo.DtResultados Else Application("GlobalDTClientesCorporativo") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 32:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'E S T A T U S - F A C T U R A
Using ObjEstatusFacturaCompra As New ClsCompEstatusFactura
If ObjEstatusFacturaCompra.GetEstatusFactura Then Application("GlobalDTCompEstatusFactura") = ObjEstatusFacturaCompra.DtResultados Else Application("GlobalDTCompEstatusFactura") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 33:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------S I S T E M A ----------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -239,23 +159,6 @@
GuardaLogAsax(String.Format("Globalasax 35:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'R O L E S
Using ObjRoles As New ClsSisRoles
If ObjRoles.GetRoles(-1, -1) Then Application("GlobalDTRoles") = ObjRoles.DtResultados Else Application("GlobalDTRoles") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 37:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'M O D U L O S
Using ObjModulos As New ClsModulos
If ObjModulos.GetModulos(-1, -1, "-1", "-1") Then Application("GlobalDTModulos") = ObjModulos.DtResultados Else Application("GlobalDTModulos") = Nothing
End Using
GuardaLogAsax(String.Format("Globalasax 38:{0}", DateTime.Now))
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'C O M B U S T I B L E S

View File

@@ -136,7 +136,7 @@ Partial Class Inicio
Dim Codigo As String = Decripta(Request("ADCod"))
Dim Msg As String = ""
If Codigo.Substring(0, 10) = "CveModulo=" Then
Msg = "No tiene permisos de acceso al módulo:" & GlobalDTModulos().FiltroPrimeroValor("Modulo", Codigo)
Msg = "No tiene permisos de acceso al módulo: " & GlobalDTModulos(Codigo.Substring(10).ToEntero).FiltroPrimeroValor("Modulo")
End If
Alert(Msg, TipoMensaje.MsgAdvertencia)
End If

View File

@@ -77,7 +77,7 @@ Partial Class Inventarios_Default
DivEquivalentes.Visible = True
DivPS.Visible = False
End If
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
If UsuarioActual.CveEmpresa = 119 Then
TrCompuesto.Visible = True
End If
Dim Txt As String = IfNull(Request("Txt"), "").ToString
@@ -98,7 +98,7 @@ Partial Class Inventarios_Default
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
CargarDatosMedRin()
CargaEquivalencia()
ElseIf UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.CveUsuario.Contiene(1703, 100) Then
ElseIf UsuarioActual.CveEmpresa = 119 Then
CargaDatosCompuesto()
Else
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)

View File

@@ -87,7 +87,7 @@ Partial Class Inventarios_Remanufactura
Public Sub InicializaValores()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
TxtFecha.Text = Now.ToShortDateString

View File

@@ -20,7 +20,7 @@ Partial Class Inventarios_RepReciclaje
Public Sub InicializaValores()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString

View File

@@ -1006,13 +1006,15 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveConceptoEntrada As Integer = 27
If Not ChkTransitorio.Checked Then CveConceptoEntrada = 27 Else CveConceptoEntrada = 9
Dim CveFolioGarantia As Integer = Request.QueryString("CveFolioGarantia").ToEntero
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble,
CveChofer:=If(ChkTransitorio.Checked, DdlChofer.SelectedValue.ToEntero, -1), Placa:="", FechaEntrega:=If(ChkTransitorio.Checked, TxtFechaEntrega.Text.Trim.ToDateTime.ToString("dd/MM/yyyy"), "-1"), EspecifUnidad:="",
ResponsableCarga:="", ResponsableRecibio:="", Identificacion:="", Domicilio:="",
Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2")
Telefono:="", Ciudad:="", Licencia:="", Modulo:="TA/G2", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioSalida = ObjInventario.Folio
Folio = ObjInventario.Folio
If CveMovimientoSalida <= 0 Then
@@ -1033,7 +1035,7 @@ Partial Class Inventarios_TraspasoAlmacen
'ENTRADA
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, CveConceptoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3")
CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G3", CveFolioGarantia:=If(CveFolioGarantia > 0, CveFolioGarantia, -1))
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then
TextoError = "Ocurrió un error al generar el movimiento de entrada"

View File

@@ -84,7 +84,7 @@
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Proyecto: </label>
<asp:Label ID="LblProyecto" class="col-md-1" runat="server">Proyecto: </asp:Label>
<div class="col-md-2" id="DivProyecto" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" DataTextField="Proyecto" DataValueField="CveProyecto" CssClass="form-control input-sm select2me" Width="250px" AutoPostBack="true"></asp:DropDownList>
</div>

View File

@@ -69,7 +69,7 @@ Partial Class OC_CatEstatus
ViewState("TipoSeleccionado") = DdlTipo.SelectedValue
CargaDatos()
CargaEstatus()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
CargaUsuarios()
sssss()

View File

@@ -196,6 +196,11 @@
<asp:DropDownList ID="DdlUsuarioAsignado" runat="server" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" Style="width: 95px; height: 30px; display: inline-block;">
</asp:DropDownList>
</div>
<label class="colf-1">Moneda</label>
<div class="colf-2">
<asp:DropDownList ID="DdlMoneda" runat="server" CssClass="form-control input-sm select2me" DataTextField="Moneda" DataValueField="CveMoneda" Style="width: 95px; height: 30px; display: inline-block;">
</asp:DropDownList>
</div>
</div>
<div class="row rownomargin">
@@ -269,18 +274,16 @@
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="padding-bottom: 13px;">
<div class="col-md-3" runat="server">
</div>
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
<asp:UpdatePanel class="col-md-4" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
<asp:UpdatePanel class="col-md-4" style="min-width: 450px;" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div id="DivIndicadores" align="Right" runat="server" visible="false">
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="col-md-4">
<div style="display:flex; align-items:flex-end;">
<div id="DivPorAtender" runat="server" visible="false">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvPorAtender.ClientID) %>" style="display: inline-block; width: 200px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvPorAtender.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>

View File

@@ -63,6 +63,7 @@ Partial Class RepOC
CargaProyectos()
'CargaSubProyectos()
CargaUsuarios()
CargaMonedas()
CargaProveedores()
CargaEstatus()
CargaActivoFijo()
@@ -122,6 +123,11 @@ Partial Class RepOC
DdlUsuarioAutorizo.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Protected Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind()
DdlMoneda.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Protected Sub CargaProveedores()
If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then
DdlProveedores.setEsWebService(True)
@@ -380,7 +386,7 @@ Partial Class RepOC
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(), CveMoneda:=DdlMoneda.SelectedValue.ToEntero()) Then
GvConsultar.DataSource = OC.DtResultados
DtOC = OC.DtResultados

View File

@@ -69,7 +69,7 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Sucursal">
<ItemTemplate>
<asp:Literal ID="LtSucursal" runat="server" Text='<%# Eval("Sucursal")%>'></asp:Literal>
<asp:Literal ID="LtSucursal" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Vendedor">

View File

@@ -17,7 +17,7 @@ Partial Class OC_RepOCSinFactura
Private Sub CargaCombos()
'CargaSucursales
DdlSucursal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSucursal.DataBind()
'Vendedor

View File

@@ -349,7 +349,7 @@ Partial Class OI_Desarrollo
DdlUsuarioPruebas.DataBind()
DdlUsuarioPruebas.Items.Insert(0, New ListItem("Selecione uno", "-1"))
DdlModulo.DataSource = GlobalDTModulos()
DdlModulo.DataSource = GlobalDTModulos(-1)
DdlModulo.DataBind()
DdlModulo.Items.Insert(0, New ListItem("Selecione uno", "-1"))

View File

@@ -27,7 +27,7 @@ Partial Class OI_RepDesarrollo
'DdlResponsable.DataBind()
'DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1"))
DdlModulo.DataSource = GlobalDTModulos()
DdlModulo.DataSource = GlobalDTModulos(-1)
DdlModulo.DataBind()
DdlModulo.Items.Insert(0, New ListItem("Todos", "-1"))

View File

@@ -2178,7 +2178,7 @@ Partial Class OI_SoporteADS
DdlModulo.DataSource = GlobalDTModulos
DdlModulo.DataSource = GlobalDTModulos(-1)
DdlModulo.DataBind()
DdlModulo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))

View File

@@ -134,7 +134,7 @@
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Proyecto: </label>
<asp:Label ID="LblProyecto" class="col-md-1" runat="server">Proyecto: </asp:Label>
<div class="col-md-2" id="DivProyecto" runat="server">
<asp:DropDownList ID="DdlProyecto" runat="server" DataTextField="Proyecto" DataValueField="CveProyecto" CssClass="form-control input-sm select2me" Width="250px" AutoPostBack="true"></asp:DropDownList>
</div>

View File

@@ -63,7 +63,7 @@ Partial Class OS_CatEstatusOrdenServicio
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
CargarTodosLosDatos()
CveEstatuOS = -1
End If

View File

@@ -1194,7 +1194,7 @@ Partial Class RH_CatPersonal
TxtCURP.Text.Trim, "", "", "", -1, CveSATRiesgoPuesto, DdlRegimenContratacion.SelectedValue.ToEntero,
-1, DdlSubProyectoAsignadoAdd.SelectedValue.ToEntero, "",
DdlSupervisor.SelectedValue.ToEntero, "", "", DdlJornada.SelectedValue.ToEntero, -1, "-1",
0, "Seleccione", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, CveUniforme:=-1,
0, "Seleccione", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "", -1, CveUniforme:=-1,
TelefonoExtension:="", CelularPersonal:="", TelefonoMarcadoRapido:="", ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=isSindicalizado, CvePais:=151,
CveMedioTransporte:=DdlMedioTransporte.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero()
) Then

View File

@@ -328,6 +328,11 @@
<label for="<%= TxtTelefonoEmergencia.ClientID.ToString()%>">Contacto en caso de emergencia (nombre y teléfono):</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtBeneficiario" runat="server" MaxLength="70"></asp:TextBox>
<label for="<%= TxtBeneficiario.ClientID.ToString()%>">Beneficiario:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCelular" runat="server" MaxLength="10"></asp:TextBox>
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular Empresa: </label>

View File

@@ -1644,6 +1644,7 @@ Partial Class RH_Personal
TxtEstado.Text = ObjPersonal.Estado
TxtTelefono.Text = ObjPersonal.Telefono
TxtTelefonoEmergencia.Text = ObjPersonal.TelefonoEmergencia
TxtBeneficiario.Text = ObjPersonal.Beneficiario
TxtCelular.Text = ObjPersonal.Celular
TxtLugarNacimiento.Text = ObjPersonal.LugarNacimiento.ToString()
TxtCredencialElector.Text = ObjPersonal.CredencialElector
@@ -1965,7 +1966,7 @@ Partial Class RH_Personal
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), URL,
DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(),
Sindicalizado:=ChkSindicalizado.Checked, Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero()) Then
@@ -1998,7 +1999,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
TieneError = True
Exit For
End If
@@ -2049,7 +2050,7 @@ Partial Class RH_Personal
DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), CvePersonal,
URL, DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(),
CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero(), EsReserva:=If(chkEsReserva.Checked, 1, 0), Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero()) Then
@@ -3352,7 +3353,7 @@ Partial Class RH_Personal
If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
@@ -3699,6 +3700,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Estado", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Telefono", ObjPersonal.Telefono))
params.Add(New ReportParameter("TelefonoEmergencia", ObjPersonal.TelefonoEmergencia))
params.Add(New ReportParameter("Beneficiario", ObjPersonal.Beneficiario))
params.Add(New ReportParameter("Celular", ObjPersonal.Celular))
params.Add(New ReportParameter("Correo", ObjPersonal.Correo))
params.Add(New ReportParameter("LugarNacimiento", Now.ToDateTime.ToShortDateString))

View File

@@ -252,7 +252,7 @@
<label class="col-md-1">Agrupador: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="CveUsuario" DataTextField="Nombre">
<asp:ListItem Value="1" Text="Agregado"></asp:ListItem>
<asp:ListItem Value="1" Text="Mes Acumulado Pesos"></asp:ListItem>
<asp:ListItem Value="2" Text="Por Comprobante"></asp:ListItem>
<asp:ListItem Value="3" Text="Mes Moneda"></asp:ListItem>
</asp:DropDownList>

View File

@@ -70,7 +70,7 @@ Partial Class Sistemas_EmpresasModulos
End Sub
Private Sub CargaModulosDisponible()
Dim DtModulosDisponible = GlobalDTModulos.FiltraParametros("Liga <> ''")
Dim DtModulosDisponible = GlobalDTModulos().FiltraParametros("Liga <> ''")
Dim rowsToDelete = From r1 In DtModulosDisponible.AsEnumerable()
Join r2 In DtModulosEmpresa.AsEnumerable() On r1.Field(Of Integer)("CveModulo") Equals r2.Field(Of Integer)("CveModulo")

View File

@@ -6615,7 +6615,7 @@ Partial Class Clientes
If CveCliente > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveCliente:=CveCliente) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
@@ -6739,10 +6739,6 @@ Partial Class Clientes
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
End If
'If ObjCuentasBancos.GetCuentasDepositos Then
' GlobalDTProveedoresCuentas(CveCliente, True) = ObjCuentasBancos.DtResultados
'End If
CargaPSGridCuentasBancos()
ObjCuentasBancos.Dispose()
RecargaGlobalCuentasBancarias()

View File

@@ -127,7 +127,7 @@ Partial Class Ventas_RepAuxiliarFacturas
DdlEstatus.SelectedIndex = 1
End If
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
TipoCambio = 1
TCEspecifico = 0

View File

@@ -142,7 +142,7 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
}
DdlClienteClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlClienteClasificacion.DataBind();
DdlClienteClasificacion.DataBind();
DdlClienteClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
//Carga Grupos

View File

@@ -7685,7 +7685,7 @@ Partial Class Ventas
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("Estado = 1", Orderby:="Clasificacion")
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("UsoClasificacion IN (1,3) and Estado = 1", Orderby:="Clasificacion")
DdlClasificacionPyME.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1).FiltraParametros("", Orderby:="Clasificacion")
End If
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
@@ -7928,6 +7928,11 @@ Partial Class Ventas
e.Row.FCTextBox("TxtPrecio").Enabled = False
End If
If CveContrato > 0 AndAlso CveContratoTipo = 33 Then
e.Row.FCTextBox("TxtCantidad").Enabled = True
e.Row.FCTextBox("TxtPrecio").Enabled = True
End If
If DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 Then
e.Row.FCLinkButton("imgClone").Visible = False
e.Row.FCTextBox("TxtOrden").Visible = True
@@ -9485,7 +9490,7 @@ Partial Class Ventas
End If
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
TmpDT = TmpDTError.Copy()
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
@@ -9499,7 +9504,7 @@ Partial Class Ventas
Exit Sub
End If
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
TmpDT = TmpDTError.Copy()
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
@@ -17722,6 +17727,7 @@ Partial Class Ventas
Private Sub CambiaTipoComprobante()
CambiaTipoDocto()
LimpiaEscondeContado()
End Sub
Private Sub CambiaTipoDocto()
CargaNC(IfNull(Request("CveDevolucion"), "-1").ToString().ToEntero())
@@ -17879,6 +17885,8 @@ Partial Class Ventas
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
'VALIDA ESTATUS CLIENTE - SOLO SE PUEDE USAR EL CLIENTE PARA COTIZAR EN CASO DE ESTAR INACTIVO
@@ -18683,7 +18691,9 @@ Partial Class Ventas
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
Dim SubTotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
Dim TotalProntoPago As Decimal = SubTotalProntoPago * (1 + PorcentajeIVA)
Dim PorcentajeProntoPago = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
@@ -22644,6 +22654,8 @@ Partial Class Ventas
imgCalendario.Visible = False
End If
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
UpContado.Update()
UPCondicionesPago.Update()
End Sub
@@ -32058,6 +32070,8 @@ Partial Class Ventas
TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
UpRemisionesFacturas.Update()
UpFacturar.Update()
UpPS.Update()
@@ -32729,9 +32743,12 @@ Partial Class Ventas
ObjCliente.Dispose()
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
TrVistaPrevia.Visible = True
TxtFechaVencimientoCotizacion.Text = Now.ToShortDateString
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
'HABILITA EDITAR Y ELIMINAR DEL GV
GvPS.Columns(17).Visible = True
GvPS.Columns(18).Visible = True
@@ -32963,6 +32980,8 @@ Partial Class Ventas
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
TxtFechaEjecucion.Text = Now.ToString()
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
'VALIDAR QUE NO SE HAYA REMISIONADO
If TipoDoctoViejo = "PA" Then
Dim RowVenta As DataRow = Nothing
@@ -36313,47 +36332,58 @@ Partial Class Ventas
Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs)
TxtFechaPago.Enabled = True
imgCalendario.Visible = True
If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
RBLPago.SelectedValue = "1"
RBLPago.Enabled = False
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
TxtFechaPago.Enabled = True
imgCalendario.Visible = True
Using ObjVentas As New ClsVentas
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
If RowLinea IsNot Nothing Then
If CveVenta <= 0 Then
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
RBLPago.SelectedValue = "1"
RBLPago.Enabled = False
Using ObjVentas As New ClsVentas
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
If RowLinea IsNot Nothing Then
If CveVenta <= 0 Then
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
If RowLinea("TipoLinea").ToString() = "2" Then
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
Else
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
End If
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
If RowLinea("TipoLinea").ToString() = "2" Then
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
TxtFechaPago.Enabled = False
imgCalendario.Visible = False
TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString()
End If
TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString()
End If
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero()
Me.SaldoLineaAdicional = RowLinea("Saldo").ToString().ToDecimal()
Me.SaldoIngresosLineaAdicional = RowLinea("SaldoIngresos").ToString().ToDecimal()
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero()
Me.SaldoLineaAdicional = RowLinea("Saldo").ToString().ToDecimal()
Me.SaldoIngresosLineaAdicional = RowLinea("SaldoIngresos").ToString().ToDecimal()
If CveVenta <= 0 Then
If DdlTipoComprobante.SelectedValue.Contiene("PA") Then
'SI NO TIENE LA OPCION DE FACTURAR LA PERMITE
If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then
DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem"))
HabilitoFacturacionIngresoLineaAdicional = True
If CveVenta <= 0 Then
If DdlTipoComprobante.SelectedValue.Contiene("PA") Then
'SI NO TIENE LA OPCION DE FACTURAR LA PERMITE
If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then
DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem"))
HabilitoFacturacionIngresoLineaAdicional = True
End If
DdlTipoComprobante.SelectedValueExist("Rem")
End If
DdlTipoComprobante.SelectedValueExist("Rem")
End If
End If
End If
Else
Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia)
Me.SaldoLineaAdicional = 0
Me.SaldoIngresosLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
End If
Else
Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia)
@@ -36361,36 +36391,32 @@ Partial Class Ventas
Me.SaldoIngresosLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
End If
Else
Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia)
Me.SaldoLineaAdicional = 0
Me.SaldoIngresosLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
End Using
Else
Me.SaldoLineaAdicional = 0
Me.SaldoIngresosLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
If CveVenta <= 0 Then
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
TxtOrdenCompra.Text = ""
'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO
If HabilitoFacturacionIngresoLineaAdicional Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
DdlTipoComprobante.SelectedValueExist("PA")
UpParametros.Update()
End If
End If
End Using
Else
Me.SaldoLineaAdicional = 0
Me.SaldoIngresosLineaAdicional = 0
Me.CveCategoriaLineaAdicional = 0
If CveVenta <= 0 Then
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
TxtOrdenCompra.Text = ""
'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO
If HabilitoFacturacionIngresoLineaAdicional Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
DdlTipoComprobante.SelectedValueExist("PA")
UpParametros.Update()
End If
End If
UpParametros.Update()
UPCondicionesPago.Update()
UPObservaciones.Update()
End If
UpParametros.Update()
UPCondicionesPago.Update()
UPObservaciones.Update()
End Sub
Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs)
'VALIDAR LINEAS ADICIONALES
@@ -36427,7 +36453,7 @@ Partial Class Ventas
End If
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then
If Me.SaldoLineaAdicional < TxtTotal.Text.ToDecimal() Then
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
Exit Sub
End If

View File

@@ -48,9 +48,8 @@ Partial Class ZDG_MensajeAutomatico
Private Sub MandaMensajeAutomatico()
Dim pag As New ClsPaginas
pag.Alert("TODO FRENADO!!", TipoMensaje.MsgAdvertencia)
pag.Dispose()
Alert("TODO FRENADO!!", TipoMensaje.MsgAdvertencia)
Exit Sub

View File

@@ -44,459 +44,6 @@ Public Class WSApp
End Get
End Property
Property GlobalDTMonedas() As DataTable
Get
GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTMonedas") = value
End Set
End Property
Property GlobalDTVtaMetodoPago() As DataTable
Get
GlobalDTVtaMetodoPago = DirectCast(Application("GlobalDTVtaMetodoPago"), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTVtaMetodoPago") = value
End Set
End Property
Property GlobalDTVtaFormaPago() As DataTable
Get
GlobalDTVtaFormaPago = DirectCast(Application("GlobalDTVtaFormaPago"), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTVtaFormaPago") = value
End Set
End Property
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
Get
If EsPersonaFisica <> -1 Then
Dim Tipo As String = ""
If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1"
Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows)
GlobalDTSATUsosCFDI = Dv.ToTable
Dv.Dispose()
Else
GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable)
End If
End Get
Set(ByVal value As DataTable)
Application("GlobalDTSATUsosCFDI") = value
End Set
End Property
Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable
Get
Dim Str As New StringBuilder
If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario)
If CveEmpresa <> -1 Then Str.AppendFormat(" {0} CveEmpresa = {1}", If(Str.Length > 0, "AND", ""), CveEmpresa)
If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente)
If CveProveedor <> -1 Then Str.AppendFormat(" {0} CveProveedor = {1}", If(Str.Length > 0, "AND", ""), CveProveedor)
If CveUsuario <> -1 OrElse CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTUsuarios = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTUsuarios") = value
End Set
End Property
'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
' Get
' If CveEmpresa <> -1 Then
' Dim Dv As New DataView(DirectCast(Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
' GlobalDTUnidadesMedida = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTUnidadesMedida = DirectCast(Application("GlobalDTUnidadesMedida"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' Application("GlobalDTUnidadesMedida") = value
' End Set
'End Property
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTGralCategorias = Dv.ToTable
Dv.Dispose()
Else
GlobalDTGralCategorias = DirectCast(Application("GlobalDTGralCategorias"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTGralCategorias") = value
End Set
End Property
Private ReadOnly Property GlobalDTProyectos(CveEmpresa As Integer, Optional Estatus As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 OrElse Estatus <> -1 Then 'OrElse CveProyecto <> -1
Dim StrSQL As New StringBuilder
If CveEmpresa <> -1 Then StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" {0} CveProyecto = {1}", If(StrSQL.Length > 0, "AND", ""), CveProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" {0} CveEstatus = {1}", If(StrSQL.Length > 0, "AND", ""), Estatus)
Dim Dv As New DataView(DirectCast(Application("GlobalDTProyectos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTProyectos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTProyectos = DirectCast(Application("GlobalDTProyectos"), DataTable)
End If
End Get
End Property
Property GlobalDTVendedores(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTVendedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTVendedores = Dv.ToTable
Dv.Dispose()
Else
GlobalDTVendedores = DirectCast(Application("GlobalDTVendedores"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTVendedores") = value
End Set
End Property
Property GlobalDTCliente(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTCliente"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTCliente = Dv.ToTable
Dv.Dispose()
Else
GlobalDTCliente = DirectCast(Application("GlobalDTCliente"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTCliente") = value
End Set
End Property
Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTOCEstatus = Dv.ToTable
Dv.Dispose()
Else
GlobalDTOCEstatus = DirectCast(Application("GlobalDTOCEstatus"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTOCEstatus") = value
End Set
End Property
Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double
Get
If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado
If Fecha = MinFecha Then Fecha = Now
Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
Else
Application("GlobalTipoCambio") = 0
End If
ObjGral.Dispose()
End If
Return Application("GlobalTipoCambio").ToString.ToDouble
End Get
Set(value As Double)
Application("GlobalTipoCambio") = value
End Set
End Property
Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Dim ObjOC As New ClsOC
If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then
HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados
Else
HttpContext.Current.Application(AppNombre) = Nothing
End If
ObjOC.Dispose()
End If
Dim filtro As New StringBuilder
filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
If CveUsuario > 0 Then
filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
End If
If Tipo <> "" Then
filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
End If
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
GlobalDTOCEstatusUsuarios = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa)
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable
' Get
' If CveEmpresa <> -1 Then
' Dim filtro As New StringBuilder
' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa)
' If CveUsuario > 0 Then
' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario)
' End If
' If Tipo <> "" Then
' filtro.AppendFormat(" AND Tipo='{0}'", Tipo)
' End If
' Dim Dv As New DataView(DirectCast(Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
' GlobalDTOCEstatusUsuarios = Dv.ToTable
' Dv.Dispose()
' Else
' GlobalDTOCEstatusUsuarios = DirectCast(Application("GlobalDTOCEstatusUsuarios"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' Application("GlobalDTOCEstatusUsuarios") = value
' End Set
'End Property
Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTCompProveedores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTCompProveedores = Dv.ToTable
Dv.Dispose()
Else
GlobalDTCompProveedores = DirectCast(Application("GlobalDTCompProveedores"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTCompProveedores") = value
End Set
End Property
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
If CveEmpresa <> -1 Then
'sino existe, recarga los datos
If Application(AppNombre) Is Nothing Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable()
ObjPS.Dispose()
End If
Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
Try
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
Catch ex As Exception
GlobalDTPSSimplificado = New DataTable
End Try
Else
GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria)
Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificaciones"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTClasificaciones = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClasificaciones = DirectCast(Application("GlobalDTClasificaciones"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTClasificaciones") = value
End Set
End Property
Property GlobalDTTurno(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTTurno"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTTurno = Dv.ToTable
Dv.Dispose()
Else
GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTTurno") = value
End Set
End Property
Property GlobalDTDepartamentos(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTDepartamentos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTDepartamentos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTDepartamentos") = value
End Set
End Property
Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTRHPuestos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTRHPuestos") = value
End Set
End Property
Property GlobalDTMetodosPago() As DataTable
Get
GlobalDTMetodosPago = DirectCast(Application("GlobalDTMetodosPago"), DataTable)
End Get
Set(value As DataTable)
Application("GlobalDTMetodosPago") = value
End Set
End Property
Property GlobalDTAsistenciasInasistencias(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTAsistenciasInasistencias = Dv.ToTable
Dv.Dispose()
Else
GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTAsistenciasInasistencias") = value
End Set
End Property
Property GlobalDTMotivosHorasExtras(CveEmpresa As Integer) As DataTable
Get
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
GlobalDTMotivosHorasExtras = Dv.ToTable
Dv.Dispose()
Else
GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTMotivosHorasExtras") = value
End Set
End Property
Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim ObjUnidadesMedida As New ClsUnidadesMedida()
If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados
ObjUnidadesMedida.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows)
GlobalDTUnidadesMedida = Dv.ToTable
Dv.Dispose()
Else
GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
#End Region
Public Property CveEmpresa As Integer = 143
@@ -549,7 +96,7 @@ Public Class WSApp
Salida = New WSUSER
Salida.CveUsuario = UsuarioActual.CveUsuario
Salida.CveEmpresa = UsuarioActual.CveEmpresa
Salida.Empresa = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Empresa")
Salida.Empresa = ClsPaginas.GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Empresa")
Salida.CveCliente = UsuarioActual.CveCliente
Salida.Usuario = UsuarioActual.Usuario
Salida.Nombre = UsuarioActual.Nombre
@@ -598,7 +145,7 @@ Public Class WSApp
Salida = New WSUSER
Salida.CveUsuario = UsuarioActual.CveUsuario
Salida.CveEmpresa = UsuarioActual.CveEmpresa
Salida.Empresa = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Empresa")
Salida.Empresa = ClsPaginas.GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Empresa")
Salida.CveCliente = UsuarioActual.CveCliente
Salida.Usuario = UsuarioActual.Usuario
Salida.Nombre = UsuarioActual.Nombre
@@ -695,7 +242,7 @@ Public Class WSApp
End Function
<WebMethod()>
Public Function GetClasificaciones() As String
Return GlobalDTClasificaciones(CveEmpresa).ToJson()
Return ClsPaginas.GlobalDTClasificaciones(CveEmpresa).ToJson()
End Function
<WebMethod()>
Public Function GetPrecioLista() As String
@@ -709,7 +256,7 @@ Public Class WSApp
End Function
<WebMethod()>
Public Function GetUnidadesMedida() As String
Return GlobalDTUnidadesMedida(CveEmpresa).ToJson()
Return ClsPaginas.GlobalDTUnidadesMedida(CveEmpresa).ToJson()
End Function
<WebMethod()>
@@ -728,7 +275,7 @@ Public Class WSApp
Dim ObjPS As New ClsProductosServicios
Try
For Each PS In ListaPS
Dim CveTipoPS As Integer = GlobalDTPSSimplificado(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero()
Dim CveTipoPS As Integer = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero()
If CveTipoPS > 0 Then
If CveTipoPS = 2 Then
If ObjPS.GetPSExistencias(PS.CvePS, -1, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
@@ -1009,10 +556,10 @@ Public Class WSApp
If CveSubProyecto <= 0 Then
'SE ASIGNA EL SUBPROYECTO MATRIZ, EN CASO DE NO ENCONTRARSE SE LE ASIGNA CUALQUIERA
Dim Dr As DataRow = Nothing
If GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("TipoSucursal = 1").Rows.Count > 0 Then
Dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("TipoSucursal = 1").Rows(0)
ElseIf GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
Dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
If ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("TipoSucursal = 1").Rows.Count > 0 Then
Dr = ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("TipoSucursal = 1").Rows(0)
ElseIf ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count > 0 Then
Dr = ClsPaginas.GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
End If
If Dr IsNot Nothing Then
@@ -1044,9 +591,9 @@ Public Class WSApp
Case 1
ObjFactura.TipoCambio = "1"
Case 2
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
Case Else
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
End Select
ObjFactura.CveVendedor = -1
@@ -1066,8 +613,8 @@ Public Class WSApp
ObjFactura.TipoCambio = 1
ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = CveMoneda
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ")
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ")
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", "CveMoneda = 1")
ObjFactura.TipoDocto = "Rem"
ObjFactura.RefDocto = ""
'ObjFactura.CveMesa = -1
@@ -1098,8 +645,8 @@ Public Class WSApp
ObjFactura.CveSubProyecto = CveSubProyecto
ObjFactura.CveSubProyectoCobranza = CveSubProyecto
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
ObjFactura.SubProyecto = New SubProyectoModel(GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
ObjFactura.SubProyectoMatriz = New SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=CveEmpresa).FiltroPrimero("TipoSucursal=1"))
ObjFactura.SubProyecto = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1).FiltroPrimero($"CveSubProyecto = {CveSubProyecto}"))
ObjFactura.SubProyectoMatriz = New SubProyectoModel(ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=CveEmpresa).FiltroPrimero("TipoSucursal=1"))
'CLIENTE
ObjFactura.CveCliente = CveCliente
@@ -1110,20 +657,20 @@ Public Class WSApp
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
If GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows.Count > 0 Then
ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows(0)("MetodoPago").ToString
If ClsPaginas.GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows.Count > 0 Then
ObjFactura.MetodoPago = ClsPaginas.GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows(0)("MetodoPago").ToString
Else
ObjFactura.CveMetodoPago = 1
ObjFactura.MetodoPago = "Efectivo"
@@ -1358,7 +905,7 @@ Public Class WSApp
End If
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Dim DrSubProyecto As DataRow = ClsPaginas.GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Row = TmpDT.NewRow()
Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero()