Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -2164,7 +2164,7 @@ Partial Class Compras_Compras
|
||||
If Msg <> "" Then
|
||||
Alert($"<b>El comprobante XML presenta las siguientes inconsistencias:</b> <br><br> {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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex%>' CommandName="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user