Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3987,21 +3987,10 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
AjustaCombustibles()
|
||||||
|
|
||||||
'------------------INICIA VALIDACIONES------------------
|
'------------------INICIA VALIDACIONES------------------
|
||||||
|
|
||||||
Dim TempIva As Decimal
|
|
||||||
For Each drowv As DataRow In TmpDT.Rows
|
|
||||||
TempIva = TempIva + (drowv("Total").ToString.ToDecimal * drowv("IVAPorcentaje").ToString.ToDecimal)
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim DifGenelraIvas As Decimal = (TxtIVA.Text.ToDecimal - TempIva)
|
|
||||||
|
|
||||||
If Math.Abs(DifGenelraIvas) > 0.2 Then
|
|
||||||
Alert($"Los importes no coinciden, error en calculo de IVA diferencia { DifGenelraIvas }", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim EstatusCredito As Integer = 0
|
Dim EstatusCredito As Integer = 0
|
||||||
Dim CveSubProyecto As Integer = 0
|
Dim CveSubProyecto As Integer = 0
|
||||||
'Credito Multiple
|
'Credito Multiple
|
||||||
@@ -6508,7 +6497,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141,152,159,160,161,162,163) andalso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141, 152, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
@@ -8540,6 +8529,61 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub AjustaCombustibles()
|
||||||
|
|
||||||
|
|
||||||
|
If Not TmpDT.Columns.Contains("AplicaIEPS") Then
|
||||||
|
TmpDT.Columns.Add(New DataColumn("AplicaIEPS", GetType(Boolean)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TmpDT.Columns.Contains("IEPSGrabaIVA") Then
|
||||||
|
TmpDT.Columns.Add(New DataColumn("IEPSGrabaIVA", GetType(Boolean)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each dRow As DataRow In TmpDT.Rows
|
||||||
|
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows.Count > 0 Then
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows(0)
|
||||||
|
dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString)
|
||||||
|
dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString)
|
||||||
|
Else
|
||||||
|
dRow("AplicaIEPS") = False
|
||||||
|
dRow("IEPSGrabaIVA") = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DTConsulta As New DataTable
|
||||||
|
DTConsulta = TmpDT.FiltraParametros(" AplicaIEPS = 'True' AND IEPSGrabaIVA = 'False' AND IVA > 0 ")
|
||||||
|
|
||||||
|
If DTConsulta.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Dim IndiceContador As Integer = 0
|
||||||
|
Dim IndiceUltimo As Integer = 0
|
||||||
|
|
||||||
|
For Each dRow As DataRow In TmpDT.Rows
|
||||||
|
|
||||||
|
If Boolean.Parse(dRow("AplicaIEPS").ToString) And Boolean.Parse(dRow("IEPSGrabaIVA").ToString) = False And dRow("IVA").ToString.ToDecimal > 0 Then
|
||||||
|
IndiceUltimo = IndiceContador
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndiceContador = IndiceContador + 1
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
Dim IVADetalles As Decimal = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||||
|
Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles
|
||||||
|
|
||||||
|
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||||
|
TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Protected Sub TxtCodigo_TextChanged(sender As Object, e As System.EventArgs) Handles TxtCodigo.TextChanged
|
Protected Sub TxtCodigo_TextChanged(sender As Object, e As System.EventArgs) Handles TxtCodigo.TextChanged
|
||||||
Dim ObjProveedores As New ClsCompProveedores()
|
Dim ObjProveedores As New ClsCompProveedores()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||||
<AutoRefresh>0</AutoRefresh>
|
<AutoRefresh>0</AutoRefresh>
|
||||||
<DataSources>
|
<DataSources>
|
||||||
<DataSource Name="DataSet1">
|
<DataSource Name="DataSet1">
|
||||||
@@ -171,6 +171,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -460,6 +461,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<ColSpan>7</ColSpan>
|
<ColSpan>7</ColSpan>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell />
|
<TablixCell />
|
||||||
@@ -551,6 +553,7 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -771,6 +774,7 @@
|
|||||||
<PaddingBottom>1pt</PaddingBottom>
|
<PaddingBottom>1pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -992,6 +996,7 @@
|
|||||||
<PaddingBottom>1pt</PaddingBottom>
|
<PaddingBottom>1pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -1206,6 +1211,7 @@
|
|||||||
<PaddingBottom>1pt</PaddingBottom>
|
<PaddingBottom>1pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
@@ -1540,6 +1546,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<ColSpan>3</ColSpan>
|
<ColSpan>3</ColSpan>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell />
|
<TablixCell />
|
||||||
@@ -1677,7 +1684,10 @@
|
|||||||
<TablixMember>
|
<TablixMember>
|
||||||
<Group Name="Id">
|
<Group Name="Id">
|
||||||
<GroupExpressions>
|
<GroupExpressions>
|
||||||
<GroupExpression>=Fields!Id.Value</GroupExpression>
|
<GroupExpression>=Fields!Fecha.Value</GroupExpression>
|
||||||
|
<GroupExpression>=Fields!TipoPoliza.Value</GroupExpression>
|
||||||
|
<GroupExpression>=Fields!Numero.Value</GroupExpression>
|
||||||
|
<GroupExpression>=Fields!ConceptoPoliza.Value</GroupExpression>
|
||||||
</GroupExpressions>
|
</GroupExpressions>
|
||||||
<PageBreak>
|
<PageBreak>
|
||||||
<BreakLocation>End</BreakLocation>
|
<BreakLocation>End</BreakLocation>
|
||||||
|
|||||||
@@ -3001,7 +3001,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3028,7 +3028,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3041,12 +3041,12 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user