Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
11
AF/AF.aspx
11
AF/AF.aspx
@@ -312,7 +312,16 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="divCuentas" runat="server" visible="false">
|
||||
|
||||
<asp:GridView ID="GvCta" runat="server" DataKeyNames="ConceptoContable,NombreCuenta" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style=" width: 100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Concepto Contable" DataField="ConceptoContable" />
|
||||
<asp:BoundField HeaderText="Nombre Cuenta" DataField="NombreCuenta" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
<div class="row" runat="server" id="trCuentaContable" visible="False">
|
||||
<div class="col-md-4 ">
|
||||
<label class=" control-label">Cuenta Contable:</label>
|
||||
|
||||
@@ -375,11 +375,8 @@ Partial Class AF_AF
|
||||
If Not IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CargaCombos()
|
||||
|
||||
If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then
|
||||
@@ -1050,6 +1047,13 @@ Partial Class AF_AF
|
||||
|
||||
If LtFechaCompra.Text <> "" Then
|
||||
LtFechaFinDepreciación.Text = ObjActivoFijo.FechaCompra.AddMonths(ObjActivoFijo.MesesDepreciacion).ToShortDateString
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
CargaCuentasConceptos()
|
||||
divCuentas.Visible = True
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
|
||||
CargaAFPAdreEHijos()
|
||||
@@ -3106,9 +3110,8 @@ Partial Class AF_AF
|
||||
#Region "CARGAR CUENTA CONTABLE"
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
trCuentaContable.Visible = True
|
||||
|
||||
|
||||
trCuentaContable.Visible = True
|
||||
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim DtCuentas As New DataTable
|
||||
Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
|
||||
@@ -3130,6 +3133,16 @@ Partial Class AF_AF
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasConceptos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasConceptos(10, UsuarioActual.CveEmpresa, CveAF:=CveActivoFijo) Then
|
||||
GvCta.DataSource = ObjConta.DtResultados
|
||||
divCuentas.Visible = True
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
GvCta.DataBind()
|
||||
|
||||
End Sub
|
||||
Private Sub ActivarRegistroCuentaAF()
|
||||
If DdlCtaContable.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(221).ToEntero > 0 Then
|
||||
BtnCtaContable.Visible = True
|
||||
|
||||
@@ -1774,7 +1774,12 @@ Public Class ClsContabilidad
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveCuentaBancos As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean
|
||||
Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1,
|
||||
Optional CveClasificacion As Integer = -1,
|
||||
Optional CveCuentaBancos As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1,
|
||||
Optional CveAF As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_CuentasConceptosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1785,6 +1790,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveCuentaBancos", SqlDbType.Int).Value = CveCuentaBancos
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -4804,7 +4810,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_UpdateCuentas")
|
||||
DataAdapter("PA_Conta_CuentasUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
@@ -4845,7 +4851,7 @@ Public Class ClsContabilidad
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
|
||||
Optional CveBancoCuenta As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = 0
|
||||
DataAdapter("PA_Conta_AddCuentas")
|
||||
DataAdapter("PA_Conta_CuentasAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePadre", SqlDbType.Int).Value = CvePadre
|
||||
@@ -4893,7 +4899,7 @@ Public Class ClsContabilidad
|
||||
Return False
|
||||
End If
|
||||
|
||||
DataAdapter("PA_Conta_RemoveCuentas")
|
||||
DataAdapter("PA_Conta_CuentasRemove")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:Label ID="LblEstatusIE" runat="server" Text="Activo" Visible="false"></asp:Label>
|
||||
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" ID="DdlEstatusIE" DataValueField="CveEstatusIE" DataTextField="EstatusIE" AutoPostBack="false"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" CssClass="form-control input-sm select2me" Visible="false" ID="DdlEstatusIE" DataValueField="CveEstatusIE" DataTextField="EstatusIE" AutoPostBack="false"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="DivTC" visible="false">
|
||||
@@ -233,15 +233,6 @@
|
||||
<asp:TextBox ID="TxtImporte" runat="server" MaxLength="15" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DVInteresMoratorio" visible="false">
|
||||
<div class="col-md-8"></div>
|
||||
<div class="col-md-1 control-label text-right">Interes:</div>
|
||||
<div class="col-md-2 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtInteresMoratorio" runat="server" MaxLength="15" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivIvaIxC" runat="server" visible="false" class="row">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-2"></div>
|
||||
|
||||
@@ -726,12 +726,8 @@ Partial Class Bancos_IE
|
||||
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
||||
LtlTitulo.Text = "Pago de Créditos"
|
||||
CveIE = -1
|
||||
|
||||
DVInteresMoratorio.Visible = True
|
||||
|
||||
If Banc.GetCreditos(CveCredito, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dt = Banc.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
Banc.Dispose()
|
||||
@@ -1746,6 +1742,7 @@ Partial Class Bancos_IE
|
||||
dt = Cred.DtResultados.FiltraParametros("Estatus IN (1,101,102)")
|
||||
|
||||
Dim Importe As Decimal = 0
|
||||
Dim ImporteInteres As Decimal = 0
|
||||
If CveCreditoDetalle > 0 Then
|
||||
Dim drt As DataRow = Cred.DtResultados.FiltroPrimero(String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle))
|
||||
If drt IsNot Nothing Then
|
||||
@@ -1754,18 +1751,15 @@ Partial Class Bancos_IE
|
||||
Alert("La Mensualidad no está vigente para pago", TipoMensaje.MsgError)
|
||||
End If
|
||||
Importe = dt.FiltroPrimeroValor("Mensualidad", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal
|
||||
ImporteInteres = dt.FiltroPrimeroValor("Intereses", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
TxtImporte.Text = Importe.ToString
|
||||
HdnImporteCredito.Value = Importe.ToString
|
||||
RegistraScript(String.Format("$get('TxtImporte').value = '{0}';", Importe.FormatoNumero))
|
||||
TxtImporte.Attributes.Remove("onkeyup")
|
||||
TxtImporte.Attributes.Add("onkeyup", String.Format("ValidaCantidad({0},{1});", TxtImporte.ClientID, Importe))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2908,15 +2902,6 @@ Partial Class Bancos_IE
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
|
||||
Case 46
|
||||
|
||||
If TxtInteresMoratorio.Text.ToDecimal > 0 Then
|
||||
importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
|
||||
importeMX = importeMovimiento
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
|
||||
|
||||
Case 50
|
||||
@@ -3589,7 +3574,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
|
||||
''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Case "EGSCREDITO"
|
||||
@@ -3606,7 +3590,8 @@ Partial Class Bancos_IE
|
||||
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
||||
Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio)
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 57, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
|
||||
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CveMoneda, False, 1)
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, ConPreP.CveConcepto, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
|
||||
@@ -3623,19 +3608,6 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
' Case 46
|
||||
' If TxtInteresMoratorio.Text.ToDecimal > 0 Then
|
||||
' importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
|
||||
' importeMX = importeMovimiento
|
||||
' Else
|
||||
' importeMovimiento = 0
|
||||
' importeMX = 0
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
|
||||
Case Else
|
||||
Dim TipoMovimiento As Boolean = True
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="divContrato" visible="false" >
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" DataTextField="TituloInfo" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" DataTextField="TituloInfo" DataValueField="CveContrato" Width="100%" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -474,7 +474,8 @@ Partial Class RepCxCDetalle
|
||||
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
|
||||
FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
|
||||
CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero()) Then
|
||||
CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(),
|
||||
CveContrato:=DdlContrato.SelectedValue.ToEntero) Then
|
||||
|
||||
GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0)
|
||||
|
||||
@@ -483,16 +484,10 @@ Partial Class RepCxCDetalle
|
||||
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(0).Copy)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1)
|
||||
|
||||
'DTCartera = ObjMovtos.DSResultados.Tables(1)
|
||||
'DTCartera.TableName = "DTCartera"
|
||||
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(1).Copy)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguro" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguro.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<label for="<%= TxtNumPolizaSeguro.ClientID.ToString()%>">Número Póliza Responsabildad Civil:</label>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtNumPolizaSeguro" ControlToValidate="TxtNumPolizaSeguro" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Póliza Responsabilidad Civil''</b> es necesario, por favor ingréselo." ValidationGroup="GrpUnidad"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
@@ -205,7 +205,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNumPolizaSeguroCarga" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Seguro:</label>
|
||||
<label for="<%= TxtNumPolizaSeguroCarga.ClientID.ToString()%>">Número Póliza Carga:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -553,11 +553,8 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPDatosAlmacen" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -633,8 +630,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPDivCodigoSeriePSRecepcion" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePSRecepcion" visible="false">
|
||||
@@ -666,38 +662,38 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,CveMovimientoDetalleTransitorio,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo,CveAlmacenTransitorioVirtual" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="2%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Cantidad" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,###.######}" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="100px" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="15%" Visible="false" >
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
|
||||
<asp:TemplateField HeaderText="Serie" HeaderStyle-Width="105px" Visible="false" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" Width="90px" runat="server" Text='<%# Eval("Serie") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" Visible="false" >
|
||||
<asp:TemplateField HeaderText="Lote" HeaderStyle-Width="105px" ItemStyle-HorizontalAlign="Center" Visible="false" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" Width="60px" runat="server" Text='<%# Eval("Lote") %>' Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLote" Width="100px" runat="server" Text='<%# Eval("Lote") %>' Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" Visible="false" >
|
||||
<asp:TemplateField HeaderText="Caducidad" HeaderStyle-Width="95px" ItemStyle-HorizontalAlign="Center" Visible="false" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCaducidad" Width="75px" runat="server" Text='<%# Eval("FechaCaducidad") %>' Visible="false" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCaducidad" Width="75px" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>' Visible="false" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="125px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -1553,9 +1553,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
e.Row.FCTextBox("TxtSerie").Visible = False
|
||||
|
||||
e.Row.Cells(2).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
|
||||
e.Row.Cells(2).Text = String.Format("Folio: <a class='texto' target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
|
||||
e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
|
||||
e.Row.Cells(5).Text = String.Format("Almacen Origen: {0} Almacen Destino: {1} Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
|
||||
e.Row.Cells(5).Text = String.Format("Almacen Origen: {0} Almacen Destino: {1} <br/> Responsable: {2}", e.Row.DBCampo("Almacen"), e.Row.DBCampo("AlmacenDestino"), e.Row.DBCampo("Recibio"))
|
||||
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad")))
|
||||
@@ -1567,17 +1567,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If e.Row.DBCampo("AplicaLote").ToString.Trim = "1" Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("AplicaCaducidad").ToString.Trim = "1" Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtSerie").ReadOnly = True
|
||||
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
|
||||
@@ -914,35 +914,37 @@ Partial Class RH_Personal
|
||||
ViewState("CvePersonal") = Request("CvePersonal")
|
||||
DdlFormapagovacaciones_SelectedIndexChanged(Nothing, Nothing)
|
||||
'CvePersonal = ViewState("CvePersonal").ToString().ToEntero()
|
||||
CargaDatos()
|
||||
CargaDocumentacionFirmaDecontratos()
|
||||
CargaPersonalIncapacidad()
|
||||
CargaMovtoPermanente()
|
||||
'LnkAddLicencias.Visible = True
|
||||
'TabLicencias.Visible = True
|
||||
'Configuración de Modalidad Update
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
LtlTitulo.Text = "Consulta de Personal:"
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
'ImgImprimir.Visible = True
|
||||
ImgImprimirExpediente.Visible = True
|
||||
If CargaDatos() Then
|
||||
CargaDocumentacionFirmaDecontratos()
|
||||
CargaPersonalIncapacidad()
|
||||
CargaMovtoPermanente()
|
||||
'LnkAddLicencias.Visible = True
|
||||
'TabLicencias.Visible = True
|
||||
'Configuración de Modalidad Update
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
LtlTitulo.Text = "Consulta de Personal:"
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
'ImgImprimir.Visible = True
|
||||
ImgImprimirExpediente.Visible = True
|
||||
End If
|
||||
|
||||
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1
|
||||
|
||||
'Inicia Permisos
|
||||
If UsuarioActual.TienePermisoProceso(228) Then
|
||||
GVAsistencia.Columns(10).Visible = True
|
||||
End If
|
||||
'Fin Permisos
|
||||
HlEvento.Visible = True
|
||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
|
||||
|
||||
CargaViaticosPersonal()
|
||||
|
||||
divBitacora.Visible = True
|
||||
CargaGvBitacora()
|
||||
End If
|
||||
|
||||
'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
|
||||
If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1
|
||||
|
||||
'Inicia Permisos
|
||||
If UsuarioActual.TienePermisoProceso(228) Then
|
||||
GVAsistencia.Columns(10).Visible = True
|
||||
End If
|
||||
'Fin Permisos
|
||||
HlEvento.Visible = True
|
||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
|
||||
|
||||
CargaViaticosPersonal()
|
||||
|
||||
divBitacora.Visible = True
|
||||
CargaGvBitacora()
|
||||
Else
|
||||
cargatipoTrabajador()
|
||||
MostrarOcultarFechasEstatus()
|
||||
@@ -956,11 +958,11 @@ Partial Class RH_Personal
|
||||
BtnEliminar.Visible = False
|
||||
CarcaConceptosNomina()
|
||||
CargaFonacot()
|
||||
CargaCuentasBancarias()
|
||||
|
||||
'Inicia Permisos
|
||||
'Fin Permisos
|
||||
End If
|
||||
CargaCuentasBancarias()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
|
||||
|
||||
@@ -1613,11 +1615,13 @@ Partial Class RH_Personal
|
||||
End If
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Private Function CargaDatos() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim ObjPersonal As New ClsRH()
|
||||
If ObjPersonal.GetPersonal(CvePersonal, "-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", UsuarioActual.CveEmpresa) Then
|
||||
If ObjPersonal.DtResultados.Rows.Count > 0 Then
|
||||
Dim drow As DataRow = ObjPersonal.DtResultados.Rows(0)
|
||||
Retorno = True
|
||||
ChkEstemporal.Checked = drow("esTemporal").ToString() = "1"
|
||||
CHKRFCValidado.Checked = drow("RFCValidado").ToString() = "1"
|
||||
'ChkPensionado.Checked = drow("Pensionado").ToString().ToUpper().Contiene("1", "TRUE")
|
||||
@@ -1909,7 +1913,8 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
End Sub
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Sub CargaCuentasConceptos()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
@@ -115,7 +115,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcelPersonalizado" runat="server"><i style="font-weight:bold" class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcelPSAdicional" runat="server" Visible="false" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Productos Adicionales</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<%--onclick="AbrirVentana('/Ventas/ProductosServicios.aspx', 700, 400, 'N', 'PS')"--%>
|
||||
</asp:Content>
|
||||
@@ -373,7 +375,48 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivCargaExcelPSAdicionales" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Excel</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>Arraste o haga click para subir el archivo Excel</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="text-align: left">
|
||||
<asp:UpdatePanel ID="UpDescargar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnDescargarPSAdicional" runat="server" CssClass="btn btn-warning" Text="Descargar Formato" />
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargarPSAdicional" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="col-md-9" style="text-align: right">
|
||||
<asp:Button ID="BtnCargaExcelPSAdicional" runat="server" CssClass="btn btn-success" Text="Aceptar"></asp:Button>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ Partial Class CatPS
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlEstado.SelectedValue = "-1"
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso Not UsuarioActual.TienePermisoProceso(122) Then
|
||||
LnkExcelPSAdicional.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -65,7 +68,6 @@ Partial Class CatPS
|
||||
If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim
|
||||
If TxtNombre.Text.Trim = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper.Trim
|
||||
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSLite(Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, Codigo, CodigoBarras, Nombre, DdlAplicaVenta.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, DdlCveTipoPS.SelectedValue.ToEntero, DdlTipoClasificacion.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjPS.DtResultados
|
||||
@@ -285,4 +287,158 @@ Partial Class CatPS
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "P R O D U C T O S A D I C I O N A L E S"
|
||||
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, CodigoPS As String, PSAdicional As String, Cantidad As Decimal, Opcion As Integer) As Boolean
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", CodigoPS)).ToEntero
|
||||
Dim CvePSAdicional As Integer
|
||||
|
||||
If Opcion = 1 Then CvePSAdicional = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", PSAdicional)).ToEntero
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If CvePSAdicional <= 0 AndAlso Opcion = 1 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Opcion = 1 Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad) Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If Opcion = 2 Then
|
||||
If Not ObjPS.RemovePSAdicionales(CvePSPagina, -1) Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub LnkExcelPSAdicional_Click(sender As Object, e As EventArgs) Handles LnkExcelPSAdicional.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivCargaExcelPSAdicionales"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargarPSAdicional.Click
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim workbook As New GemBox.Spreadsheet.ExcelFile()
|
||||
Dim worksheet = workbook.Worksheets.Add("Productos")
|
||||
Dim DtExcel As New DataTable
|
||||
DtExcel.Columns.Add("CodigoProducto", GetType(String))
|
||||
DtExcel.Columns.Add("CodigoProductoAdicional", GetType(String))
|
||||
DtExcel.Columns.Add("CantidadFija", GetType(String))
|
||||
|
||||
worksheet.InsertDataTable(DtExcel, New GemBox.Spreadsheet.InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.StartColumn = 0
|
||||
})
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
workbook.Save(Response, $"CargaProductos.xlsx", GemBox.Spreadsheet.SaveOptions.XlsxDefault)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelPSAdicional.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
|
||||
Dim Directorio As String = Server.MapPath("~") & file.path
|
||||
|
||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargaArchivoPSAdicional(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaArchivoPSAdicional(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
|
||||
dt = ReadExcelFile(Ruta + FileName, True, 0).FiltraParametros("CodigoProducto <> ''")
|
||||
|
||||
If Not ErrorArchivo Then
|
||||
If Not dt.Columns(0).ColumnName.ToUpper = "CODIGOPRODUCTO" Then
|
||||
Alert("El nombre de la primera columna debe ser 'ConceptoAdministrativo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(1).ColumnName.ToUpper = "CODIGOPRODUCTOADICIONAL" Then
|
||||
Alert("El nombre de la segunda columna debe ser 'Cuenta'.Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorArchivo Then
|
||||
|
||||
Try
|
||||
Dim ContadorRegistros As Integer = 0
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
ObjPS.IniciaTransacSQL()
|
||||
|
||||
'antes de iniciar la carga se limpiarán los asignados, se filtran por codigops
|
||||
For Each Row As DataRow In dt.FiltraParametros("", DistinctColumns:={"CodigoProducto"}).Rows
|
||||
If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, Row("CodigoProducto").ToString.Trim, "", 0, 2) Then
|
||||
ErrorExcel = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not ErrorExcel Then
|
||||
For Each Row As DataRow In dt.Rows
|
||||
Dim CodigoPS As String = Row("CodigoProducto").ToString
|
||||
Dim CodigoPSAdicional As String = Row("CodigoProductoAdicional").ToString
|
||||
Dim Cantidad As Integer = Row("CantidadFija").ToString.ToEntero
|
||||
If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1) Then
|
||||
ErrorExcel = True
|
||||
Exit For
|
||||
End If
|
||||
ContadorRegistros = ContadorRegistros + 1
|
||||
Next
|
||||
End If
|
||||
If Not ErrorExcel Then
|
||||
ObjPS.Commit()
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
'regenerar el global de cada empresa
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
GlobalDTPSAdicionales(-1, Franquicia) = Nothing
|
||||
Next
|
||||
|
||||
Alert($"{ContadorRegistros} Registros aplicados.")
|
||||
Else
|
||||
ObjPS.RollBack()
|
||||
Alert($"Ocurrió un error al cargar los productos.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("No se pudo cargar el excel", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLog(ex.Message)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -12613,19 +12613,20 @@ Partial Class Ventas
|
||||
' If drr("ImporteIVA").ToString().ToDouble > 0 Then
|
||||
|
||||
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
|
||||
If Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then
|
||||
' si es objimp = 01, significa que no lleva desglose de impuesto, está exento
|
||||
If concepto.ObjetoImpuesto <> "01" AndAlso Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteIEPS").ToString().ToDouble > 0 Then
|
||||
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteIEPS").ToString().ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
|
||||
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
|
||||
If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user