diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index f707c911f..dcbf88e55 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -109,15 +109,13 @@ - - +
-
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
- +
@@ -125,7 +123,7 @@ @@ -162,8 +160,12 @@   - - + + + + + + @@ -370,20 +372,12 @@
- -
-
-
-
- -
-
-
-
-
+
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
-
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 44d66911f..bc905ed23 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2469,6 +2469,25 @@ Partial Class Ventas HlFacturasRelaciondas.Visible = True End If + If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then + DdlMoneda.SelectedValueExist(2) + Using ObjVentas As New ClsNominas + + If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", Request("CveEmbarqueManifiesto").ToEntero()) Then + TmpDT = ObjVentas.DtResultados + TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) + TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) + TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer)) + TmpDT.Columns.Add("TieneProntoPago", GetType(String)) + TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) + GvPS.DataSource = ObjVentas.DtResultados + GvPS.DataBind() + + 'IEPS A NIVEL DETALLE + 'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text) + End If + End Using + End If 'Carga Venta If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero() > 0 Then @@ -6628,7 +6647,7 @@ Partial Class Ventas 'RMF. validacion temporal 'verifica si tiene autorizaciones de Nota de crédito autorizadas Dim ObjVentas As New ClsVentas - If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, CveEstatus:=1) Then + If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Ing", CveEstatus:=1) Then Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="TipoAutorizacion") If RowAutorizacion IsNot Nothing Then DdlTipoComprobante.SelectedValueExistInsert("Egs", "Egresos") @@ -7971,7 +7990,7 @@ Partial Class Ventas Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero() Dim ObjVentas As New ClsVentas Try - If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, CveEstatus:=1) Then + If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, DdlTipoDocto.SelectedValue, CveEstatus:=1) Then Dim RowAutorizacion As DataRow = Nothing 'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO If TieneDiasVencidos Then @@ -26965,15 +26984,47 @@ Partial Class Ventas Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs) 'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then - If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then - Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia) + + Dim Verificacion As Boolean = False + + If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs + Verificacion = True + Else + If UsuarioActual.TienePermisoProceso(175) Then ' si es una nc, que se va a generar directa, el permiso de generar NC directas + Verificacion = True Else - Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") + 'verificar autorizaciones + Dim ObjVentas As New ClsVentas + If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, -1, "Egs", CveEstatus:=1) Then + Dim RowAutorizacion As DataRow = ObjVentas.DtResultados.FiltroPrimero($"CveVenta IS NULL ", Orderby:="TipoAutorizacion") + If RowAutorizacion IsNot Nothing Then + Verificacion = True + End If + End If + ObjVentas.Dispose() + ' si es una nc, que se va a generar directa, debe de revisar que tenga una autorización, o el permiso de generar NC directas + End If + End If + + If GvCxC.Rows.Count = 0 OrElse GvCxC.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("ChkCxC").Checked) = 0 Then + If Verificacion Then + If ClienteEsDistribuidor AndAlso TxtImportesRemisionesNC.Text.ToDecimal() > 0 Then + Alert("No se puede generar una nota de crédito para devolución de efectivo si el cliente es distribuidor.", TipoMensaje.MsgAdvertencia) + Else + Alert("No se ha seleccionado ninguna factura, en caso de no seleccionar ninguna se creará una nueva nota de crédito. ¿Está seguro de realizar esta acción?", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnAplicaNuevaNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") + End If + Else + Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia) End If Else - AplicarNotaCreditoDesdeVenta() + ' si viene de remisiones, puede seguir adelante + If Verificacion Then + AplicarNotaCreditoDesdeVenta() + Else + Alert("No se puede Generar notas de crédito directas", TipoMensaje.MsgAdvertencia) + End If + End If Else AplicarNotaCreditoDesdeVenta() @@ -31593,6 +31644,7 @@ Partial Class Ventas End If ListaRemisionesNC.Add(RemNC) + BtnAplicarNC.Enabled = True If TerminarCiclo Then Exit For @@ -31636,6 +31688,10 @@ Partial Class Ventas TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero 'TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero + If ListaRemisionesNC.Count > 0 Then ' si hay opciones seleccionadas, se activa el generar las NCs + BtnAplicarNC.Enabled = True + End If + UpModalRemisionesNC.Update() UpAplicarNC.Update() diff --git a/vwd.webinfo b/vwd.webinfo index af2a2c734..5b42c0490 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -398,6 +398,12 @@ + + + + + +