Quita validacion no necesaria de saldo almacen en ventas
This commit is contained in:
@@ -141,7 +141,7 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<div class="row" style="padding-top: 10px; position: relative;">
|
<div class="row" style="padding-top: 10px; position: relative;">
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="max-width: 80px;">Producto:</label>
|
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate" style="max-width: 80px;">Producto:</asp:Label>
|
||||||
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
|
||||||
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="ddlProducto2" runat="server" AutoPostBack="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
CargaPermisos()
|
CargaPermisos()
|
||||||
|
|
||||||
|
If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -160,7 +164,12 @@ Partial Class Inventarios_Kardex
|
|||||||
DdlUnidadMedida.Items.Clear()
|
DdlUnidadMedida.Items.Clear()
|
||||||
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
DdlUnidadMedida.DataSource = GlobalDTProductosServiciosEquivalencias(ddlProducto2.SelectedValue.ToEntero, -1)
|
||||||
DdlUnidadMedida.DataBind()
|
DdlUnidadMedida.DataBind()
|
||||||
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlUnidadMedida.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
LblPS.ToolTip = ddlProducto2.SelectedValue
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
|
||||||
|
|
||||||
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1
|
||||||
|
|
||||||
@@ -14837,8 +14837,9 @@ Partial Class Ventas
|
|||||||
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas
|
||||||
|
|
||||||
Dim MovDetalle As New DataTable
|
Dim MovDetalle As New DataTable
|
||||||
|
Dim AplicaMovimientoDetalleEntrada As Boolean = False
|
||||||
If RemisionesLista.Count > 0 Then
|
If RemisionesLista.Count > 0 Then
|
||||||
|
AplicaMovimientoDetalleEntrada = True
|
||||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL"))
|
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL"))
|
||||||
Else
|
Else
|
||||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||||
@@ -14847,8 +14848,9 @@ Partial Class Ventas
|
|||||||
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
|
||||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
'Le damos salida de apartado por traspaso
|
'Le damos salida de apartado por traspaso
|
||||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision)
|
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada)
|
||||||
|
|
||||||
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
If Not CveMovimientoSalidaPorTraspaso > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -14985,7 +14987,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return Not OcurrioError
|
Return Not OcurrioError
|
||||||
End Function
|
End Function
|
||||||
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer
|
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False) As Integer
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
Dim ContadorMovtosDetalles = 0
|
Dim ContadorMovtosDetalles = 0
|
||||||
|
|
||||||
@@ -15029,7 +15031,13 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
|
'CUANDO SEA REMISION FACTURADA DEBE RELACIONAR LOS NUEVOS MOVIMIENTOS POR EL DETALLE
|
||||||
|
Dim CveMovimientoDetalleEntrada As Integer = -1
|
||||||
|
If AplicaMovimientoDetalleEntrada Then
|
||||||
|
CveMovimientoDetalleEntrada = MovDet("CveMovimientoDetalle").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
||||||
ContadorMovtosDetalles += 1
|
ContadorMovtosDetalles += 1
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -17555,40 +17563,42 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
|
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
|
||||||
|
|
||||||
If VentaSaldoAlmacen <> 0 Then
|
'If VentaSaldoAlmacen <> 0 Then
|
||||||
Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.<br/>Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia)
|
' Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.<br/>Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
'Else
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
|
||||||
Dim sb As New StringBuilder()
|
|
||||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
|
||||||
|
|
||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
'End If
|
||||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
|
||||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||||
If Vigencia IsNot Nothing Then
|
Dim sb As New StringBuilder()
|
||||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||||
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
End If
|
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||||
sb.Append("<b>No encontrado</b> <br/>")
|
If Vigencia IsNot Nothing Then
|
||||||
Else
|
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||||
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
Else
|
Else
|
||||||
sb.Append("<b>No encontrado</b> <br/>")
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sb.Append("Está seguro de cancelar el documento?.")
|
|
||||||
|
|
||||||
LblCancelarDocumento.Text = sb.ToString()
|
|
||||||
|
|
||||||
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
|
||||||
UpCancelarDocumento.Update()
|
|
||||||
'Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnCancelarDocumentoConfirmar()", TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
|
||||||
Else
|
Else
|
||||||
CancelarDocumento()
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
sb.Append("Está seguro de cancelar el documento?.")
|
||||||
|
|
||||||
|
LblCancelarDocumento.Text = sb.ToString()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalCancelarDocumento').modal();")
|
||||||
|
UpCancelarDocumento.Update()
|
||||||
|
|
||||||
|
Else
|
||||||
|
CancelarDocumento()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user