This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-05-11 10:50:12 -07:00
11 changed files with 174 additions and 157 deletions

View File

@@ -182,8 +182,8 @@ Partial Class Bancos_DepositosCaja
End If End If
Dim OcurrioError As Boolean = False Dim OcurrioError As Boolean = False
Dim ObjContabilidad As New ClsContabilidad() Dim ObjConta As New ClsContabilidad()
Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL()) Dim ObjBancos As New ClsBancos(ObjConta.IniciaTransacSQL())
Dim CveIEOrigen As Integer 'CajaChica Dim CveIEOrigen As Integer 'CajaChica
Dim CveIEDestino As Integer 'Banco Dim CveIEDestino As Integer 'Banco
@@ -222,7 +222,7 @@ Partial Class Bancos_DepositosCaja
IdCuentaBancariaDestino = drDestino("IdCtaContable").ToString.ToEntero IdCuentaBancariaDestino = drDestino("IdCtaContable").ToString.ToEntero
End If End If
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
If ChkIntermediario.Checked Then If ChkIntermediario.Checked Then
@@ -232,21 +232,21 @@ Partial Class Bancos_DepositosCaja
CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
OcurrioError = True OcurrioError = True
End If End If
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
OcurrioError = True OcurrioError = True
End If End If
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then
OcurrioError = True OcurrioError = True
End If End If
If IVA <> 0 Then If IVA <> 0 Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -285,13 +285,13 @@ Partial Class Bancos_DepositosCaja
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE) documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE)
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then If ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
If ChkFaltante.Checked Then If ChkFaltante.Checked Then
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
If Comision <> 0 Then If Comision <> 0 Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 78, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 78, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -301,7 +301,7 @@ Partial Class Bancos_DepositosCaja
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -322,7 +322,6 @@ Partial Class Bancos_DepositosCaja
'Datos de las Prepolizas A Cancelar 'Datos de las Prepolizas A Cancelar
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero
Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero
@@ -334,7 +333,7 @@ Partial Class Bancos_DepositosCaja
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -355,11 +354,19 @@ Partial Class Bancos_DepositosCaja
End If End If
If Not OcurrioError AndAlso ObjConta.ValidacionPrePolizaCuadre(NuevaCvePrePoliza, 1) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Bancos/DepositoCaja | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{NuevaCvePrePoliza}", "LogPrePolizas")
OcurrioError = True
End If
End If
If OcurrioError Then If OcurrioError Then
ObjContabilidad.RollBack() ObjConta.RollBack()
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
Else Else
ObjContabilidad.Commit()
ObjConta.Commit()
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza) documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
Alert(documentos.ToString) Alert(documentos.ToString)
@@ -373,7 +380,7 @@ Partial Class Bancos_DepositosCaja
lblValorTotal.Text = "0.0" lblValorTotal.Text = "0.0"
lblValorTotalSeleccionado.Text = "0.0" lblValorTotalSeleccionado.Text = "0.0"
CargaDatos() CargaDatos()
ObjContabilidad.Dispose() ObjConta.Dispose()
End Sub End Sub
Private Sub ObtenerTotalImporta() Private Sub ObtenerTotalImporta()

View File

@@ -732,6 +732,10 @@
</div> </div>
<div class="col-md-6" style="text-align: right!important"> <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" /> <asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
<asp:HiddenField ID="HdnBancoCvePrePoliza" runat="server" />
<asp:HyperLink ID="HplBancosLiga" runat="server" Text="Ver Póliza" CssClass="Texto" Visible="false" />
<asp:Button ID="BtnBancosRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnBancosRemove_Click" class="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="Está seguro de eliminar?" data-btn-ok-label="si" /></div>
</div> </div>
</div> </div>

View File

@@ -314,37 +314,16 @@ Partial Class Bancos_FluctuacionCambiaria
If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 77, UsuarioActual.CveEmpresa) Then If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 77, UsuarioActual.CveEmpresa) Then
Dim DtTemp As DataTable = ObjBancos.DtResultados.Copy Dim DtTemp As DataTable = ObjBancos.DtResultados.Copy
Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal
Dim TotAcumulado As Decimal = ObjBancos.DtResultados.SUMD("Fluctuacion") Dim TotAcumulado As Decimal = ObjBancos.DtResultados.SUMD("Fluctuacion")
'Dim Conta As New ClsContabilidad
'For Each Dr As DataRow In DtTemp.Rows HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
' Dim Total As Decimal = 0 HdnBancoCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
' Dim CveCuentaExtranjera As Integer = Dr("CveCuentaExtranjera").ToString.ToEntero BtnBancosRemove.Visible = HdnBancoCvePrePoliza.Value.ToEntero > 0
' If CveCuentaExtranjera > 0 Then BtnGeneraBancos.Visible = Not HdnBancoCvePrePoliza.Value.ToEntero > 0
' If Conta.GetMovimientosAuxiliaresCatalogo(CveCuentaExtranjera, MinFecha, FechaUltimoDiaMes, 2, -1, -1, UsuarioActual.CveEmpresa, "1") Then
' If Conta.DtResultados.Rows.Count > 1 Then HplBancosLiga.Visible = HdnBancoCvePrePoliza.Value.ToEntero > 0
' Total = Conta.DtResultados.Rows(1)("SaldoActual").ToString.ToDecimal HplBancosLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
' End If
' End If
' End If
' Dr("Saldo") = Total
' Total = Total * TCCierreFluctuacion - Total
' Dim SaldoActualContabilidad As Decimal = 0
' Dim CveCuentaComplementaria As Integer = Dr("CveCuentaComplementaria").ToString.ToEntero
' If CveCuentaComplementaria > 0 Then
' If Conta.GetMovimientosAuxiliaresCatalogo(CveCuentaComplementaria, MinFecha, FechaUltimoDiaMes, 2, -1, -1, UsuarioActual.CveEmpresa, "1") Then
' If Conta.DtResultados.Rows.Count > 1 Then
' SaldoActualContabilidad = Conta.DtResultados.Rows(1)("SaldoActual").ToString.ToDecimal
' End If
' End If
' End If
' Total = Total - SaldoActualContabilidad
' TotAcumulado += Math.Round(Total, 2)
' Dr("Fluctuacion") = Total
'Next
'DtTemp.AcceptChanges()
'Conta.Dispose()
GvCuentas.DataSource = DtTemp GvCuentas.DataSource = DtTemp
LblTotalBancos.Text = TotAcumulado.FormatoNumero LblTotalBancos.Text = TotAcumulado.FormatoNumero
Else Else
@@ -938,8 +917,8 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs)
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL() Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
'Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) 'Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
'ObjContPaq.IniciaTransacSQL() 'ObjContPaq.IniciaTransacSQL()
Dim idCta As Integer = 0 Dim idCta As Integer = 0
@@ -961,6 +940,15 @@ Partial Class Bancos_FluctuacionCambiaria
Dim CveConconceptoBancos As Integer = 204 Dim CveConconceptoBancos As Integer = 204
If HdnCveFluctuacionBitacora.Value.ToEntero <= 0 Then
HdnCveFluctuacionBitacora.Value = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).ToString
If HdnCveFluctuacionBitacora.Value.ToEntero <= 0 Then
ErrorRegistrar = True
End If
End If
'saco las cuentas de pérdida y ganancia 'saco las cuentas de pérdida y ganancia
For Each gvr As GridViewRow In GvCuentas.Rows For Each gvr As GridViewRow In GvCuentas.Rows
Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos") Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos")
@@ -1009,10 +997,16 @@ Partial Class Bancos_FluctuacionCambiaria
If Not ErrorRegistrar Then If Not ErrorRegistrar Then
Conta.Commit() If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
' ObjContPaq.Commit() ErrorRegistrar = True
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion) End If
CargaDatosBancosCuentas()
If Not ErrorRegistrar Then
Conta.Commit()
' ObjContPaq.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
CargaDatosBancosCuentas()
End If
Else Else
Conta.RollBack() Conta.RollBack()
' ObjContPaq.Dispose() ' ObjContPaq.Dispose()
@@ -1429,4 +1423,18 @@ Partial Class Bancos_FluctuacionCambiaria
End If End If
Banco.Dispose() Banco.Dispose()
End Sub End Sub
Protected Sub BtnBancosRemove_Click(sender As Object, e As EventArgs)
Dim Banco As New ClsBancos
Banco.IniciaTransacSQL()
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnBancoCvePrePoliza.Value.ToEntero, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
Banco.Commit()
BtnBancosRemove.Visible = False
Alert("Fluctuación eliminada.")
Else
Banco.RollBack()
End If
Banco.Dispose()
End Sub
End Class End Class

View File

@@ -200,68 +200,81 @@
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable"> <ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
<ContentTemplate> <ContentTemplate>
<h4><b>IVA Acreditable</b></h4>
<asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA <br/>Importación " HtmlEncode="False" DataField="IVAImportacion" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.M." HtmlEncode="False" DataField="RetIVAFletePM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Arrenda." HtmlEncode="False" DataField="RetIVAArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Resico" HtmlEncode="False" DataField="RetISRResico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 6%" DataField="IEPS6" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 7%" DataField="IEPS7" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 9%" DataField="IEPS9" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" />
</Columns>
</asp:GridView>
<div class="row"> <div class="row">
<h4><b>IVA por Porcentaje</b></h4> <h4><b>IVA Acreditable</b></h4>
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"> <asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns> <Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" /> <asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA <br/>Importación " HtmlEncode="False" DataField="IVAImportacion" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.M." HtmlEncode="False" DataField="RetIVAFletePM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Arrenda." HtmlEncode="False" DataField="RetIVAArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Resico" HtmlEncode="False" DataField="RetISRResico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 6%" DataField="IEPS6" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 7%" DataField="IEPS7" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 9%" DataField="IEPS9" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
<div class="row">
<div class="col-md-6">
<h4><b>IVA por Porcentaje</b></h4>
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
<div class="col-md-6" id="divRetIVA" runat="server" visible="false">
<h4><b>Ret IVA</b></h4>
<asp:GridView ID="GvRetIVA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Tipo" DataField="TipoRetIVA" />
<asp:BoundField HeaderText="Base" DataField="BaseRetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Ret IVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>

View File

@@ -65,7 +65,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
TCEspecifico = -1; TCEspecifico = -1;
DateTime FF = DateTime.Now.AddMonths(-1); DateTime FF = DateTime.Now.AddMonths(-1);
txtFechaI.Text = $"01/{FF.Month}/{FF.Year}"; txtFechaI.Text = $"01/{FF.Month}/{FF.Year}";
txtFechaF.Text = FF.ToShortDateString(); txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString();
LnkAccionesDIOT.Visible = true; LnkAccionesDIOT.Visible = true;
@@ -109,13 +109,19 @@ public partial class Contabilidad_RepIVA : ClsPaginas
GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{ {
GvIVA2.DataSource = ObjCont.DtResultados; GvIVA2.DataSource = ObjCont.DtResultados;
} }
if (UsuarioActual.CveEmpresa == 119)
{
divRetIVA.Visible=true;
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 4, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
GvRetIVA.DataSource = ObjCont.DtResultados;
}
}
} }
ObjCont.Dispose(); ObjCont.Dispose();
GvT.DataBind(); GvT.DataBind();
@@ -123,6 +129,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
GvIEPSA.DataBind(); GvIEPSA.DataBind();
GvIVAA.DataBind(); GvIVAA.DataBind();
GvIVA2.DataBind(); GvIVA2.DataBind();
GvRetIVA.DataBind();
UpDatos.Update(); UpDatos.Update();
String Str = "Se Consultó el Reporte de IVA. - " + UsuarioActual.Usuario; String Str = "Se Consultó el Reporte de IVA. - " + UsuarioActual.Usuario;
@@ -162,7 +169,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{ {
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2); Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
if (Math.Abs(dif) > 1) if (Math.Abs(dif) > 1)
{ {
e.Row.ForeColor = System.Drawing.Color.Red; e.Row.ForeColor = System.Drawing.Color.Red;

View File

@@ -855,7 +855,7 @@ Partial Class General_SaldosIniciales
If CvePS > 0 Then If CvePS > 0 Then
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie) Then CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) Then
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, 'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then ' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then
ErrorPS = True ErrorPS = True
@@ -871,7 +871,7 @@ Partial Class General_SaldosIniciales
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie) <= 0 Then CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) <= 0 Then
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
ErrorPS = True ErrorPS = True

View File

@@ -372,12 +372,6 @@ Partial Class Inventarios_EntradasSalidas
Exit Sub Exit Sub
End If End If
If IfNull(Request("AL"), "").ToString = "1" Then
DivEmitirTransitorio.Visible = True
EsApoyoLogistico = True
End If
CveMovimiento = -1 CveMovimiento = -1
CveMovimientoRelacionado = -1 CveMovimientoRelacionado = -1
TieneRelacionado = -1 TieneRelacionado = -1
@@ -403,6 +397,12 @@ Partial Class Inventarios_EntradasSalidas
IndexSeccionAlmacen = 0 IndexSeccionAlmacen = 0
Tipo = 0 Tipo = 0
If IfNull(Request("AL"), "").ToString = "1" Then
DivEmitirTransitorio.Visible = True
EsApoyoLogistico = True
DivCliente.Visible = True
End If
'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos 'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos
Select Case UsuarioActual.Empresa.Funcionalidad(103) Select Case UsuarioActual.Empresa.Funcionalidad(103)
Case "1" Case "1"
@@ -893,14 +893,14 @@ Partial Class Inventarios_EntradasSalidas
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
HplDescargaXml.Visible = True HplDescargaXml.Visible = True
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), "Tra"))) HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"))))
If drM("AplicaCP").ToString = "True" Then If drM("AplicaCP").ToString = "True" Then
HplCartaPorteTimbre.Visible = True HplCartaPorteTimbre.Visible = True
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&CVETIMBRE={1}", CveMovimiento, drM("CveTimbre")))) HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&CVETIMBRE={1}", CveMovimiento, drM("CveTimbre"))))
Else Else
HplDescargaPdf.Visible = True HplDescargaPdf.Visible = True
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}&CVETIMBRE={4}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra", drM("CveTimbre")))) HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}&CVETIMBRE={4}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"), drM("CveTimbre"))))
HplCartaPorte.Visible = True HplCartaPorte.Visible = True
HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento))) HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento)))
@@ -2054,11 +2054,10 @@ Partial Class Inventarios_EntradasSalidas
ErrorMovInv = RetornoVirtual.TieneError ErrorMovInv = RetornoVirtual.TieneError
End If End If
Dim SerieInsertadaTimbre As String = "" Dim SerieInsertadaTimbre As String = ""
Dim FolioInsertadoTimbre As Integer = -1 Dim FolioInsertadoTimbre As Integer = -1
Dim CveTimbre As Integer = -1 Dim CveTimbre As Integer = -1
Dim tTimbreTipoDocto As String = "Tra"
If Not ErrorAC And Not ErrorMovInv Then If Not ErrorAC And Not ErrorMovInv Then
@@ -2075,12 +2074,12 @@ Partial Class Inventarios_EntradasSalidas
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, DdlDireccionEnvio.SelectedValue.ToEntero, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero, Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, DdlDireccionEnvio.SelectedValue.ToEntero, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDateTime, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero,
CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero, CveCliente:=DdlClientes.SelectedValue.ToEntero) CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero, CveCliente:=DdlClientes.SelectedValue.ToEntero)
If EsApoyoLogistico Then tTimbreTipoDocto = "Ent"
If CveEntregaAlmacen > 0 Then If CveEntregaAlmacen > 0 Then
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked) CveTimbre = ObjGral.AddGralTimbre(tTimbreTipoDocto, CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
If CveTimbre > 0 Then If CveTimbre > 0 Then
SerieInsertadaTimbre = ObjGral.SerieInsertada SerieInsertadaTimbre = ObjGral.SerieInsertada
FolioInsertadoTimbre = ObjGral.FolioInsertado FolioInsertadoTimbre = ObjGral.FolioInsertado
@@ -2090,13 +2089,9 @@ Partial Class Inventarios_EntradasSalidas
Else Else
ErrorMovInv = True ErrorMovInv = True
End If End If
End If End If
End If End If
If Not ErrorAC And Not ErrorMovInv Then If Not ErrorAC And Not ErrorMovInv Then
Dim Msg As New StringBuilder Dim Msg As New StringBuilder
@@ -2115,10 +2110,9 @@ Partial Class Inventarios_EntradasSalidas
ObjInventario.Commit() ' aplica los movimientos insertados ObjInventario.Commit() ' aplica los movimientos insertados
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
If ChkEmitirTimbrado.Checked Then If ChkEmitirTimbrado.Checked Then
CveMovimientoTimbrado = CveMovimiento CveMovimientoTimbrado = CveMovimiento
EmitirTimbrado(CveTimbre, CveMovimientoTimbrado, Msg) EmitirTimbrado(CveTimbre, tTimbreTipoDocto, CveMovimientoTimbrado, Msg)
End If End If
Alert(Msg.ToString, TipoMensaje.MsgInformacion) Alert(Msg.ToString, TipoMensaje.MsgInformacion)
@@ -2128,10 +2122,8 @@ Partial Class Inventarios_EntradasSalidas
DdlSubProyecto.SelectedValueExist("-1") DdlSubProyecto.SelectedValueExist("-1")
UPEncabezado.Update() UPEncabezado.Update()
End If End If
UPDatos.Update() UPDatos.Update()
If UsuarioActual.TienePermisoProceso(139) Then If UsuarioActual.TienePermisoProceso(139) Then
CargaDatos(CveMovimiento) CargaDatos(CveMovimiento)
Else Else
@@ -2146,8 +2138,6 @@ Partial Class Inventarios_EntradasSalidas
Alert(Mensaje, TipoMensaje.MsgError) Alert(Mensaje, TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If End If
Else Else
ObjInventario.RollBack() 'deshace lo insertado ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0 CveMovimiento = 0
@@ -2155,14 +2145,10 @@ Partial Class Inventarios_EntradasSalidas
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If End If
End If End If
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
End If End If
Catch ex As Exception Catch ex As Exception
Try 'por si ya le habian dado rollback o commit Try 'por si ya le habian dado rollback o commit
ObjInventario.RollBack() 'deshace lo insertad ObjInventario.RollBack() 'deshace lo insertad
@@ -5933,9 +5919,9 @@ Partial Class Inventarios_EntradasSalidas
End Sub End Sub
Private Sub EmitirTimbrado(CveTimbre As Integer, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder) Private Sub EmitirTimbrado(CveTimbre As Integer, TipoDocto As String, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder)
Dim ObjTimbres As New Timbres("Tra", CveTimbre, UsuarioActual) Dim ObjTimbres As New Timbres(TipoDocto, CveTimbre, UsuarioActual)
MensajeAlert.Append("<br/><br/>") MensajeAlert.Append("<br/><br/>")

View File

@@ -191,15 +191,7 @@
</div> </div>
</div> </div>
</div> </div>
<label class="col-md-1 truncate" style="display: none">Hora:</label>
<div class="col-md-1" style="display: none">
<div style="width: 85px;">
<ew:TimePicker ID="TxtHoraInicio" TimeStyle-CssClass="Texto" runat="server" ControlDisplay="TextBoxImage" CssClass="inputtimepicker" ImageUrl="/Imagenes/timepicker.png" PopupWidth="100px" Width="50px" DisableTextBoxEntry="True" PopupHeight="150px" RoundUpMinutes="True" MilitaryTime="True" Culture="Spanish (Mexico)"></ew:TimePicker>
<ew:CustomValidator ID="CVHoraInicio" runat="server" ClientValidationFunction="RevisaHora" ControlToValidate="TxtHoraInicio" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="Guardar" ValidateEmptyText="true"></ew:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VcoHoraInicio" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraInicio" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate" style="width: 110px" id="DivFolio1" runat="server">Folio:</label> <label class="col-md-1 truncate" style="width: 110px" id="DivFolio1" runat="server">Folio:</label>
<div class="col-md-2" id="DivFolio2" runat="server"> <div class="col-md-2" id="DivFolio2" runat="server">
<asp:TextBox ID="TxtFolio" runat="server" Style="" Width="100%"></asp:TextBox> <asp:TextBox ID="TxtFolio" runat="server" Style="" Width="100%"></asp:TextBox>

View File

@@ -1031,7 +1031,7 @@ Partial Class Inventarios_RecepcionUsados
#Region " AGREGAR - GUARDAR " #Region " AGREGAR - GUARDAR "
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
Dim Inv As New ClsInventarios Dim Inv As New ClsInventarios
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), Now.ToShortTimeString), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
Inv.Dispose() Inv.Dispose()
Return Existencia Return Existencia
End Function End Function
@@ -1240,7 +1240,7 @@ Partial Class Inventarios_RecepcionUsados
If CveMovimiento > 0 Then If CveMovimiento > 0 Then
Else Else
Dim Fecha = String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime).ToDate Dim Fecha = String.Format("{0}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd")).ToDate
Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero)) Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero))
Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero)) Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero))

View File

@@ -1752,7 +1752,7 @@ Partial Class Clientes
TxtExtOtro.Text = ObjClientes.ExtOtros TxtExtOtro.Text = ObjClientes.ExtOtros
If UsuarioActual.CveEmpresa.Contiene(119, 4, 7, 11, 12, 122, 145) Then If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then
If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString() If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString()
If ObjClientes.IdCtaContAnticipos > 0 Then If ObjClientes.IdCtaContAnticipos > 0 Then

View File

@@ -18876,7 +18876,7 @@ Partial Class Ventas
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then If ObjVentas.DtResultados.Rows.Count > 0 Then
TrLineaAdicional.Visible = True TrLineaAdicional.Visible = True
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{Now.ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
End If End If
End If End If
Else Else
@@ -36689,7 +36689,7 @@ Partial Class Ventas
End If End If
Using ObjVentas As New ClsVentas Using ObjVentas As New ClsVentas
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", -1, UsuarioActual.CveEmpresa) Then If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", 1, UsuarioActual.CveEmpresa) Then
Alert("Se actualizó la linea adicional de crédito de la venta") Alert("Se actualizó la linea adicional de crédito de la venta")
End If End If
End Using End Using