-- al editar remision, que si tiene salida, no permita cambiar el producto
This commit is contained in:
@@ -1263,8 +1263,8 @@ Public Class Timbrado
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
||||
'RECEPTOR
|
||||
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
|
||||
cfdi.agregarComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
||||
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
||||
|
||||
@@ -2090,54 +2090,82 @@ Partial Class Bancos_PopIEVentas
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
Dim tImporteVenta, tImportePago, Diferencia As Decimal
|
||||
ImporteMovimiento = 0
|
||||
|
||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
If CveMonedaVenta = 1 And CveMoneda = 2 Then
|
||||
'factura pesos, pago en dolares
|
||||
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta / tipoCambioPago).RoundSQL
|
||||
ElseIf CveMonedaVenta = 2 And CveMoneda = 2 Then
|
||||
'factura dolares, pago en dolares
|
||||
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
|
||||
ElseIf CveMonedaVenta = 2 And CveMoneda = 1 Then
|
||||
'factura dolares, pago en pesos
|
||||
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
|
||||
End If
|
||||
|
||||
If tImporteVenta <> tImportePago Then
|
||||
If tImporteVenta < tImportePago Then
|
||||
CveConcepto = 64
|
||||
Else
|
||||
CveConcepto = 65
|
||||
End If
|
||||
Diferencia = Math.Abs(tImporteVenta - tImportePago)
|
||||
End If
|
||||
|
||||
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
|
||||
If FuncionalidadFluctuacionImpuestos Then
|
||||
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
|
||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
End If
|
||||
|
||||
|
||||
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
||||
|
||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||
If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
|
||||
ImporteMovimiento = Math.Abs(Diferencia)
|
||||
ImporteMX = ImporteMovimiento
|
||||
End If
|
||||
'If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
|
||||
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||
' ImporteMX = ImporteMovimiento
|
||||
'End If
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
Case 65 'Perdida
|
||||
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'Case 65 'Perdida
|
||||
' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
||||
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
TimpocambioGeneral = TCImpuestos
|
||||
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||
' TimpocambioGeneral = TCImpuestos
|
||||
|
||||
|
||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||
' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
' Diferencia = Math.Round(Diferencia, 2)
|
||||
|
||||
'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
||||
If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
|
||||
ImporteMovimiento = Math.Abs(Diferencia)
|
||||
ImporteMX = ImporteMovimiento
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
||||
' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
|
||||
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||
' ImporteMX = ImporteMovimiento
|
||||
' End If
|
||||
' Else
|
||||
' ImporteMovimiento = 0
|
||||
' End If
|
||||
' CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
Case 30
|
||||
If RBLContado.SelectedValue = "1" Then
|
||||
|
||||
BIN
Bin/RVCFDI33.dll
BIN
Bin/RVCFDI33.dll
Binary file not shown.
@@ -6307,7 +6307,7 @@ Partial Class Compras_Compras
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
||||
@@ -6645,18 +6645,22 @@ Partial Class Compras_Compras
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
|
||||
|
||||
'CLASIFICACION
|
||||
If Row2("CveClasificacion").ToString.ToEntero > 0 Then
|
||||
If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "FAC" Then
|
||||
|
||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'SEGMENTO DE NEGOCIO
|
||||
Dim IdSegmentoNegocio As Integer = -1
|
||||
Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
|
||||
@@ -6686,6 +6690,11 @@ Partial Class Compras_Compras
|
||||
If DdlMoneda.SelectedValue = "2" Then
|
||||
tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
|
||||
End If
|
||||
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
tcvecon = 259
|
||||
tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||
|
||||
End If
|
||||
|
||||
Dim usacomplementariaProveedor As Boolean = False
|
||||
|
||||
@@ -464,7 +464,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
GVPendientes.DataBind()
|
||||
UpPendientes.Update()
|
||||
DtPendientes.Dispose()
|
||||
If DtPendientes IsNot Nothing Then DtPendientes.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound
|
||||
@@ -632,10 +632,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
|
||||
End If
|
||||
|
||||
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
||||
|
||||
If Not DtDatos.Columns.Contains("Lote") Then
|
||||
DtDatos.Columns.Add("Lote", GetType(String))
|
||||
End If
|
||||
@@ -1749,7 +1746,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
|
||||
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
If CBool(Dr("AplicaSerieLote")) Then
|
||||
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
@@ -1882,7 +1879,12 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1,
|
||||
SerieLote:=Dr("SerieLote").ToString,
|
||||
CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero,
|
||||
FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha),
|
||||
Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"),
|
||||
CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1894,7 +1896,8 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Next
|
||||
|
||||
If ErrorMovInv Then Exit For
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1038,7 +1038,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
Dim GenerarRNC As Boolean = False
|
||||
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
|
||||
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
||||
If Me.CveRemisionRecibida <= 0 Then 'EsDistribuidor AndAlso , comentado, 2020.04.21 RMF
|
||||
GenerarRNC = True
|
||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
@@ -440,7 +440,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Private Sub CargaAlmacenOrigen()
|
||||
DdlAlmacenOrigen.Enabled = True
|
||||
DdlAlmacenOrigen.Items.Clear()
|
||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11)")
|
||||
DdlAlmacenOrigen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||
DdlAlmacenOrigen.DataBind()
|
||||
@@ -1598,6 +1598,43 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
' TextoError = "Ocurrió un error al obtener los movimientos de salida"
|
||||
'End If
|
||||
|
||||
'VIRTUAL ENTRADA
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenRecepcion.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S2")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
If CveMovimientoVirtualEntrada > 0 AndAlso ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
TextoError = "No se pudo registrar el movimiento virtual"
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
TextoError = "La Sucursal no tiene creado un almacen virtual"
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
@@ -5802,8 +5802,12 @@ Partial Class Ventas
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
End If
|
||||
'e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
'e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
|
||||
'cuando ya tiene una salida, no se puede cambiar el producto
|
||||
If e.Row.DBCampo("CantidadInventario").ToDouble > 0 Then
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtTiempoEntrega").Enabled = False
|
||||
e.Row.FCDropDownList("DdlProyecto").Enabled = False
|
||||
@@ -5948,6 +5952,7 @@ Partial Class Ventas
|
||||
|
||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
||||
Dim CveUM As Integer = DatarowPS("CveUM").ToString.ToEntero
|
||||
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero
|
||||
|
||||
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
||||
@@ -5962,7 +5967,7 @@ Partial Class Ventas
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia As Decimal
|
||||
If ValidaExistencia Then
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||
End If
|
||||
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, CveTipoAlmacen:=1)
|
||||
@@ -11076,7 +11081,7 @@ Partial Class Ventas
|
||||
CveConceptoAlmacen = 18
|
||||
End If
|
||||
|
||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEnteroca
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
|
||||
|
||||
If CveMovimientoInventario <= 0 Then
|
||||
|
||||
Reference in New Issue
Block a user