diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 0d8ac4700..f526dbb11 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1991,7 +1991,10 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1) As Boolean
+ Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double,
+ AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean,
+ AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1,
+ Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleAdd")
@@ -2014,6 +2017,7 @@ Public Class ClsVentas
.Add("@HoraInicio", SqlDbType.DateTime).Value = HoraInicio
.Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
+ .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With
Try
@@ -2025,7 +2029,10 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function UpdatePromocionesDetalle(CvePromocionDetalle As Integer, CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1) As Boolean
+ Public Function UpdatePromocionesDetalle(CvePromocionDetalle As Integer, CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double,
+ PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean,
+ AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime,
+ Optional CantidadMinima As Integer = 1, Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleUpdate")
@@ -2049,6 +2056,7 @@ Public Class ClsVentas
.Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
+ .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With
Try
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 2091e565f..447ab3844 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -1439,10 +1439,11 @@ Namespace Modelos
End If
'Contratos
- If factura.CveContrato > 0 AndAlso TipoDocto.Contiene("Ing") Then
- GuardarContratoAvanceEstimaciones(ObjContr, ErrorList, 1)
- ElseIf factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Egs", "Dev") Then
- GuardarContratoAvanceEstimaciones(ObjContr, ErrorList, -1)
+ If factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Ing") Then
+ GuardarContratoAvanceEstimaciones(factura, ObjContr, ErrorList, 1)
+ 'CUANDO ES NOTA DE CRÉDITO, NO DEBE DE CONSIDERAR AVANCE, CUANDO ES NOTA DE CRÉDITO POR AMORTIZACIÓN
+ ElseIf factura.CveContrato > 0 AndAlso factura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not factura.EsNCAmortizacion Then
+ GuardarContratoAvanceEstimaciones(factura, ObjContr, ErrorList, -1)
End If
'Impuestos Locales
@@ -1781,18 +1782,18 @@ Namespace Modelos
Return True
End Function
- Private Sub GuardarContratoAvanceEstimaciones(ObjContrato As ClsContratos, ErrorList As List(Of String), Multiplicador As Integer, Optional CrearAvance As Boolean = False)
+ Private Sub GuardarContratoAvanceEstimaciones(ObjFactura As Modelos.Factura, ObjContrato As ClsContratos, ErrorList As List(Of String), Multiplicador As Integer, Optional CrearAvance As Boolean = False)
- If Me.CveContrato > 0 Then
+ If ObjFactura.CveContrato > 0 Then
Dim CveEstimacion As Integer = -1
- If ObjContrato.AddEstimaciones(Me.CveContrato, Me.Fecha, -1, Me.CveVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
+ If ObjContrato.AddEstimaciones(ObjFactura.CveContrato, ObjFactura.Fecha, -1, ObjFactura.CveVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
CveEstimacion = ObjContrato.DtResultados(0)("CveEstimacion").ToString.ToEntero
- For Each row As DataRow In DtDetalle.Rows
+ For Each row As DataRow In ObjFactura.DtDetalle.Rows
If row("CveContratoDetalle").ToString.ToEntero > 0 Then
- If Not ObjContrato.AddContratosAvance(row("CveContratoDetalle").ToString.ToEntero, row("Cantidad").ToString.ToEntero * Multiplicador, Me.Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
+ If Not ObjContrato.AddContratosAvance(row("CveContratoDetalle").ToString.ToEntero, row("Cantidad").ToString.ToEntero * Multiplicador, ObjFactura.Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
ErrorList.Add("Ocurrió un error al agregar los avances")
End If
End If
@@ -4464,13 +4465,13 @@ Namespace Modelos
'CANCELA CONTRATOS
If Not ErrorCancelar Then
If ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
- ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, -1, True)
+ ObjFactura.GuardarContratoAvanceEstimaciones(ObjFactura, ObjContrato, ErrorList, -1, True)
If ErrorList.Count > 0 Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al cancelar las estimaciones del contrato."
End If
ElseIf ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
- ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, 1, True)
+ ObjFactura.GuardarContratoAvanceEstimaciones(ObjFactura, ObjContrato, ErrorList, 1, True)
If ErrorList.Count > 0 Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al cancelar los avances del contrato."
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index a08826ba7..f5a0be724 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -2164,7 +2164,7 @@ Partial Class Compras_Compras
If Msg <> "" Then
Alert($"El comprobante XML presenta las siguientes inconsistencias: {Msg}", TipoMensaje.MsgAdvertencia)
- Tab.ActiveTabIndex = 0
+ TAB.ActiveTabIndex = 0
''''BLOQUEA ACCIONES''''
BtnGuardar.Enabled = False
@@ -2839,7 +2839,7 @@ Partial Class Compras_Compras
'BLOQUEA OC
TxtOC.Enabled = False
ImgBtnBuscarOC.Visible = False
- Tab.ActiveTabIndex = 0
+ TAB.ActiveTabIndex = 0
GvAnticiposSel.DataSource = dtnc
GvAnticiposSel.DataBind()
@@ -6634,24 +6634,24 @@ Partial Class Compras_Compras
If CveTipoConcepto = 2 Then CveConceptoComplementario = 310
If tipoCambioActual = 1 Then
- IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
- Else
- IdCtaContable = CtaProveedorComplementaria
- CveCuenta = CveCuentaProveedorComplementaria
- If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
- importeMN = importeMovimiento
+ IdCtaContable = CtaProveedor
+ CveCuenta = CveCuentaProveedor
+ Else
+ IdCtaContable = CtaProveedorComplementaria
+ CveCuenta = CveCuentaProveedorComplementaria
+ If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
+ importeMN = importeMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoComplementario, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If
- IdCtaContable = CtaProveedorExtranjera
- CveCuenta = CveCuentaProveedorExtranjera
- End If
+ IdCtaContable = CtaProveedorExtranjera
+ CveCuenta = CveCuentaProveedorExtranjera
End If
+ End If
- Case 59 'Documentos
+ Case 59 'Documentos
importeMovimiento = importeCreditos
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then
@@ -8838,14 +8838,20 @@ Partial Class Compras_Compras
'Si el importe total de la amortizacion es igual al saldo de la compra se registra IVA
If IVACompleto = False AndAlso UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If sumaAmortizacionCompleto = CompraSaldo Then
- Dim PorcentajeImpuesto As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
- ErrorMovtosCxP = 1
- End If
-
- If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
- ErrorMovtosCxP = 1
- End If
+ Dim PorcentajeImpuesto As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
+
+
+ If TxtIVA.Text.ToDecimal > 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ ErrorMovtosCxP = 1
+ End If
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
+ ErrorMovtosCxP = 1
+ End If
+ End If
+
+
End If
End If
@@ -11634,7 +11640,7 @@ Partial Class Compras_Compras
#Region "TAB - ACTIVOS FIJOS -AF"
Protected Sub CargarGvActivosFijos(sender As Object, e As EventArgs)
- Tab.ActiveTabIndex = 3
+ TAB.ActiveTabIndex = 3
If GvAFInsumos.Rows.Count > 0 Then
llenaDtsAF()
@@ -13706,7 +13712,7 @@ Partial Class Compras_Compras
UpFacturar.Update()
TabGenerales.Enabled = True
- Tab.ActiveTabIndex = 0
+ TAB.ActiveTabIndex = 0
UpTabs.Update()
ImgClasificacion.Visible = False
@@ -14435,7 +14441,7 @@ Partial Class Compras_Compras
'SI NO ES UNA COMPRA REGISTRADA = ENABLE FALSE TAB GENERALES, ACTIVE TAB OC
If Not CveCompra > 0 Then
TabGenerales.Enabled = False
- Tab.ActiveTabIndex = 2
+ TAB.ActiveTabIndex = 2
UpTabs.Update()
End If
@@ -14995,7 +15001,7 @@ Partial Class Compras_Compras
UpFacturar.Update()
TabGenerales.Enabled = True
- Tab.ActiveTabIndex = 0
+ TAB.ActiveTabIndex = 0
UpTabs.Update()
@@ -15098,7 +15104,7 @@ Partial Class Compras_Compras
UpFacturar.Update()
TabGenerales.Enabled = True
- Tab.ActiveTabIndex = 0
+ TAB.ActiveTabIndex = 0
UpTabs.Update()
ImgClasificacion.Visible = False
diff --git a/Empresas/Grales/Formatos/EntradaSalida.rdlc b/Empresas/Grales/Formatos/EntradaSalida.rdlc
index b5fd6cb99..39632b298 100644
--- a/Empresas/Grales/Formatos/EntradaSalida.rdlc
+++ b/Empresas/Grales/Formatos/EntradaSalida.rdlc
@@ -1,1343 +1,1343 @@
-
-
-
-
-
-
-
-
- 1.72112cm
-
-
- 2.33244cm
-
-
- 7.27452cm
-
-
- 2.70027cm
-
-
- 1.89819cm
-
-
- 1.87391cm
-
-
-
-
- 0.42054cm
-
-
-
-
- true
- true
-
-
-
-
- Cant.
-
-
-
-
-
-
- Textbox7
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- Código
-
-
-
-
-
-
- Textbox9
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- Descripción
-
-
-
-
-
-
- Textbox11
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- Serie Lote
-
-
-
-
-
-
- Textbox6
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- Lote
-
-
-
-
-
-
- Textbox5
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- Batch
-
-
-
-
-
-
- Textbox12
-
-
-
- Black
-
- 1pt
-
-
- Black
-
- 1pt
-
- White
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 0.69042cm
-
-
-
-
- true
- true
-
-
-
-
- =Fields!Cantidad.Value
-
-
-
-
-
-
- Cantidad
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!Codigo.Value
-
-
-
-
-
-
- Codigo
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!PS.Value
-
-
-
-
-
-
- PS
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!SerieLote.Value
-
-
-
-
-
-
- SerieLote
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!Lote.Value
-
-
-
-
-
-
- Lote
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
- true
- true
-
-
-
-
- =Fields!Batch.Value
-
-
-
-
-
-
- Batch
-
-
- 2pt
- 2pt
- =IIf(RowNumber(Nothing)=1,"1pt","0pt")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False)
-
-
-
-
- =IIF(String.IsNullOrEmpty(Fields!Batch.Value), True,False)
-
-
-
-
-
-
-
- After
-
-
-
-
-
-
- DsInventarios
- 0.17639cm
- 0.12931cm
- 1.11096cm
- 17.80045cm
-
-
-
-
-
- true
- true
-
-
-
-
- =Parameters!Observaciones.Value
-
-
-
-
-
-
- Textbox2
- 1.39318cm
- 0.16459cm
- 0.6cm
- 11.36782cm
- 1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- 0.82291in
-
-
- 7.05896in
-
-
- 4.11151cm
- true
- true
-
-
- true
- true
-
-
-
-
- =Parameters!Empresa.Value
-
-
-
-
-
-
- Textbox1
- 0.28677cm
- 3.73711cm
- 0.67056cm
- 8.97552cm
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!Concepto.Value
-
-
-
-
-
-
- Textbox34
- 1.02789cm
- 3.73711cm
- 0.95277cm
- 8.10916cm
- 1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- External
- =Parameters!LogoPath.Value
- FitProportional
- 0.3175cm
- 0.19987cm
- 1.66316cm
- 3.43141cm
- 2
-
-
-
-
-
- true
- true
-
-
-
-
- =Parameters!FacturaProveedor.Value
-
-
-
-
-
-
- Textbox15
- 2.40854cm
- 2.30482cm
- 0.6cm
- 9.54145cm
- 3
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
-
-
-
-
- =Parameters!FacturadoA.Value
-
-
-
-
-
-
- Textbox18
- 3.14964cm
- 2.30482cm
- 0.6cm
- 9.54145cm
- 4
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Proveedor:
-
-
-
-
-
-
- Textbox16
- 3.1605cm
- 0.14172cm
- 0.6cm
- 2.11724cm
- 5
-
- =IIF(Parameters!FacturadoA.Value = "", True, False)
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Factura:
-
-
-
-
-
-
- Textbox14
- 2.40854cm
- 0.12931cm
- 0.6cm
- 2.12965cm
- 6
-
- =IIF(Parameters!FacturaProveedor.Value = "", True, False)
-
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Folio:
-
-
-
-
-
-
- Textbox3
- 0.35028cm
- 12.99791cm
- 0.89103cm
- 2.06494cm
- 7
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!Folio.Value
-
-
-
-
-
-
- Textbox31
- 0.31501cm
- 15.06284cm
- 0.9263cm
- 2.57165cm
- 8
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Fecha:
-
-
-
-
-
-
- Textbox4
- 3.16051cm
- 12.17799cm
- 0.59999cm
- 1.80326cm
- 9
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
-
-
-
-
- =Parameters!Almacen.Value
-
-
-
-
-
-
- Textbox6
- 2.40855cm
- 13.98125cm
- 0.6cm
- 3.65324cm
- 10
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!Fecha.Value
-
-
-
-
-
-
- Textbox32
- 3.16051cm
- 13.98125cm
- 0.59999cm
- 3.65324cm
- 11
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Almacén:
-
-
-
-
-
-
- Textbox3
- 2.40855cm
- 12.17799cm
- 0.59999cm
- 1.80326cm
- 12
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
-
- 2.22251cm
- true
- true
-
-
- 0.28886cm
- 2.22221cm
- 0cm
- 4.95004cm
-
-
-
-
-
- true
- true
-
-
-
-
- =Parameters!NombreRecibio.Value
-
-
-
-
-
-
- Textbox31
- 0.46525cm
- 1.74387cm
- 0.6cm
- 5.95755cm
- 1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- 0.28886cm
- 12.07381cm
- 0cm
- 4.95004cm
- 2
-
-
-
-
-
- true
- true
-
-
-
-
- =Parameters!Almacen.Value
-
-
-
-
-
-
- Textbox31
- 0.42997cm
- 11.67694cm
- 0.6cm
- 5.95755cm
- 3
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- Fecha Impresion:
-
-
-
-
-
-
- Textbox5
- 1.49022cm
- 11.83688cm
- 0.6cm
- 2.90426cm
- 4
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- =Parameters!FechaImpresion.Value
-
-
-
-
-
-
- Textbox33
- 1.49022cm
- 14.74114cm
- 0.6cm
- 2.89335cm
- 5
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
-
-
-
-
- 29.7cm
- 21cm
- 0.5cm
- 1.5cm
- 2cm
- 2cm
- 0.13cm
-
-
- 0
-
-
-
- System.Data.DataSet
- /* Local Connection */
-
- 1f7ab5df-1d00-4763-8479-9ab750b1589a
-
-
-
-
-
- DsInventarios
- /* Local Query */
-
-
-
- Codigo
- System.String
-
-
- PS
- System.String
-
-
- UnidadMedida
- System.String
-
-
- PU
- System.Decimal
-
-
- Cantidad
- System.Decimal
-
-
- Total
- System.Decimal
-
-
- Descuento
- System.Decimal
-
-
- CodigoAF
- System.String
-
-
- Almacen
- System.String
-
-
- Lote
- System.String
-
-
- Batch
- System.String
-
-
- SerieLote
- System.String
-
-
-
- DsInventarios
- C:\inetpub\wwwVentas\App_Code\DsInventarios.xsd
- DtMovimientos
-
-
-
-
-
-
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- ReportParameter1
-
-
- String
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- String
- true
- true
- ReportParameter1
-
-
- Cm
- e6b08487-acfe-4020-a8f2-f9a54953646f
+
+
+
+
+
+
+
+
+ 1.72112cm
+
+
+ 2.33244cm
+
+
+ 7.27452cm
+
+
+ 2.70027cm
+
+
+ 1.89819cm
+
+
+ 1.57864cm
+
+
+
+
+ 0.42054cm
+
+
+
+
+ true
+ true
+
+
+
+
+ Cant.
+
+
+
+
+
+
+ Textbox7
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Código
+
+
+
+
+
+
+ Textbox9
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Descripción
+
+
+
+
+
+
+ Textbox11
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Serie Lote
+
+
+
+
+
+
+ Textbox6
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Lote
+
+
+
+
+
+
+ Textbox5
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Batch
+
+
+
+
+
+
+ Textbox12
+
+
+
+ Black
+
+ 1pt
+
+
+ Black
+
+ 1pt
+
+ White
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.69042cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Cantidad.Value
+
+
+
+
+
+
+ Cantidad
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Codigo.Value
+
+
+
+
+
+
+ Codigo
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!PS.Value
+
+
+
+
+
+
+ PS
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!SerieLote.Value
+
+
+
+
+
+
+ SerieLote
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Lote.Value
+
+
+
+
+
+
+ Lote
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Batch.Value
+
+
+
+
+
+
+ Batch
+
+
+ 2pt
+ 2pt
+ =IIf(RowNumber(Nothing)=1,"1pt","0pt")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False)
+
+
+
+
+ =IIF(String.IsNullOrEmpty(Fields!Batch.Value), True,False)
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ DsInventarios
+ 0.17639cm
+ 0.22456cm
+ 1.11096cm
+ 17.50518cm
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Observaciones.Value
+
+
+
+
+
+
+ Textbox2
+ 1.39318cm
+ 0.25984cm
+ 0.6cm
+ 11.36782cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 0.82291in
+
+
+ 7.06771in
+
+
+ 4.11151cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Empresa.Value
+
+
+
+
+
+
+ Textbox1
+ 0.28677cm
+ 3.73711cm
+ 0.67056cm
+ 8.97552cm
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Concepto.Value
+
+
+
+
+
+
+ Textbox34
+ 1.02789cm
+ 3.73711cm
+ 0.95277cm
+ 8.10916cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ External
+ =Parameters!LogoPath.Value
+ FitProportional
+ 0.3175cm
+ 0.19987cm
+ 1.66316cm
+ 3.43141cm
+ 2
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!FacturaProveedor.Value
+
+
+
+
+
+
+ Textbox15
+ 2.34504cm
+ 2.43182cm
+ 0.6cm
+ 9.54145cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+
+
+
+
+ =Parameters!FacturadoA.Value
+
+
+
+
+
+
+ Textbox18
+ 3.08614cm
+ 2.43182cm
+ 0.6cm
+ 9.54145cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Proveedor:
+
+
+
+
+
+
+ Textbox16
+ 3.097cm
+ 0.26872cm
+ 0.6cm
+ 2.11724cm
+ 5
+
+ =IIF(Parameters!FacturadoA.Value = "", True, False)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Factura:
+
+
+
+
+
+
+ Textbox14
+ 2.34504cm
+ 0.25631cm
+ 0.6cm
+ 2.12965cm
+ 6
+
+ =IIF(Parameters!FacturaProveedor.Value = "", True, False)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Folio:
+
+
+
+
+
+
+ Textbox3
+ 0.35028cm
+ 12.99791cm
+ 0.89103cm
+ 2.06494cm
+ 7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Folio.Value
+
+
+
+
+
+
+ Textbox31
+ 0.31501cm
+ 15.06284cm
+ 0.9263cm
+ 2.57165cm
+ 8
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha:
+
+
+
+
+
+
+ Textbox4
+ 3.09701cm
+ 12.33674cm
+ 0.59999cm
+ 1.80326cm
+ 9
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+
+
+
+
+ =Parameters!Almacen.Value
+
+
+
+
+
+
+ Textbox6
+ 2.34505cm
+ 14.14cm
+ 0.6cm
+ 3.65324cm
+ 10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Fecha.Value
+
+
+
+
+
+
+ Textbox32
+ 3.09701cm
+ 14.14cm
+ 0.59999cm
+ 3.65324cm
+ 11
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Almacén:
+
+
+
+
+
+
+ Textbox3
+ 2.34505cm
+ 12.33674cm
+ 0.59999cm
+ 1.80326cm
+ 12
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ 2.22251cm
+ true
+ true
+
+
+ 0.28886cm
+ 2.22221cm
+ 0cm
+ 4.95004cm
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!NombreRecibio.Value
+
+
+
+
+
+
+ Textbox31
+ 0.46525cm
+ 1.74387cm
+ 0.6cm
+ 5.95755cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 0.28886cm
+ 12.20081cm
+ 0cm
+ 4.95004cm
+ 2
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Almacen.Value
+
+
+
+
+
+
+ Textbox31
+ 0.42997cm
+ 11.80394cm
+ 0.6cm
+ 5.95755cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Impresion:
+
+
+
+
+
+
+ Textbox5
+ 1.49022cm
+ 11.96388cm
+ 0.6cm
+ 2.90426cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!FechaImpresion.Value
+
+
+
+
+
+
+ Textbox33
+ 1.49022cm
+ 14.86814cm
+ 0.6cm
+ 2.89335cm
+ 5
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 0.5cm
+ 1.5cm
+ 2cm
+ 2cm
+ 0.13cm
+
+
+ 0
+
+
+
+ System.Data.DataSet
+ /* Local Connection */
+
+ 1f7ab5df-1d00-4763-8479-9ab750b1589a
+
+
+
+
+
+ DsInventarios
+ /* Local Query */
+
+
+
+ Codigo
+ System.String
+
+
+ PS
+ System.String
+
+
+ UnidadMedida
+ System.String
+
+
+ PU
+ System.Decimal
+
+
+ Cantidad
+ System.Decimal
+
+
+ Total
+ System.Decimal
+
+
+ Descuento
+ System.Decimal
+
+
+ CodigoAF
+ System.String
+
+
+ Almacen
+ System.String
+
+
+ Lote
+ System.String
+
+
+ Batch
+ System.String
+
+
+ SerieLote
+ System.String
+
+
+
+ DsInventarios
+ C:\inetpub\wwwVentas\App_Code\DsInventarios.xsd
+ DtMovimientos
+
+
+
+
+
+
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ ReportParameter1
+
+
+ String
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ Cm
+ e6b08487-acfe-4020-a8f2-f9a54953646f
\ No newline at end of file
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb
index 511cd68a0..c63584343 100644
--- a/Inventarios/RecepcionUsados.aspx.vb
+++ b/Inventarios/RecepcionUsados.aspx.vb
@@ -322,82 +322,80 @@ Partial Class Inventarios_RecepcionUsados
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
-
-
- CveMovimiento = -1
- CveMovimientoRelacionado = -1
- TieneRelacionado = -1
- TieneSalida = False
- EstatusAlmacenCompra = -1
- EsConsumoInterno = False
- Correo = ""
- FolioCorreo = ""
-
- If IfNull(Request("Opc"), "").ToString = "S" Then
- RBLOpcion.SelectedValue = "3"
- DivCliente.Visible = False
- End If
-
- CreaDT()
- CargaCombos()
- TxtFecha.Text = Now.ToShortDateString
- TxtFechaPendientes.Text = Now.ToShortDateString
- RVFecha.MaximumValue = Now.ToShortDateString
- InicializaClientes()
-
- 'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos
- Select Case UsuarioActual.Empresa.Funcionalidad(103)
- Case "1"
-
- Case "2"
- divMonedaSeccion.Visible = True
- divGuia.Visible = True
- End Select
-
-
-
- 'AsignacionOpcion()
- SiguienteFolio()
-
-
- 'SI YA ES MOVIMIENTO REGISTRADO NO ESCONDE COLUMNA AF
- If CveMovimiento > 0 Then
- BloqueaEdicionEncabezado()
- If UsuarioActual.CveEmpresa.Contiene(66, 13) Then
- TrSubProyectoActivoFijo.Visible = True
- VisualizaAF(True)
- CargaSubProyectos()
- End If
- End If
-
- CargaSubProyectosUsados()
- InicializaBitacoraTemporal()
-
- If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
- DivCodigoSeriePS.Visible = True
- End If
-
- 'If IfNull(Request("CI"), -1).ToString.ToEntero > 0 Then
- ' ActivaConsumoInterno()
- 'End If
-
- 'BLOQUEA PERMISOS
- BtnGuardar.Enabled = PermiteGuardar()
- BtnEliminar.Enabled = PermiteEliminar()
- BtnContabilizar.Enabled = PermiteContabilizar()
- BtnNuevo.Enabled = PermiteCrearNuevo()
-
- ActivaPermisoSeccionAlmacen()
- If CveMovimiento > 0 Then
- PermisoVerImportes()
- End If
-
- CargaTamaños()
- 'DdlProducto2.setEsWebService(True)
- 'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
+ CargaInicial()
End If
End Sub
+ Private Sub CargaInicial()
+ CveMovimiento = -1
+ CveMovimientoRelacionado = -1
+ TieneRelacionado = -1
+ TieneSalida = False
+ EstatusAlmacenCompra = -1
+ EsConsumoInterno = False
+ Correo = ""
+ FolioCorreo = ""
+
+ If IfNull(Request("Opc"), "").ToString = "S" Then
+ RBLOpcion.SelectedValue = "3"
+ DivCliente.Visible = False
+ End If
+
+ CreaDT()
+ CargaCombos()
+ TxtFecha.Text = Now.ToShortDateString
+ TxtFechaPendientes.Text = Now.ToShortDateString
+ RVFecha.MaximumValue = Now.ToShortDateString
+ InicializaClientes()
+
+ 'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos
+ Select Case UsuarioActual.Empresa.Funcionalidad(103)
+ Case "1"
+
+ Case "2"
+ divMonedaSeccion.Visible = True
+ divGuia.Visible = True
+ End Select
+
+ 'AsignacionOpcion()
+ SiguienteFolio()
+
+ 'SI YA ES MOVIMIENTO REGISTRADO NO ESCONDE COLUMNA AF
+ If CveMovimiento > 0 Then
+ BloqueaEdicionEncabezado()
+ If UsuarioActual.CveEmpresa.Contiene(66, 13) Then
+ TrSubProyectoActivoFijo.Visible = True
+ VisualizaAF(True)
+ CargaSubProyectos()
+ End If
+ End If
+
+ CargaSubProyectosUsados()
+ InicializaBitacoraTemporal()
+
+ If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
+ DivCodigoSeriePS.Visible = True
+ End If
+
+ 'If IfNull(Request("CI"), -1).ToString.ToEntero > 0 Then
+ ' ActivaConsumoInterno()
+ 'End If
+
+ 'BLOQUEA PERMISOS
+ BtnGuardar.Enabled = PermiteGuardar()
+ BtnEliminar.Enabled = PermiteEliminar()
+ BtnContabilizar.Enabled = PermiteContabilizar()
+ BtnNuevo.Enabled = PermiteCrearNuevo()
+
+ ActivaPermisoSeccionAlmacen()
+ If CveMovimiento > 0 Then
+ PermisoVerImportes()
+ End If
+
+ CargaTamaños()
+ 'DdlProducto2.setEsWebService(True)
+ 'DdlProducto2.Attributes.Add("data-metodo", "getpsusados")
+ End Sub
@@ -630,6 +628,7 @@ Partial Class Inventarios_RecepcionUsados
CveRemisionRecibida = -1
EsDistribuidor = False
DdlClientes.SelectedValueExist("-1")
+ DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
SiguienteFolio()
@@ -654,6 +653,7 @@ Partial Class Inventarios_RecepcionUsados
If Not DdlAlmacen.Items.Contains(New ListItem("Seleccione", "-1")) Then
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
End If
+
DdlAlmacen.SelectedValue = "-1"
If Not EsConsumoInterno Then
DdlAlmacen_SelectedIndexChanged(DdlAlmacen, EventArgs.Empty)
@@ -680,6 +680,8 @@ Partial Class Inventarios_RecepcionUsados
TxtRemision.Text = ""
DivRemision.Visible = False
+ 'CargaInicial()
+
UpRegistroTipoCambio.Update()
UPDatos.Update()
End Sub
@@ -2046,22 +2048,12 @@ Partial Class Inventarios_RecepcionUsados
'End Sub
Private Sub CreaRemisionNC(CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer)
+ If ObjRemisionNC IsNot Nothing Then
+ ObjRemisionNC.Dispose()
+ ObjRemisionNC = Nothing
+ End If
Me.ObjRemisionNC = New Modelos.Factura(UsuarioActual)
- 'Dim Folio As String = ""
- 'Dim Serie As String = ""
-
- 'Dim ObjFolios As New ClsGralFolios()
- 'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
- ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto))
- ' If DT.Rows.Count > 0 Then
- ' Serie = DT.Rows(0)("Serie").ToString()
- ' Folio = DT.Rows(0)("FActual").ToString()
- ' End If
- ' DT.Dispose()
- 'End If
- 'ObjFolios.Dispose()
-
Me.ObjRemisionNC.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML
Me.ObjRemisionNC.Serie = "-1"
Me.ObjRemisionNC.Folio = -1 'Folio.ToEntero()
diff --git a/Ventas/Promociones.aspx b/Ventas/Promociones.aspx
index 6ed0aabef..4a4d6b944 100644
--- a/Ventas/Promociones.aspx
+++ b/Ventas/Promociones.aspx
@@ -180,6 +180,7 @@
+
diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb
index abb594cff..1d9f1a6b6 100644
--- a/Ventas/Promociones.aspx.vb
+++ b/Ventas/Promociones.aspx.vb
@@ -219,8 +219,8 @@ Partial Class Ventas_Promociones
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
- If DdlPS.SelectedValue.ToEntero <= 0 Then
- Alert("Debe seleccionar un Producto/Servicio.", TipoMensaje.MsgAdvertencia)
+ If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
+ Alert("Debe seleccionar una clasificacion", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -242,7 +242,7 @@ Partial Class Ventas_Promociones
Dr("Clasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimeroValor("Clasificacion")
End If
- Dr("CvePS") = DdlPS.SelectedValue
+ Dr("CvePS") = If(DdlPS.SelectedValue = "", "-1", DdlPS.SelectedValue)
Dr("CodigoPS") = DdlPS.SelectedText
Dr("PUAnterior") = LbPUActual.Text.ToDecimal
@@ -388,7 +388,8 @@ Partial Class Ventas_Promociones
For Each Dr As DataRow In TempDT.Rows
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
CBool(Dr("AplicaRestriccion")), CBool(Dr("AplicaLunes")), CBool(Dr("AplicaMartes")), CBool(Dr("AplicaMiercoles")), CBool(Dr("AplicaJueves")), CBool(Dr("AplicaViernes")), CBool(Dr("AplicaSabado")), CBool(Dr("AplicaDomingo")),
- Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero) Then
+ Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero,
+ CveClasificacion:=If(Dr("CvePS").ToString = "", 20, Dr("CveClasificacion").ToString.ToEntero)) Then
TieneError = True
Exit For
End If
@@ -417,7 +418,7 @@ Partial Class Ventas_Promociones
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 0").Rows
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
CBool(Dr("AplicaRestriccion")), CBool(Dr("AplicaLunes")), CBool(Dr("AplicaMartes")), CBool(Dr("AplicaMiercoles")), CBool(Dr("AplicaJueves")), CBool(Dr("AplicaViernes")), CBool(Dr("AplicaSabado")), CBool(Dr("AplicaDomingo")),
- Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero) Then
+ Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero, CveClasificacion:=If(Dr("CvePS").ToString = "-1", Dr("CveClasificacion").ToString.ToEntero, -1)) Then
TieneError = True
Exit For
End If
@@ -427,7 +428,7 @@ Partial Class Ventas_Promociones
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 1").Rows
If Not ObjVentas.UpdatePromocionesDetalle(Dr("CvePromocionDetalle").ToString.ToEntero, CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
CBool(Dr("AplicaRestriccion")), CBool(Dr("AplicaLunes")), CBool(Dr("AplicaMartes")), CBool(Dr("AplicaMiercoles")), CBool(Dr("AplicaJueves")), CBool(Dr("AplicaViernes")), CBool(Dr("AplicaSabado")), CBool(Dr("AplicaDomingo")),
- Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero) Then
+ Dr("HoraInicio").ToString.ToDateTime, Dr("HoraFin").ToString.ToDateTime, Dr("CantidadMinima").ToString.ToEntero, CveClasificacion:=If(Dr("CvePS").ToString = "-1", Dr("CveClasificacion").ToString.ToEntero, -1)) Then
TieneError = True
Exit For
End If
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 091460f02..8f8f11141 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -3826,6 +3826,18 @@ Partial Class Ventas
TxtSubTotal2.Text = (TxtSubTotal.Text.Replace(",", "").Trim.Trim.ToDouble - LblDescuentos.Text.Replace(",", "").Trim.Trim.ToDouble - LblAmortizacion.Text.Replace(",", "").Trim.Trim.ToDouble).FormatoNumero(2)
TxtIVA.Text = DbRowVenta("IVA").ToString.FormatoNumero(2)
TxtRetIVA.Text = DbRowVenta("RetIVA").ToString.FormatoNumero(2)
+ If TxtRetIVA.Text.ToDecimal() > 0 Then
+ TrRetIVA.Style.Add("display", "")
+ UsuarioActual.Empresa.MostrarRetIVA = True
+ If DdlTipoRetencion.SelectedValue.ToEntero() > 0 Then
+ DdlTipoRetencion.Visible = True
+ End If
+ If TmpDT IsNot Nothing Then
+ Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
+ LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
+ End If
+
+ End If
TxtRetISR.Text = DbRowVenta("RetISR").ToString.FormatoNumero(2)
TxtIEPS.Text = DbRowVenta("IEPS").ToString.FormatoNumero(2)
TrIEPS.Visible = TxtIEPS.Text.ToDouble > 0
@@ -4398,6 +4410,10 @@ Partial Class Ventas
TxtSubTotal2.Text = (TxtSubTotal.Text.Replace(",", "").Trim.Trim.ToDouble - LblDescuentos.Text.Replace(",", "").Trim.Trim.ToDouble - LblAmortizacion.Text.Replace(",", "").Trim.Trim.ToDouble).FormatoNumero(2)
TxtIVA.Text = drv("IVA").ToString.FormatoNumero(2)
TxtRetIVA.Text = drv("RetIVA").ToString.FormatoNumero(2)
+ If TxtRetIVA.Text.ToDecimal() > 0 Then
+ TrRetIVA.Style.Add("display", "")
+ UsuarioActual.Empresa.MostrarRetIVA = True
+ End If
TxtRetISR.Text = drv("RetISR").ToString.FormatoNumero(2)
TxtTotal.Text = drv("Total").ToString.FormatoNumero(2)
TotalOriginal = Math.Round(drv("Total").ToString.ToDouble, 2)
@@ -4720,15 +4736,18 @@ Partial Class Ventas
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString)
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
- ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
- If ObjCliente.RetieneIVAFletes Then
- TrRetIVA.Style.Add("display", "")
- UsuarioActual.Empresa.MostrarRetIVA = True
+ If CveVenta <= 0 Then
+ ViewState("RetIVAFletes") = ObjCliente.RetieneIVAFletes
+ If ObjCliente.RetieneIVAFletes Then
+ TrRetIVA.Style.Add("display", "")
+ UsuarioActual.Empresa.MostrarRetIVA = True
+ End If
End If
+
ViewState("Vendedor") = ObjCliente.Vendedor
ViewState("CtaContable") = ObjCliente.CuentaContable
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
@@ -24205,18 +24224,20 @@ Partial Class Ventas
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
If PorcentajeRetIVA > 0 Then
+ TrRetIVA.Style.Add("display", "")
+ UsuarioActual.Empresa.MostrarRetIVA = True
DdlTipoRetencion.Visible = True
End If
GvPS.DataSource = TmpDT
GvPS.DataBind()
- UpPS.Update()
+
End If
End If
End If
-
+ UpPS.Update()
End Sub