--
This commit is contained in:
@@ -424,6 +424,10 @@ Partial Class AF_AF
|
|||||||
ModalidadesPaginaAFInicial(Request("Op").ToString)
|
ModalidadesPaginaAFInicial(Request("Op").ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(410) Then
|
||||||
|
BtnGuardar.Visible = False
|
||||||
|
BtnEliminar.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ Public Class ClsCompProveedores
|
|||||||
Public Property DIOTNacionalidad As String
|
Public Property DIOTNacionalidad As String
|
||||||
Public Property CveRegimenFiscal As Integer = -1
|
Public Property CveRegimenFiscal As Integer = -1
|
||||||
Public Property PorcentajeProntoPago As Decimal = 0D
|
Public Property PorcentajeProntoPago As Decimal = 0D
|
||||||
|
Public Property CveTipoFechaVencimiento As Integer = 1
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -302,6 +303,7 @@ Public Class ClsCompProveedores
|
|||||||
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
|
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
|
||||||
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
|
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
|
||||||
Me.PorcentajeProntoPago = Data.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
Me.PorcentajeProntoPago = Data.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
||||||
|
Me.CveTipoFechaVencimiento = Data.Rows(0)("CveTipoFechaVencimiento").ToString.ToEntero
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -524,28 +526,30 @@ Public Class ClsCompProveedores
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateProveedorLimiteCredito(CveProveedor As Integer, LimiteCredito As Decimal, PlazoPago As Integer, UsaLimiteCredito As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function UpdateProveedorLimiteCredito(CveProveedor As Integer, LimiteCredito As Decimal, PlazoPago As Integer, UsaLimiteCredito As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoFechaVencimiento As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ProveedorLimiteCreditoUpdate")
|
DataAdapter("PA_Comp_ProveedorLimiteCreditoUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
.Add("@LimiteCredito", SqlDbType.Money).Value = LimiteCredito
|
.Add("@LimiteCredito", SqlDbType.Money).Value = LimiteCredito
|
||||||
.Add("@PlazoPago", SqlDbType.Int).Value = PlazoPago
|
.Add("@PlazoPago", SqlDbType.Int).Value = PlazoPago
|
||||||
.Add("@UsaLimiteCredito", SqlDbType.Bit).Value = UsaLimiteCredito
|
.Add("@UsaLimiteCredito", SqlDbType.Bit).Value = UsaLimiteCredito
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
.Add("@CveTipoFechaVencimiento", SqlDbType.TinyInt).Value = CveTipoFechaVencimiento
|
||||||
|
|
||||||
Try
|
End With
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al Actualizar el limite de crédito del Proveedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
Try
|
||||||
End Function
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al Actualizar el limite de crédito del Proveedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean
|
Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -849,53 +849,6 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI ES REFACTURACION
|
|
||||||
'Dim ObjNC As List(Of Object) = Nothing
|
|
||||||
'If ErrorList.Count = 0 Then
|
|
||||||
' If NuevaFactura = 1 AndAlso FacturaDevolucion IsNot Nothing Then
|
|
||||||
|
|
||||||
' ObjNC = GeneraNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, ObjEventos)
|
|
||||||
|
|
||||||
' If ObjNC Is Nothing Then
|
|
||||||
' ErrorList.Add("No se pudo Cancelar la Factura")
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Esquema viejo, evitamos que aparezca por surtir
|
|
||||||
' If ErrorList.Count = 0 Then
|
|
||||||
' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVenta, 2) Then
|
|
||||||
' ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'SI ES amortizacion 3.3
|
|
||||||
'Dim Obj2 As New List(Of Object)
|
|
||||||
|
|
||||||
'If ErrorList.Count = 0 Then
|
|
||||||
' ' cambiar la condicion para saber si hay seleccionado
|
|
||||||
' If TieneAnticipo AndAlso Me.CveTipoAmortizacionAnticipo = 2 Then
|
|
||||||
|
|
||||||
' If TieneAnticipo Then
|
|
||||||
' Try
|
|
||||||
' 'DESCOMENTAR
|
|
||||||
' If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, Nothing, Nothing) Then
|
|
||||||
' Obj2.Add(FacturaDevolucion)
|
|
||||||
' End If
|
|
||||||
' Catch ex As Exception
|
|
||||||
' ErrorList.Add("No se pudo generarse la nota de crédito de amortización")
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Obj2 Is Nothing AndAlso Obj2.Count = 0 Then
|
|
||||||
' ErrorList.Add("No se pudo generarse la nota de crédito de amortización")
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE
|
'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE
|
||||||
If ErrorList.Count = 0 Then
|
If ErrorList.Count = 0 Then
|
||||||
If Me.CveVenta > 0 And Me.CveAlmacenExistenciasContrato > 0 And Me.TipoDocto = "Ing" Then
|
If Me.CveVenta > 0 And Me.CveAlmacenExistenciasContrato > 0 And Me.TipoDocto = "Ing" Then
|
||||||
@@ -1065,17 +1018,6 @@ Namespace Modelos
|
|||||||
|
|
||||||
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me, CvePACEspecial:=CvePAC)
|
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me, CvePACEspecial:=CvePAC)
|
||||||
|
|
||||||
'NOTA DE CREDITO - REFACTURADA - CASO ESPECIAL, TIMBRADO E IMPRESION
|
|
||||||
'If Not IsNothing(Obj2) AndAlso Obj2.Count > 0 Then
|
|
||||||
' Dim ofa As Modelos.Factura = CType(Obj2(0), Modelos.Factura)
|
|
||||||
' 'asigna el foliofiscal del ingreso que se acaba de timbrar, cuando es amortización de anticipo con NC
|
|
||||||
' If TieneAnticipo AndAlso CveTipoAmortizacionAnticipo = 2 Then
|
|
||||||
' ofa.Timbre.CFDIRelacionados.UUID.Clear()
|
|
||||||
' ofa.Timbre.CFDIRelacionados.UUID.Add(ObjTimbrado.UUID)
|
|
||||||
' End If
|
|
||||||
' ObjTimbrado.TimbrarFactura(UsuarioActual, ofa)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If SeTimbro AndAlso Me.TipoDocto.Contiene("Ing") Then
|
If SeTimbro AndAlso Me.TipoDocto.Contiene("Ing") Then
|
||||||
EstatusSMS = EnviarSMSTimbrado(ObjEventos)
|
EstatusSMS = EnviarSMSTimbrado(ObjEventos)
|
||||||
End If
|
End If
|
||||||
@@ -1085,14 +1027,6 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'NOTA DE CREDITO DE REFACTURACION
|
|
||||||
'If RefacturacionGeneroNC Then
|
|
||||||
' If Not IsNothing(ObjNC) AndAlso ObjNC.Count > 0 Then
|
|
||||||
' Dim ofa As Modelos.Factura = CType(ObjNC(0), Modelos.Factura)
|
|
||||||
' SeTimbroNC = ObjTimbrado.TimbrarFactura(UsuarioActual, ofa)
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1337,7 +1271,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Shared Function CreaDTFactura() As DataTable
|
Public Shared Function CreaDTFactura() As DataTable
|
||||||
Dim TmpDT As New DataTable
|
Dim TmpDT As New DataTable
|
||||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||||
@@ -1451,6 +1385,15 @@ Namespace Modelos
|
|||||||
TmpDT.Columns.Add("CveViajePasajero", GetType(Integer))
|
TmpDT.Columns.Add("CveViajePasajero", GetType(Integer))
|
||||||
TmpDT.Columns("CveViajePasajero").DefaultValue = -1
|
TmpDT.Columns("CveViajePasajero").DefaultValue = -1
|
||||||
|
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Decimal))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
|
'COLUMNAS DE PV.aspx
|
||||||
|
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||||
|
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
|
||||||
|
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -1460,7 +1403,7 @@ Namespace Modelos
|
|||||||
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
|
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
|
||||||
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
||||||
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True,
|
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True,
|
||||||
Optional CvePromocionDetalle As Integer = -1) As Boolean
|
Optional CvePromocionDetalle As Integer = -1, Optional CantidadConversion As Decimal = 0) As Boolean
|
||||||
|
|
||||||
If Not CvePS > 0 Then
|
If Not CvePS > 0 Then
|
||||||
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
@@ -1650,6 +1593,7 @@ Namespace Modelos
|
|||||||
Row("CuentaPredial") = CuentaPredial
|
Row("CuentaPredial") = CuentaPredial
|
||||||
Row("EsCargo") = 0
|
Row("EsCargo") = 0
|
||||||
Row("CvePromocionDetalle") = CvePromocionDetalle
|
Row("CvePromocionDetalle") = CvePromocionDetalle
|
||||||
|
Row("CantidadConversion") = CantidadConversion
|
||||||
|
|
||||||
If Me.DtDetalle.Columns.Contains("CveMarca") Then
|
If Me.DtDetalle.Columns.Contains("CveMarca") Then
|
||||||
Row("CveMarca") = DrPS("CveMarca")
|
Row("CveMarca") = DrPS("CveMarca")
|
||||||
@@ -2241,7 +2185,7 @@ Namespace Modelos
|
|||||||
IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
|
IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
|
||||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal,
|
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal,
|
||||||
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString,
|
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString,
|
||||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero) Then
|
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero, CantidadConversion:=Row("CantidadConversion").ToString.ToDecimal) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -3107,7 +3051,7 @@ Namespace Modelos
|
|||||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
Pago.AplicaTraslado = False
|
Pago.AplicaTraslado = False
|
||||||
Pago.Referencia = DrPago("Folio").ToString()
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||||
Pago.CveClientePago = ObjFactura.CveCliente
|
Pago.CveClientePago = ObjFactura.CveCliente
|
||||||
|
|
||||||
@@ -3128,11 +3072,10 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim DT As DataTable
|
Dim DT As DataTable
|
||||||
Dim CvePlantilaPoliza As Integer
|
Dim CvePlantilaPoliza As Integer
|
||||||
Dim PorcentajeAmortizacion As Decimal = 0
|
|
||||||
Dim sumaAmorticaciones As Decimal = 0
|
|
||||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||||
Dim idCuentaContabilizacion As Integer = 1
|
Dim idCuentaContabilizacion As Integer = 1
|
||||||
Dim CveCuentaContabilizacion As Integer = 1
|
|
||||||
Dim tipoCambio As Decimal
|
Dim tipoCambio As Decimal
|
||||||
Dim CuentasContablesInvalidas As New StringBuilder
|
Dim CuentasContablesInvalidas As New StringBuilder
|
||||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||||
@@ -3760,13 +3703,13 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal
|
|
||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
|
|
||||||
Case 91 'Amortizacion Nota de Credito
|
Case 91 'Amortizacion Nota de Credito
|
||||||
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||||
|
|
||||||
If ValorMultiplicador = -1 Then
|
'CANCELACION
|
||||||
|
If Not ErrorPrepoliza AndAlso ValorMultiplicador = -1 Then
|
||||||
Dim TipoCambioNC As Decimal = 1
|
Dim TipoCambioNC As Decimal = 1
|
||||||
|
|
||||||
If ObjFactura.CveMoneda = 2 Then
|
If ObjFactura.CveMoneda = 2 Then
|
||||||
@@ -3781,7 +3724,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'cuando es cancelación
|
'CANCELA LA APLICACION DEL PAGO DE LA NC EN LA FACTURA APLICADA
|
||||||
If ObjFactura.DtNCVinculadas IsNot Nothing Then
|
If ObjFactura.DtNCVinculadas IsNot Nothing Then
|
||||||
For Each row2 As DataRow In ObjFactura.DtNCVinculadas.Rows
|
For Each row2 As DataRow In ObjFactura.DtNCVinculadas.Rows
|
||||||
|
|
||||||
@@ -3891,76 +3834,54 @@ Namespace Modelos
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'VENTA NUEVA
|
||||||
|
If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then
|
||||||
|
importeMovimiento = 0
|
||||||
|
importeMX = 0
|
||||||
|
|
||||||
If ObjFactura.DtAnticiposAplicados IsNot Nothing Then
|
If ObjFactura.DtAnticiposAplicados IsNot Nothing Then
|
||||||
|
Dim VentaActual As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||||
|
|
||||||
For Each row2 As DataRow In ObjFactura.DtAnticiposAplicados.Rows
|
For Each row2 As DataRow In ObjFactura.DtAnticiposAplicados.Rows
|
||||||
|
|
||||||
If row2("CveConceptoContable").ToString().ToEntero = 12 Then
|
If row2("CveConceptoContable").ToString().ToEntero = 12 Then
|
||||||
importeMovimiento = row2("Importe").ToString().ToDecimal()
|
importeMovimiento = row2("Importe").ToString().ToDecimal
|
||||||
sumaAmorticaciones += importeMovimiento
|
|
||||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio,
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
ConceptoContable, Referencia, Concepto,
|
Pago.Fecha = Now
|
||||||
CveVenta:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente,
|
Pago.FechaDocumentoRelacionado = row2("Fecha").ToString().ToDateTime()
|
||||||
CveVentaAmortizacion:=ObjFactura.CveVenta,
|
Pago.ImportePagoVenta = importeMovimiento
|
||||||
ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
Pago.ImportePago = importeMovimiento
|
||||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
Pago.CveIE = row2("CveIE").ToString().ToEntero()
|
||||||
ErrorPrepoliza = True
|
Pago.CveMonedaPago = row2("CveMoneda").ToString().ToEntero()
|
||||||
End If
|
Pago.TCPago = row2("TipoCambioPago").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = row2("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = row2("CveVenta").ToString().ToEntero()
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Pago.CveClientePago = ObjFactura.CveCliente
|
||||||
|
|
||||||
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaActual, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI ES PAGO CON DEVOLUCION
|
|
||||||
If Not ErrorPrepoliza AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 4 Then
|
|
||||||
If row2("CveConceptoContable").ToString().ToEntero = 277 Then
|
|
||||||
|
|
||||||
importeMovimiento = row2("Importe").ToString().ToDecimal()
|
|
||||||
importeMX = importeMovimiento * tipoCambio
|
|
||||||
sumaAmorticaciones += importeMovimiento
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ErrorPrepoliza Then
|
If ErrorPrepoliza Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorPrepoliza AndAlso sumaAmorticaciones <> 0 Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, 251, Referencia, Concepto,
|
|
||||||
CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
|
||||||
CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Else
|
|
||||||
ObjFactura.SeGuardoPrePoliza = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
|
importeMX = 0
|
||||||
|
|
||||||
Case 4 'Venta Clasificacion
|
Case 4 'Venta Clasificacion
|
||||||
|
|
||||||
@@ -4314,7 +4235,7 @@ Namespace Modelos
|
|||||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
Pago.AplicaTraslado = False
|
Pago.AplicaTraslado = False
|
||||||
Pago.Referencia = DrPago("Folio").ToString()
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
Pago.CveVentaAmortizacion = -1
|
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||||
Pago.CveClientePago = ObjFactura.CveCliente
|
Pago.CveClientePago = ObjFactura.CveCliente
|
||||||
|
|
||||||
@@ -4366,7 +4287,7 @@ Namespace Modelos
|
|||||||
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
Pago.AplicaTraslado = False
|
Pago.AplicaTraslado = False
|
||||||
Pago.Referencia = DrPago("Folio").ToString()
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
Pago.CveVentaAmortizacion = DrPago("CveVentaNC").ToString().ToEntero()
|
||||||
Pago.TipoPago = DrPago("TipoPago").ToString()
|
Pago.TipoPago = DrPago("TipoPago").ToString()
|
||||||
Pago.CveClientePago = ObjFactura.CveCliente
|
Pago.CveClientePago = ObjFactura.CveCliente
|
||||||
|
|
||||||
|
|||||||
@@ -2476,7 +2476,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Obs" ItemStyle-Width="300px" ControlStyle-CssClass="Texto" />
|
<asp:BoundField DataField="Obs" ControlStyle-CssClass="Texto" />
|
||||||
<asp:TemplateField ItemStyle-Width="20%">
|
<asp:TemplateField ItemStyle-Width="20%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox runat="server" ID="TxtReferencia" Width="120px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtReferencia" Width="120px"></asp:TextBox>
|
||||||
@@ -2491,23 +2491,12 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="20%">
|
<asp:TemplateField ItemStyle-Width="30%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlPersonalGv" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" runat="server" Width="100%" CssClass="form-control select2me" style="margin-top:15px!important " >
|
||||||
<asp:DropDownList ID="DdlPersonalGv" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<%--<asp:Label runat="server" ID="LbCveAF" Text='<%# Eval("CodAF")%>'></asp:Label>--%>
|
</ItemTemplate>
|
||||||
<%--<asp:TextBox ID="LblCodigo" Text='<%# Eval("CodAF")%>' runat="server" Visible="false" Width="40px"></asp:TextBox>
|
|
||||||
|
|
||||||
<asp:HyperLink runat="server" ImageUrl="/Imagenes/buscar.gif" ID="HLBuscarAF"></asp:HyperLink>
|
|
||||||
|
|
||||||
<asp:HiddenField runat="server" ID="HdnCveConcepto" Value='<%# Eval("CveConcepto")%>' />
|
|
||||||
<asp:HiddenField runat="server" ID="HdnIndex" />
|
|
||||||
<asp:HiddenField runat="server" ID="HdnCveAF" Value='<%# Eval("CveActivoFijo")%>' />
|
|
||||||
<asp:HiddenField runat="server" ID="HdnCodAF" Value='<%# Eval("CodAF")%>' />--%>
|
|
||||||
</ItemTemplate>
|
|
||||||
<%-- <ItemStyle Width="90px" />--%>
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="100px">
|
<asp:TemplateField ItemStyle-Width="100px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -1568,6 +1568,7 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
BtnCancelarCompra.Visible = False
|
BtnCancelarCompra.Visible = False
|
||||||
End If
|
End If
|
||||||
|
CargaGvPersonal()
|
||||||
Else
|
Else
|
||||||
|
|
||||||
ViewState("CveProveedor") = -1
|
ViewState("CveProveedor") = -1
|
||||||
@@ -9357,6 +9358,16 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Dim CvePersonal As Integer = 0
|
Dim CvePersonal As Integer = 0
|
||||||
If Cont < GvPersonal.Rows.Count Then CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
|
If Cont < GvPersonal.Rows.Count Then CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero
|
||||||
|
|
||||||
|
'If CvePersonal <= 0 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 Then
|
||||||
|
' CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero
|
||||||
|
' If Not CvePersonal > 0 Then
|
||||||
|
' Alert("Debe asignar personal al reembolso.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Retorno = False
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
Dim Referencia As String = ""
|
Dim Referencia As String = ""
|
||||||
If Cont < GvPersonal.Rows.Count Then Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text
|
If Cont < GvPersonal.Rows.Count Then Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text
|
||||||
|
|
||||||
|
|||||||
@@ -781,7 +781,7 @@ Partial Class PopUpVerFactura
|
|||||||
Cliente = row("Cliente").ToString()
|
Cliente = row("Cliente").ToString()
|
||||||
Direccion = row("Direccion").ToString()
|
Direccion = row("Direccion").ToString()
|
||||||
Correo = row("Correo").ToString()
|
Correo = row("Correo").ToString()
|
||||||
Fecha = String.Format("{0dd/MM/yyyy}", row("Fecha"))
|
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
||||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
||||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
||||||
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
||||||
@@ -790,13 +790,11 @@ Partial Class PopUpVerFactura
|
|||||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
||||||
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SubProyecto = row("SubProyecto").ToString()
|
SubProyecto = row("SubProyecto").ToString()
|
||||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||||
Temperatura = row("Temperatura").ToString()
|
Temperatura = row("Temperatura").ToString()
|
||||||
Hora = String.Format("{0hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||||
Chofer = row("Chofer").ToString()
|
Chofer = row("Chofer").ToString()
|
||||||
CamPlaca = row("CamPlaca").ToString()
|
CamPlaca = row("CamPlaca").ToString()
|
||||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||||
|
|||||||
@@ -3287,6 +3287,17 @@
|
|||||||
<label for="<%= ChkUsaLimiteCredito.ClientID.ToString()%>">Usa límite de crédito:</label>
|
<label for="<%= ChkUsaLimiteCredito.ClientID.ToString()%>">Usa límite de crédito:</label>
|
||||||
<asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" />
|
<asp:CheckBox ID="ChkUsaLimiteCredito" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList runat="server" ID="DdlTipoFechaVencimiento" CssClass="form-control select2me" Width="200px">
|
||||||
|
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Fecha Factura</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Fecha Entrada</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlTipoFechaVencimiento" InitialValue="-1" runat="server" ControlToValidate="DdlTipoFechaVencimiento" Display="None"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Fecha Vencimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCRfvDdlTipoFechaVencimiento" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoFechaVencimiento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="<%= DdlTipoFechaVencimiento.ClientID.ToString()%>">Tipo Fecha Vencimiento:</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:LinkButton ID="LnkAddParametros" CssClass="btn btn-success" Text="Guardar" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkAddParametros" CssClass="btn btn-success" Text="Guardar" runat="server"></asp:LinkButton>
|
||||||
|
|||||||
@@ -930,6 +930,7 @@ Partial Class Compras_Proveedores
|
|||||||
TxtPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
TxtPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
||||||
LblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero
|
LblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero
|
||||||
LblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
LblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString
|
||||||
|
DdlTipoFechaVencimiento.SelectedValueExist(ObjProveedor.CveTipoFechaVencimiento)
|
||||||
|
|
||||||
'Sistema
|
'Sistema
|
||||||
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
|
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
|
||||||
@@ -4177,7 +4178,9 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
Dim ObjPro As New ClsCompProveedores
|
Dim ObjPro As New ClsCompProveedores
|
||||||
If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
DdlTipoFechaVencimiento.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
Alert("Limite de crédito modificado correctamente.")
|
Alert("Limite de crédito modificado correctamente.")
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -41,6 +41,13 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
|
|
||||||
|
max-width: calc(100% - 2em);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|||||||
@@ -146,7 +146,17 @@ Partial Class Compras_RepProductosServicios
|
|||||||
DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10"))
|
DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10"))
|
||||||
DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11"))
|
DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11"))
|
||||||
DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12"))
|
DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12"))
|
||||||
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "1"))
|
|
||||||
|
DdlGrupo.Items.Insert(10, New ListItem("Sucursal", "2"))
|
||||||
|
DdlGrupo.Items.Insert(11, New ListItem("Tipo de Gasto", "16"))
|
||||||
|
DdlGrupo.Items.Insert(12, New ListItem("Activo Fijo", "17"))
|
||||||
|
DdlGrupo.Items.Insert(13, New ListItem("Sub Tipo Activo Fijo", "18"))
|
||||||
|
DdlGrupo.Items.Insert(14, New ListItem("Tipo Activo Fijo", "19"))
|
||||||
|
DdlGrupo.Items.Insert(15, New ListItem("Tipo Documento", "20"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(16, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "1"))
|
||||||
|
|
||||||
'Agrega el grupo si es una empresa Agricola
|
'Agrega el grupo si es una empresa Agricola
|
||||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
||||||
@@ -209,7 +219,7 @@ Partial Class Compras_RepProductosServicios
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Then
|
If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Or (DdlGrupo.SelectedValue.ToEntero >= 16) Then
|
||||||
If e.Row.DBCampo("GpoID") = "1" Then
|
If e.Row.DBCampo("GpoID") = "1" Then
|
||||||
e.Row.Cells(0).Text = e.Row.DBCampo("Moneda")
|
e.Row.Cells(0).Text = e.Row.DBCampo("Moneda")
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
@@ -256,11 +266,21 @@ Partial Class Compras_RepProductosServicios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}",
|
'Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}" &
|
||||||
|
' "&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}" &
|
||||||
|
' "",
|
||||||
|
' DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"),
|
||||||
|
' e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"),
|
||||||
|
' e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"),
|
||||||
|
' DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
|
||||||
|
|
||||||
|
Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}" &
|
||||||
|
"&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}&CveCultivo={25}" &
|
||||||
|
"",
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"),
|
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"),
|
||||||
e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"),
|
e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"),
|
||||||
e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"),
|
e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"),
|
||||||
DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
|
e.Row.DBCampo("CveTipoGasto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero, e.Row.DBCampo("CveCultivo"))
|
||||||
|
|
||||||
|
|
||||||
If Not e.Row.DBCampo("GpoID") = "1" Then
|
If Not e.Row.DBCampo("GpoID") = "1" Then
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
Usuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
Usuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString
|
||||||
Familia = If(Request("CveFamilia") IsNot Nothing AndAlso Request("CveFamilia").ToEntero() > -3, Request("CveFamilia").ToEntero(), -1).ToString
|
Familia = If(Request("CveFamilia") IsNot Nothing AndAlso Request("CveFamilia").ToEntero() > -3, Request("CveFamilia").ToEntero(), -1).ToString
|
||||||
SubFamilia = If(Request("CveSubFamilia") IsNot Nothing AndAlso Request("CveSubFamilia").ToEntero() > -3, Request("CveSubFamilia").ToEntero(), -1).ToString
|
SubFamilia = If(Request("CveSubFamilia") IsNot Nothing AndAlso Request("CveSubFamilia").ToEntero() > -3, Request("CveSubFamilia").ToEntero(), -1).ToString
|
||||||
ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString
|
|
||||||
|
ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso (Request("CveAF").ToEntero() > 0 Or Request("CveAF").ToEntero() = -2), Request("CveAF").ToEntero(), -1).ToString
|
||||||
|
|
||||||
CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero
|
CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero
|
||||||
TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString
|
TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString
|
||||||
Deducible = If(Request("Deducible") IsNot Nothing, Request("Deducible").ToString, "-1").ToString
|
Deducible = If(Request("Deducible") IsNot Nothing, Request("Deducible").ToString, "-1").ToString
|
||||||
@@ -187,6 +189,7 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
'Carga Tipos de Gasto
|
'Carga Tipos de Gasto
|
||||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoGasto.DataBind()
|
DdlTipoGasto.DataBind()
|
||||||
|
DdlTipoGasto.Items.Add(New ListItem("Sin Asignar", "-2"))
|
||||||
|
|
||||||
'Cargo Categorias
|
'Cargo Categorias
|
||||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||||
@@ -227,10 +230,12 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
'Carga Tipos AF
|
'Carga Tipos AF
|
||||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoAF.DataBind()
|
DdlTipoAF.DataBind()
|
||||||
|
DdlTipoAF.Items.Add(New ListItem("Sin Asignar", "-2"))
|
||||||
|
|
||||||
'Carga SubTipos AF
|
'Carga SubTipos AF
|
||||||
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa)
|
DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||||
DdlSubTipoAF.DataBind()
|
DdlSubTipoAF.DataBind()
|
||||||
|
DdlSubTipoAF.Items.Add(New ListItem("Sin Asignar", "-2"))
|
||||||
|
|
||||||
'Carga Grupos
|
'Carga Grupos
|
||||||
CargaGrupo()
|
CargaGrupo()
|
||||||
@@ -261,6 +266,13 @@ Partial Class Compras_RepProductosServiciosDetalle
|
|||||||
DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15"))
|
DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DdlGrupo.Items.Insert(10, New ListItem("Sucursal", "2"))
|
||||||
|
DdlGrupo.Items.Insert(11, New ListItem("Tipo de Gasto", "16"))
|
||||||
|
DdlGrupo.Items.Insert(12, New ListItem("Activo Fijo", "17"))
|
||||||
|
DdlGrupo.Items.Insert(13, New ListItem("Sub Tipo Activo Fijo", "18"))
|
||||||
|
DdlGrupo.Items.Insert(14, New ListItem("Tipo Activo Fijo", "19"))
|
||||||
|
DdlGrupo.Items.Insert(15, New ListItem("Tipo Documento", "20"))
|
||||||
|
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
DdlGrupo.SelectedValueExist("8")
|
DdlGrupo.SelectedValueExist("8")
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -82,6 +82,46 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*Begin ScrollADS V2*/
|
||||||
|
|
||||||
|
.divContainerads {
|
||||||
|
width: 100%;
|
||||||
|
max-height: calc(100vh - 260px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
table.adssigscroll {
|
||||||
|
min-width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
table.adssigscroll tbody, table.adssigscroll thead {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.adssigscroll tr.stickyRow {
|
||||||
|
position: sticky;
|
||||||
|
top: 0; /* Se mantiene pegado en la parte superior */
|
||||||
|
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||||
|
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||||
|
}
|
||||||
|
.tr_order tr > th::after {
|
||||||
|
content: "\f0dc";
|
||||||
|
font:normal normal normal 14px / 1 FontAwesome;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 5px;
|
||||||
|
color: #32A1CF;
|
||||||
|
}
|
||||||
|
.tr_order tr > th.asce::after {
|
||||||
|
content: "\f0de";
|
||||||
|
}
|
||||||
|
|
||||||
|
.tr_order tr > th.desc::after {
|
||||||
|
content: "\f0dd";
|
||||||
|
}
|
||||||
|
/*END ScrollADS V2*/
|
||||||
|
|
||||||
table.GvDatos{
|
table.GvDatos{
|
||||||
|
|
||||||
@@ -99,27 +139,20 @@
|
|||||||
</li>
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:Label ID="LblTitulo" runat="server" Text="Gastos Acumulados"></asp:Label>
|
<asp:Label ID="LblTitulo" runat="server" Text="Reporte de Gastos"></asp:Label>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
|
||||||
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="btn-group pull-right btn-separete">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 42px; position: relative;">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
@@ -160,13 +193,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Tipo Movto
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 truncate">
|
||||||
|
<asp:DropDownList ID="DdlOpcionCuenta" runat="server" CssClass="form-control input-sm select2me" Width="100%">
|
||||||
|
<asp:ListItem Text="Todos" Value="-1" ></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Sin Importes" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Con Importes" Value="2" Selected="True"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||||
@@ -176,7 +221,8 @@
|
|||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText=""
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText=""
|
||||||
CssClass="table table-striped table-advance table-hover Widthall GvDatos adssigrid-scroll adssigrid-order" data-cols="0" data-rows="1" GridLines="None">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||||
|
data-sort="true" GridLines="None">
|
||||||
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
|
|||||||
@@ -35,13 +35,17 @@ Partial Class RepGastosCC
|
|||||||
Dim Obj As New ClsContabilidad
|
Dim Obj As New ClsContabilidad
|
||||||
|
|
||||||
If Obj.GetGastosRepCC(txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim().ToDate, UsuarioActual.CveEmpresa) Then
|
If Obj.GetGastosRepCC(txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim().ToDate, UsuarioActual.CveEmpresa) Then
|
||||||
GvDatos.DataSource = Obj.DtResultados
|
Dim dt As DataTable = Obj.DtResultados
|
||||||
|
If DdlOpcionCuenta.SelectedValue = "2" Then
|
||||||
|
dt = dt.FiltraParametros("Total > 0")
|
||||||
|
ElseIf DdlOpcionCuenta.SelectedValue = "1" Then
|
||||||
|
dt = dt.FiltraParametros("isnull(Total,0) = 0")
|
||||||
|
End If
|
||||||
|
GvDatos.DataSource = dt
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Obj.Dispose()
|
Obj.Dispose()
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
|
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -68,7 +72,7 @@ Partial Class RepGastosCC
|
|||||||
|
|
||||||
' e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
' e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||||
|
|
||||||
e.Row.Cells(1).Width = 250
|
e.Row.Cells(1).Width = 300
|
||||||
e.Row.Cells(0).Visible = False
|
e.Row.Cells(0).Visible = False
|
||||||
|
|
||||||
For Each Cells As TableCell In e.Row.Cells
|
For Each Cells As TableCell In e.Row.Cells
|
||||||
@@ -92,14 +96,12 @@ Partial Class RepGastosCC
|
|||||||
End If
|
End If
|
||||||
ElseIf e.Row.RowType = DataControlRowType.Header Then
|
ElseIf e.Row.RowType = DataControlRowType.Header Then
|
||||||
e.Row.Cells(0).Visible = False
|
e.Row.Cells(0).Visible = False
|
||||||
|
e.Row.Cells(1).CssClass = "grid-column250"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "PDF"
|
#Region "PDF"
|
||||||
'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||||
' If DtVentas IsNot Nothing Then
|
' If DtVentas IsNot Nothing Then
|
||||||
|
|||||||
@@ -27,14 +27,16 @@
|
|||||||
</li>
|
</li>
|
||||||
<asp:UpdatePanel runat="server" ID="UpAccionesDIOT" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpAccionesDIOT" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkAccionesDIOT" OnClick="LnkAccionesDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar DIOT</asp:LinkButton>
|
<asp:LinkButton ID="LnkTxtDIOT" OnClick="LnkTxtDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar DIOT</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExcelDIOT" OnClick="LnkExcelDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel DIOT</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkAccionesDIOT" />
|
<asp:PostBackTrigger ControlID="LnkTxtDIOT" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExcelDIOT" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
txtFechaI.Text = $"01/{FF.Month}/{FF.Year}";
|
txtFechaI.Text = $"01/{FF.Month}/{FF.Year}";
|
||||||
txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString();
|
txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString();
|
||||||
|
|
||||||
LnkAccionesDIOT.Visible = true;
|
LnkTxtDIOT.Visible = true;
|
||||||
|
LnkExcelDIOT.Visible = true;
|
||||||
|
|
||||||
DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa, CveTipoCuenta:2);
|
DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa, CveTipoCuenta:2);
|
||||||
DdlCuenta.DataBind();
|
DdlCuenta.DataBind();
|
||||||
@@ -181,15 +182,15 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
}
|
}
|
||||||
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
|
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
|
||||||
{
|
{
|
||||||
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
|
// Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
|
||||||
|
|
||||||
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
|
Decimal dif = Math.Round(e.Row.DBCampo("SubTotal16").ToDecimal() * 0.16M, 2) + Math.Round(e.Row.DBCampo("SubTotal8").ToDecimal() * 0.08M , 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
|
||||||
if (Math.Abs(dif) > 1)
|
if (Math.Abs(dif) > 1)
|
||||||
{
|
{
|
||||||
e.Row.ForeColor = System.Drawing.Color.Red;
|
e.Row.ForeColor = System.Drawing.Color.Red;
|
||||||
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
|
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
|
||||||
|
|
||||||
e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + SubTotal + " - IVA:" + e.Row.DBCampo("IVA");
|
e.Row.ToolTip = "Dif:" + dif.ToString() + " - IVA:" + e.Row.DBCampo("IVA");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.Row.DBCampo("IVA").ToDecimal() < 0 || e.Row.DBCampo("IEPS").ToDecimal() < 0 || e.Row.DBCampo("SubTotal16").ToDecimal() < 0 || e.Row.DBCampo("SubTotal8").ToDecimal() < 0 || e.Row.DBCampo("valorActosImp0").ToDecimal() < 0)
|
if (e.Row.DBCampo("IVA").ToDecimal() < 0 || e.Row.DBCampo("IEPS").ToDecimal() < 0 || e.Row.DBCampo("SubTotal16").ToDecimal() < 0 || e.Row.DBCampo("SubTotal8").ToDecimal() < 0 || e.Row.DBCampo("valorActosImp0").ToDecimal() < 0)
|
||||||
@@ -276,7 +277,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
|
Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}";
|
||||||
@@ -290,10 +290,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Ruta.GuardaLogAD();
|
Ruta.GuardaLogAD();
|
||||||
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
//ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
@@ -334,7 +330,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
return Respuesta.ToString();
|
return Respuesta.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkAccionesDIOT_Click(object sender, EventArgs e)
|
protected void LnkTxtDIOT_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
ClsContabilidad Objconta = new ClsContabilidad();
|
ClsContabilidad Objconta = new ClsContabilidad();
|
||||||
@@ -380,7 +376,12 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
DataTable dtt = new DataTable();
|
||||||
|
dtt = Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 AND ( ActosFN > 0 OR ActosFS > 0 OR Actos16 > 0 OR ActosImp16 > 0 OR ActosImpNotan16 > 0 OR DATasa0 > 0 OR DANoObjetoTN > 0 OR DANoObjetoNoTN > 0)");
|
||||||
|
//acumula los prov, globales en un solo registro
|
||||||
|
dtt = AcumularYReemplazar(dtt);
|
||||||
|
|
||||||
|
foreach (DataRow Drow in dtt.Rows)
|
||||||
{
|
{
|
||||||
SBDIOT.AppendLine(
|
SBDIOT.AppendLine(
|
||||||
Drow["TipoTercero"].ToString() + "|" +
|
Drow["TipoTercero"].ToString() + "|" +
|
||||||
@@ -391,55 +392,56 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
Drow["PaisResidenciaFiscal"].ToString() + "|" +
|
Drow["PaisResidenciaFiscal"].ToString() + "|" +
|
||||||
Drow["Jurisdiccion"].ToString() + "|" +
|
Drow["Jurisdiccion"].ToString() + "|" +
|
||||||
// 3.2 valor de los actos o actividades
|
// 3.2 valor de los actos o actividades
|
||||||
LV0(Drow["ActosFN"].ToString()) + "|" + // actos norte
|
LV(Drow["ActosFN"].ToString()) + "|" + // actos norte
|
||||||
LV0(Drow["ActosDevFN"].ToString()) + "|" + // desc norte
|
LV(Drow["ActosDevFN"].ToString()) + "|" + // desc norte
|
||||||
LV0(Drow["ActosFS"].ToString()) + "|" + // actos sur
|
LV(Drow["ActosFS"].ToString()) + "|" + // actos sur
|
||||||
LV0(Drow["ActosDevFS"].ToString()) + "|" + // desc sur
|
LV(Drow["ActosDevFS"].ToString()) + "|" + // desc sur
|
||||||
LV0(Drow["Actos16"].ToString()) + "|" + // 16%
|
LV(Drow["Actos16"].ToString()) + "|" + // 16%
|
||||||
LV0(Drow["ActosDev16"].ToString()) + "|" + // desc 16%
|
LV(Drow["ActosDev16"].ToString()) + "|" + // desc 16%
|
||||||
LV0(Drow["ActosImp16"].ToString()) + "|" + // importacion 16%
|
LV(Drow["ActosImp16"].ToString()) + "|" + // importacion 16%
|
||||||
LV0(Drow["ActosImpDev16"].ToString()) + "|" + // desc importacion 16%
|
LV(Drow["ActosImpDev16"].ToString()) + "|" + // desc importacion 16%
|
||||||
LV0(Drow["ActosImpNotan16"].ToString()) + "|" + // importacion intangibles 16%
|
LV(Drow["ActosImpNotan16"].ToString()) + "|" + // importacion intangibles 16%
|
||||||
LV0(Drow["ActosImpNotanDev16"].ToString()) + "|" + // desc intangibles 16%
|
LV(Drow["ActosImpNotanDev16"].ToString()) + "|" + // desc intangibles 16%
|
||||||
// 3.3 IVA Acreditable
|
// 3.3 IVA Acreditable
|
||||||
LV0(Drow["AcredFN"].ToString()) + "|" + // actos norte
|
LV(Drow["AcredFN"].ToString()) + "|" + // actos norte
|
||||||
LV0(Drow["AcreNoFN"].ToString()) + "|" + // proporcion actos norte
|
LV(Drow["AcreNoFN"].ToString()) + "|" + // proporcion actos norte
|
||||||
LV0(Drow["AcredFS"].ToString()) + "|" + // actos sur
|
LV(Drow["AcredFS"].ToString()) + "|" + // actos sur
|
||||||
LV0(Drow["AcredNoFS"].ToString()) + "|" + // proporcion actos sur
|
LV(Drow["AcredNoFS"].ToString()) + "|" + // proporcion actos sur
|
||||||
LV0(Drow["Acred16"].ToString()) + "|" + // 16%
|
LV(Drow["Acred16"].ToString()) + "|" + // 16%
|
||||||
LV0(Drow["AcredIva16"].ToString()) + "|" + // proporcion 16%
|
LV(Drow["AcredIva16"].ToString()) + "|" + // proporcion 16%
|
||||||
LV0(Drow["AcredImp16"].ToString()) + "|" + // importacion 16%
|
LV(Drow["AcredImp16"].ToString()) + "|" + // importacion 16%
|
||||||
LV0(Drow["AcredNoImp16"].ToString()) + "|" + // proporción importacion 16%
|
LV(Drow["AcredNoImp16"].ToString()) + "|" + // proporción importacion 16%
|
||||||
LV0(Drow["AcredImpIntan16"].ToString()) + "|" + // intangibles 16%
|
LV(Drow["AcredImpIntan16"].ToString()) + "|" + // intangibles 16%
|
||||||
LV0(Drow["AcredNoImpIntan16"].ToString()) + "|" + // proporcion intangibles 16%
|
LV(Drow["AcredNoImpIntan16"].ToString()) + "|" + // proporcion intangibles 16%
|
||||||
// 3.4 IVA NO Acreditable
|
// 3.4 IVA NO Acreditable
|
||||||
LV0(Drow["NoAcredFN"].ToString()) + "|" +
|
LV(Drow["NoAcredFN"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNoFN"].ToString()) + "|" +
|
LV(Drow["NoAcredNoFN"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredExentaFN"].ToString()) + "|" +
|
LV(Drow["NoAcredExentaFN"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNoObjetoFN"].ToString()) + "|" +
|
LV(Drow["NoAcredNoObjetoFN"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredFS"].ToString()) + "|" +
|
LV(Drow["NoAcredFS"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNoFS"].ToString()) + "|" +
|
LV(Drow["NoAcredNoFS"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredExentaFS"].ToString()) + "|" +
|
LV(Drow["NoAcredExentaFS"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNoObjetoFS"].ToString()) + "|" +
|
LV(Drow["NoAcredNoObjetoFS"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcred16"].ToString()) + "|" +
|
LV(Drow["NoAcred16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNo16"].ToString()) + "|" +
|
LV(Drow["NoAcredNo16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredExenta16"].ToString()) + "|" +
|
LV(Drow["NoAcredExenta16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredNoObjeto16"].ToString()) + "|" +
|
LV(Drow["NoAcredNoObjeto16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredIntan16"].ToString()) + "|" +
|
|
||||||
LV0(Drow["NoAcredIntanNo16"].ToString()) + "|" +
|
LV(Drow["NoAcredTan16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredIntanExenta16"].ToString()) + "|" +
|
LV(Drow["NoAcredTanNo16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredIntanNoObjeto16"].ToString()) + "|" +
|
LV(Drow["NoAcredTanExenta16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredImp16"].ToString()) + "|" +
|
LV(Drow["NoAcredTanNoObjeto16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredImpNo16"].ToString()) + "|" +
|
LV(Drow["NoAcredImpIntan16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredImpExenta16"].ToString()) + "|" +
|
LV(Drow["NoAcredImpIntanNo16"].ToString()) + "|" +
|
||||||
LV0(Drow["NoAcredImpNoObjeto16"].ToString()) + "|" +
|
LV(Drow["NoAcredImpIntanExenta16"].ToString()) + "|" +
|
||||||
|
LV(Drow["NoAcredImpIntanNoObjeto16"].ToString()) + "|" +
|
||||||
// 3.5 datos adicionales
|
// 3.5 datos adicionales
|
||||||
LV0(Drow["DAIvaRetenido"].ToString()) + "|" + // VA retenido por el contribuyente
|
LV(Drow["DAIvaRetenido"].ToString()) + "|" + // VA retenido por el contribuyente
|
||||||
LV0(Drow["DAIvaExentoImpo"].ToString()) + "|" + //Actos o actividades pagados en la importación de bienes y servicios por los que no se pagara el IVA (Exentos)
|
LV(Drow["DAIvaExentoImpo"].ToString()) + "|" + //Actos o actividades pagados en la importación de bienes y servicios por los que no se pagara el IVA (Exentos)
|
||||||
LV0(Drow["DAIvaExento"].ToString()) + "|" + // Actos o actividades pagados por los que no se pagará el IVA(Exentos)
|
LV(Drow["DAIvaExento"].ToString()) + "|" + // Actos o actividades pagados por los que no se pagará el IVA(Exentos)
|
||||||
LV0(Drow["DATasa0"].ToString()) + "|" + // Demás actos o actividades pagados a la tasa del 0%
|
LV(Drow["DATasa0"].ToString()) + "|" + // Demás actos o actividades pagados a la tasa del 0%
|
||||||
LV0(Drow["DANoObjetoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en
|
LV(Drow["DANoObjetoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en
|
||||||
LV0(Drow["DANoObjetoNoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion
|
LV(Drow["DANoObjetoNoTN"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion
|
||||||
(Drow["DAManifiesto"].ToString())); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor
|
(Drow["DAManifiesto"].ToString())); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -478,6 +480,81 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
Response.End();
|
Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DataTable AcumularYReemplazar(DataTable dt)
|
||||||
|
{
|
||||||
|
if (dt.Rows.Count == 0) return dt;
|
||||||
|
|
||||||
|
// 🔹 Crear una nueva fila con valores acumulados
|
||||||
|
DataRow nuevaFila = dt.NewRow();
|
||||||
|
nuevaFila["TipoTercero"] = "15"; // Puedes definir un ID especial o NULL si no se usa.
|
||||||
|
nuevaFila["TipoOperacion"] = "87";
|
||||||
|
nuevaFila["RFC_DIOT"] = "XAXX010101000";
|
||||||
|
|
||||||
|
var filasFiltradas = dt.AsEnumerable()
|
||||||
|
.Where(row => row.Field<string>("TipoTercero") == "15")
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// 🔹 Recorrer las filas y sumar valores
|
||||||
|
foreach (DataRow row in dt.FiltraParametros("TipoTercero = '15' ").Rows)
|
||||||
|
{
|
||||||
|
// 3.2 valor de los actos o actividades
|
||||||
|
nuevaFila["ActosFN"] = nuevaFila["ActosFN"].ToString().ToEntero() + row["ActosFN"].ToString().ToEntero(); // actos norte
|
||||||
|
nuevaFila["ActosFN"] = nuevaFila["ActosFN"].ToString().ToEntero() + row["ActosFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosDevFN"] = nuevaFila["ActosDevFN"].ToString().ToEntero() + row["ActosDevFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosFS"] = nuevaFila["ActosFS"].ToString().ToEntero() + row["ActosFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosDevFS"] = nuevaFila["ActosDevFS"].ToString().ToEntero() + row["ActosDevFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["Actos16"] = nuevaFila["Actos16"].ToString().ToEntero() + row["Actos16"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosDev16"] = nuevaFila["ActosDev16"].ToString().ToEntero() + row["ActosDev16"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosImp16"] = nuevaFila["ActosImp16"].ToString().ToEntero() + row["ActosImp16"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosImpDev16"] = nuevaFila["ActosImpDev16"].ToString().ToEntero() + row["ActosImpDev16"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosImpNotan16"] = nuevaFila["ActosImpNotan16"].ToString().ToEntero() + row["ActosImpNotan16"].ToString().ToEntero();
|
||||||
|
nuevaFila["ActosImpNotanDev16"] = nuevaFila["ActosImpNotanDev16"].ToString().ToEntero() + row["ActosImpNotanDev16"].ToString().ToEntero();
|
||||||
|
|
||||||
|
// 3.3 IVA Acreditable
|
||||||
|
nuevaFila["AcredFN"] = nuevaFila["AcredFN"].ToString().ToEntero() + row["AcredFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcreNoFN"] = nuevaFila["AcreNoFN"].ToString().ToEntero() + row["AcreNoFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredFS"] = nuevaFila["AcredFS"].ToString().ToEntero() + row["AcredFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredNoFS"] = nuevaFila["AcredNoFS"].ToString().ToEntero() + row["AcredNoFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["Acred16"] = nuevaFila["Acred16"].ToString().ToEntero() + row["Acred16"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredIva16"] = nuevaFila["AcredIva16"].ToString().ToEntero() + row["AcredIva16"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredImp16"] = nuevaFila["AcredImp16"].ToString().ToEntero() + row["AcredImp16"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredNoImp16"] = nuevaFila["AcredNoImp16"].ToString().ToEntero() + row["AcredNoImp16"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredImpIntan16"] = nuevaFila["AcredImpIntan16"].ToString().ToEntero() + row["AcredImpIntan16"].ToString().ToEntero();
|
||||||
|
nuevaFila["AcredNoImpIntan16"] = nuevaFila["AcredNoImpIntan16"].ToString().ToEntero() + row["AcredNoImpIntan16"].ToString().ToEntero();
|
||||||
|
|
||||||
|
// 3.4 IVA NO Acreditable
|
||||||
|
nuevaFila["NoAcredFN"] = nuevaFila["NoAcredFN"].ToString().ToEntero() + row["NoAcredFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNoFN"] = nuevaFila["NoAcredNoFN"].ToString().ToEntero() + row["NoAcredNoFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredExentaFN"] = nuevaFila["NoAcredExentaFN"].ToString().ToEntero() + row["NoAcredExentaFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNoObjetoFN"] = nuevaFila["NoAcredNoObjetoFN"].ToString().ToEntero() + row["NoAcredNoObjetoFN"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredFS"] = nuevaFila["NoAcredFS"].ToString().ToEntero() + row["NoAcredFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNoFS"] = nuevaFila["NoAcredNoFS"].ToString().ToEntero() + row["NoAcredNoFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredExentaFS"] = nuevaFila["NoAcredExentaFS"].ToString().ToEntero() + row["NoAcredExentaFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNoObjetoFS"] = nuevaFila["NoAcredNoObjetoFS"].ToString().ToEntero() + row["NoAcredNoObjetoFS"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcred16"] = nuevaFila["NoAcred16"].ToString().ToEntero() + row["NoAcred16"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNo16"] = nuevaFila["NoAcredNo16"].ToString().ToEntero() + row["NoAcredNo16"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredExenta16"] = nuevaFila["NoAcredExenta16"].ToString().ToEntero() + row["NoAcredExenta16"].ToString().ToEntero();
|
||||||
|
nuevaFila["NoAcredNoObjeto16"] = nuevaFila["NoAcredNoObjeto16"].ToString().ToEntero() + row["NoAcredNoObjeto16"].ToString().ToEntero();
|
||||||
|
|
||||||
|
// 3.5 Datos Adicionales
|
||||||
|
nuevaFila["DAIvaRetenido"] = nuevaFila["DAIvaRetenido"].ToString().ToEntero() + row["DAIvaRetenido"].ToString().ToEntero();
|
||||||
|
nuevaFila["DAIvaExentoImpo"] = nuevaFila["DAIvaExentoImpo"].ToString().ToEntero() + row["DAIvaExentoImpo"].ToString().ToEntero();
|
||||||
|
nuevaFila["DAIvaExento"] = nuevaFila["DAIvaExento"].ToString().ToEntero() + row["DAIvaExento"].ToString().ToEntero();
|
||||||
|
nuevaFila["DATasa0"] = nuevaFila["DATasa0"].ToString().ToEntero() + row["DATasa0"].ToString().ToEntero();
|
||||||
|
nuevaFila["DANoObjetoTN"] = nuevaFila["DANoObjetoTN"].ToString().ToEntero() + row["DANoObjetoTN"].ToString().ToEntero();
|
||||||
|
nuevaFila["DANoObjetoNoTN"] = nuevaFila["DANoObjetoNoTN"].ToString().ToEntero() + row["DANoObjetoNoTN"].ToString().ToEntero();
|
||||||
|
nuevaFila["DAManifiesto"] = "01";
|
||||||
|
}
|
||||||
|
// 🔹 Eliminar filas originales filtradas
|
||||||
|
foreach (var row in filasFiltradas)
|
||||||
|
{
|
||||||
|
dt.Rows.Remove(row);
|
||||||
|
}
|
||||||
|
// 🔹 Agregar la nueva fila acumulada
|
||||||
|
dt.Rows.Add(nuevaFila);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
protected void LnkModalCompara_Click(object sender, EventArgs e)
|
protected void LnkModalCompara_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -678,4 +755,153 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
protected void LnkExcelDIOT_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ClsContabilidad Objconta = new ClsContabilidad();
|
||||||
|
StringBuilder SBDIOT = new StringBuilder();
|
||||||
|
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||||
|
|
||||||
|
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||||
|
{
|
||||||
|
DataTable TmpDIOT = new DataTable("DIOT");
|
||||||
|
TmpDIOT.Columns.Add("TipoTercero", typeof(string)); TmpDIOT.Columns.Add("TipoOperacion", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("RFC_DIOT", typeof(string)); TmpDIOT.Columns.Add("NumeroIDFiscal", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NombreExtranjero", typeof(string)); TmpDIOT.Columns.Add("PaisResidenciaFiscal", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("Jurisdiccion", typeof(string));
|
||||||
|
|
||||||
|
TmpDIOT.Columns.Add("ActosFN", typeof(string)); TmpDIOT.Columns.Add("ActosDevFN", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("ActosFS", typeof(string)); TmpDIOT.Columns.Add("ActosDevFS", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("Actos16", typeof(string)); TmpDIOT.Columns.Add("ActosDev16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("ActosImp16", typeof(string)); TmpDIOT.Columns.Add("ActosImpDev16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("ActosImpNotan16", typeof(string)); TmpDIOT.Columns.Add("ActosImpNotanDev16", typeof(string));
|
||||||
|
|
||||||
|
TmpDIOT.Columns.Add("AcredFN", typeof(string)); TmpDIOT.Columns.Add("AcreNoFN", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("AcredFS", typeof(string)); TmpDIOT.Columns.Add("AcredNoFS", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("Acred16", typeof(string)); TmpDIOT.Columns.Add("AcredIva16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("AcredImp16", typeof(string)); TmpDIOT.Columns.Add("AcredNoImp16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("AcredImpIntan16", typeof(string)); TmpDIOT.Columns.Add("AcredNoImpIntan16", typeof(string));
|
||||||
|
|
||||||
|
TmpDIOT.Columns.Add("NoAcredFN", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoFN", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredExentaFN", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoObjetoFN", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredFS", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoFS", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredExentaFS", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoObjetoFS", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcred16", typeof(string)); TmpDIOT.Columns.Add("NoAcredNo16", typeof(string));
|
||||||
|
|
||||||
|
TmpDIOT.Columns.Add("NoAcredExenta16", typeof(string)); TmpDIOT.Columns.Add("NoAcredNoObjeto16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredTan16", typeof(string)); TmpDIOT.Columns.Add("NoAcredTanNo16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredTanExenta16", typeof(string)); TmpDIOT.Columns.Add("NoAcredTanNoObjeto16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredImpIntan16", typeof(string)); TmpDIOT.Columns.Add("NoAcredImpIntanNo16", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("NoAcredImpIntanExenta16", typeof(string)); TmpDIOT.Columns.Add("NoAcredImpIntanNoObjeto16", typeof(string));
|
||||||
|
|
||||||
|
TmpDIOT.Columns.Add("DAIvaRetenido", typeof(string)); TmpDIOT.Columns.Add("DAIvaExentoImpo", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("DAIvaExento", typeof(string)); TmpDIOT.Columns.Add("DATasa0", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("DANoObjetoTN", typeof(string)); TmpDIOT.Columns.Add("DANoObjetoNoTN", typeof(string));
|
||||||
|
TmpDIOT.Columns.Add("DAManifiesto", typeof(string));
|
||||||
|
|
||||||
|
DataTable dtt = new DataTable();
|
||||||
|
dtt = Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 AND ( ActosFN > 0 OR ActosFS > 0 OR Actos16 > 0 OR ActosImp16 > 0 OR ActosImpNotan16 > 0 OR DATasa0 > 0 OR DANoObjetoTN > 0 OR DANoObjetoNoTN > 0)");
|
||||||
|
//acumula los prov, globales en un solo registro
|
||||||
|
dtt = AcumularYReemplazar(dtt);
|
||||||
|
|
||||||
|
foreach (DataRow Drow in dtt.Rows) // and(IVA > 1 OR IEPS > 0)
|
||||||
|
{
|
||||||
|
DataRow dr = TmpDIOT.NewRow();
|
||||||
|
|
||||||
|
dr["TipoTercero"] = Drow["TipoTercero"].ToString();
|
||||||
|
dr["TipoOperacion"] = Drow["TipoOperacion"].ToString();
|
||||||
|
dr["RFC_DIOT"] = Drow["RFC_DIOT"].ToString();
|
||||||
|
dr["NumeroIDFiscal"] = Drow["NumeroIDFiscal"].ToString();
|
||||||
|
dr["NombreExtranjero"] = Drow["NombreExtranjero"].ToString();
|
||||||
|
dr["PaisResidenciaFiscal"] = Drow["PaisResidenciaFiscal"].ToString();
|
||||||
|
dr["Jurisdiccion"] = Drow["Jurisdiccion"].ToString();
|
||||||
|
// 3.2 valor de los actos o actividades
|
||||||
|
dr["ActosFN"] = LV(Drow["ActosFN"].ToString()); // actos norte
|
||||||
|
dr["ActosDevFN"] = LV(Drow["ActosDevFN"].ToString()); // desc norte
|
||||||
|
dr["ActosFS"] = LV(Drow["ActosFS"].ToString()); // actos sur
|
||||||
|
dr["ActosDevFS"] = LV(Drow["ActosDevFS"].ToString()); // desc sur
|
||||||
|
dr["Actos16"] = LV(Drow["Actos16"].ToString()); // 16%
|
||||||
|
dr["ActosDev16"] = LV(Drow["ActosDev16"].ToString()); // desc 16%
|
||||||
|
dr["ActosImp16"] = LV(Drow["ActosImp16"].ToString()); // importacion 16%
|
||||||
|
dr["ActosImpDev16"] = LV(Drow["ActosImpDev16"].ToString()); // desc importacion 16%
|
||||||
|
dr["ActosImpNotan16"] = LV(Drow["ActosImpNotan16"].ToString()); // importacion intangibles 16%
|
||||||
|
dr["ActosImpNotanDev16"] = LV(Drow["ActosImpNotanDev16"].ToString()); // desc intangibles 16%
|
||||||
|
// 3.3 IVA Acreditable
|
||||||
|
dr["AcredFN"] = LV(Drow["AcredFN"].ToString()); // actos norte
|
||||||
|
dr["AcreNoFN"] = LV(Drow["AcreNoFN"].ToString()); // proporcion actos norte
|
||||||
|
dr["AcredFS"] = LV(Drow["AcredFS"].ToString()); // actos sur
|
||||||
|
dr["AcredNoFS"] = LV(Drow["AcredNoFS"].ToString()); // proporcion actos sur
|
||||||
|
dr["Acred16"] = LV(Drow["Acred16"].ToString()); // 16%
|
||||||
|
dr["AcredIva16"] = LV(Drow["AcredIva16"].ToString()); // proporcion 16%
|
||||||
|
dr["AcredImp16"] = LV(Drow["AcredImp16"].ToString()); // importacion 16%
|
||||||
|
dr["AcredNoImp16"] = LV(Drow["AcredNoImp16"].ToString()); // proporción importacion 16%
|
||||||
|
dr["AcredImpIntan16"] = LV(Drow["AcredImpIntan16"].ToString()); // intangibles 16%
|
||||||
|
dr["AcredNoImpIntan16"] = LV(Drow["AcredNoImpIntan16"].ToString()); // proporcion intangibles 16%
|
||||||
|
// 3.4 IVA NO Acreditable
|
||||||
|
dr["NoAcredFN"] = LV(Drow["NoAcredFN"].ToString());
|
||||||
|
dr["NoAcredNoFN"] = LV(Drow["NoAcredNoFN"].ToString());
|
||||||
|
dr["NoAcredExentaFN"] = LV(Drow["NoAcredExentaFN"].ToString());
|
||||||
|
dr["NoAcredNoObjetoFN"] = LV(Drow["NoAcredNoObjetoFN"].ToString());
|
||||||
|
dr["NoAcredFS"] = LV(Drow["NoAcredFS"].ToString());
|
||||||
|
dr["NoAcredNoFS"] = LV(Drow["NoAcredNoFS"].ToString());
|
||||||
|
dr["NoAcredExentaFS"] = LV(Drow["NoAcredExentaFS"].ToString());
|
||||||
|
dr["NoAcredNoObjetoFS"] = LV(Drow["NoAcredNoObjetoFS"].ToString());
|
||||||
|
dr["NoAcred16"] = LV(Drow["NoAcred16"].ToString());
|
||||||
|
dr["NoAcredNo16"] = LV(Drow["NoAcredNo16"].ToString());
|
||||||
|
|
||||||
|
dr["NoAcredExenta16"] = LV(Drow["NoAcredExenta16"].ToString());
|
||||||
|
dr["NoAcredNoObjeto16"] = LV(Drow["NoAcredNoObjeto16"].ToString());
|
||||||
|
dr["NoAcredTan16"] = LV(Drow["NoAcredTan16"].ToString());
|
||||||
|
dr["NoAcredTanNo16"] = LV(Drow["NoAcredTanNo16"].ToString());
|
||||||
|
dr["NoAcredTanExenta16"] = LV(Drow["NoAcredTanExenta16"].ToString());
|
||||||
|
dr["NoAcredTanNoObjeto16"] = LV(Drow["NoAcredTanNoObjeto16"].ToString());
|
||||||
|
dr["NoAcredImpIntan16"] = LV(Drow["NoAcredImpIntan16"].ToString());
|
||||||
|
dr["NoAcredImpIntanNo16"] = LV(Drow["NoAcredImpIntanNo16"].ToString());
|
||||||
|
dr["NoAcredImpIntanExenta16"] = LV(Drow["NoAcredImpIntanExenta16"].ToString());
|
||||||
|
dr["NoAcredImpIntanNoObjeto16"] = LV(Drow["NoAcredImpIntanNoObjeto16"].ToString());
|
||||||
|
// 3.5 datos adicionales
|
||||||
|
dr["DAIvaRetenido"] = LV(Drow["DAIvaRetenido"].ToString()); // VA retenido por el contribuyente
|
||||||
|
dr["DAIvaExentoImpo"] = LV(Drow["DAIvaExentoImpo"].ToString()); //Actos o actividades pagados en la importación de bienes y servicios por los que no se pagara el IVA (Exentos)
|
||||||
|
dr["DAIvaExento"] = LV(Drow["DAIvaExento"].ToString()); // Actos o actividades pagados por los que no se pagará el IVA(Exentos)
|
||||||
|
dr["DATasa0"] = LV(Drow["DATasa0"].ToString()); // Demás actos o actividades pagados a la tasa del 0%
|
||||||
|
dr["DANoObjetoTN"] = LV(Drow["DANoObjetoTN"].ToString()); // Actos o actividades no objeto del IVA realizados en
|
||||||
|
dr["DANoObjetoNoTN"] = LV(Drow["DANoObjetoNoTN"].ToString()); // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion
|
||||||
|
dr["DAManifiesto"] = (Drow["DAManifiesto"].ToString()); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor
|
||||||
|
TmpDIOT.Rows.Add(dr);
|
||||||
|
}
|
||||||
|
Objconta.Dispose();
|
||||||
|
TmpDIOT.Columns[0].ColumnName = "01- Tipo de tercero\r\n"; TmpDIOT.Columns[1].ColumnName = "02 -Tipo de operación\r\n";
|
||||||
|
TmpDIOT.Columns[2].ColumnName = "03- RFC\r\n"; TmpDIOT.Columns[3].ColumnName = "04 - ID Fiscal";
|
||||||
|
TmpDIOT.Columns[4].ColumnName = "05- Nombre del Extranjero\r\n"; TmpDIOT.Columns[5].ColumnName = "06 - País de residencia\r\n";
|
||||||
|
TmpDIOT.Columns[6].ColumnName = "07- Jurisdicción Fiscal\r\n"; TmpDIOT.Columns[7].ColumnName = "08 - Actividades pagadas RFN\r\n";
|
||||||
|
TmpDIOT.Columns[8].ColumnName = "09- Devoluciones, Descuentos y Bonificaciones RFN\r\n"; TmpDIOT.Columns[9].ColumnName = "10 - Actividades pagadas RFS\r\n";
|
||||||
|
TmpDIOT.Columns[10].ColumnName = "11- Devoluciones, Descuentos y Bonificaciones RFS\r\n"; TmpDIOT.Columns[11].ColumnName = " 12 - Actividades pagadas Resto del país\r\n";
|
||||||
|
TmpDIOT.Columns[12].ColumnName = "13- Devoluciones, Descuentos y Bonificaciones Resto del país\r\n"; TmpDIOT.Columns[13].ColumnName = "14 - Importaciones 16%\r\n";
|
||||||
|
TmpDIOT.Columns[14].ColumnName = "15- Devoluciones, Descuentos y Bonificaciones en Importaciones\r\n"; TmpDIOT.Columns[15].ColumnName = "16 - Importaciones Intangibles 16%\r\n";
|
||||||
|
TmpDIOT.Columns[16].ColumnName = "17- Devoluciones, Descuentos y Bonificaciones en Importaciones Intangibles\r\n"; TmpDIOT.Columns[17].ColumnName = "18 - IVA Acreditable Pagado Frontera Norte\r\n";
|
||||||
|
|
||||||
|
TmpDIOT.Columns[18].ColumnName = "19- Proporción de actividades pagadas Frontera Norte\r\n"; TmpDIOT.Columns[19].ColumnName = "20 - IVA Acreditable Pagado Frontera Sur\r\n";
|
||||||
|
TmpDIOT.Columns[20].ColumnName = "21- Proporción de actividades pagadas Frontera Sur\r\n"; TmpDIOT.Columns[21].ColumnName = "22 - IVA Acreditable Pagado Resto del País\r\n";
|
||||||
|
TmpDIOT.Columns[22].ColumnName = "23- Proporción de actividades pagadas Resto del País\r\n"; TmpDIOT.Columns[23].ColumnName = "24- IVA Acreditable Pagado Importación Tangibles\r\n";
|
||||||
|
TmpDIOT.Columns[24].ColumnName = "25- Proporción de actividades pagadas Importación Tangibles \r\n"; TmpDIOT.Columns[25].ColumnName = "26- IVA Acreditable Pagado Importación Intangibles\r\n";
|
||||||
|
TmpDIOT.Columns[26].ColumnName = "27- Proporción de actividades pagadas Importación Intangibles\r\n"; TmpDIOT.Columns[27].ColumnName = "28- IVA no acreditable - Proporción de actividades pagadas 16% RFN\r\n";
|
||||||
|
|
||||||
|
TmpDIOT.Columns[28].ColumnName = "29- IVA No Acreditable - Actividades que no cumplen requisitos fiscales RFN\r\n"; TmpDIOT.Columns[29].ColumnName = "30- IVA No Acreditable - Actividades Exentas RFN\r\n";
|
||||||
|
TmpDIOT.Columns[30].ColumnName = "31 - IVA No Acreditable - Actividades No Objeto RFN\r\n"; TmpDIOT.Columns[31].ColumnName = "32 - IVA no acreditable - Proporción de actividades pagadas 16% RFS\r\n";
|
||||||
|
TmpDIOT.Columns[32].ColumnName = "33 - IVA No Acreditable - Actividades que no cumplen requisitos fiscales RFS\r\n"; TmpDIOT.Columns[33].ColumnName = "34- IVA No Acreditable - Actividades Exentas RFS\r\n";
|
||||||
|
TmpDIOT.Columns[34].ColumnName = "35 -IVA No Acreditable - Actividades No Objeto RFS\r\n"; TmpDIOT.Columns[35].ColumnName = "36 - IVA no acreditable - Proporción de actividades pagadas 16% Resto del país\r\n";
|
||||||
|
TmpDIOT.Columns[36].ColumnName = "37- IVA No Acreditable - Actividades que no cumplen requisitos fiscales Resto del país\r\n"; TmpDIOT.Columns[37].ColumnName = "38 - IVA No Acreditable - Actividades Exentas Resto del país\r\n";
|
||||||
|
|
||||||
|
TmpDIOT.Columns[38].ColumnName = "39 - IVA No Acreditable - Actividades No Objeto Resto del país\r\n"; TmpDIOT.Columns[39].ColumnName = "40 - IVA no acreditable - Proporción de actividades pagadas 16% Importación Tangibles\r\n";
|
||||||
|
TmpDIOT.Columns[40].ColumnName = "41 - IVA No Acreditable - Actividades que no cumplen requisitos fiscales Importación Tangibles\r\n"; TmpDIOT.Columns[41].ColumnName = "42 - IVA No Acreditable - Actividades Exentas Importación Tangibles\r\n";
|
||||||
|
TmpDIOT.Columns[42].ColumnName = "43 - IVA No Acreditable - Actividades No Objeto Importación Tangibles\r\n"; TmpDIOT.Columns[43].ColumnName = "44 - IVA no acreditable - Proporción de actividades pagadas 16% Importación Intangibles\r\n";
|
||||||
|
TmpDIOT.Columns[44].ColumnName = "45 - IVA No Acreditable - Actividades que no cumplen requisitos fiscales Importación Intangibles\r\n"; TmpDIOT.Columns[45].ColumnName = "46 - IVA No Acreditable - Actividades Exentas Importación Intangibles\r\n";
|
||||||
|
TmpDIOT.Columns[46].ColumnName = "47 - IVA No Acreditable - Actividades No Objeto Importación Intangibles\r\n"; TmpDIOT.Columns[47].ColumnName = "48 - IVA Retenido POR el contribuyente\r\n";
|
||||||
|
|
||||||
|
TmpDIOT.Columns[48].ColumnName = "49 - Valor de los actos o actividades en la importación exentos\r\n"; TmpDIOT.Columns[49].ColumnName = "50 - Valor de actos o actividades exentos\r\n";
|
||||||
|
TmpDIOT.Columns[50].ColumnName = "51 - Valor de actos o actividades 0%\r\n"; TmpDIOT.Columns[51].ColumnName = "52 -Valor de actos o actividades no objeto en territorio nacional\r\n";
|
||||||
|
TmpDIOT.Columns[52].ColumnName = "53 - Valor de actos o actividades no objeto sin establecimiento en territorio nacional\r\n"; TmpDIOT.Columns[53].ColumnName = "54 - Efectos fiscales a los comprobantes de operaciones realizadas con el proveedor\r\n";
|
||||||
|
|
||||||
|
TmpDIOT.ExportToExcelG("DIOT_"+ txtFechaI.Text,"Reporte DIOT");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1424,10 +1424,10 @@
|
|||||||
<Width>4.82589cm</Width>
|
<Width>4.82589cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.5cm</Width>
|
<Width>1.75917cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.6882cm</Width>
|
<Width>2.42903cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.33651cm</Width>
|
<Width>2.33651cm</Width>
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
<DataField>Cantidad</DataField>
|
<DataField>Cantidad</DataField>
|
||||||
<rd:TypeName>System.Double</rd:TypeName>
|
<rd:TypeName>System.Double</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="CantidadOriginal">
|
||||||
|
<DataField>CantidadOriginal</DataField>
|
||||||
|
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||||
|
</Field>
|
||||||
<Field Name="UnidadMedida">
|
<Field Name="UnidadMedida">
|
||||||
<DataField>UnidadMedida</DataField>
|
<DataField>UnidadMedida</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
@@ -93,32 +97,35 @@
|
|||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.69333cm</Width>
|
<Width>1.69333cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
|
<TablixColumn>
|
||||||
|
<Width>1.29923cm</Width>
|
||||||
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.16467cm</Width>
|
<Width>1.16467cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.51446cm</Width>
|
<Width>1.17434cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>3.37414cm</Width>
|
<Width>3.37414cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>5.82471cm</Width>
|
<Width>6.19513cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.53921cm</Width>
|
<Width>1.53921cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>1.57859cm</Width>
|
<Width>1.86963cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.32298cm</Width>
|
<Width>2.02533cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.21787cm</Width>
|
<Width>2.21787cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>2.36613cm</Width>
|
<Width>2.44551cm</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
@@ -237,6 +244,62 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="Textbox23">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>C.Orig.</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>Textbox23</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Color>LightGrey</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
</Border>
|
||||||
|
<TopBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</TopBorder>
|
||||||
|
<BottomBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</BottomBorder>
|
||||||
|
<LeftBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</LeftBorder>
|
||||||
|
<RightBorder>
|
||||||
|
<Color>Black</Color>
|
||||||
|
<Style>Solid</Style>
|
||||||
|
<Width>1pt</Width>
|
||||||
|
</RightBorder>
|
||||||
|
<BackgroundColor>Silver</BackgroundColor>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Textbox3">
|
<Textbox Name="Textbox3">
|
||||||
@@ -582,7 +645,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Alm. Origen</Value>
|
<Value>Alm.Origen</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
@@ -638,7 +701,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Alm. Destino</Value>
|
<Value>Alm.Destino</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
@@ -817,6 +880,43 @@
|
|||||||
</Textbox>
|
</Textbox>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
|
<TablixCell>
|
||||||
|
<CellContents>
|
||||||
|
<Textbox Name="CantidadOriginal">
|
||||||
|
<CanGrow>true</CanGrow>
|
||||||
|
<KeepTogether>true</KeepTogether>
|
||||||
|
<Paragraphs>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Fields!CantidadOriginal.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
|
||||||
|
<Format>#,0.00</Format>
|
||||||
|
<Color>=IIf(Fields!PS.Value = "", "White", "Black")</Color>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style>
|
||||||
|
<TextAlign>Center</TextAlign>
|
||||||
|
</Style>
|
||||||
|
</Paragraph>
|
||||||
|
</Paragraphs>
|
||||||
|
<rd:DefaultName>CantidadOriginal</rd:DefaultName>
|
||||||
|
<Style>
|
||||||
|
<Border>
|
||||||
|
<Style>None</Style>
|
||||||
|
</Border>
|
||||||
|
<BackgroundColor>=IIf(Fields!PS.Value = "", "#9cacc1", "NoColor")</BackgroundColor>
|
||||||
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
|
<PaddingRight>2pt</PaddingRight>
|
||||||
|
<PaddingTop>2pt</PaddingTop>
|
||||||
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
|
</Style>
|
||||||
|
</Textbox>
|
||||||
|
</CellContents>
|
||||||
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Cantidad">
|
<Textbox Name="Cantidad">
|
||||||
@@ -1004,6 +1104,7 @@
|
|||||||
<Style>
|
<Style>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
|
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
|
||||||
|
<Format>#,0.00</Format>
|
||||||
<Color>=IIf(Fields!PS.Value = "", "White", "Black")</Color>
|
<Color>=IIf(Fields!PS.Value = "", "White", "Black")</Color>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -1152,6 +1253,7 @@
|
|||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
<TablixMember />
|
<TablixMember />
|
||||||
|
<TablixMember />
|
||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixColumnHierarchy>
|
</TablixColumnHierarchy>
|
||||||
<TablixRowHierarchy>
|
<TablixRowHierarchy>
|
||||||
@@ -1171,7 +1273,7 @@
|
|||||||
<DataSetName>DataSet1</DataSetName>
|
<DataSetName>DataSet1</DataSetName>
|
||||||
<Top>0.17639cm</Top>
|
<Top>0.17639cm</Top>
|
||||||
<Height>1.0148cm</Height>
|
<Height>1.0148cm</Height>
|
||||||
<Width>24.56252cm</Width>
|
<Width>25.96481cm</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
@@ -1182,7 +1284,7 @@
|
|||||||
<Height>0.67394in</Height>
|
<Height>0.67394in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>9.67028in</Width>
|
<Width>10.22237in</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
<Height>3.48078cm</Height>
|
<Height>3.48078cm</Height>
|
||||||
@@ -1318,7 +1420,7 @@
|
|||||||
<Line Name="Line1">
|
<Line Name="Line1">
|
||||||
<Top>3.30439cm</Top>
|
<Top>3.30439cm</Top>
|
||||||
<Height>0cm</Height>
|
<Height>0cm</Height>
|
||||||
<Width>24.56252cm</Width>
|
<Width>25.96481cm</Width>
|
||||||
<ZIndex>4</ZIndex>
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -1477,7 +1579,7 @@
|
|||||||
<Line Name="Line2">
|
<Line Name="Line2">
|
||||||
<Top>0.15875cm</Top>
|
<Top>0.15875cm</Top>
|
||||||
<Height>0cm</Height>
|
<Height>0cm</Height>
|
||||||
<Width>24.56252cm</Width>
|
<Width>25.96481cm</Width>
|
||||||
<ZIndex>4</ZIndex>
|
<ZIndex>4</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -877,7 +877,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveTamaño As Integer = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' ").ToString().ToEntero()
|
Dim CveTamaño As Integer = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' ").ToString().ToEntero()
|
||||||
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero()
|
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero()
|
||||||
Dim CveClasificacionDetalle As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveClasificacionDetalle", $"ClasificacionDetalle = '{Linea}'").ToString().ToEntero()
|
Dim CveClasificacionDetalle As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveClasificacionDetalle", $"ClasificacionDetalle = '{Linea}'").ToString().ToEntero()
|
||||||
|
Dim UltimoCosto As Decimal = If(dt.Columns.Contains("UltimoCosto"), Row("UltimoCosto").ToString().ToDecimal, 0)
|
||||||
|
|
||||||
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
||||||
If ObjClas.AddClasificaciones(Clasificacion, "", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
|
If ObjClas.AddClasificaciones(Clasificacion, "", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
|
||||||
@@ -1001,7 +1001,7 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, NumeroParte, CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, NumeroParte, CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||||
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) <= 0 Then
|
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2, UltimoCosto:=UltimoCosto) <= 0 Then
|
||||||
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||||
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
|
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
|
||||||
ErrorPS = True
|
ErrorPS = True
|
||||||
|
|||||||
@@ -425,7 +425,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7">
|
<div class="col-md-6">
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
|
||||||
@@ -433,6 +433,30 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAddWishList" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div runat="server" id="DVWishList" visible="false">
|
||||||
|
<table style="width:170px!important" >
|
||||||
|
<td style="width:70px!important">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox runat="server" ID="TxtCantidad" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||||
|
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="width:100px!important">
|
||||||
|
<asp:LinkButton ID="LnkAgrgarWishList" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkAgrgarWishList_Click" Width="91px"><i class="fa fa-shopping-cart" aria-hidden="true"></i> Agregar</asp:LinkButton>
|
||||||
|
</td>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -67,8 +67,15 @@ Partial Class Inventarios_Kardex
|
|||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
LblPS.ToolTip = ddlProducto2.SelectedValue
|
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||||
lblAlm.InnerText = ddlProducto2.SelectedValue
|
lblAlm.InnerText = ddlProducto2.SelectedValue
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
DVWishList.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -893,7 +900,7 @@ Partial Class Inventarios_Kardex
|
|||||||
Protected Sub ddlProducto2_selectedindexchange(sender As Object, e As EventArgs)
|
Protected Sub ddlProducto2_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
LnkKPIVerComportamiento.Visible = False
|
LnkKPIVerComportamiento.Visible = False
|
||||||
If ddlProducto2.SelectedValue.ToEntero > 0 And UsuarioActual.CveRol = 1 Then
|
If ddlProducto2.SelectedValue.ToEntero > 0 And UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
LnkKPIVerComportamiento.Visible = True
|
LnkKPIVerComportamiento.Visible = True
|
||||||
End If
|
End If
|
||||||
UpAcciones.Update()
|
UpAcciones.Update()
|
||||||
@@ -901,4 +908,129 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkAgrgarWishList_Click(sender As Object, e As EventArgs)
|
||||||
|
AgregarAWishList()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function AgregarAWishList() As Boolean
|
||||||
|
|
||||||
|
Dim respuesta As Boolean = True
|
||||||
|
Dim CveAlmacen As Integer = -1
|
||||||
|
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||||
|
Dim almacenStr As String() = ddlAlmacen.GetSelectedValues().Split(","c)
|
||||||
|
Dim CveSubProyecto As Integer = -1
|
||||||
|
Dim FolioOrdenCompra As String = ""
|
||||||
|
Dim CveOrdenCompra As Integer = -1
|
||||||
|
Dim UltimoCosto As Decimal = 0D
|
||||||
|
Dim CveProveedorCompra As Integer = -1
|
||||||
|
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal
|
||||||
|
Dim PorcentajeIVA As Decimal = 0
|
||||||
|
Dim PorcentajeIVASucursal As Decimal = 0
|
||||||
|
Dim CveUnidadMedida As Integer = -1
|
||||||
|
Dim RetISR As Decimal = 0
|
||||||
|
Dim RetIVA As Decimal = 0
|
||||||
|
Dim PorcentajeRetISR As Decimal = 0
|
||||||
|
Dim PorcentajeRetIVA As Decimal = 0
|
||||||
|
|
||||||
|
|
||||||
|
If Not Cantidad > 0 Then
|
||||||
|
Alert("Debe indicar una cantidad.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If almacenStr.Length > 0 Then
|
||||||
|
CveAlmacen = almacenStr(0).ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveAlmacen > 0 Then
|
||||||
|
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||||
|
|
||||||
|
If CveSubProyecto > 0 Then
|
||||||
|
Dim DRowSubProyecto As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto).FiltroPrimero("")
|
||||||
|
If DRowSubProyecto IsNot Nothing Then
|
||||||
|
PorcentajeIVASucursal = DRowSubProyecto("IVA").ToString.ToDecimal
|
||||||
|
Else
|
||||||
|
Alert("No se encontro el subproyecto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se encontro el subproyecto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Debe seleccionar un almacén.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CvePS > 0 Then
|
||||||
|
Dim DTRowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("")
|
||||||
|
If DTRowPS IsNot Nothing Then
|
||||||
|
UltimoCosto = DTRowPS("UltimoCosto").ToString.ToDecimal
|
||||||
|
CveProveedorCompra = If(DTRowPS("CveProveedorCompra").ToString.ToEntero > 0, DTRowPS("CveProveedorCompra").ToString.ToEntero, -1)
|
||||||
|
CveUnidadMedida = DTRowPS("CveUnidadMedida").ToString.ToEntero
|
||||||
|
PorcentajeIVA = If(DTRowPS("IVA").ToString.ToEntero = -1, PorcentajeIVASucursal, 0)
|
||||||
|
PorcentajeRetISR = DTRowPS("RetISR").ToString.ToDecimal
|
||||||
|
PorcentajeRetIVA = DTRowPS("RetIVA").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Debe seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjOC As New ClsOC
|
||||||
|
ObjOC.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If ObjOC.GetOrdenesCompraRep("REQ", -1, CveSubProyecto, -1, 0, MinFecha, MaxFecha, -1, CveProveedorCompra, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
If ObjOC.DtResultados IsNot Nothing AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||||
|
CveOrdenCompra = ObjOC.DtResultados(0)("CveOrdenCompra").ToString.ToEntero
|
||||||
|
FolioOrdenCompra = ObjOC.DtResultados(0)("SerieFolio").ToString
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta AndAlso Not CveOrdenCompra > 0 Then
|
||||||
|
If ObjOC.AddOrdenCompra("REQ", CveSubProyecto, "Compra de Stock", "Compra de Stock", 1, NowADS, 1, 0, NowADS.ToString("dd/MM/yyyy"), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveProveedorCompra, CveSubProyectoEntrega:=CveSubProyecto, PorcentajeIVA:=PorcentajeIVA) Then
|
||||||
|
CveOrdenCompra = ObjOC.CveOrdenCompra
|
||||||
|
FolioOrdenCompra = ObjOC.SerieFolio
|
||||||
|
Else
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If respuesta AndAlso CveOrdenCompra > 0 Then
|
||||||
|
|
||||||
|
Dim Total As Decimal = (Cantidad * UltimoCosto).RoundSQL
|
||||||
|
Dim IVA As Decimal = (Total * PorcentajeIVA).RoundSQL
|
||||||
|
RetIVA = IVA * PorcentajeRetIVA
|
||||||
|
RetISR = Total * PorcentajeRetISR
|
||||||
|
|
||||||
|
If Not ObjOC.AddOrdenCompraDetalle(CveOrdenCompra, Cantidad, CveUnidadMedida, CvePS, UltimoCosto, CveSubProyecto, -1, "Obs", UsuarioActual.CveUsuario,
|
||||||
|
IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, Total:=Total, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=PorcentajeRetIVA, RetISRPorcentaje:=PorcentajeRetISR) Then
|
||||||
|
respuesta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If respuesta Then
|
||||||
|
Alert($"Producto agregado a la lista, requisición: {FolioOrdenCompra}.", TipoMensaje.ToastInformacion)
|
||||||
|
ObjOC.Commit()
|
||||||
|
TxtCantidad.Text = ""
|
||||||
|
UpAddWishList.Update()
|
||||||
|
Else
|
||||||
|
Alert("No se agrego el producto a la lista.", TipoMensaje.ToastAdventencia)
|
||||||
|
ObjOC.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ObjOC.Dispose()
|
||||||
|
|
||||||
|
Return respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Owin.Security.Provider
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Inventarios_RecepcionAlmacen
|
Partial Class Inventarios_RecepcionAlmacen
|
||||||
@@ -2568,6 +2570,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveProveedorCompra As Integer = -1
|
||||||
Try
|
Try
|
||||||
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
||||||
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
||||||
@@ -3346,6 +3349,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PREPOLIZA - SOLO CUANDO SEA RECEPCIÓN
|
'PREPOLIZA - SOLO CUANDO SEA RECEPCIÓN
|
||||||
|
|
||||||
If TipoMovimiento = 1 AndAlso Not ErrorMovInv Then
|
If TipoMovimiento = 1 AndAlso Not ErrorMovInv Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
@@ -3372,6 +3376,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
||||||
Fecha = TxtFecha.Text.ToDate
|
Fecha = TxtFecha.Text.ToDate
|
||||||
CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
|
CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
|
||||||
|
CveProveedorCompra = CveProveedor
|
||||||
ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
|
ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
|
||||||
SerieFolio = $"Compra: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
|
SerieFolio = $"Compra: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
|
||||||
CveConceptoContableCosto = 205
|
CveConceptoContableCosto = 205
|
||||||
@@ -3663,6 +3668,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
RenombrarBitacoras()
|
RenombrarBitacoras()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv And CveProveedorCompra > 0 And CveCompraSurtir > 0 Then
|
||||||
|
If Not ActualizaFechaVencimientoCompra(CveCompraSurtir, CveProveedorCompra, ObjInventario.IniciaTransacSQL) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'FINAL
|
'FINAL
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||||
@@ -3764,6 +3775,31 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function ActualizaFechaVencimientoCompra(CveCompra As Integer, CveProveedor As Integer, TransaccionSql As SqlTransaction) As Boolean
|
||||||
|
|
||||||
|
Dim ErrorProceso As Boolean = False
|
||||||
|
|
||||||
|
Dim objProveedores As New ClsCompProveedores(TransaccionSql)
|
||||||
|
Dim objCompras As New ClsCompras(TransaccionSql)
|
||||||
|
Dim CveTipoFechaVencimiento As Integer = 1
|
||||||
|
|
||||||
|
If objProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
CveTipoFechaVencimiento = objProveedores.CveTipoFechaVencimiento
|
||||||
|
Else
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveTipoFechaVencimiento = 2 Then
|
||||||
|
If Not objCompras.UpdateFechaVencimientoCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Return If(ErrorProceso, False, True)
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub RenombrarBitacoras()
|
Private Sub RenombrarBitacoras()
|
||||||
Dim fechaActual As String = DateTime.Now.ToString("yyyyMMddHHmmss")
|
Dim fechaActual As String = DateTime.Now.ToString("yyyyMMddHHmmss")
|
||||||
|
|
||||||
|
|||||||
@@ -2737,6 +2737,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -2951,7 +2951,7 @@ Partial Class OC_OC
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim tCveSubProyecto As Integer = UsuarioActual.CveSubProyecto
|
Dim tCveSubProyecto As Integer = -1
|
||||||
If ModalidadSubProyectoGeneral Then tCveSubProyecto = DdlSubProyectoGral.SelectedValue.ToEntero
|
If ModalidadSubProyectoGeneral Then tCveSubProyecto = DdlSubProyectoGral.SelectedValue.ToEntero
|
||||||
|
|
||||||
If tCveSubProyecto <= 0 Then
|
If tCveSubProyecto <= 0 Then
|
||||||
@@ -9484,7 +9484,7 @@ Partial Class OC_OC
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EsCancelacion AndAlso TxtFecha.Text.ToDate < "2025/01/01".ToDate Then 'si es cancelación, anterior al 2025, que no lo registre
|
If EsCancelacion AndAlso TxtFecha.Text.ToDate < "2024/06/01".ToDate Then 'si es cancelación, anterior al 2025, que no lo registre
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@
|
|||||||
<ADS:Dropdownlost ID="ddlclientes" runat="server" CssClassDdl="select2me" CssStyle="width: 100%;" Width="100%" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="ddlclientes" runat="server" CssClassDdl="select2me" CssStyle="width: 100%;" Width="100%" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
<div class="colf-3">
|
<div class="colf-3">
|
||||||
<asp:CheckBox Text="No Completa" TextAlign="Left" CssClass="md-checksd2" ID="CheckNoCompleta" Visible="true" runat="server" />
|
<asp:CheckBox Text="No Completa" TextAlign="Left" CssClass="md-checksd2" ID="CheckNoCompleta" Visible="false" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
<label class="colf-1">Entrega Directa</label>
|
<label class="colf-1">Entrega Directa</label>
|
||||||
<div class="colf-2">
|
<div class="colf-2">
|
||||||
|
|||||||
@@ -380,12 +380,16 @@ Partial Class RepOC
|
|||||||
FF = FF.AddDays(1)
|
FF = FF.AddDays(1)
|
||||||
|
|
||||||
Dim OC As New ClsOC
|
Dim OC As New ClsOC
|
||||||
|
|
||||||
|
'If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
|
||||||
|
|
||||||
|
|
||||||
If OC.GetOrdenesCompraRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero,
|
If OC.GetOrdenesCompraRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero,
|
||||||
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
|
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
|
||||||
If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False),
|
UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), False,
|
||||||
ddlclientes.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
ddlclientes.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
||||||
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero) Then
|
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
GvConsultar.DataSource = OC.DtResultados
|
GvConsultar.DataSource = OC.DtResultados
|
||||||
DtOC = OC.DtResultados
|
DtOC = OC.DtResultados
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ Partial Class Sistemas_CatSesiones
|
|||||||
If ObjVentas.GetCondicionesEntrega(-1) Then Application("GlobalDTVtaCondicionesEntrega") = ObjVentas.DtResultados Else Application("GlobalDTVtaCondicionesEntrega") = Nothing
|
If ObjVentas.GetCondicionesEntrega(-1) Then Application("GlobalDTVtaCondicionesEntrega") = ObjVentas.DtResultados Else Application("GlobalDTVtaCondicionesEntrega") = Nothing
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
GlobalDTTipoVenta(-1) = Nothing
|
GlobalDTTipoVenta(UsuarioActual.CveEmpresa) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProductosServicios()
|
Private Sub CargaProductosServicios()
|
||||||
|
|||||||
@@ -9502,7 +9502,9 @@ Partial Class Clientes
|
|||||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -2111,6 +2111,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
Private Function InicializaDTVentasNC() As DataTable
|
Private Function InicializaDTVentasNC() As DataTable
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
|
|
||||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||||
Try
|
Try
|
||||||
Retorno = ObjFactura.EmitirFactura(True)
|
Retorno = ObjFactura.EmitirFactura(True, Modulo:="FGlobal/GuardarVenta")
|
||||||
|
|
||||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||||
SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
||||||
|
|||||||
@@ -4839,7 +4839,8 @@ Partial Class PV
|
|||||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||||
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
|
||||||
|
TmpDT.Columns.Add("CantidadConversion", GetType(Integer))
|
||||||
|
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -53,22 +53,13 @@
|
|||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
/*max-width: 150px;*/ /* Ajusta a tu gusto */
|
|
||||||
max-width: calc(100% - 2em);
|
max-width: calc(100% - 2em);
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
/*.select2-selection__choice__remove{*/
|
|
||||||
/* o absolute/fixed, según necesites */
|
|
||||||
/*position: absolute;
|
|
||||||
z-index: 9999;*/ /* un valor alto para estar sobre los demás */
|
|
||||||
/*}
|
|
||||||
.select2-search.select2-search--inline .select2-search__field .select2-selection__rendered .select2-container--default .select2-container--focus {
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -654,19 +654,7 @@
|
|||||||
<td runat="server">
|
<td runat="server">
|
||||||
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr runat="server" id="TrVentasMedicas5" visible="false">
|
|
||||||
<td >
|
|
||||||
<b>Educ. Médica:</b>
|
|
||||||
</td>
|
|
||||||
<td runat="server">
|
|
||||||
<asp:TextBox ID="TxtEducMedica" runat="server" Style="width: 130px" MaxLength="50"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td >
|
|
||||||
</td>
|
|
||||||
<td runat="server">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -9155,8 +9143,11 @@
|
|||||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
|
||||||
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%>
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|||||||
@@ -7962,10 +7962,14 @@ Partial Class Ventas
|
|||||||
EsCotizacion = True
|
EsCotizacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(199) Then DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión") ' puede remisionar
|
'NO MODIFIQUE EL TipoComprobante
|
||||||
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
|
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||||
|
If UsuarioActual.TienePermisoProceso(199) Then DdlTipoComprobante.SelectedValueExistInsert("Rem", "Remisión") ' puede remisionar
|
||||||
|
If UsuarioActual.TienePermisoProceso(60) Then DdlTipoComprobante.SelectedValueExistInsert("Ing", "Ingresos") 'puede facturar
|
||||||
|
|
||||||
|
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
|
||||||
|
End If
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValueExist(UsuarioActual.CveTipoDocumento)
|
|
||||||
If EsCotizacion Then
|
If EsCotizacion Then
|
||||||
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
|
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
|
||||||
End If
|
End If
|
||||||
@@ -14619,7 +14623,6 @@ Partial Class Ventas
|
|||||||
CveMedico = DdlMedico.SelectedValue.ToEntero
|
CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||||
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
|
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
|
||||||
factura.Alfa2 = TxtEducMedica.Text.Trim
|
|
||||||
'CveAlmacenTraspasoDestino
|
'CveAlmacenTraspasoDestino
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -15310,8 +15313,7 @@ Partial Class Ventas
|
|||||||
Try
|
Try
|
||||||
Dim DT As DataTable
|
Dim DT As DataTable
|
||||||
Dim CvePlantilaPoliza As Integer
|
Dim CvePlantilaPoliza As Integer
|
||||||
Dim PorcentajeAmortizacion As Decimal = 0
|
|
||||||
Dim sumaAmorticaciones As Decimal = 0
|
|
||||||
Dim ErrorPrepoliza As Boolean = False
|
Dim ErrorPrepoliza As Boolean = False
|
||||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||||
Dim CveCuentaContabilizacion As Integer = 1
|
Dim CveCuentaContabilizacion As Integer = 1
|
||||||
@@ -15888,133 +15890,46 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PorcentajeAmortizacion = sumaAmorticaciones / TxtTotal.Text.ToDecimal
|
|
||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
|
|
||||||
Case 91 'Amortizacion Nota de Credito
|
Case 91 'Amortizacion Nota de Credito
|
||||||
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||||
|
|
||||||
If ValorMultiplicador = -1 Then
|
If Not ErrorPrepoliza AndAlso ValorMultiplicador = 1 Then
|
||||||
'cuando es cancelación
|
Dim VentaRef As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||||
For Each row2 As GridViewRow In GvNC.Rows
|
importeMovimiento = 0
|
||||||
|
|
||||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 91 Then
|
|
||||||
|
|
||||||
importeMovimiento = row2.DataKey("Importe").ToDecimal * ValorMultiplicador
|
|
||||||
sumaAmorticaciones += importeMovimiento
|
|
||||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
|
||||||
|
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
|
|
||||||
Dim CveConceptoPagoNC As Integer = 251
|
|
||||||
If ObjFactura.CveMoneda > 1 Then
|
|
||||||
CveConceptoPagoNC = 301
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMovimiento * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, importeMovimiento * tipoCambio, 91, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
'If DdlTipoAmortizacionAnticipo.SelectedValue <> "4" Then
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
For Each row2 As GridViewRow In GVAnticipos.Rows
|
For Each row2 As GridViewRow In GVAnticipos.Rows
|
||||||
|
|
||||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 12 Then
|
||||||
|
|
||||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
||||||
|
|
||||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal
|
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal
|
||||||
sumaAmorticaciones += importeMovimiento
|
|
||||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, ConceptoContable, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=row2.DataKey("CveCliente").ToString().ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
ErrorPrepoliza = True
|
Pago.Fecha = Now
|
||||||
End If
|
Pago.FechaDocumentoRelacionado = row2.DataKey("Fecha").ToString().ToDateTime()
|
||||||
End If
|
Pago.ImportePagoVenta = importeMovimiento
|
||||||
End If
|
Pago.ImportePago = importeMovimiento
|
||||||
|
Pago.CveIE = row2.DataKey("CveIE").ToString().ToEntero()
|
||||||
|
Pago.CveMonedaPago = row2.DataKey("CveMoneda").ToString().ToEntero()
|
||||||
|
Pago.TCPago = row2.DataKey("TipoCambioPago").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = row2.DataKey("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = row2.DataKey("CveVenta").ToString().ToEntero()
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Pago.CveClientePago = ObjFactura.CveCliente
|
||||||
|
Pago.Referencia = Referencia
|
||||||
|
|
||||||
End If
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=True)
|
||||||
|
|
||||||
'SI ES PAGO CON DEVOLUCION
|
|
||||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
|
||||||
If row2.DataKey("CveConceptoContable").ToString().ToEntero() = 277 Then
|
|
||||||
|
|
||||||
If row2.FCCheckBox("Chk" & row2.RowIndex).Checked Then
|
|
||||||
importeMovimiento = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal() * Multiplicador
|
|
||||||
importeMX = importeMovimiento * tipoCambio
|
|
||||||
sumaAmorticaciones += importeMovimiento
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToString().ToEntero(), CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If ObjFactura.AplicaDevolucion AndAlso ObjFactura.TipoDocto = "RNC" AndAlso CveVentaDevolucion > 0 Then
|
|
||||||
Dim importeMovimientoDev As Decimal = TxtTotal.Text.ToDecimal
|
|
||||||
importeMovimientoDev = If(SaldoVentaDevolucion < importeMovimientoDev, SaldoVentaDevolucion, importeMovimientoDev)
|
|
||||||
|
|
||||||
importeMovimiento = importeMovimientoDev * Multiplicador
|
|
||||||
importeMX = importeMovimiento * tipoCambio
|
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
|
||||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMovimiento * tipoCambio, 150, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=-1, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveClasificacion:=ObjFactura.DtDetalle.MAX("CveClasificacion").ToEntero(), CveSubProyecto:=ObjFactura.CveSubProyecto, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento * -1, importeMX * -1, 277, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento * -1, importeMX * -1, 278, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorPrepoliza Then
|
|
||||||
Dim CveConceptoPagoNC As Integer = 251
|
|
||||||
If ObjFactura.CveMoneda > 1 Then
|
|
||||||
CveConceptoPagoNC = 301
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, importeMX, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Else
|
|
||||||
ViewState("SeGuardoPrePoliza") = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
If UsuarioActual.Empresa.Funcionalidad(344) = "1" AndAlso ObjFactura.TipoDocto = "Egs" Then
|
||||||
Dim ListaNC As List(Of Modelos.Factura) = Nothing
|
Dim ListaNC As List(Of Modelos.Factura) = Nothing
|
||||||
@@ -16084,19 +15999,6 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If sumaAmorticaciones <> 0 Then
|
|
||||||
|
|
||||||
Dim CveConceptoPagoNC As Integer = 251
|
|
||||||
If ObjFactura.CveMoneda > 1 Then
|
|
||||||
CveConceptoPagoNC = 301
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, sumaAmorticaciones * tipoCambio, CveConceptoPagoNC, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Else
|
|
||||||
ViewState("SeGuardoPrePoliza") = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
@@ -19981,11 +19883,6 @@ Partial Class Ventas
|
|||||||
HdnPS.Value = PSValidarModal
|
HdnPS.Value = PSValidarModal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If HdnPS.Value = "" Or HdnPS.Value = "-1" Then
|
|
||||||
' Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Return False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'SI USA CONTABILIDAD LA CLASIFICACION ES OBLIGATORIA
|
'SI USA CONTABILIDAD LA CLASIFICACION ES OBLIGATORIA
|
||||||
If CveClasificacion <= 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
If CveClasificacion <= 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
Alert("La Clasificación es obligatoria, favor de seleccionarla", TipoMensaje.MsgAdvertencia)
|
Alert("La Clasificación es obligatoria, favor de seleccionarla", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -20140,7 +20037,7 @@ Partial Class Ventas
|
|||||||
If ValidaExistencia Then
|
If ValidaExistencia Then
|
||||||
|
|
||||||
'VALIDA EXISTENCIA
|
'VALIDA EXISTENCIA
|
||||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189}) Then
|
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189, 186}) Then
|
||||||
|
|
||||||
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
|
Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False)
|
||||||
Dim Existencia As Decimal = 0D
|
Dim Existencia As Decimal = 0D
|
||||||
@@ -40002,16 +39899,13 @@ Partial Class Ventas
|
|||||||
TrVentasMedicas1.Visible = True
|
TrVentasMedicas1.Visible = True
|
||||||
TrVentasMedicas2.Visible = True
|
TrVentasMedicas2.Visible = True
|
||||||
TrVentasMedicas3.Visible = True
|
TrVentasMedicas3.Visible = True
|
||||||
TrVentasMedicas5.Visible = True
|
|
||||||
|
|
||||||
For Each item As ListItem In RBLTipoVenta.Items
|
For Each item As ListItem In RBLTipoVenta.Items
|
||||||
item.Text = $"  {item.Text}"
|
item.Text = $"  {item.Text}"
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Opcion = "Cot" Then
|
If Opcion = "Cot" Then
|
||||||
'TrVentasMedicas2.Visible = False
|
'TrVentasMedicas2.Visible = False
|
||||||
TrVentasMedicas3.Visible = False
|
TrVentasMedicas3.Visible = False
|
||||||
TrVentasMedicas5.Visible = False
|
|
||||||
Else
|
Else
|
||||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||||
End If
|
End If
|
||||||
@@ -40096,16 +39990,10 @@ Partial Class Ventas
|
|||||||
ChkRequiereTecnicoModal.Checked = True
|
ChkRequiereTecnicoModal.Checked = True
|
||||||
ChkRequiereTecnicoModal.Enabled = True
|
ChkRequiereTecnicoModal.Enabled = True
|
||||||
DvModalRequiereOSFecha.Visible = True
|
DvModalRequiereOSFecha.Visible = True
|
||||||
|
|
||||||
'If CveCliente > 0 Then
|
|
||||||
' CargaSucursalesModal(CveCliente)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||||
|
|
||||||
LnkDvModalTipoVentaAceptar.Visible = True
|
LnkDvModalTipoVentaAceptar.Visible = True
|
||||||
|
|
||||||
|
|
||||||
Select Case RBLTipoVenta.SelectedValue
|
Select Case RBLTipoVenta.SelectedValue
|
||||||
Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado
|
Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado
|
||||||
ChkRequiereTecnicoModal.Checked = True
|
ChkRequiereTecnicoModal.Checked = True
|
||||||
@@ -40133,16 +40021,11 @@ Partial Class Ventas
|
|||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text
|
LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
Dim CveClienteSplit As Integer = -1
|
Dim CveClienteSplit As Integer = -1
|
||||||
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
|
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
|
||||||
@@ -40165,8 +40048,6 @@ Partial Class Ventas
|
|||||||
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Sub SeleccionarClienteSucursal(CveCliente As Integer)
|
Private Sub SeleccionarClienteSucursal(CveCliente As Integer)
|
||||||
|
|
||||||
Dim IndexSeleccion As Integer = 0
|
Dim IndexSeleccion As Integer = 0
|
||||||
@@ -40178,9 +40059,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
IndexSeleccion = IndexSeleccion + 1
|
IndexSeleccion = IndexSeleccion + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ModalValidaMedicoProcedimiento()
|
Protected Sub ModalValidaMedicoProcedimiento()
|
||||||
|
|
||||||
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -40188,11 +40067,8 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
LnkDvModalTipoVentaAceptar.Visible = False
|
LnkDvModalTipoVentaAceptar.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
LnkDvModalTipoVentaAceptar.Visible = False
|
LnkDvModalTipoVentaAceptar.Visible = False
|
||||||
@@ -40214,9 +40090,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
|
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If RBLTipoVenta.SelectedValue = "2" Then 'pago directo
|
If RBLTipoVenta.SelectedValue = "2" Then 'pago directo
|
||||||
@@ -40318,7 +40192,6 @@ Partial Class Ventas
|
|||||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||||
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
|
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
|
||||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
@@ -40348,13 +40221,15 @@ Partial Class Ventas
|
|||||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||||
|
Dim EdMedica As Decimal = 0
|
||||||
|
If RBLTipoVenta.SelectedValue = "2" Then EdMedica = GvRow.FCTextBox("TxtEdMedica").Text.ToDecimal
|
||||||
|
|
||||||
If Cantidad > 0 Then
|
If Cantidad > 0 Then
|
||||||
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
|
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
|
||||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
||||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
||||||
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then
|
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0, CantidadConversion:=EdMedica) Then
|
||||||
CountPsAgregados = CountPsAgregados + 1
|
CountPsAgregados = CountPsAgregados + 1
|
||||||
Else
|
Else
|
||||||
Exit For
|
Exit For
|
||||||
@@ -40420,6 +40295,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
GvPSProced.DataBind()
|
GvPSProced.DataBind()
|
||||||
DVGvPSProced.Visible = True
|
DVGvPSProced.Visible = True
|
||||||
|
GvPSProced.Columns(4).Visible = RBLTipoVenta.SelectedValue = "2" ' comisión Ed. Médica, solo cuando es pago directo
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvPSProced.Rows
|
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||||
If RBLTipoVenta.SelectedValue = "2" Then
|
If RBLTipoVenta.SelectedValue = "2" Then
|
||||||
|
|||||||
Reference in New Issue
Block a user