This commit is contained in:
HECTOR RODRIGUEZ
2021-07-06 21:28:40 -07:00
21 changed files with 165 additions and 272 deletions

View File

@@ -76,14 +76,7 @@ Public Class ClsClientes
Public Property IdCtaContAnticipos As Integer
Public Property IdCtaContRetIVA As Integer
Public Property IdCtaContRetISR As Integer
Public Property IdCtaContFondoGarantia As Integer
Public Property CveCuentaClientes As Integer
Public Property CveCuentaMonedaExtranjera As Integer
Public Property CveCuentaComplementaria As Integer
Public Property CveCuentaAnticipos As Integer
Public Property CveCuentaRetIVA As Integer
Public Property CveCuentaRetISR As Integer
Public Property CveCuentaFondoGarantia As Integer
Public Property IdCtaContFondoGarantia As Integer
Public Property Codigo As String
Public Property LimiteCredito As Double
'Public Property NumCtaPago As String
@@ -334,15 +327,9 @@ Public Class ClsClientes
_IdCtaContAnticipos = Data.Rows(0)("IdCtaContAnticipos").ToString.ToEntero
_IdCtaContRetIVA = Data.Rows(0)("IdCtaContRetIVA").ToString.ToEntero
_IdCtaContRetISR = Data.Rows(0)("IdCtaContRetISR").ToString.ToEntero
_IdCtaContFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantia").ToString.ToEntero
_CveCuentaClientes = Data.Rows(0)("IdCtaContClientesSIG").ToString.ToEntero
_CveCuentaMonedaExtranjera = Data.Rows(0)("IdCtaContMonedaExtranjeraSIG").ToString.ToEntero
_CveCuentaComplementaria = Data.Rows(0)("IdCtaContComplementariaSIG").ToString.ToEntero
_CveCuentaAnticipos = Data.Rows(0)("IdCtaContAnticiposSIG").ToString.ToEntero
_CveCuentaRetIVA = Data.Rows(0)("IdCtaContRetIVASIG").ToString.ToEntero
_CveCuentaRetISR = Data.Rows(0)("IdCtaContRetISRSIG").ToString.ToEntero
_CveCuentaFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantiaSIG").ToString.ToEntero
'_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString
_IdCtaContFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantia").ToString.ToEntero
'_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString
_FormaFacturacion = Data(0)("FormaFacturacion").ToString
_LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble
'_NumCtaPago = Data(0)("NumCtaPago").ToString

View File

@@ -383,7 +383,7 @@ Public Class LogicNominas
If DtOtrosPagos IsNot Nothing AndAlso DtOtrosPagos.Rows.Count > 0 Then
For Each Row As DataRow In DtOtrosPagos.Rows
If (Row("Importe").ToString().ToDecimal() > 0) OrElse
If (Row("Importe").ToString().ToDecimal() <> 0) OrElse
(Row("SATCveConcepto").ToString().ToEntero() = 2 AndAlso (CveRegimenContratacion.ToEntero() = 2 OrElse Row("Importe").ToString().ToDecimal() <> 0)) OrElse
(Row("SATCveConcepto").ToString().ToEntero().Contiene(2, 4) AndAlso Row("Importe").ToString().ToDecimal() < 0) Then

View File

@@ -813,7 +813,7 @@ Public Class Timbrado
'validación especial.
If Ventas.TipoDocto.Contiene("Ing", "Dev") Then
Dim CodigoIncorrecto = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "84111506" Or c.ClaveProdServ = "01010101")
Dim CodigoIncorrecto = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "01010101") OrElse (c.ClaveProdServ = "84111506" AndAlso Not UsuarioActual.CveEmpresa.Contiene(2, 70))
Select c.ClaveProdServ, c.Descripcion)
Dim Str As New StringBuilder
Str.Append("Los siguentes productos tienen especificado un código no permitido por el SAT: <br/>")

View File

@@ -276,14 +276,8 @@ Partial Class Bancos_DepositoTerminal
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("CveCuentaCliente") = ObjCliente.CveCuentaClientes
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
IdCuentaBancaria = 0
CveCuentaBancaria = 0
End If

View File

@@ -2304,16 +2304,16 @@ Partial Class Bancos_PopIECompras
Else
If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then
'ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
ImporteMovimiento = MovimientoPagar.IVAPorPagar * PorcentajePago
ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
ImporteMX = ImporteMovimiento
ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago)
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago)
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra
ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then
ImporteMovimiento = (MovimientoPagar.IVAPorPagar * PorcentajePago)
ImporteMovimiento = (MovimientoPagar.IVA * PorcentajePago)
ImporteMX = ImporteMovimiento * tipoCambioCompra
End If
ImporteMovimiento = ImporteMovimiento.RoundSQL

View File

@@ -826,16 +826,8 @@ Partial Class Bancos_PopIEVentas
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
ViewState("IdCtaAnticipo") = ObjCliente.IdCtaContAnticipos
ViewState("IdCtaContMonedaExtranjeraAnticipo") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos
'Conta SIG
CveCuentaCliente = ObjCliente.CveCuentaClientes
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
ViewState("CveCuentaAnticipo") = ObjCliente.CveCuentaAnticipos
ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos
Else
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If
@@ -1587,7 +1579,6 @@ Partial Class Bancos_PopIEVentas
Dim ImporteMX As Decimal = 0
Dim ImporteCliente As Decimal = 0
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
Dim Referencia As String = TxtObservaciones.Text
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim TimpocambioGeneral As Decimal = 1
@@ -1625,26 +1616,23 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera
Else
IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If
TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
End If
@@ -1677,25 +1665,22 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera
Else
IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If
TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
End If
End If
@@ -1726,25 +1711,22 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContMonedaExtranjera
Else
IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
End If
TotalPagarCliente = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMX, TipoCambio:=tipoCambioVentaValuacion, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
If CveMonedaVenta = 2 Then
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, rw.DataKey("CveCompra").ToEntero, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
End If
@@ -1775,19 +1757,16 @@ Partial Class Bancos_PopIEVentas
If CveMonedaVenta = 1 Then
IdCtaContable = IdCuentaCliente
CveCuenta = CveCuentaCliente
Else
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaComplementaria
CveSubProyectoContabilizar = CveSubProyectoVenta
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ReferenciaConcepto, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2) 'le agrego la complementario
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
End If
Case 8 'Ret IVA
@@ -1822,19 +1801,8 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
Case 9 'Ret ISR
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
@@ -1867,19 +1835,8 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
Case 13 'Iva por Trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.IVA * PorcentajePago
@@ -1905,16 +1862,13 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVAXTrasladar As Integer = 0
Dim CveCuentaIVAxTrasladar As Integer = 0
Dim IdCtaIVAXTrasladar As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
Case 61 'Iva Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1941,15 +1895,12 @@ Partial Class Bancos_PopIEVentas
PorcentajeImpuesto = MovimientoPagar.PorcentajeIVA
Dim IdCtaIVATrasladado As Integer = 0
Dim CveCuentaIVATrasladado As Integer = 0
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero
End If
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
Case 38 'IEPS por trasladar
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -1975,7 +1926,6 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString.ToEntero
End If
End If
@@ -2004,7 +1954,6 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString.ToEntero
End If
End If
@@ -2041,19 +1990,8 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetIVA <> 0 Then
CveCuenta = CveCuentaRetIVA
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
Case 63 'Ret ISR Trasladado
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
ImporteMovimiento = MovimientoPagar.RetISR * PorcentajePago
@@ -2087,23 +2025,11 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetISR <> 0 Then
CveCuenta = CveCuentaRetISR
Else
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
Case 64 'Ganancia
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim tImporteVenta, tImportePago, Diferencia As Decimal
ImporteMovimiento = 0
@@ -2210,17 +2136,14 @@ Partial Class Bancos_PopIEVentas
If CveMoneda = 1 Then
IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaCliente
Else
IdCtaContable = IdCuentaBancariaComplementaria
CveCuenta = CveCuentaComplementaria
If ImporteMovimiento <> 0 AndAlso IdCtaContable > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ObjIE.Folio, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago, CveCuenta:=CveCuenta) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, ObjIE.Folio, 204, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1), ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaMonedaExtranjera
TotalPagarCliente += Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2)
End If
End If
@@ -2255,10 +2178,8 @@ Partial Class Bancos_PopIEVentas
If CveMoneda = 2 Then
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjeraAnticipo
CveCuenta = CveCuentaMonedaExtranjera
Else
IdCtaContable = IdCtaAnticipo
CveCuenta = CveCuentaAnticipo
End If
TotalPagarCliente = ImporteMovimiento
@@ -2354,7 +2275,7 @@ Partial Class Bancos_PopIEVentas
CveIE = rw.DataKey("CveIE").ToString.ToEntero
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, rw.DataKey("IdCtaContDeudor").ToString.ToEntero, -1, CveIE, CveVenta:=CveVenta, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, rw.DataKey("IdCtaContDeudor").ToString.ToEntero, -1, CveIE, CveVenta:=CveVenta, CveProveedor:=CveProveedor2, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveSubProyecto:=CveSubProyectoContabilizar) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2440,24 +2361,21 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = IdCtaContComplementariaProveedor
Else
IdCtaContable = CtaProveedor
CveCuenta = CveCuentaProveedor
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioPago) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, 275, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, ImporteMX:=ImporteMX, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
If rw.DataKey("CveMoneda").ToEntero = 2 Then
IdCtaContable = IdCtaProveedorExtranjera
CveCuenta = CveCuentaProveedorExtranjera
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 206, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago, CveCuenta:=CveCuenta) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, rw.FCLiteral("LtlFolio").Text, 206, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
ImporteMX = ImporteMovimiento
IdCtaContable = IdCtaContMonedaExtranjera
CveCuenta = CveCuentaMonedaExtranjera
End If
End If
@@ -2500,21 +2418,10 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2564,7 +2471,7 @@ Partial Class Bancos_PopIEVentas
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2610,21 +2517,10 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2673,7 +2569,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2721,20 +2617,8 @@ Partial Class Bancos_PopIEVentas
End If
End If
'Conta SIG
If CveCuentaRetIVAProveedor <> 0 Then
CveCuenta = CveCuentaRetIVAProveedor
Else
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
End If
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2780,11 +2664,10 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2833,7 +2716,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2882,7 +2765,7 @@ Partial Class Bancos_PopIEVentas
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -2942,7 +2825,7 @@ Partial Class Bancos_PopIEVentas
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
@@ -2990,20 +2873,10 @@ Partial Class Bancos_PopIEVentas
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
@@ -3050,19 +2923,9 @@ Partial Class Bancos_PopIEVentas
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
@@ -3110,20 +2973,8 @@ Partial Class Bancos_PopIEVentas
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
@@ -3206,13 +3057,12 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3294,12 +3144,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3380,12 +3229,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, rw.DataKey("TipoCambio").ToString.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3419,12 +3267,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3458,12 +3305,11 @@ Partial Class Bancos_PopIEVentas
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
End If
End If
If ImporteMovimiento > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -3483,7 +3329,7 @@ Partial Class Bancos_PopIEVentas
idCuentaContabilizacion = 0
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, CvePersonal:=CvePersonal, TipoCambio:=TimpocambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ReferenciaConcepto, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, CveVenta, -1, CveSubProyectoContabilizar, CveCliente:=CveClienteOriginal, ImporteMX:=ImporteMX, CvePersonal:=CvePersonal, TipoCambio:=TimpocambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza"
Exit For
End If

View File

@@ -175,21 +175,18 @@ Partial Class Compras_RepNotasCredito
Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida
Dim TipoMovtoFluctua As Boolean = True
Dim IdCtaContableFluctua As Integer
Dim CveCuenta As Integer = 0
If difFluctuacion < 0 Then
CveConceptoFluctua = 65
TipoMovtoFluctua = False
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Else
CveConceptoFluctua = 64
TipoMovtoFluctua = True
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC, CveCuenta:=CveCuenta) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC) Then
MsgError = "Ocurrio un Error al saldar el movimiento"
End If
End If

View File

@@ -2045,7 +2045,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Exit For
End If
If CveConceptoContable = 30 Then
If CveConceptoContable = 30 AndAlso Row("TipoTransferencia").ToString <> "" Then
Dim objconta3 As New ClsContabilidad
objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa)

View File

@@ -56,10 +56,10 @@
</div>
</div>
<label class="col-md-1 truncate">Cuenta:</label>
<label class="col-md-1 truncate">Cuentas:</label>
<div class="col-md-2">
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
<asp:ListItem Text="Todas" Value="-1" />
<asp:ListItem Text="Todas" Value="1" />
<asp:ListItem Text="Con Movimientos" Value="2" />
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
<asp:ListItem Text="Con Movimientos y saldo no igual a cero" Value="4" />

View File

@@ -62,7 +62,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
If ExistenciasAux > 0 Then
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("N3")
Else
e.Row.FCCheckBox("Chk").Visible = False
e.Row.FCRangeValidator("RVR").MaximumValue = 0

View File

@@ -2497,12 +2497,12 @@ Partial Class Inventarios_EntregaAlmacen
If DtDetalle.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalle.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
'CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2511,11 +2511,11 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf DtDetalleLote.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalleLote.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
'CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For

View File

@@ -1462,22 +1462,25 @@ div.chksino, span.chksino {
text-overflow: ellipsis;
font-size: 0px;
white-space: nowrap;
height: 25px;
}
.chksino input:checked ~ label {
margin-left: 0px;
height: 25px;
}
.chksino label::before {
content: 'Si ';
padding: 3px;
padding-left: 15px;
padding-right: 14px;
padding-left: 15px !important;
padding-right: 14px !important;
font-size: 12px !important;
font-weight: bold !important;
display: inline-block;
background: #428bca;
color: #FFF;
height: 25px;
}
.chksino label::after {
@@ -1491,6 +1494,7 @@ div.chksino, span.chksino {
display: inline-block;
background: #ececec;
color: #666;
height: 25px;
}
.md-checkbox {

View File

@@ -236,7 +236,10 @@ public partial class Nomina_Finiquito : ClsPaginas
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, CvePersonal, CvePeriodoFiniquito))
{
Alert("el importe sera tomado del calculo y no del valor fijo");
loadsobrerecibo(onom);
UPDatos.Update();
}
}
}
}
@@ -759,10 +762,10 @@ public partial class Nomina_Finiquito : ClsPaginas
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc", UsuarioActual.CveEmpresa));
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.CveEmpresa));
if (!System.IO.File.Exists(urlfile))
{
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);

View File

@@ -70,6 +70,10 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosSUAM" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ajax:TabContainer ID="Tab" runat="server" Width="100%" AutoPostBack="True">
<ajax:TabPanel ID="TabAsistencia" runat="server" HeaderText="Asistencia">
<ContentTemplate>
<div class="portlet light xspadding bordered " id="pnlDatosAsistencia">
<div class="portlet-title">
<div class="caption ">
@@ -110,6 +114,10 @@
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabAltasbajas" runat="server" HeaderText="Altas bajas">
<ContentTemplate>
<div class="portlet light xspadding bordered " id="pnlDatosAltasbajas">
<div class="portlet-title">
<div class="caption ">
@@ -153,6 +161,11 @@
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabModsalario" runat="server" HeaderText="Modificación de salario">
<ContentTemplate>
<div class="portlet light xspadding bordered " id="pnlDatosModsalario">
<div class="portlet-title">
<div class="caption ">
@@ -191,6 +204,10 @@
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

View File

@@ -448,9 +448,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
CvePeriodoSeleccionado = FiltCvePeriodo;
continuar = true;
}
if (dtempleados != null)
{
LnkTimbrarTodos.Visible = (dtempleados.Rows.Count > 0 &&
dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0 AND NomAutorizado =1") > 0);
}
}
}
@@ -864,7 +867,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
#endregion
UpDatos.Update();
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", " CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
if (dtempleados != null)
{
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", " CvePersonal > 0 AND NomAutorizado =0") > 0) || (Estatus < 2);
}
}
private void setGVNominas()
{
@@ -1966,9 +1972,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LblSRSbc.Text = SalarioDiarioIMSS;
#endregion
#region "Sobre Recibo"
cargasobrericiboconceptos();
#endregion
cargasobrericiboconceptos();
#region "Infonavit"
{
using (ClsRH objper = new ClsRH())
@@ -2026,7 +2030,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema NOT IN(101)");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
@@ -2051,7 +2055,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
&& (dtempleadosConceptos.COUNT("CveConcepto", string.Format("CveConcepto={0} AND CvePersonal ={1} AND Estatus =2", CveConcepto, SRCvePersonal)) == 0)
)
{
BorradoLogico = 1;
if(!row["CveSistema"].ToString().ToEntero().Contiene(new int[] { 20,21,112,202, 203 }))
{
BorradoLogico = 1;
}
}
row["BorradoLogico"] = BorradoLogico;
}

View File

@@ -167,11 +167,25 @@
<label class="col-md-1 mediocol">del:</label>
<div class="col-md-1">
<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="form-group input-iconright">
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 mediocol">al:</label>
<div class="col-md-1">
<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="form-group input-iconright">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-3">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />

View File

@@ -105,8 +105,8 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
FiltCveProyecto = DdlProyecto.SelectedValue.ToEntero();
FiltCveSubProyecto = -1;
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
FiltCvePeriodoI = TxtPeriodoInicio.Text.ToEntero();
FiltCvePeriodoF = TxtPeriodoFin.Text.ToEntero();
FiltCvePeriodoI = TxtRpdFechaInicio.Text.ToDateTime().ToString("yyyyMMdd").ToEntero();
FiltCvePeriodoF = TxtRpdFechaFin.Text.ToDateTime().ToString("yyyyMMdd").ToEntero();
cargaDatos();
}
@@ -393,8 +393,8 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
FiltCveProyecto = DdlProyecto.SelectedValue.ToEntero();
FiltCveSubProyecto = -1;
FiltCveTurno = DdlTurno.SelectedValue.ToEntero();
FiltCvePeriodoI = TxtPeriodoInicio.Text.ToEntero();
FiltCvePeriodoF = TxtPeriodoFin.Text.ToEntero();
FiltCvePeriodoI = TxtRpdFechaInicio.Text.ToDateTime().ToString("yyyyMMdd").ToEntero();
FiltCvePeriodoF = TxtRpdFechaFin.Text.ToDateTime().ToString("yyyyMMdd").ToEntero();
cargaDatos();
if (dtempleados.Rows.Count > 0)
{

View File

@@ -9,16 +9,15 @@ using Extensiones;
public partial class RH_CalculoSBC : ClsPaginas
{
//private DataTable dtPeriodos
//{
// get
// {
// if (ViewState["dtPeriodos"] == null) { return null; }
// else { return (DataTable)ViewState["dtPeriodos"]; }
// }
// set { ViewState["dtPeriodos"] = value; }
//}
private DataTable dtDetalleParteVariable
{
get
{
if (ViewState["dtDetalleParteVariable"] == null) { return null; }
else { return (DataTable)ViewState["dtDetalleParteVariable"]; }
}
set { ViewState["dtDetalleParteVariable"] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@@ -44,7 +43,8 @@ public partial class RH_CalculoSBC : ClsPaginas
GVPV.DataSource = objnom.DTSetResultados.Tables[0];
if (objnom.DTSetResultados.Tables.Count >1)
{
GVDetalleParteVariable.DataSource = objnom.DTSetResultados.Tables[1];
dtDetalleParteVariable=objnom.DTSetResultados.Tables[1];
GVDetalleParteVariable.DataSource = dtDetalleParteVariable;
GVDetalleParteVariable.DataBind();
}
}
@@ -154,7 +154,8 @@ public partial class RH_CalculoSBC : ClsPaginas
DataTable dt = GVToDT(GVCalculosSBC,"Salario");
DataTable dtPF = GVToDT(GVCFija, "Parte fija");
DataTable dtPV = GVToDT(GVPV, "Parte variable");
DataTable dtPVD = GVToDT(GVDetalleParteVariable, "Detalle parte variable");
dtDetalleParteVariable.TableName = "Detalle parte variable";
DataTable dtPVD = dtDetalleParteVariable;//GVToDT(GVDetalleParteVariable, "Detalle parte variable");
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet(dt);

View File

@@ -727,6 +727,16 @@
<asp:BoundField HeaderText="Fecha Fin" DataField="FechaFin" DataFormatString="{0:d}">
<ItemStyle Width="150px" />
</asp:BoundField>
<asp:TemplateField HeaderText="Editar">
<ItemTemplate>
<asp:LinkButton ID="LnkUpAltass" OnClick="LnkUpAltass_Click" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="LnkDAltas" OnClick="LnkDAltas_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />

View File

@@ -6506,4 +6506,13 @@ Partial Class RH_Personal
End Sub
Protected Sub LnkUpAltass_Click(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkDAltas_Click(sender As Object, e As EventArgs)
End Sub
End Class

View File

@@ -264,6 +264,10 @@