Promisiones grupo Díaz 2024-10-05
This commit is contained in:
@@ -917,7 +917,14 @@ Public Class Timbrado
|
|||||||
.NumParcialidad = VentaNumParcialidad,
|
.NumParcialidad = VentaNumParcialidad,
|
||||||
.ObjetoImpuesto = ObjetoImpuesto} 'If(drr("MetodoPago").ToString = "PUE", 0, drr("NumParcialidad").ToString.ToEntero)}
|
.ObjetoImpuesto = ObjetoImpuesto} 'If(drr("MetodoPago").ToString = "PUE", 0, drr("NumParcialidad").ToString.ToEntero)}
|
||||||
|
|
||||||
For Each drp As DataRow In dttpagosimpuestos.FiltraParametros(String.Format("FolioFiscal = '{0}'", VentaFolioFiscal.ToLower)).Rows
|
|
||||||
|
'dtTempdttpagosimpuestos se esta usando para el caso de que el objeto de impuesto del ps de la venta sea 01 (la consulta por default genera 02)
|
||||||
|
Dim dtTempdttpagosimpuestos As DataTable = dttpagosimpuestos.FiltraParametros(String.Format("FolioFiscal = '{0}'", VentaFolioFiscal.ToLower))
|
||||||
|
If dtTempdttpagosimpuestos IsNot Nothing AndAlso doc.ObjetoImpuesto = "02" AndAlso dtTempdttpagosimpuestos.Rows.Count = 0 Then
|
||||||
|
doc.ObjetoImpuesto = "01"
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each drp As DataRow In dtTempdttpagosimpuestos.Rows
|
||||||
doc.Impuestos.Add(New CFDIConceptosImpuestos With {
|
doc.Impuestos.Add(New CFDIConceptosImpuestos With {
|
||||||
.TrasladooRetencion = drp("Tipo").ToString,
|
.TrasladooRetencion = drp("Tipo").ToString,
|
||||||
.Base = drp("Base").ToString.ToDecimal.RoundSQL,
|
.Base = drp("Base").ToString.ToDecimal.RoundSQL,
|
||||||
|
|||||||
@@ -435,7 +435,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Proveedor">
|
<asp:TemplateField HeaderText="Proveedor">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HplProveedor" runat="server" CssClass="Texto" Target="_blank" rel="opener" Text='<%# Eval("NombreProveedor") %>'></asp:HyperLink>
|
<asp:HyperLink ID="HplProveedor" runat="server" CssClass="Texto" Target="_blank" Text='<%# Eval("NombreProveedor") %>' rel="opener"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server" >
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnGuardar" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" OnClick="BtnGuardar_Click" runat="server" />
|
<asp:Button ID="BtnGuardar" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" OnClick="BtnGuardar_Click" runat="server" />
|
||||||
<asp:Button ID="ButBtnEliminar" Text="Eliminar" CssClass="btn btn-danger" OnClick="BtnEliminar_Click" runat="server" Visible="false"
|
<asp:Button ID="ButBtnEliminar" Text="Eliminar" CssClass="btn btn-danger" OnClick="BtnEliminar_Click" runat="server" Visible="false"
|
||||||
|
|||||||
@@ -121,16 +121,16 @@ Partial Class Ventas_Promociones
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property EmpresaFnc382 As Boolean
|
Private Property EmpresaGrupoDiaz As Boolean
|
||||||
Get
|
Get
|
||||||
|
|
||||||
If ViewState("EmpresaFnc382") Is Nothing Then
|
If ViewState("EmpresaGrupoDiaz") Is Nothing Then
|
||||||
ViewState("EmpresaFnc382") = False
|
ViewState("EmpresaGrupoDiaz") = False
|
||||||
End If
|
End If
|
||||||
Return Boolean.Parse(ViewState("EmpresaFnc382").ToString)
|
Return Boolean.Parse(ViewState("EmpresaGrupoDiaz").ToString)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
ViewState("EmpresaFnc382") = value
|
ViewState("EmpresaGrupoDiaz") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -157,10 +157,10 @@ Partial Class Ventas_Promociones
|
|||||||
PorMinMasCostoVentaFnc129 = UsuarioActual.Empresa.Funcionalidad(129).ToDecimal
|
PorMinMasCostoVentaFnc129 = UsuarioActual.Empresa.Funcionalidad(129).ToDecimal
|
||||||
PermisoAutorizPromocionPorcentaje = UsuarioActual.TienePermisoProceso(386)
|
PermisoAutorizPromocionPorcentaje = UsuarioActual.TienePermisoProceso(386)
|
||||||
|
|
||||||
EmpresaFnc382 = If(UsuarioActual.Empresa.Funcionalidad(382) = "1", True, False) 'Grupo díaz
|
EmpresaGrupoDiaz = If(UsuarioActual.Empresa.Funcionalidad(382) = "1", True, False) 'Grupo díaz
|
||||||
'EmpresaFnc382 = True ''Para pruebas
|
'EmpresaGrupoDiaz = True ''Para pruebas
|
||||||
|
|
||||||
If EmpresaFnc382 Then
|
If EmpresaGrupoDiaz Then
|
||||||
DVModalClasificacion.Visible = False
|
DVModalClasificacion.Visible = False
|
||||||
GvDatos.Columns(6).Visible = True
|
GvDatos.Columns(6).Visible = True
|
||||||
GvDatos.Columns(7).Visible = True
|
GvDatos.Columns(7).Visible = True
|
||||||
@@ -179,8 +179,18 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
|
|
||||||
ValidaPromosiones(False)
|
ValidaPromosiones(False)
|
||||||
If EmpresaFnc382 AndAlso ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
If EmpresaGrupoDiaz Then
|
||||||
ChkEstatus.Enabled = False
|
|
||||||
|
If ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||||
|
ChkEstatus.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
|
||||||
|
BtnGuardar.Visible = False
|
||||||
|
ButBtnEliminar.Visible = False
|
||||||
|
'UpBotones.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -351,7 +361,7 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
Private Sub CargaDTUltimoCosto()
|
Private Sub CargaDTUltimoCosto()
|
||||||
|
|
||||||
If EmpresaFnc382 Then
|
If EmpresaGrupoDiaz Then
|
||||||
Dim DTPSUltimoCosto = New DataTable
|
Dim DTPSUltimoCosto = New DataTable
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
@@ -659,7 +669,7 @@ Partial Class Ventas_Promociones
|
|||||||
Private Sub ValidaPromosiones(Bloquear As Boolean)
|
Private Sub ValidaPromosiones(Bloquear As Boolean)
|
||||||
|
|
||||||
|
|
||||||
If Not EmpresaFnc382 Then
|
If Not EmpresaGrupoDiaz Then
|
||||||
BloqueadoPromocionPorcentaje = False
|
BloqueadoPromocionPorcentaje = False
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -808,6 +818,15 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
Private Sub GuardaPromocion()
|
Private Sub GuardaPromocion()
|
||||||
|
|
||||||
|
If EmpresaGrupoDiaz Then
|
||||||
|
|
||||||
|
If DdlClientes.SelectedValue.ToEntero <= 0 AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||||
|
Alert("Debe de seleccionar un cliente. Seleccione uno e intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
ValidaPromosiones(True)
|
ValidaPromosiones(True)
|
||||||
|
|
||||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||||
@@ -858,8 +877,19 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
|
|
||||||
Private Sub ActualizaPromocion()
|
Private Sub ActualizaPromocion()
|
||||||
|
|
||||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||||
|
|
||||||
|
If EmpresaGrupoDiaz Then
|
||||||
|
|
||||||
|
If DdlClientes.SelectedValue.ToEntero <= 0 AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||||
|
Alert("Debe de seleccionar un cliente. Seleccione uno e intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
@@ -1079,7 +1109,7 @@ Partial Class Ventas_Promociones
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EmpresaFnc382 AndAlso EstatusOriginal = False AndAlso ChkEstatus.Checked And BloqueadoPromocionPorcentaje Then
|
If EmpresaGrupoDiaz AndAlso EstatusOriginal = False AndAlso ChkEstatus.Checked And BloqueadoPromocionPorcentaje Then
|
||||||
|
|
||||||
Dim objGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL)
|
Dim objGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL)
|
||||||
If Not objGeneral.AddHistorialBitacora(360, -1, -1, -1, -1, -1, -1, -1, "Se Autorizo con bloqueo", "No", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", "", "", CvePromocion:=CvePromocion) Then
|
If Not objGeneral.AddHistorialBitacora(360, -1, -1, -1, -1, -1, -1, -1, "Se Autorizo con bloqueo", "No", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", "", "", CvePromocion:=CvePromocion) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user