This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-09-14 10:19:14 -07:00
18 changed files with 551 additions and 297 deletions

View File

@@ -197,7 +197,9 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row">
<%-- <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<span>Número de Tarjeta:</span> <span>Número de Tarjeta:</span>
</div> </div>
@@ -222,9 +224,7 @@
<asp:CompareValidator ID="CVFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpAgregarTarjeta" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Vencimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator> <asp:CompareValidator ID="CVFechaVencimiento" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpAgregarTarjeta" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Vencimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Cancelacion" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFecha2Cancelacion" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaVencimiento" Width="350px"></ajax:ValidatorCalloutExtender>
<%-- <asp:CompareValidator ID="CVFechaVencimientoMin" runat="server" ControlToCompare="Date.Now" ControlToValidate="TxtFechaVencimiento" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
</div> </div>
@@ -242,13 +242,21 @@
<asp:LinkButton ID="LkbAgregarTarjera" CssClass="Texto" runat="server" ValidationGroup="GrpAgregarTarjeta">Agregar</asp:LinkButton></td> <asp:LinkButton ID="LkbAgregarTarjera" CssClass="Texto" runat="server" ValidationGroup="GrpAgregarTarjeta">Agregar</asp:LinkButton></td>
</div> </div>
</div> </div>
</div> </div>--%>
<div class="row" style="margin-top: 5px;"> <div class="row" style="margin-top: 5px;">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvTarjetas" runat="server" GridLines="None" AutoGenerateColumns="false" CssClass="table table-striped table-hover mysmallbtn" data-height="400px" DataKeyNames="CveCuentaTarjeta, CveCuenta"> <asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField DataField="NumCuenta" HeaderText="Num. Cuenta" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
</Columns>
</asp:GridView>
<%--<asp:GridView ID="GvTarjetas" runat="server" GridLines="None" AutoGenerateColumns="false" CssClass="table table-striped table-hover mysmallbtn" data-height="400px" DataKeyNames="CveCuentaTarjeta, CveCuenta">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@@ -317,7 +325,9 @@
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" /> <AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView> </asp:GridView>--%>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -682,112 +682,124 @@ Partial Class Bancos_CuentasBancariasDetalle
Else Else
DivTarjeta.Visible = False DivTarjeta.Visible = False
End If End If
End Sub End Sub
#End Region #End Region
#Region "D A T O S T A R J E TA - C R E D I T O" #Region "D A T O S T A R J E TA - C R E D I T O"
Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click 'Private Sub LkbAgregarTarjera_Click(sender As Object, e As EventArgs) Handles LkbAgregarTarjera.Click
Dim ObjTarjeta As New ClsBancos() ' Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False ' Dim TieneError = False
If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then ' If Not ObjTarjeta.AddTarjetaCredito(CveCuenta, TxtNumTarjeta.Text, TxtNombreResponsable.Text, TxtFechaVencimiento.Text.ToDate, UsuarioActual.CveUsuario) Then
TieneError = True ' TieneError = True
End If ' End If
If Not TieneError Then ' If Not TieneError Then
Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion) ' Alert("Se guardo la tarjeta de credito correctamente", TipoMensaje.MsgInformacion)
TxtNumTarjeta.Text = "" ' TxtNumTarjeta.Text = ""
TxtNombreResponsable.Text = "" ' TxtNombreResponsable.Text = ""
TxtFechaVencimiento.Text = "" ' TxtFechaVencimiento.Text = ""
CargaDatosTarjeta() ' CargaDatosTarjeta()
Else ' Else
Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError) ' Alert("Ocurrio un Error al Guardar la tarjeta de credito", TipoMensaje.MsgError)
End If ' End If
ObjTarjeta.Dispose() ' ObjTarjeta.Dispose()
UpDatos.Update() ' UpDatos.Update()
End Sub 'End Sub
Private Sub CargaDatosTarjeta() Private Sub CargaDatosTarjeta()
Dim ObjTarjeta As New ClsBancos() 'Dim ObjTarjeta As New ClsBancos()
'If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
' GvTarjetas.DataSource = ObjTarjeta.DtResultados()
'Else
' GvTarjetas.DataSource = Nothing
'End If
'GvTarjetas.DataBind()
'ObjTarjeta.Dispose()
Dim ObjCreditos As New ClsBancos
If ObjCreditos.GetTarjetasCreditos(CveCuenta) Then
If ObjCreditos.DtResultados.Rows.Count > 0 Then
GvTC.DataSource = ObjCreditos.DtResultados
End If
GvTC.Visible = True
End If
ObjCreditos.Dispose()
GvTC.DataBind()
If ObjTarjeta.GetTarjetaCredito(-1, CveCuenta, -1) Then
GvTarjetas.DataSource = ObjTarjeta.DtResultados()
Else
GvTarjetas.DataSource = Nothing
End If
GvTarjetas.DataBind()
ObjTarjeta.Dispose()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing 'Private Sub GvTarjetas_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvTarjetas.RowEditing
GvTarjetas.EditIndex = e.NewEditIndex ' GvTarjetas.EditIndex = e.NewEditIndex
CargaDatosTarjeta() ' CargaDatosTarjeta()
End Sub 'End Sub
Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit 'Private Sub GvTarjetas_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvTarjetas.RowCancelingEdit
GvTarjetas.EditIndex = -1 ' GvTarjetas.EditIndex = -1
CargaDatosTarjeta() ' CargaDatosTarjeta()
End Sub 'End Sub
Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating 'Private Sub GvTarjetas_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvTarjetas.RowUpdating
Dim ObjTarjeta As New ClsBancos() ' Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False ' Dim TieneError = False
Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero ' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero ' Dim CveCuenta As Integer = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuenta").ToEntero
Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim ' Dim Numero = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtNumeroEdit"), TextBox).Text.Trim
Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim ' Dim Responsable = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtResponsableEdit"), TextBox).Text.Trim
Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate ' Dim Vencimiento = DirectCast(GvTarjetas.Rows(e.RowIndex).FindControl("TxtFechaVencimientoEdit"), TextBox).Text.ToDate
If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then ' If Not ObjTarjeta.UpdateTarjetaCredito(CveCuentaTarjeta, CveCuenta, Numero, Responsable, Vencimiento, UsuarioActual.CveUsuario) Then
TieneError = True ' TieneError = True
Else ' Else
GvTarjetas.EditIndex = -1 ' GvTarjetas.EditIndex = -1
End If ' End If
If Not TieneError Then ' If Not TieneError Then
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
CargaDatosTarjeta() ' CargaDatosTarjeta()
Else ' Else
Alert("Error al actualizar los cambios.", TipoMensaje.MsgError) ' Alert("Error al actualizar los cambios.", TipoMensaje.MsgError)
End If ' End If
ObjTarjeta.Dispose() ' ObjTarjeta.Dispose()
UpDatos.Update() ' UpDatos.Update()
End Sub 'End Sub
Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting 'Private Sub GvTarjetas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvTarjetas.RowDeleting
Dim ObjTarjeta As New ClsBancos() ' Dim ObjTarjeta As New ClsBancos()
Dim TieneError = False ' Dim TieneError = False
Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero ' Dim CveCuentaTarjeta = GvTarjetas.Rows(e.RowIndex).DataKey("CveCuentaTarjeta").ToEntero
If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then ' If ObjTarjeta.RemoveTarjetaCredito(CveCuentaTarjeta, UsuarioActual.CveUsuario) Then
CargaDatosTarjeta() ' CargaDatosTarjeta()
Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion) ' Alert("Se eliminaron datos correctamente", TipoMensaje.MsgInformacion)
Else ' Else
Alert("Error al eliminar", TipoMensaje.MsgError) ' Alert("Error al eliminar", TipoMensaje.MsgError)
End If ' End If
ObjTarjeta.Dispose() ' ObjTarjeta.Dispose()
UpDatos.Update() ' UpDatos.Update()
End Sub 'End Sub
Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound 'Private Sub GvTarjetas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTarjetas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then ' If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then ' If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(100) ' e.Row.Cells(0).Width = Unit.Pixel(100)
e.Row.Cells(1).Width = Unit.Pixel(100) ' e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(200) ' e.Row.Cells(2).Width = Unit.Pixel(200)
e.Row.Cells(3).Width = Unit.Pixel(20) ' e.Row.Cells(3).Width = Unit.Pixel(20)
e.Row.Cells(4).Width = Unit.Pixel(20) ' e.Row.Cells(4).Width = Unit.Pixel(20)
End If ' End If
End If ' End If
End Sub 'End Sub
Private Function CargarDdlUsuarios(UsuariosGlobal As DataTable) As DataTable Private Function CargarDdlUsuarios(UsuariosGlobal As DataTable) As DataTable
Dim tablaUsuariosFormateada As DataTable = New DataTable("Usuarios") Dim tablaUsuariosFormateada As DataTable = New DataTable("Usuarios")

View File

@@ -734,11 +734,11 @@
<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:HiddenField ID="HdnBancoCvePrePoliza" runat="server" />
<asp:HyperLink ID="HplBancosLiga" runat="server" Text="Ver Póliza" CssClass="Texto" Visible="false" /> <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> <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>
<br /> <br />
<asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvCuentas" Width="99%" runat="server" AutoGenerateColumns="False"
@@ -787,7 +787,7 @@
<i></i> <i></i>
</div> </div>
<div class="col-md-6" style="text-align: right!important"> <div class="col-md-5" style="text-align: right!important">
<asp:HiddenField ID="HdnAcreedoresDiversosCvePrePoliza" runat="server" /> <asp:HiddenField ID="HdnAcreedoresDiversosCvePrePoliza" runat="server" />
<asp:HyperLink ID="HplAcreedoresDiversosPoliza" runat="server" Text="Ver Póliza" CssClass="Texto" Visible="false" /> <asp:HyperLink ID="HplAcreedoresDiversosPoliza" runat="server" Text="Ver Póliza" CssClass="Texto" Visible="false" />
<asp:Button ID="BtnAcreedoresDiversosRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresDiversosRemove_Click" class="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="Está seguro de eliminar?" data-btn-ok-label="si" /> <asp:Button ID="BtnAcreedoresDiversosRemove" runat="server" Text="Eliminar" Visible="false" OnClick="BtnAcreedoresDiversosRemove_Click" class="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="Está seguro de eliminar?" data-btn-ok-label="si" />
@@ -797,9 +797,7 @@
</div> </div>
<br /> <br />
<div style="float: right; margin-right: 50px;">
</div>
<asp:GridView ID="GvAcreedorDiversos" Width="99%" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvAcreedorDiversos" Width="99%" runat="server" AutoGenerateColumns="False"
DataKeyNames="TipoCambio,Fluctuacion,RazonSocial,CveProveedor" DataKeyNames="TipoCambio,Fluctuacion,RazonSocial,CveProveedor"
EmptyDataText="No se Encontraron" ToolTip="" EmptyDataText="No se Encontraron" ToolTip=""

View File

@@ -51,15 +51,15 @@ Partial Class Bancos_FluctuacionCambiaria
'Año Anterior 'Año Anterior
DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(-1).Year.ToString())) DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(-1).Year.ToString()))
For i = 1 To 12 For i As Integer = 1 To 12
Dim fecha = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1) Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1)
Dim mes = fecha.ToString("MMMM", CultureInfo.GetCultureInfo("es-MX")) Dim mes As String = fecha.ToString("MMMM", CultureInfo.GetCultureInfo("es-MX"))
Dim mesStr = Char.ToUpper(mes(0)) + mes.Substring(1) Dim mesStr As String = Char.ToUpper(mes(0)) + mes.Substring(1)
DdlMes.Items.Add(New ListItem(mesStr, i.ToString())) DdlMes.Items.Add(New ListItem(mesStr, i.ToString()))
Next Next
Dim UltimaFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now)
If UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion IsNot Nothing Then
DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month)
DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year)
@@ -86,7 +86,6 @@ Partial Class Bancos_FluctuacionCambiaria
UpTabs.Update() UpTabs.Update()
End Sub End Sub
Private Sub CargaTipoCambio() Private Sub CargaTipoCambio()
Dim ObjGenerales As New ClsGenerales Dim ObjGenerales As New ClsGenerales
ObjGenerales.GetTipoCambio(-1, FechaUltimoDiaMes) ObjGenerales.GetTipoCambio(-1, FechaUltimoDiaMes)
@@ -99,7 +98,6 @@ Partial Class Bancos_FluctuacionCambiaria
Private Sub CargaUltimaFluctuacion() Private Sub CargaUltimaFluctuacion()
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now)
If UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion IsNot Nothing Then
@@ -1067,7 +1065,7 @@ Partial Class Bancos_FluctuacionCambiaria
'TotalAcumulado = GvAcreedorDiversos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) Convert.ToDecimal(GvAcreedorDiversos.DataKeys(gvr.RowIndex)("Fluctuacion"))) 'TotalAcumulado = GvAcreedorDiversos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) Convert.ToDecimal(GvAcreedorDiversos.DataKeys(gvr.RowIndex)("Fluctuacion")))
If TotalAcumulado < 0 Then If TotalAcumulado > 0 Then
CveConceptoContable = 64 : TipoMovto = True CveConceptoContable = 64 : TipoMovto = True
Else Else
CveConceptoContable = 65 : TipoMovto = False CveConceptoContable = 65 : TipoMovto = False
@@ -1087,7 +1085,7 @@ Partial Class Bancos_FluctuacionCambiaria
Next Next
If Not ErrorRegistrar Then If Not ErrorRegistrar Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(TotalAcumulado), Math.Abs(TotalAcumulado), CveConceptoContable, ConceptoFluctuacion, ConceptoFluctuacion, CveSubProyecto:=DdlSubProyectoAcreedoresDiversos.SelectedValue.ToEntero) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Math.Abs(TotalAcumulado), Math.Abs(TotalAcumulado), CveConceptoContable, ConceptoFluctuacion, ConceptoFluctuacion, CveSubProyecto:=DdlSubProyectoAcreedoresDiversos.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
End If End If

View File

@@ -181,6 +181,7 @@
<div> <div>
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None"> <asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right"> <asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
@@ -202,6 +203,7 @@
<AlternatingRowStyle CssClass="TextoAlterno" /> <AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" Height="50px" /> <HeaderStyle CssClass="Titulos" Height="50px" />
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>

View File

@@ -380,7 +380,6 @@ Partial Class Bancos_Transferencias
Exit For Exit For
Else Else
AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino) AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino)
'FolioDestino = (FolioDestino.ToLong + 1).ToString
End If End If
Next Next
@@ -407,7 +406,6 @@ Partial Class Bancos_Transferencias
End If End If
End If End If
If MsgError = "" Then If MsgError = "" Then
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
If ObjMov.ValorPolizaDescuadre > 0 Then If ObjMov.ValorPolizaDescuadre > 0 Then
@@ -419,9 +417,6 @@ Partial Class Bancos_Transferencias
End If End If
End If End If
If MsgError = "" Then If MsgError = "" Then
'Conta ContPAQ 'Conta ContPAQ

View File

@@ -729,7 +729,7 @@
</asp:Panel> </asp:Panel>
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat,TipoAF,CveCultivoCuadroDetalle" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn" > <asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat,TipoAF,CveCultivoCuadroDetalle,CveTipoPS" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn" >
<Columns> <Columns>
<%-- 0 --%> <%-- 0 --%>
<asp:TemplateField ItemStyle-Width="15px"> <asp:TemplateField ItemStyle-Width="15px">
@@ -2863,7 +2863,7 @@
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control" runat="server" /> <asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" runat="server" />
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="10%" /> <ItemStyle HorizontalAlign="Center" Width="10%" />
@@ -4886,7 +4886,7 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="Cantidad"> <asp:TemplateField HeaderText="Cantidad">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" runat="server" /> <asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" Height="24px" runat="server" />
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="10%" /> <ItemStyle HorizontalAlign="Center" Width="10%" />

View File

@@ -10,7 +10,8 @@ Imports System.Threading.Tasks
Imports Newtonsoft.Json Imports Newtonsoft.Json
Imports Extensiones Imports Extensiones
Imports MoreLinq Imports MoreLinq
Imports Profact.TimbraCFDI40
Partial Class Compras_Compras Partial Class Compras_Compras
@@ -3916,6 +3917,7 @@ Partial Class Compras_Compras
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
'------------------ INICIA VALIDACIONES ------------------ '------------------ INICIA VALIDACIONES ------------------
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal() Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
@@ -4370,14 +4372,35 @@ Partial Class Compras_Compras
Exit Sub Exit Sub
End If End If
'If DdlFolioGarantia.Visible AndAlso DdlFolioGarantia.SelectedValue <> "-1" Then
' If Not ValidaFolioGarantia() Then Exit Sub
'End If
'------------------TERMINA VALIDACIONES------------------ '------------------TERMINA VALIDACIONES------------------
Dim EntradaComoGastoConAlmacen As Boolean = False
If GvInv.Rows.Count > 0 AndAlso GvInv.HeaderRow.FCCheckBox("cbAll").Checked Then
Dim CvealamcenSeleccionado As Integer = -1
For Each GvRow As GridViewRow In GvInv.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
CvealamcenSeleccionado = GvRow.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero
If CvealamcenSeleccionado > 0 Then
Exit For
End If
End If
Next
If CvealamcenSeleccionado > 0 Then
Dim ModalidadAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CvealamcenSeleccionado).FiltroPrimeroValor("Modalidad").ToEntero
If ModalidadAlmacen = 0 Then
EntradaComoGastoConAlmacen = True
End If
End If
End If
'si hay necesidad de actualizar el globaldtps 'si hay necesidad de actualizar el globaldtps
If RegeneraPS Then If RegeneraPS Then
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
@@ -4605,8 +4628,8 @@ Partial Class Compras_Compras
CveConceptoContableAlmacen = HdnRefacturacionConcepto.Value.ToEntero CveConceptoContableAlmacen = HdnRefacturacionConcepto.Value.ToEntero
End If End If
End If End If
'se activa que es un importación en la compra, para que se afecten los conceptos de iva correspondientes 'se activa que es un importación en la compra, para que se afecten los conceptos de iva correspondientes, solo se manejará el iva de importación en RFC extranjeros
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveImportacion > 0 Then If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveImportacion > 0 AndAlso RFCProveedor = "XEXX010101000" Then
chkImportacion.Checked = True : EsImportacion = True chkImportacion.Checked = True : EsImportacion = True
End If End If
@@ -5178,7 +5201,7 @@ Partial Class Compras_Compras
Dim indice As Integer = 0 Dim indice As Integer = 0
Dim importeconcepto As Decimal = 0 Dim importeconcepto As Decimal = 0
Dim listalmacenes = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList Dim listalmacenes As List(Of Integer) = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList
For Each tcvealmacen As Integer In listalmacenes For Each tcvealmacen As Integer In listalmacenes
If GvInv.Rows(indice).FCDropDownList("ddlrecibirinv").SelectedValue = "1" Then If GvInv.Rows(indice).FCDropDownList("ddlrecibirinv").SelectedValue = "1" Then
@@ -5208,7 +5231,6 @@ Partial Class Compras_Compras
End If End If
End If End If
Next Next
End If End If
'agregamos la salida 'agregamos la salida
@@ -5227,7 +5249,6 @@ Partial Class Compras_Compras
Next Next
End If End If
End If End If
Next Next
End If End If
@@ -5608,7 +5629,7 @@ Partial Class Compras_Compras
'Creditos/Documentos (59) 'Creditos/Documentos (59)
Dim importeCreditos As Decimal = 0 Dim importeCreditos As Decimal = 0
Dim CveIECreditos = -1 Dim CveIECreditos As Integer = -1
If RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue = "3" AndAlso DdlTipoCredito.SelectedValue.ToEntero = 2 Then If RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue = "3" AndAlso DdlTipoCredito.SelectedValue.ToEntero = 2 Then
If ObjIE.GetCreditosDetalle(DdlCredito.SelectedValue.ToEntero, -1) Then If ObjIE.GetCreditosDetalle(DdlCredito.SelectedValue.ToEntero, -1) Then
CveIECreditos = ObjIE.DtResultados.FiltroPrimero($"CveCreditoDetalle = {DdlCreditoDetalle.SelectedValue.ToEntero}")("CveIE").ToString.ToEntero CveIECreditos = ObjIE.DtResultados.FiltroPrimero($"CveCreditoDetalle = {DdlCreditoDetalle.SelectedValue.ToEntero}")("CveIE").ToString.ToEntero
@@ -6020,10 +6041,14 @@ Partial Class Compras_Compras
If DdlTipoCompra.SelectedValue <> "10" Then If DdlTipoCompra.SelectedValue <> "10" Then
For Each Dr As DataRow In DT.Rows For Each Dr As DataRow In DT.Rows
If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then
Dr("CveAlmacen") = 0 If Not EntradaComoGastoConAlmacen Then
Dr("CveAlmacen") = 0
End If
AlmacenSoloExistencia = True AlmacenSoloExistencia = True
End If End If
Dr.AcceptChanges() Dr.AcceptChanges()
Next Next
End If End If
@@ -6032,6 +6057,8 @@ Partial Class Compras_Compras
DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0") DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0")
If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
'SI ES GASTO CON ALMACEN 'SI ES GASTO CON ALMACEN
If DdlTipoCompra.SelectedValue = "10" Then If DdlTipoCompra.SelectedValue = "10" Then
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows
@@ -6050,18 +6077,44 @@ Partial Class Compras_Compras
For Each Row2 As DataRow In DT.Rows For Each Row2 As DataRow In DT.Rows
Dim ContabilizableAlmacen As Boolean = If(EntradaComoGastoConAlmacen Or DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal
importeMN = importeMovimiento * tipoCambioActual * Multiplicador importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If importeMN <> 0 Then If importeMN <> 0 Then
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 68, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then If (TxtFecha.Text <> Now.ToString("dd/MM/yyyy")) And Not EntradaComoGastoConAlmacen Then
ErrorPrepoliza = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
ErrorPrepoliza = True
End If
Dim CvePrePoliza2Almacen As Integer = ObjConta.AddPrePolizas("Compras/Registrar/Almacen", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, Now, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
If CvePrePoliza2Almacen > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, True, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
ErrorPrepoliza = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, False, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 68, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
Else
'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 68, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
ErrorPrepoliza = True
End If
End If End If
'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95 'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95
If DdlTipoCompra.SelectedValue = "10" Then If DdlTipoCompra.SelectedValue = "10" Or EntradaComoGastoConAlmacen Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 95, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 95, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
@@ -6093,7 +6146,7 @@ Partial Class Compras_Compras
Dim UsaComplementariaFleteImportaciones As Boolean = False Dim UsaComplementariaFleteImportaciones As Boolean = False
'DEBE METER EL CONCEPTO DE COMPRAS SI EL TIPO ES GASTO CON ALMACEN 'DEBE METER EL CONCEPTO DE COMPRAS SI EL TIPO ES GASTO CON ALMACEN
If DdlTipoCompra.SelectedValue = "10" Then If DdlTipoCompra.SelectedValue = "10" Or EntradaComoGastoConAlmacen Then
ConceptoContabilizacion = 6 ConceptoContabilizacion = 6
End If End If
@@ -6585,82 +6638,71 @@ Partial Class Compras_Compras
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
GuardoConcepto18 = True GuardoConcepto18 = True
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then
'PROVISION de NC 'If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, DdlMoneda.SelectedValue.ToEntero, False, CveTipoConcepto)
'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False)
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, importeMovimiento, ConPreP.CveConcepto, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then 'PROVISION de NC
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, DdlMoneda.SelectedValue.ToEntero, False, CveTipoConcepto)
'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False)
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, importeMovimiento, ConPreP.CveConcepto, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
If DdlMoneda.SelectedValue.ToEntero >= 2 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, importeMN - importeMovimiento, ConPreP.CveConceptoComplementario, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, importeMN - importeMovimiento, ConPreP.CveConceptoComplementario, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit Select Exit Select
End If End If
Else
ErrorPrepoliza = True
Exit Select
End If End If
'AMORTIZACIÓN EN EL REGISTRO
For Each Gvr As GridViewRow In GvFacturaNC.Rows
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
Dim importeMovimientoNC As Decimal = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim Pago As New CompraPago
Pago.ImportePago = importeMovimientoNC
Pago.CveMonedaPago = CompraActual.CveMoneda
Pago.CveCompraAmortizacion = CompraActual.CveCompra
Pago.Referencia = CompraActual.SerieFolio
Pago.TCPago = CompraActual.TC
Pago.AplicaAcreditable = False
Pago.TipoPago = "NC"
Pago.Fecha = CompraActual.Fecha 'toma la misma fecha de la provisión en el pago de NC
Dim CompraPago As New Compra
'datos de la compra tipodocto:Fac, para sobreescribirlos
CompraPago.CveCompra = Gvr.DataKey("CveCompra").ToEntero
CompraPago.CveProveedor = Gvr.DataKey("CveProveedor").ToEntero
CompraPago.SerieFolio = Gvr.DataKey("SerieFolio")
CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal
CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate
CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero
CompraPago.Total = Gvr.DataKey("Total").ToDecimal
CompraPago.CveTipoConceptoProveedor = Gvr.DataKey("CveTipoConcepto").ToEntero
CompraPago.CveSubProyecto = CompraActual.CveSubProyecto
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraPago, Pago, CvePrePoliza, ObjConta)
If ErrorPrepoliza Then
Exit For
End If
End If
Next
If ErrorPrepoliza Then
ErrorMovtosCxP = True
Exit Select
End If
Else Else
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, importeMN, ConceptoContable, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True
For Each Gvr As GridViewRow In GvFacturaNC.Rows Exit Select
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
'Dim CvePrePolizaTemp = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
Dim importeMovimientoNC As Decimal = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim importeMNNC As Decimal = importeMovimientoNC * tipoCambioActual * Multiplicador
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimientoNC, importeMNNC, 272, Referencia, Concepto, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), CveCompraAmortizacion:=CveCompra, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimientoNC, importeMNNC, 60, Referencia, Concepto, CveCompra:=CveCompra, CveCompraAmortizacion:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimientoNC), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
Else
ErrorPrepoliza = True
End If
'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp)
End If
Next
End If
End If End If
End If
'AMORTIZACIÓN EN EL REGISTRO
For Each Gvr As GridViewRow In GvFacturaNC.Rows
If Gvr.FCCheckBox("ChkFacturaNC").Checked Then
Dim importeMovimientoNC As Decimal = Gvr.FCTextBox("TxtImporte").Text.ToDecimal
Dim Pago As New CompraPago
Pago.ImportePago = importeMovimientoNC
Pago.CveMonedaPago = CompraActual.CveMoneda
Pago.CveCompraAmortizacion = CompraActual.CveCompra
Pago.Referencia = CompraActual.SerieFolio
Pago.TCPago = CompraActual.TC
Pago.AplicaAcreditable = False
Pago.TipoPago = "NC"
Pago.Fecha = CompraActual.Fecha 'toma la misma fecha de la provisión en el pago de NC
Dim CompraPago As New Compra
'datos de la compra tipodocto:Fac, para sobreescribirlos
CompraPago.CveCompra = Gvr.DataKey("CveCompra").ToEntero
CompraPago.CveProveedor = Gvr.DataKey("CveProveedor").ToEntero
CompraPago.SerieFolio = Gvr.DataKey("SerieFolio")
CompraPago.TC = Gvr.DataKey("TipoCambio").ToDecimal
CompraPago.Fecha = Gvr.DataKey("Fecha").ToDate
CompraPago.CveMoneda = Gvr.DataKey("CveMoneda").ToEntero
CompraPago.Total = Gvr.DataKey("Total").ToDecimal
CompraPago.CveTipoConceptoProveedor = Gvr.DataKey("CveTipoConcepto").ToEntero
CompraPago.CveSubProyecto = CompraActual.CveSubProyecto
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraPago, Pago, CvePrePoliza, ObjConta)
If ErrorPrepoliza Then
Exit For
End If
End If
Next
If ErrorPrepoliza Then
ErrorMovtosCxP = True
Exit Select
End If
End If
importeMovimiento = 0 importeMovimiento = 0
Case 29 'Funcionarios y Empleados Case 29 'Funcionarios y Empleados
@@ -7000,7 +7042,7 @@ Partial Class Compras_Compras
Dim ArrayCveEstatusOC As String() = HdnCveEstatusOC.Value.Split(New Char() {","c}) Dim ArrayCveEstatusOC As String() = HdnCveEstatusOC.Value.Split(New Char() {","c})
If ArrayCveEstatusOC.Count = ArrayCveOC.Count Then If ArrayCveEstatusOC.Count = ArrayCveOC.Count Then
For i = 0 To ArrayCveEstatusOC.Count - 1 For i As Integer = 0 To ArrayCveEstatusOC.Count - 1
If Not ObjOC.UpdateOrdenCompraCompletada(ArrayCveEstatusOC(i).ToEntero, ArrayCveOC(i).ToEntero, UsuarioActual.CveUsuario, "Se vinculó Compra", CveCompra) Then If Not ObjOC.UpdateOrdenCompraCompletada(ArrayCveEstatusOC(i).ToEntero, ArrayCveOC(i).ToEntero, UsuarioActual.CveUsuario, "Se vinculó Compra", CveCompra) Then
ErrorOC = True ErrorOC = True
Exit For Exit For
@@ -7346,8 +7388,7 @@ Partial Class Compras_Compras
Dim CveSubProyectoActual As Integer = dRow("CveSubProyecto").ToString.ToEntero Dim CveSubProyectoActual As Integer = dRow("CveSubProyecto").ToString.ToEntero
If CveSubProyectoActual > 0 Then If CveSubProyectoActual > 0 Then
Dim nRow As DataRow = DTSubProyectoPrincipal.NewRow
Dim nRow = DTSubProyectoPrincipal.NewRow
nRow("CveSubProyecto") = dRow("CveSubProyecto").ToString.ToEntero nRow("CveSubProyecto") = dRow("CveSubProyecto").ToString.ToEntero
nRow("Total") = TmpDT.SUMD("Total", $"CveSubProyecto={CveSubProyectoActual}") nRow("Total") = TmpDT.SUMD("Total", $"CveSubProyecto={CveSubProyectoActual}")
DTSubProyectoPrincipal.Rows.Add(nRow) DTSubProyectoPrincipal.Rows.Add(nRow)
@@ -8004,6 +8045,14 @@ Partial Class Compras_Compras
End If End If
If ErrorMovtosCxP = 0 AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePolizaNueva, UsuarioActual) Then
ErrorMovtosCxP = 1
'If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' ErrorPrepolizaDescuadre = True
'End If
End If
Select Case ErrorMovtosCxP Select Case ErrorMovtosCxP
Case 0 Case 0
@@ -8418,9 +8467,9 @@ Partial Class Compras_Compras
ElseIf grp.CveActivoFijo > 0 Then ElseIf grp.CveActivoFijo > 0 Then
Dim CtaAF = -1 Dim CtaAF As Integer = -1
Dim AF = "" Dim AF As String = ""
Dim CuentaInicial = -1 Dim CuentaInicial As Integer = -1
If ObjAF.GetActivosFijos(grp.CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then If ObjAF.GetActivosFijos(grp.CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then
CtaAF = ObjAF.Cuenta CtaAF = ObjAF.Cuenta
@@ -8442,7 +8491,7 @@ Partial Class Compras_Compras
If drCuenta IsNot Nothing Then If drCuenta IsNot Nothing Then
CuentaAbono = drCuenta("Id").ToString.ToEntero CuentaAbono = drCuenta("Id").ToString.ToEntero
Dim FolioAF = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString Dim FolioAF As String = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString
CtaAF = ObjContaAC.AddCuenta(String.Format("0{0}{1}000000000", CuentaInicial, FolioAF.PadLeft(4, "0"c)), AF, "A", 2, 0, 1, 0, "", 1, CuentaAbono) CtaAF = ObjContaAC.AddCuenta(String.Format("0{0}{1}000000000", CuentaInicial, FolioAF.PadLeft(4, "0"c)), AF, "A", 2, 0, 1, 0, "", 1, CuentaAbono)
ObjAF.UpdateActivosFijosCuentaAC(grp.CveActivoFijo, CtaAF, UsuarioActual.CveUsuario) ObjAF.UpdateActivosFijosCuentaAC(grp.CveActivoFijo, CtaAF, UsuarioActual.CveUsuario)
@@ -8752,7 +8801,9 @@ Partial Class Compras_Compras
Dim NumRow As Integer = 0 Dim NumRow As Integer = 0
For Each row1 As DataRow In TmpDT.Rows For Each row1 As DataRow In TmpDT.Rows
Dim NumRow2 As Integer = 0 Dim NumRow2 As Integer = 0
For Each row2 As DataRow In TmpDTOriginal.Rows For Each row2 As DataRow In TmpDTOriginal.Rows
If NumRow2 = NumRow Then If NumRow2 = NumRow Then
If (row1("CveSubProyecto").ToString.ToEntero <> row2("CveSubProyecto").ToString.ToEntero) Or If (row1("CveSubProyecto").ToString.ToEntero <> row2("CveSubProyecto").ToString.ToEntero) Or
(row1("CveClasificacion").ToString.ToEntero <> row2("CveClasificacion").ToString.ToEntero) Or (row1("CveClasificacion").ToString.ToEntero <> row2("CveClasificacion").ToString.ToEntero) Or
@@ -8769,9 +8820,24 @@ Partial Class Compras_Compras
End If End If
NumRow2 += 1 NumRow2 += 1
Next Next
Dim CvePersonal As Integer = 0
If NumRow < GvPersonal.Rows.Count Then
CvePersonal = GvPersonal.Rows(NumRow).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
If CvePersonal = -1 Then
CvePersonal = 0
End If
End If
If row1("CvePersonal").ToString.ToEntero <> CvePersonal Then
Return False
End If
NumRow += 1 NumRow += 1
Next Next
Return True Return True
End Function End Function
Private Function ActualizarPrePoliza(ObjConta As ClsContabilidad, ObjCompra As ClsCompras) As Boolean Private Function ActualizarPrePoliza(ObjConta As ClsContabilidad, ObjCompra As ClsCompras) As Boolean
@@ -14542,12 +14608,11 @@ Partial Class Compras_Compras
End Sub End Sub
Protected Sub BtnAlertaPUCero_Click(sender As Object, e As EventArgs) Protected Sub BtnAlertaPUCero_Click(sender As Object, e As EventArgs)
Dim Argumentos = HdnAlertaPUCero.Value.Split("|"c) Dim Argumentos As String() = HdnAlertaPUCero.Value.Split("|"c)
Dim PS = Argumentos(0) Dim PS As String = Argumentos(0)
Dim Cantidad = Argumentos(1) Dim Cantidad As String = Argumentos(1)
'Alert($"El concepto tiene especificada una cantidad pero con costo de cero ($0).<br/<> br /<> b > En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia) 'Alert($"El concepto tiene especificada una cantidad pero con costo de cero ($0).<br/<> br /<> b > En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia)
Alert($"El concepto <b>{PS}</b> tiene especificada la cantidad <b>{Cantidad}</b> pero un costo de cero ($0). <br/><br/> <b>En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia) Alert($"El concepto <b>{PS}</b> tiene especificada la cantidad <b>{Cantidad}</b> pero un costo de cero ($0). <br/><br/> <b>En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia)
End Sub End Sub
#End Region #End Region
@@ -15978,6 +16043,16 @@ Partial Class Compras_Compras
TxtIEPSModal.Text = "" TxtIEPSModal.Text = ""
TxtDescuentoModal.Text = "" TxtDescuentoModal.Text = ""
TxtCantidad.Enabled = True
DdlClasificacion.Enabled = True
DdlPS.Enabled = True
DdlPS.ddlWS.Disabled = False
ddlUM.Enabled = True
TxtPrecio.Enabled = True
TxtDescuentoModal.Enabled = True
DdlIVA.Enabled = True
DivAddProductoAliasPS.Visible = False DivAddProductoAliasPS.Visible = False
LbAgregar.Text = "Agregar" LbAgregar.Text = "Agregar"
@@ -15989,6 +16064,8 @@ Partial Class Compras_Compras
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Con = GvRow.DataKey("Consec").ToEntero Con = GvRow.DataKey("Consec").ToEntero
Index = Con Index = Con
@@ -16106,8 +16183,33 @@ Partial Class Compras_Compras
divIVA.Visible = True divIVA.Visible = True
If GvInvMov.Rows.Count > 0 AndAlso GvRow.DataKey("CveTipoPS").ToEntero = 2 Then
TxtCantidad.Enabled = False
DdlClasificacion.Enabled = False
DdlPS.Enabled = False
DdlPS.ddl.Enabled = False
DdlPS.ddlWS.Disabled = True
ddlUM.Enabled = False
TxtPrecio.Enabled = False
TxtDescuentoModal.Enabled = False
DdlIVA.Enabled = False
Else
TxtCantidad.Enabled = True
DdlClasificacion.Enabled = True
DdlPS.Enabled = True
DdlPS.ddlWS.Disabled = False
ddlUM.Enabled = True
TxtPrecio.Enabled = True
TxtDescuentoModal.Enabled = True
DdlIVA.Enabled = True
End If
UpPSS.Update() UpPSS.Update()
RegistraScript("$('#divAddProducto').modal('show');") RegistraScript("$('#divAddProducto').modal('show');")
End Sub End Sub
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
DdlClasificacionChange() DdlClasificacionChange()
@@ -17747,32 +17849,19 @@ Partial Class Compras_Compras
End Sub End Sub
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs) Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
' se comenta RMF.2023/09/08, genera negativos en el rep recibir oc
'Dim ObjCompras As New ClsCompras 'Dim i As Integer = 0
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL) 'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
'Dim TieneError = False ' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
Dim i As Integer = 0 ' If i < TmpDT.Rows.Count Then
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows ' TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle")
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then ' End If
If i < TmpDT.Rows.Count Then ' 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle") ' ' TieneError = True
End If ' ' Exit For
'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then ' 'End If
' TieneError = True ' End If
' Exit For 'Next
'End If
End If
Next
'If Not TieneError Then
' Alert("Se guardo la devolución correctamente", TipoMensaje.MsgInformacion)
' ObjCompras.Commit()
'Else
' Alert("Ocurrió un error al guardar la devolución", TipoMensaje.MsgError)
' ObjCompras.RollBack()
'End If
'ObjCompras.Dispose()
RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv") RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv")
End Sub End Sub
@@ -19878,27 +19967,18 @@ Partial Class Compras_Compras
#End Region #End Region
Protected Sub BtnCancelarCompra_Click(sender As Object, e As EventArgs) Protected Sub BtnCancelarCompra_Click(sender As Object, e As EventArgs)
Dim objCompras As New ClsCompras Dim objCompras As New ClsCompras
If objCompras.GetFechaCancelacionMovimiento(CveCompra:=CveCompra, CveEmpresa:=UsuarioActual.CveEmpresa) Then If objCompras.GetFechaCancelacionMovimiento(CveCompra:=CveCompra, CveEmpresa:=UsuarioActual.CveEmpresa) Then
FechaCancelacionMovimiento = objCompras.FechaCancelacionMovto FechaCancelacionMovimiento = objCompras.FechaCancelacionMovto
Else Else
FechaCancelacionMovimiento = MinFecha FechaCancelacionMovimiento = MinFecha
End If End If
TxtFechaCancelacion.Text = TxtFecha.Text TxtFechaCancelacion.Text = TxtFecha.Text
objCompras.Dispose() objCompras.Dispose()
UpCancelarCompra.Update() UpCancelarCompra.Update()
RegistraScript(" $('#DivCancelarCompra').modal();") RegistraScript(" $('#DivCancelarCompra').modal();")
End Sub End Sub
Protected Sub CheckDevAuto_CheckedChanged(sender As Object, e As EventArgs) Protected Sub CheckDevAuto_CheckedChanged(sender As Object, e As EventArgs)

View File

@@ -264,14 +264,14 @@
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label> <asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Ret IVA <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="Ret IVA <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="Ret IVA <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="Ret IVA <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="Ret ISR <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="Ret ISR <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="Ret ISR <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="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="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="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />

Binary file not shown.

BIN
Imagenes/SinImagenB.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -2608,6 +2608,10 @@ Partial Class OC_OC
'VALIDACIONES PARA GUARDAR 'VALIDACIONES PARA GUARDAR
If ValidaGuardar() Then Exit Sub If ValidaGuardar() Then Exit Sub
If UsuarioActual.CveEmpresa.Contiene(119) Then
ChkCotizacion.Checked = False
End If
Dim MsgError As String = "Hubo un error al registrar" Dim MsgError As String = "Hubo un error al registrar"
'VARIABLES 'VARIABLES
Dim CveProveedorSucursal As Integer = -1 Dim CveProveedorSucursal As Integer = -1
@@ -2666,6 +2670,7 @@ Partial Class OC_OC
CveProveedorContacto = IIf(DdlProveedorContacto.SelectedValue.ToEntero = 0, "-1", DdlProveedorContacto.SelectedValue).ToString.ToEntero CveProveedorContacto = IIf(DdlProveedorContacto.SelectedValue.ToEntero = 0, "-1", DdlProveedorContacto.SelectedValue).ToString.ToEntero
End If End If
Dim CveOrdenCompraPadre As Integer = -1 Dim CveOrdenCompraPadre As Integer = -1
If GeneraReq Then If GeneraReq Then

View File

@@ -49,10 +49,19 @@
<li> <li>
<asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style=" font-weight: bold;"></i> Expediente de personal</asp:LinkButton> <asp:LinkButton ID="ImgImprimirExpediente" Visible="false" runat="server"> <i class="fa fa-file-pdf-o" style=" font-weight: bold;"></i> Expediente de personal</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass=""><i class="fa fa-list-alt"></i> Gafete</asp:LinkButton> <%-- <asp:UpdatePanel runat="server">
<ContentTemplate>
</li> <li>
<asp:LinkButton ID="LbGafete" runat="server" CssClass=""><i class="fa fa-list-alt"></i> Gafete</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LbGafete" />
</Triggers>
</asp:UpdatePanel>--%>
<li> <li>
<asp:LinkButton ID="Lnkopenaddcuentabancaria" OnClick="Lnkopenaddcuentabancaria_Click" Visible="true" runat="server"> <i class="fa fa-plus"></i> Agregar cuenta bancaria</asp:LinkButton> <asp:LinkButton ID="Lnkopenaddcuentabancaria" OnClick="Lnkopenaddcuentabancaria_Click" Visible="true" runat="server"> <i class="fa fa-plus"></i> Agregar cuenta bancaria</asp:LinkButton>
</li> </li>
@@ -80,7 +89,7 @@
<asp:UpdatePanel ID="UpDescargaConsumos" runat="server" Visible="false"> <asp:UpdatePanel ID="UpDescargaConsumos" runat="server" Visible="false">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style=" font-weight: bold;"></i> PDF consumo</asp:LinkButton> <asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style="font-weight: bold;"></i> PDF consumo</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>

View File

@@ -10,6 +10,8 @@ Imports Microsoft.Reporting.WebForms
Imports System.Globalization Imports System.Globalization
Imports System.Xml Imports System.Xml
Imports System.Web.Script.Services Imports System.Web.Script.Services
Imports System.Linq
Partial Class RH_Personal Partial Class RH_Personal
Inherits ClsPaginas Inherits ClsPaginas
@@ -1740,6 +1742,11 @@ Partial Class RH_Personal
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal) 'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal) Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
ImgPersonal.ImageUrl = logouri
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpeg", UsuarioActual.Empresa.Ruta, CvePersonal)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
ImgPersonal.ImageUrl = logouri ImgPersonal.ImageUrl = logouri
End If End If
@@ -3897,40 +3904,95 @@ Partial Class RH_Personal
End If End If
ObjPersonal.Dispose() ObjPersonal.Dispose()
End Sub End Sub
Private Sub LbGafete_Click(sender As Object, e As EventArgs) Handles LbGafete.Click
Dim params As New List(Of ReportParameter)
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 'Eliminar hasta 15 de septiembre 2023
If ObjPersonal.DtResultados.Rows.Count > 0 Then 'Private Sub LbGafete_Click(sender As Object, e As EventArgs) Handles LbGafete.Click
params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim))) ' Dim PathSource As String = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text)) ' If File.Exists(PathSource) Then
params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
params.Add(New ReportParameter("CURP", TxtCURP.Text)) ' Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
params.Add(New ReportParameter("NoRegistro", "")) ' Dim pathDesti As String
params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text)) ' PathSource = UsuarioActual.Empresa.Ruta & "Formatos\Gafete.docx"
params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text))) ' pathDesti = PathRoot & "Temp\" & CvePersonal & "Gafete.docx"
params.Add(New ReportParameter("Emergencia", ""))
params.Add(New ReportParameter("CUIP", "")) ' If File.Exists(pathDesti) Then
params.Add(New ReportParameter("TipoSangre", "")) ' File.Delete(pathDesti)
params.Add(New ReportParameter("RFC", TxtRFC.Text)) ' End If
params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
' File.Copy(PathSource, pathDesti)
' Dim objDoc As New clsGemBoxDocument(pathDesti)
' Dim objRH As New ClsRH
' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
' objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
' objRH.Dispose()
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then ' objDoc.Guardar(pathDesti)
params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
Else
params.Add(New ReportParameter("LogoUri", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF") ' Dim fileinfo As New FileInfo(pathDesti)
End If
End If
ObjPersonal.Dispose() ' If fileinfo.Exists Then
End Sub
' Response.ContentType = "application/docx"
' Response.AppendHeader("Content-Disposition", $"attachment; filename=Gafete_{CvePersonal}.docx")
' Response.TransmitFile(pathDesti)
' Response.End()
' End If
' 'Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
' 'baseUrl = baseUrl & "/temp/" & fileinfo.Name
' 'RegistraDescargaJavaScript(baseUrl)
' Else
' Dim params As New List(Of ReportParameter)
' 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
' params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
' params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
' params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
' params.Add(New ReportParameter("CURP", TxtCURP.Text))
' params.Add(New ReportParameter("NoRegistro", ""))
' params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
' params.Add(New ReportParameter("FechaIngreso", TxtFechaIngreso.Text))
' params.Add(New ReportParameter("DomPart", String.Format("{0} NoExt:{1} NoInt:{2} {3}", TxtCalle.Text, TxtNumExt.Text, TxtNumInt.Text, TxtColonia.Text)))
' params.Add(New ReportParameter("Emergencia", TxtTelefonoEmergencia.Text))
' params.Add(New ReportParameter("CUIP", ""))
' params.Add(New ReportParameter("TipoSangre", DdlTipoSangre.SelectedItem.Text))
' params.Add(New ReportParameter("RFC", TxtRFC.Text))
' params.Add(New ReportParameter("Denominacion", TxtRFC.Text))
' If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
' params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
' Else
' params.Add(New ReportParameter("LogoUri", ""))
' End If
' ImprimirPDF("Empresas/Grales/Formatos/RHGafete.rdlc", New DataTable, params, String.Format("Gafete_{0}", ObjPersonal.CvePersonal), "PDF")
' End If
' End If
' ObjPersonal.Dispose()
' End If
'End Sub
Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF") Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF")
If CvePersonal > 0 Then If CvePersonal > 0 Then
If RBLTipoGastos.SelectedValue = "1" Then If RBLTipoGastos.SelectedValue = "1" Then
@@ -4367,10 +4429,94 @@ Partial Class RH_Personal
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)) objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa))
objRH.Dispose() objRH.Dispose()
objDoc.Guardar(pathDesti) objDoc.Guardar(pathDesti)
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
Dim document = GemBox.Document.DocumentModel.Load(pathDesti)
Dim imgPersonalURL As String = ""
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp"
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg"
End If
'imgPersonalURL = UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png"
If imgPersonalURL.Trim.Length = 0 Then
imgPersonalURL = ModExtensiones.DirectorioBaseEmpresas & "\wwwSIG\Imagenes\SinImagenB.jpg"
End If
'Dim document As New GemBox.Document.DocumentModel()
'Dim section As New GemBox.Document.Section(document)
'Dim paragraph As New GemBox.Document.Paragraph(document)
'section.Blocks.Add(paragraph)
'Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 61, 53, GemBox.Document.LengthUnit.Pixel)
'paragraph.Inlines.Add(picture1)
'Dim Zahnrad As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Zahnrad.gif"
'Dim Dices As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Dices.png"
'Dim Graphics1 As String = UsuarioActual.Empresa.Ruta & "RH\Personal\Graphics1.svg"
'Dim section As New GemBox.Document.Section(document)
'document.Sections.Add(section)
'Dim paragraph As New GemBox.Document.Paragraph(document)
'section.Blocks.Add(paragraph)
'Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 61, 53, GemBox.Document.LengthUnit.Pixel)
'paragraph.Inlines.Add(picture1)
' Get the first section and the first paragraph (or create them if necessary)
'**************************************************************
Dim firstSection As GemBox.Document.Section = document.Sections.FirstOrDefault()
If firstSection Is Nothing Then
firstSection = New GemBox.Document.Section(document)
document.Sections.Add(firstSection)
End If
Dim firstParagraph As GemBox.Document.Paragraph = firstSection.Blocks.OfType(Of GemBox.Document.Paragraph)().FirstOrDefault()
If firstParagraph Is Nothing Then
firstParagraph = New GemBox.Document.Paragraph(document)
firstSection.Blocks.Add(firstParagraph)
End If
Dim imageParagraph As New GemBox.Document.Paragraph(document)
Dim picture1 As New GemBox.Document.Picture(document, imgPersonalURL, 83, 100, GemBox.Document.LengthUnit.Pixel)
Dim layout3 As New GemBox.Document.FloatingLayout(
New GemBox.Document.HorizontalPosition(1.79, GemBox.Document.LengthUnit.Inch, GemBox.Document.HorizontalPositionAnchor.LeftMargin),
New GemBox.Document.VerticalPosition(2.55, GemBox.Document.LengthUnit.Inch, GemBox.Document.VerticalPositionAnchor.TopMargin),
picture1.Layout.Size)
'layout3.WrappingStyle = GemBox.Document.TextWrappingStyle.Through
picture1.Layout = layout3
imageParagraph.Inlines.Add(picture1)
firstSection.Blocks.Insert(0, imageParagraph)
document.Sections(0).Blocks.RemoveAt(9)
document.Save(pathDesti)
End If
Dim fileinfo As New FileInfo(pathDesti) Dim fileinfo As New FileInfo(pathDesti)
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)

View File

@@ -324,7 +324,7 @@ Partial Class ProductosyServicios
ChkAplicaParaVenta.Checked = True ChkAplicaParaVenta.Checked = True
Dim DrSAT = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506", AplicaParaVenta:=1).FiltroPrimero("") ', SATClavePS:=CveSATNC Dim DrSAT As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506", AplicaParaVenta:=1).FiltroPrimero("") ', SATClavePS:=CveSATNC
DdlSATPS.SelectedValue = DrSAT("CveSATPS").ToString() DdlSATPS.SelectedValue = DrSAT("CveSATPS").ToString()
DdlSATPS.SelectedText = DrSAT("SATClaveProductoServicio").ToString() DdlSATPS.SelectedText = DrSAT("SATClaveProductoServicio").ToString()
@@ -984,7 +984,7 @@ Partial Class ProductosyServicios
DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString) DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString)
If DdlTamanio.SelectedValue.ToEntero() > 0 Then If DdlTamanio.SelectedValue.ToEntero() > 0 Then
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString) Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString)
@@ -1393,7 +1393,7 @@ Partial Class ProductosyServicios
'VALIDAR TAMAÑOS Y ACUMULADORES 'VALIDAR TAMAÑOS Y ACUMULADORES
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString) Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString)
@@ -1418,8 +1418,8 @@ Partial Class ProductosyServicios
Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL()) Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL())
Dim ObjEmpresas As New ClsSisEmpresas(ObjProductosServicios.IniciaTransacSQL()) Dim ObjEmpresas As New ClsSisEmpresas(ObjProductosServicios.IniciaTransacSQL())
Dim TieneError = False Dim TieneError As Boolean = False
Dim AccionJS = "" Dim AccionJS As String = ""
Try Try
@@ -1643,7 +1643,7 @@ Partial Class ProductosyServicios
End Sub End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjAliasAdd As New ClsProductosServicios Dim ObjAliasAdd As New ClsProductosServicios
Dim TieneError = False Dim TieneError As Boolean = False
If ObjAliasAdd.AddPSAlias(TxtAlias.Text.ToString, CvePS, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjAliasAdd.AddPSAlias(TxtAlias.Text.ToString, CvePS, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
CargarAlias() CargarAlias()
@@ -2425,8 +2425,6 @@ Partial Class ProductosyServicios
#End Region #End Region
#Region " ECOMMERCE " #Region " ECOMMERCE "
Private Sub InicializaEcommerce() Private Sub InicializaEcommerce()
AplicaEcommerce = False AplicaEcommerce = False
@@ -3165,6 +3163,7 @@ Partial Class ProductosyServicios
End If End If
GlobalDTPSSimplificado(CveEmpresaFranquicia) = Nothing GlobalDTPSSimplificado(CveEmpresaFranquicia) = Nothing
GlobalDTProductosServiciosEquivalencias(-1, -1, CveEmpresaFranquicia) = Nothing
Next Next
Return False Return False

View File

@@ -376,7 +376,7 @@
<%--6--%> <%--6--%>
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--7--%> <%--7--%>
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<%--8--%> <%--8--%>
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--9--%> <%--9--%>

View File

@@ -193,7 +193,7 @@ Partial Class Ventas_RepVentas
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
'CargaClientes 'CargaClientes
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then If EsWS Then
DdlClientes.setEsWebService(True) DdlClientes.setEsWebService(True)
Else Else