This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-10-08 14:29:12 -07:00
23 changed files with 8419 additions and 307 deletions

View File

@@ -247,35 +247,35 @@
<i></i>
</div>
<br />
<%--<br />--%>
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label>
<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="200px" AutoPostBack="true"></asp:DropDownList>
<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 />
<%--<br />--%>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>&nbsp;
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label></br>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</label>&nbsp;
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<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 />
<%--<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>
@@ -283,8 +283,8 @@
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlArea.ClientID.ToString()%>">Área:</label>&nbsp;
<asp:DropDownList ID="DdlArea" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<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>

View File

@@ -341,7 +341,7 @@ Public Class ClsVentas
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False) As Boolean
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -433,6 +433,7 @@ Public Class ClsVentas
.Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
.Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal
.Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With

View File

@@ -6094,6 +6094,8 @@ Namespace Modelos
Public Property CveTipoRetencion As Integer
Public Property VentaDesglosaIEPS As Boolean
#End Region

View File

@@ -149,13 +149,7 @@
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server"></asp:TextBox>
</div>
<div class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl">
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
</div>
<div class="col-md-1 " runat="server" id="LiSubProyectoDdl">
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
</asp:DropDownList>
</div>
</div>
</div>
@@ -230,10 +224,37 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" />
</div>
<br />
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoCompras" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoCompras" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCompras"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCompras"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoCompras.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoCompras" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoCompras.ClientID.ToString()%>"><asp:Label runat="server" ID="LblSubProyectoCompras"></asp:Label></label>
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoCompras" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoCompras" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCompras"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
</div>
</div>
<br />
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,FluctuacionTotal,PerdidaGanancia"
@@ -309,11 +330,39 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" />
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoCompras.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlsubProyectoVentas" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlsubProyectoVentas.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoVentas"></asp:Label> </label>
<asp:RequiredFieldValidator ID="RFVDdlsubProyectoVentas" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlsubProyectoVentas" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
</div>
</div>
<br />
<br />
<br />
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE" EmptyDataText="No se Encontraron Cuentas Bancarias."
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
@@ -333,10 +382,37 @@
</ajax:TabPanel>
<ajax:TabPanel runat="server" ID="TabCuentasBancarias" HeaderText="Cuentas Bancarias">
<ContentTemplate>
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" />
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoBancos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoBancos"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoBancos.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubproyectoBancos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlSubproyectoBancos.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoBancos"></asp:Label> </label>
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
</div>
</div>
<br />
<br />
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="IdCtaAfectable,IdCtaContable,IdCtaContableComplementaria,TipoCambio,Fluctuacion,
@@ -361,11 +437,39 @@
</ajax:TabPanel>
<ajax:TabPanel runat="server" ID="TabDeudores" HeaderText="Deudores">
<ContentTemplate>
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" />
</div>
<br />
<br />
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoDeudores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoDeudores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoDeudores"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoDeudores.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoDeudores"></asp:Label> </label>
<asp:RequiredFieldValidator ID="RFVRFVDdlSubProyectoDeudores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoDeudores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Deudores" runat="server" ID="BtnGeneraDedudores" OnClick="BtnGeneraDedudores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarDeudores" />
</div>
</div>
<br />
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
@@ -383,13 +487,38 @@
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
<ContentTemplate>
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" />
</div>
<br />
<br />
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoAcreedores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoAcreedores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedores"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoAcreedores.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoAcreedores"></asp:Label> </label>
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
</div>
</div>
<br />
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio"
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
@@ -408,11 +537,40 @@
</ajax:TabPanel>
<ajax:TabPanel runat="server" ID="TabFilial" HeaderText="Filial">
<ContentTemplate>
<br />
<div class="row">
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConceptoFiliales" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtConceptoFiliales" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoFiliales"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
<label for="<%= TxtConceptoFiliales.ClientID.ToString()%>">Concepto:</label>
<i></i>
</div>
<div class="col-md-3 form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoFiliales" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
</asp:DropDownList>
<label for="<%= DdlSubProyectoFiliales.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoFiliales"></asp:Label> </label>
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoFiliales" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoFiliales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<asp:Button Text="Generar Filiales" runat="server" ID="BtnGeneraFiliales" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarFiliales" />
</div>
</div>
<br />
<div style="float: right; margin-right: 50px;">
<asp:Button Text="Generar Filiales" runat="server" ID="Button1" OnClick="BtnGeneraFiliales_Click" Style="margin-left: 30px;" class="btn btn-primary" />
</div>
<br />
<br />
<asp:GridView ID="GvFiliales" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE,Folio"
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"

View File

@@ -4,8 +4,8 @@ Option Strict On
Imports System.Data
Imports Extensiones
Partial Class Bancos_FluctuacionCambiaria
Inherits ClsPaginas
Inherits ClsPaginas
#Region "PROPIEDADES"
Private Property LblTotal() As String
Get
@@ -14,18 +14,25 @@ Partial Class Bancos_FluctuacionCambiaria
Set(value As String)
ViewState("Total") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
If Not Page.IsPostBack Then
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos)
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas)
CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras)
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales)
CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores)
CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores)
CargaUltimaFluctuacion()
End If
End Sub
End Sub
#Region "CARGAS"
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaTipoCambio()
If T.ActiveTabIndex = 0 Then CargaDatosCompra()
@@ -225,17 +232,12 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION COMPRAS"
Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs)
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -267,7 +269,7 @@ Partial Class Bancos_FluctuacionCambiaria
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Compras", CveConceptoContable, "Fluctuación Compras", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoCompras.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
@@ -299,18 +301,12 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION VENTAS"
Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs)
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -338,11 +334,12 @@ Partial Class Bancos_FluctuacionCambiaria
CveCuenta = CveCuentaPerdida
idCta = idCtaPerdida
TipoMovto = False
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
Dim CveConconceptoCliente As Integer = 203
'saco las cuentas de pérdida y ganancia
@@ -378,18 +375,12 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -440,7 +431,7 @@ Partial Class Bancos_FluctuacionCambiaria
Exit For
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), ConceptoReferencia, CveConceptoContable, ConceptoReferencia, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyectoBancos.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
End If
@@ -477,16 +468,10 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Deudor", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoDeudores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -523,7 +508,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida
TipoMovto = False
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), ConceptoFluctuacion, CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoDeudores.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
@@ -557,17 +542,12 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoFiliales.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -606,7 +586,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida
TipoMovto = False
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), ConceptoFluctuacion, CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoFiliales.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
@@ -657,16 +637,10 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
Dim CveCuentaPerdida, CveCuentaGanancia As Integer
@@ -696,7 +670,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida
TipoMovto = False
End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
ErrorRegistrar = True
End If
@@ -936,9 +910,9 @@ Partial Class Bancos_FluctuacionCambiaria
End If
End If
End Sub
End Sub
#End Region
End Class

View File

@@ -35,6 +35,13 @@
</b>
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
<b>
&nbsp;<asp:Label ID="LblMetodoPAgo" runat="server" data-toggle="tooltip" data-placement="right" title="Metodo de pago"></asp:Label>
</b>
</div>
</ContentTemplate>

View File

@@ -736,11 +736,16 @@ Partial Class Bancos_PopIEVentas
SerieFolio = dr("SerieFolio").ToString
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
'Configuración de Modalidad Update
'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ")
LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }"
'Configuración de Modalidad Update
'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ")
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
If dr("TipoDocto").ToString = "Rem" Then
Alert("Los documentos de tipo Remisión no se permite realizar el pago", TipoMensaje.MsgAdvertencia)

View File

@@ -29,6 +29,24 @@ Partial Class Compras_Compras
End Set
End Property
Private Property EstaAsociadoACajaChica() As Boolean
Get
Return If(IsNothing(ViewState("EstaAsociadoACajaChica")), False, CBool(ViewState("EstaAsociadoACajaChica")))
End Get
Set
ViewState("EstaAsociadoACajaChica") = Value
End Set
End Property
Private Property EstaAsociadoAPersonal() As Boolean
Get
Return If(IsNothing(ViewState("EstaAsociadoAPersonal")), False, CBool(ViewState("EstaAsociadoAPersonal")))
End Get
Set
ViewState("EstaAsociadoAPersonal") = Value
End Set
End Property
Private Property CveUsuarioEvaluador() As Integer
Get
Return If(IsNothing(ViewState("CveUsuarioEvaluador")), -1, CInt(ViewState("CveUsuarioEvaluador")))
@@ -848,6 +866,14 @@ Partial Class Compras_Compras
ViewState("PopUpOC") = value
End Set
End Property
Private Property CompraEstaVinculadaOC As Boolean
Get
Return CBool(ViewState("CompraEstaVinculadaOC"))
End Get
Set(value As Boolean)
ViewState("CompraEstaVinculadaOC") = value
End Set
End Property
#End Region
#Region "PROPIEDADES ALMACEN" 'Charlie
@@ -1307,6 +1333,9 @@ Partial Class Compras_Compras
ViewState("CveFactura") = Request("CveFactura").ToEntero
Dim RFC As String = CargaFactura(CveFactura)
If Not VerificarProductosSATPS() Then
Exit Sub
End If
If RFC.Trim <> String.Empty Then
DdlProveedor.Visible = False
HplProveedor.Visible = True
@@ -1734,6 +1763,7 @@ Partial Class Compras_Compras
'TmpDT.Columns.Add("IEPSPSIVAPorcentaje")
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
AddPS2(False)
End If
Else
CargaConceptosXML(XMLDoc)
@@ -3971,6 +4001,17 @@ Partial Class Compras_Compras
DtNoEncontrados.Dispose()
End If
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
If Not CompraEstaVinculadaOC Then
Alert("Debe de vincular una orden de compra para realizar esta factura")
Exit Sub
End If
End If
End If
'Si se marcó No Deducible en el encabezado mínimo se debe registrar un No Deducible en el Detalle
Dim GuardaNoDeducibles As Boolean = False
If ChkEsNoDeducible.Checked Then
@@ -12712,6 +12753,7 @@ Partial Class Compras_Compras
CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
EstaAsociadoACajaChica = True
End If
If UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then
@@ -12740,7 +12782,7 @@ Partial Class Compras_Compras
ObjMovtos.Dispose()
DDlCheques.DataBind()
EstaAsociadoAPersonal = True
DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty)
Else
@@ -13751,6 +13793,9 @@ Partial Class Compras_Compras
#Region " REEMBOLSOS NO USA AC "
Protected Sub DdlPersonal2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonalReembolso.SelectedIndexChanged
ViewState("CvePersonal") = DdlPersonalReembolso.SelectedValue
If DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then
EstaAsociadoAPersonal = True
End If
End Sub
Protected Sub DdlCajaChica2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaCajaChicaReembolso.SelectedIndexChanged
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuentaCajaChicaReembolso.SelectedValue)
@@ -13759,6 +13804,7 @@ Partial Class Compras_Compras
CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
EstaAsociadoACajaChica = True
End If
ViewState("CveCajaChica") = DdlCuentaCajaChicaReembolso.SelectedValue
End Sub
@@ -15051,13 +15097,11 @@ Partial Class Compras_Compras
End If
'SI PUEDE RECIBIR POR OC Y COMPRA
If UsuarioActual.CveEmpresa.Contiene(119) Then
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 And Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then
DivOCVinculaInv.Visible = True
End If
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
DivOCVinculaInv.Visible = True
End If
'TIPO CAMBIO
If CveCompra > 0 Then
DivTipoCambioOC.Visible = False
@@ -15383,27 +15427,27 @@ Partial Class Compras_Compras
Dim SubTotalCompra As Decimal = Amortizacion
Dim DiferenciaPermitida = 1
Dim Cont = 0
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
For Each gvr As GridViewRow In GvOC1.Rows
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
Cont = 1
If GvOC1.Columns(6).Visible Then
Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
If SatPS.Contains("01010101") Then
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
'For Each gvr As GridViewRow In GvOC1.Rows
' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
' Cont = 1
' If GvOC1.Columns(6).Visible Then
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
' If SatPS.Contains("01010101") Then
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
End If
End If
Next
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
Exit Sub
End If
' End If
' End If
'Next
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
If Math.Abs(SubTotalGV - SubTotalCompra) < DiferenciaPermitida Then
LbSubTotalDif.Visible = False
@@ -15641,6 +15685,7 @@ Partial Class Compras_Compras
End If
CalculaTotales()
CompraEstaVinculadaOC = True
End Sub
@@ -20158,7 +20203,35 @@ Partial Class Compras_Compras
End Sub
Private Function VerificarProductosSATPS() As Boolean
Dim CvePSGRuposAux As New StringBuilder("")
For Each gvr As GridViewRow In GvPS.Rows
Dim CvePSIndividual As String = gvr.DataKey("CvePS")
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
Next
Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
For Each PS As GridViewRow In GvPS.Rows
Dim PSIndividual As String = PS.DataKey("PS")
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
If ClavePSSAT = "46920" Then
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
End If
Next
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
Return False
End If
Return True
End Function
End Class

View File

@@ -1238,6 +1238,7 @@ Partial Class PopUpVerFactura
Dim Observaciones As String = ObjInventarios.Observaciones
Dim ObservacionesSolicitud As String = ObjInventarios.DtResultados.FiltroPrimeroValor("ObservacionesSolicitud")
Dim NombreCapturo As String = ObjInventarios.NombreCapturo
Dim NombreEntrego As String = ObjInventarios.DtResultados.FiltroPrimeroValor("Entrego")
Dim CveAlmacen As Integer = ObjInventarios.CveAlmacen
Dim Recibio As String = ObjInventarios.Recibio
Dim PuestoRecibio As String = ObjInventarios.PuestoRecibio
@@ -1341,7 +1342,7 @@ Partial Class PopUpVerFactura
EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen)
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego)
End Sub
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
@@ -1358,7 +1359,7 @@ Partial Class PopUpVerFactura
Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String,
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1)
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "")
Select Case CveConcepto
@@ -2704,7 +2705,7 @@ Partial Class PopUpVerFactura
End If
Dim DepartamentoRecibe As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Recibio))
Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Capturo))
Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", NombreEntrego))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Concepto", "Salida por resguardo"))
@@ -2715,7 +2716,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Descuentos", ""))
params.Add(New ReportParameter("IVA", ""))
params.Add(New ReportParameter("Total", ""))
params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
params.Add(New ReportParameter("NombreEntrego", NombreEntrego))
params.Add(New ReportParameter("NombreRecibio", Recibio))
params.Add(New ReportParameter("PuestoRecibio", PuestoEntrego))
params.Add(New ReportParameter("PuestoEntrego", PuestoRecibio))
@@ -2727,7 +2728,7 @@ Partial Class PopUpVerFactura
End If
params.Add(New ReportParameter("FechaMovimiento", FechaMovimiento.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", NombreCapturo))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Observaciones", Observaciones))

View File

@@ -291,7 +291,8 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
<Columns>
<asp:TemplateField>
<HeaderTemplate>

View File

@@ -1036,7 +1036,7 @@ Partial Class Compras_ReembolsosComprobaciones
'Otros Ingresos
If ChkAjusteOI.Checked Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
End If

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -278,8 +278,8 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal
'LIGA SOLO EN DETALLE POR CAMPO CVECUENTA - TEMPORAL
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
If e.Row.DBCampo("CtaMayor").ToString = "1" Then
' e.Row.FCHyperLink("HLNombre").NavigateUrl = $"/Contabilidad2/RepAnexoCatalogoMensual.aspx?C={e.Row.DBCampo("CveCuenta")}&E={DdlEjercicio.SelectedValue}&S={DdlSubProyecto.SelectedValue}&D={DdlDivisor.SelectedValue}"
End If

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -732,7 +732,7 @@ Partial Class Inventarios_RecepcionAlmacen
ObjInventarios.Dispose()
DdlIndirectoFactura.DataBind()
DdlIndirectoFactura.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlIndirectoFactura.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
@@ -2270,6 +2270,10 @@ Partial Class Inventarios_RecepcionAlmacen
Dim ObjContaContPAQ As ClsContPAQi = Nothing
'ENTREGA DIRECTA
Dim MovtosEntradaExA As New List(Of Integer)
Dim FoliosEntradaExA As New List(Of Integer)
Dim MovtosSalidaDirecta As New List(Of Integer)
Dim FoliosSalidaDirecta As New List(Of Integer)
@@ -2548,36 +2552,42 @@ Partial Class Inventarios_RecepcionAlmacen
Dim CveVenta As Integer = DrVenta("CveVenta").ToString().ToEntero()
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1,
CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RA/G2")
FolioSalidaDirecta = ObjInventario.Folio
Dim ObjFactura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
If Not CveMovtoSalidaDirecta > 0 Then
ErrorMovInv = True
Exit For
End If
Dim DtDetalleMovimiento As DataTable = Dt.FiltraParametros($"CveVenta={ObjFactura.CveVenta}")
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
End If
If ObjFactura.TipoDocto = "Ing" Then
Dim MovSalida = GenerarMovimientoAlmacenVenta(DdlAlmacen.SelectedValue.ToEntero(), 3, ObjFactura.CveVenta, CveMovimiento, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable, "RA/G2")
If Not ErrorMovInv Then
If Not GeneraPrePolizaSalidaEntregaDirecta(CveMovtoSalidaDirecta, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable) Then
ErrorMovInv = True
Exit For
ErrorMovInv = MovSalida.CveMovimiento <= 0
If Not ErrorMovInv Then
MovtosSalidaDirecta.Add(MovSalida.CveMovimiento)
FoliosSalidaDirecta.Add(MovSalida.Folio)
End If
ElseIf ObjFactura.TipoDocto = "Rem" Then
Dim MovSalidaExA = GenerarMovimientoAlmacenVenta(DdlAlmacen.SelectedValue.ToEntero(), 8, ObjFactura.CveVenta, -1, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R1")
ErrorMovInv = MovSalidaExA.CveMovimiento <= 0
If Not ErrorMovInv Then
MovtosSalidaDirecta.Add(MovSalidaExA.CveMovimiento)
FoliosSalidaDirecta.Add(MovSalidaExA.Folio)
Dim MovEntradaExA = GenerarMovimientoAlmacenVenta(ObjFactura.CveAlmacenTraspasoDestino, 9, ObjFactura.CveVenta, MovSalidaExA.CveMovimiento, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R2")
ErrorMovInv = MovEntradaExA.CveMovimiento <= 0
If Not ErrorMovInv Then
MovtosEntradaExA.Add(MovEntradaExA.CveMovimiento)
FoliosEntradaExA.Add(MovEntradaExA.Folio)
End If
End If
End If
If Not ErrorMovInv Then
MovtosSalidaDirecta.Add(CveMovtoSalidaDirecta)
FoliosSalidaDirecta.Add(FolioSalidaDirecta)
End If
Next
If Not ErrorMovInv Then
@@ -3307,6 +3317,14 @@ Partial Class Inventarios_RecepcionAlmacen
'ENTREGA DIRECTA
If MovtosSalidaDirecta.Count > 0 Then
Msg.AppendFormat("<br/><br/> Movimientos de control:<br/>")
If MovtosEntradaExA.Count > 0 Then
For index = 0 To MovtosEntradaExA.Count - 1
link = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", MovtosEntradaExA(index), FoliosEntradaExA(index))
Msg.AppendFormat("<br/>Movimiento de Entrada Folio: <b>{0}</b>", link)
Next
End If
For index = 0 To MovtosSalidaDirecta.Count - 1
link = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", MovtosSalidaDirecta(index), FoliosSalidaDirecta(index))
Msg.AppendFormat("<br/>Movimiento de Salida Folio: <b>{0}</b>", link)
@@ -3355,6 +3373,45 @@ Partial Class Inventarios_RecepcionAlmacen
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
If ObjContaContPAQ IsNot Nothing Then ObjContaContPAQ.Dispose()
End Sub
Private Function GenerarMovimientoAlmacenVenta(CveAlmacen As Integer, CveConceptoAlmacen As Integer, CveVenta As Integer, CveMovimientoRelacionado As Integer, DtDetalle As DataTable, ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, ObjContaContPAQ As ClsContPAQi, EsContabilizable As Boolean, Modulo As String) As MMovimientoAlmacen
Dim ErrorMovInv As Boolean = False
Dim Retorno As New MMovimientoAlmacen
Dim CveMovtoSalidaDirecta As Integer = -1
Dim FolioSalidaDirecta As Integer = -1
CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1,
CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimientoRelacionado, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:=Modulo)
FolioSalidaDirecta = ObjInventario.Folio
If Not CveMovtoSalidaDirecta > 0 Then
ErrorMovInv = True
End If
If Not ErrorMovInv AndAlso DtDetalle IsNot Nothing Then
For Each Dr As DataRow In DtDetalle.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
End If
If Not ErrorMovInv AndAlso CveConceptoAlmacen = 3 Then
If Not GeneraPrePolizaSalidaEntregaDirecta(CveMovtoSalidaDirecta, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable) Then
ErrorMovInv = True
End If
End If
If Not ErrorMovInv Then
Retorno.CveMovimiento = CveMovtoSalidaDirecta
Retorno.Folio = FolioSalidaDirecta
End If
Return Retorno
End Function
Private Sub GuardaImportacionFlete()
Dim CveMovimiento As Integer
Dim InvFolio As String = ""
@@ -4283,3 +4340,9 @@ Partial Class Inventarios_RecepcionAlmacen
End Class
Public Class MMovimientoAlmacen
Public Property CveMovimiento As Integer
Public Property Folio As Integer
End Class

View File

@@ -234,35 +234,39 @@
</div>
</div>
<div class="portlet-body rowpadding">
<div class="row" runat="server" id="DVAutorizaInformacion" visible = "False" >
<asp:UpdatePanel ID="UpAutorizaciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-12" runat="server" >
<table>
<div class="row" runat="server" id="DVAutorizaInformacion" visible = "False" >
<div class="col-md-12" runat="server" >
<table>
<tr><td><b>Estado : </b></td><td><asp:Label runat="server" id="LblEstatusAutorizo" ></asp:Label></td></tr>
<tr><td><b>Usuario : </b></td><td><asp:Label runat="server" id="LblUsaurioAutorizo" ></asp:Label></td></tr>
<tr><td><b>Fecha : </b></td><td><asp:Label runat="server" id="LblFechaAutoriza" ></asp:Label></td></tr>
<tr><td><b>Estado : </b></td><td><asp:Label runat="server" id="LblEstatusAutorizo" ></asp:Label></td></tr>
<tr><td><b>Usuario : </b></td><td><asp:Label runat="server" id="LblUsaurioAutorizo" ></asp:Label></td></tr>
<tr><td><b>Fecha : </b></td><td><asp:Label runat="server" id="LblFechaAutoriza" ></asp:Label></td></tr>
</table>
</table>
</div>
</div>
</div>
</div>
<div class="row" runat="server" id="DVAutorizarBotones" visible = "False" >
<div class="row" runat="server" id="DVAutorizarBotones" visible = "False" >
<div class="col-md-6" style="text-align:center!important">
<asp:LinkButton runat="server" Text ="Aceptar" id="LnkAceptarTraslado" CssClass="btn btn-success"
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click"></asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:center!important">
<asp:LinkButton runat="server" Text ="Rechazar" ID="LnkRechazarTraslado" CssClass="btn btn-danger" OnClick="LnkRechazarTraslado_Click" ></asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:center!important">
<asp:LinkButton runat="server" Text ="Aceptar" id="LnkAceptarTraslado" CssClass="btn btn-success"
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click"></asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:center!important">
<asp:LinkButton runat="server" Text ="Rechazar" ID="LnkRechazarTraslado" CssClass="btn btn-danger" OnClick="LnkRechazarTraslado_Click" ></asp:LinkButton>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -285,6 +285,9 @@ Partial Class Inventarios_TrasladoSolicitud
Else
Alert("Ocurrió un error al obtener los datos del traspaso.", TipoMensaje.MsgError)
End If
UpAutorizaciones.Update()
End If
ObjInventarios.Dispose()
ObjClientes.Dispose()
@@ -1034,6 +1037,9 @@ Partial Class Inventarios_TrasladoSolicitud
MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text)
CargaDatos()
RegistraScript("$('#ModalRechazarTraslado').modal('hide');")
End If
End Sub

View File

@@ -1327,6 +1327,11 @@
<asp:ListItem Text="Identificador" Value="4"></asp:ListItem>
<asp:ListItem Text="Serie" Value="5"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlMetodoInventario" runat="server" ControlToValidate="DdlMetodoInventario" InitialValue="0" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Metodo Inventario(Diferente de empresa)''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlMetodoInventario" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlMetodoInventario" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>

View File

@@ -1921,7 +1921,9 @@
</div>
</div>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC"
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-height="300" GridLines="None" DataKeyNames="CveVenta">
<Columns>
@@ -1931,6 +1933,9 @@
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Metodo Pago" DataField="ClaveMetodoPagoSAT" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Días Vencidos" DataField="DiasVencidos" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" />
@@ -1974,6 +1979,8 @@
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>
@@ -2003,14 +2010,15 @@
</div>
<div class="portlet-body">
<div class="row col-md-12" align="right">
<div class="col-md-12" align="right">
<input type="text" id="TxtCxCHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<br />
<br />
<br />
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvCxCHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar"
ToolTip="Listado de Historia CxC" CssClass="table table-striped table-advance table-hover table-grid Widthall ScrollAD" data-height="300"
GridLines="None">
@@ -2052,6 +2060,7 @@
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
</div>
</div>

View File

@@ -911,7 +911,7 @@ Partial Class ProductosyServicios
Public Sub CargaDdlSATPS()
DdlSATPS.setEsWebService(True)
DdlSATPS.Attributes.Add("data-metodo", "getpssat")
DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat")
End Sub
Public Sub CargaDdlFraccionArancelaria()
@@ -1123,6 +1123,10 @@ Partial Class ProductosyServicios
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
If DdlSATPS.SelectedValue = "46920" Then
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtPS.Text.Trim.Length = 0 Or DdlTipoPS.SelectedValue.ToEntero <= 0 Or DdlUnidadMedida.SelectedValue.ToEntero <= 0 Or DdlClasificacion.SelectedValue.ToEntero <= 0 Then
Alert("Los campos Producto/Servicio, Tipo, Unidad de medida, Clasificación Contable son requeridos por favor ingreselos.", TipoMensaje.MsgAdvertencia)

View File

@@ -1782,6 +1782,15 @@ Partial Class Ventas
End Set
End Property
Private Property VentaDesglosaIEPS As Boolean
Get
Return CBool(IfNull(ViewState("VentaDesglosaIEPS"), "False", ViewState("VentaDesglosaIEPS")))
End Get
Set(value As Boolean)
ViewState("VentaDesglosaIEPS") = value
End Set
End Property
#End Region
'#Region "AuxiliarConta"
@@ -5325,8 +5334,7 @@ Partial Class Ventas
CargarAlmacenes()
If UsuarioActual.Empresa.FacturaProduccion Then
End If
CargaDocumentacionCliente()
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
@@ -8483,7 +8491,7 @@ Partial Class Ventas
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
'ObjFactura.RefDocto = TxtDocto.Text.Trim
'si es cancelacion, debe de conservar el folio actual
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
@@ -9868,16 +9876,23 @@ Partial Class Ventas
ObjClientes.Dispose()
BtnEmitirImprimir.Text = "Facturar"
'REGISTRAR UNA ENTREGA DIRECTA
If TmpDT.COUNT("EntregaDirecta", "EntregaDirecta = 1") > 0 Then
trPaqueteriaOpciones.Visible = False
trPaqueteriOpcionesLabel.Visible = False
trPaqueteriaDirectaLabel.Visible = True
End If
BtnEmitirImprimir.Text = "Facturar"
DdlTipoComprobante.SelectedValue = "Ing"
DdlTipoComprobante.Enabled = False
DdlTipoComprobante.Items.Clear()
DdlTipoComprobante.Items.Insert(0, New ListItem("Ingresos", "Ing"))
DdlTipoComprobante.Items.Insert(1, New ListItem("Remisión", "Rem"))
DdlTipoComprobante.Enabled = True
Else
DdlTipoComprobante.SelectedValue = "Ing"
DdlTipoComprobante.Enabled = False
End If
Tab.ActiveTab = TabGenerales
TabGenerales.Enabled = True
@@ -10048,7 +10063,8 @@ Partial Class Ventas
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal) Then
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
@@ -14534,119 +14550,121 @@ Partial Class Ventas
TxtPrecio.Enabled = True
End If
If UsuarioActual.TienePermisoProceso(68) Then TxtPrecio.Enabled = False
Dim PSCodigoSAT As String = drPS("SATClavePS").ToString
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
CambiaMoneda()
End If
'SUGIERE PRECIO
Dim PrecioSugerido = 0.0
PrecioSugerido = drPS("Precio").ToString().ToDouble
If UsuarioActual.CveEmpresa.Contiene(1) Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPorcentajeProductos(CveCliente) Then
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
If PrecioAplicado > 0 Then
PrecioSugerido = PrecioAplicado
End If
End If
ObjPS.Dispose()
End If
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
' si es 10. primero el cliente
Dim CvePrecioListaPS As Integer
Dim PorcentajePrecio As Double = 0
If TipoPrecioLista = 10 Then
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
End If
Else
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
End If
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
CambiaMoneda()
End If
If CvePrecioListaPS > 0 Then
'SUGIERE PRECIO
Dim PrecioSugerido = 0.0
PrecioSugerido = drPS("Precio").ToString().ToDouble
If UsuarioActual.CveEmpresa.Contiene(1) Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
If ObjPS.GetPorcentajeProductos(CveCliente) Then
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
If PrecioAplicado > 0 Then
PrecioSugerido = PrecioAplicado
End If
End If
ObjPS.Dispose()
End If
If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
ObjInventarios.Dispose()
If CostoPS > 0 And PorcentajePrecio > 0 Then
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
' si es 10. primero el cliente
Dim CvePrecioListaPS As Integer
Dim PorcentajePrecio As Double = 0
If TipoPrecioLista = 10 Then
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
End If
Else
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
If CvePrecioListaPS <= 0 Then
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
End If
End If
If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
End If
ObjPS.Dispose()
End If
If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
ObjInventarios.Dispose()
If CostoPS > 0 And PorcentajePrecio > 0 Then
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If
End If
CvePrecioLista = CvePrecioListaPS
End If
CvePrecioLista = CvePrecioListaPS
End If
'Dim ObjClasificaciones As New ClsClasificaciones
'If ObjClasificaciones.GetClasificaciones() Then
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
'End If
'Dim ObjClasificaciones As New ClsClasificaciones
'If ObjClasificaciones.GetClasificaciones() Then
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
'End If
If PrecioSugerido > 0 Then
Dim PrecioBaseCosto As Decimal = 0
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
If PrecioSugerido > 0 Then
Dim PrecioBaseCosto As Decimal = 0
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
If PrecioBaseCosto > 0 Then
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
End If
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
End If
If IsNumeric(TxtCantidad.Text.Trim) Then
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
Else
LblTotalPS.Text = "0.00"
End If
LblPrecio1.Text = TxtPrecio.Text
UPPDescuento.Update()
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
HdnCodigo.Value = drPS("Codigo").ToString()
If DdlClasificacion.SelectedIndex = 0 Then
If drPS("CveClasificacion").ToString() IsNot Nothing Then
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
If IsNumeric(TxtCantidad.Text.Trim) Then
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
Else
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
LblTotalPS.Text = "0.00"
End If
LblPrecio1.Text = TxtPrecio.Text
UPPDescuento.Update()
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
HdnCodigo.Value = drPS("Codigo").ToString()
If DdlClasificacion.SelectedIndex = 0 Then
If drPS("CveClasificacion").ToString() IsNot Nothing Then
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
Else
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
End If
End If
End If
End If
ElseIf CvePSParametro = -2 Then
ElseIf CvePSParametro = -2 Then
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
End If
@@ -15668,13 +15686,10 @@ Partial Class Ventas
ObjPS.Dispose()
End Sub
Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
PU As Decimal, Descuento As Decimal,
CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean
PU As Decimal, Descuento As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, Optional Serie As String = "", Optional TiempoEntrega As String = "",
Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean
Dim Retorno As Boolean = False
If Not CvePS > 0 Then
@@ -15758,12 +15773,21 @@ Partial Class Ventas
End If
End If
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS))
If Not ClienteDesglosaIEPS Then
If Not RegeneraIEPS Then
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
VentaDesglosaIEPS = True
End If
DrPS("IEPSPorcentaje") = 0
End If
'SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA
If FacturaDesglosoIEPS Then
VentaDesglosaIEPS = True
End If
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)