189
This commit is contained in:
@@ -2504,7 +2504,7 @@ Public Class ClsVentas
|
||||
End Function
|
||||
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
|
||||
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
|
||||
Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer
|
||||
Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional ReqAutorizacion As Boolean = False) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Vta_PromocionesAdd")
|
||||
|
||||
@@ -2522,6 +2522,7 @@ Public Class ClsVentas
|
||||
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@ReqAutorizacion", SqlDbType.Bit).Value = ReqAutorizacion
|
||||
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -2668,7 +2669,8 @@ Public Class ClsVentas
|
||||
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, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False, Optional Opcion As Integer = 1) As Boolean
|
||||
Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False, Optional Opcion As Integer = 1
|
||||
) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PromocionesDetalleAdd")
|
||||
|
||||
@@ -2695,6 +2697,7 @@ Public Class ClsVentas
|
||||
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
|
||||
.Add("@IncluyeImpuestos", SqlDbType.Bit).Value = IncluyeImpuestos
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3140,6 +3140,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
params.Add(New ReportParameter("FechaVencimiento", If(CveCompra > 0, dr("FechaVencimiento").ToString.ToDate().ToString("dd/MM/yyyy"), "")))
|
||||
params.Add(New ReportParameter("NombreCapturo", If(CveCompra > 0, dr("NombreCapturo").ToString, "")))
|
||||
params.Add(New ReportParameter("NumeroOrden", If(CveCompra > 0, dr("OCSerieFolioVinculada").ToString, "")))
|
||||
|
||||
Else
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format(Recibio)))
|
||||
|
||||
@@ -179,22 +179,22 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>1.0835cm</Width>
|
||||
<Width>0.97724cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.53251cm</Width>
|
||||
<Width>1.40581cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.40148cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>11.05821cm</Width>
|
||||
<Width>10.82525cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.33994cm</Width>
|
||||
<Width>3.03882cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.86685cm</Width>
|
||||
<Width>1.63389cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.96383cm</Width>
|
||||
@@ -222,7 +222,7 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -275,7 +275,7 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -478,7 +478,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Costo Unit.</Value>
|
||||
<Value>Cos.Unit.</Value>
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -598,7 +598,7 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -632,7 +632,7 @@
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
@@ -1899,7 +1899,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!OCVinculada.Value</Value>
|
||||
<Value>=Parameters!NumeroOrden.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -113,6 +113,10 @@
|
||||
<DataField>IEPS</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||
@@ -132,31 +136,34 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>0.2in</Width>
|
||||
<Width>0.15in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.57026in</Width>
|
||||
<Width>0.35in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.74207in</Width>
|
||||
<Width>0.5in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.78808in</Width>
|
||||
<Width>0.6in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.63616in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.05574in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.03151in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.68106in</Width>
|
||||
<Width>0.5in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.56042in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.95956in</Width>
|
||||
<Width>0.83282in</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -343,6 +350,42 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Código Prov.</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>9.5pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<BackgroundColor>#e36c09</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox46">
|
||||
@@ -553,7 +596,6 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -647,6 +689,35 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="NumeroParte">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>NumeroParte</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Obs1">
|
||||
@@ -790,6 +861,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -805,7 +877,7 @@
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Left>0.04788in</Left>
|
||||
<Height>0.34081in</Height>
|
||||
<Width>8.16912in</Width>
|
||||
<Width>8.21665in</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1700,7 +1772,7 @@
|
||||
<Height>3.83039in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>8.21701in</Width>
|
||||
<Width>8.26453in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>5.96613cm</Height>
|
||||
|
||||
@@ -5639,15 +5639,18 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 pull-right" style="text-align: right;">
|
||||
Importe total:
|
||||
|
||||
Importe total:
|
||||
<asp:TextBox Text="" ID="TxtSaldoImportar" ClientIDMode="Static" Enabled="false" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right" runat="server" id="DVBusquedaImportarSaldos" visible="false">
|
||||
<input type="text" id="TxtBusquedaImportarSaldos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div style="height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall" runat="server">
|
||||
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None"
|
||||
CssClass="table table-striped table-hover Widthall" runat="server">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -4818,9 +4818,14 @@ Partial Class Clientes
|
||||
ConsultarAnticiposSaldosClientes()
|
||||
End Sub
|
||||
Private Sub ConsultarAnticiposSaldosClientes()
|
||||
DVBusquedaImportarSaldos.Visible = False
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCCliente(DdlClienteImportarSaldos.SelectedValue.ToEntero()) Then
|
||||
GvImportarSaldos.DataSource = ObjMovtos.DtResultados.FiltraParametros("ISTotal = 0 AND Saldo > 0 AND Saldo > 0 AND CveIE > 0 AND Tipo IN('NC','IxC','Ant')")
|
||||
GvImportarSaldos.DataSource = ObjMovtos.DtResultados.FiltraParametros("ISTotal = 0 AND Saldo > 0 AND Saldo > 0 AND CveIE > 0 AND Tipo IN('NC','IxC','Ant')")
|
||||
If ObjMovtos.DtResultados.Rows.Count > 0 Then
|
||||
DVBusquedaImportarSaldos.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
GvImportarSaldos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
@@ -31,12 +31,16 @@ Partial Class Ventas_Promociones
|
||||
|
||||
Private Property CvePromocion As Integer
|
||||
Get
|
||||
If ViewState("CvePromocion") Is Nothing Then
|
||||
ViewState("CvePromocion") = -1
|
||||
End If
|
||||
Return ViewState("CvePromocion").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePromocion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveConsecutivo As Integer
|
||||
Get
|
||||
Return ViewState("CveConsecutivo").ToString.ToEntero
|
||||
@@ -108,6 +112,19 @@ Partial Class Ventas_Promociones
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ReqAutorizacion As Boolean
|
||||
Get
|
||||
If ViewState("ReqAutorizacion") Is Nothing Then
|
||||
ViewState("ReqAutorizacion") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("ReqAutorizacion").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ReqAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property BloqueadoPromocionPorcentaje As Boolean
|
||||
Get
|
||||
|
||||
@@ -181,7 +198,7 @@ Partial Class Ventas_Promociones
|
||||
ChkEstatus.Enabled = False
|
||||
End If
|
||||
|
||||
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
|
||||
If (ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje) Or (ReqAutorizacion And Not PermisoAutorizPromocionPorcentaje) Then
|
||||
BtnGuardar.Visible = False
|
||||
ButBtnEliminar.Visible = False
|
||||
End If
|
||||
@@ -433,6 +450,7 @@ Partial Class Ventas_Promociones
|
||||
DdlMarca.SelectedValue = Dr("CveMarca").ToString
|
||||
LblUsuario.Text = Dr("Usuario").ToString
|
||||
LblFechaIng.Text = Dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
If Dr("CveVendedor").ToString.ToEntero > 0 Then DdlVendedor.SelectedValue = Dr("CveVendedor").ToString
|
||||
|
||||
If Dr("CveCliente").ToString.ToEntero > 0 Then
|
||||
@@ -455,6 +473,8 @@ Partial Class Ventas_Promociones
|
||||
|
||||
CvePromocionPadre = If(Dr("CvePromocionPadre").ToString.ToEntero > 0, Dr("CvePromocionPadre").ToString.ToEntero, -1)
|
||||
|
||||
ReqAutorizacion = Boolean.Parse(Dr("ReqAutorizacion").ToString)
|
||||
|
||||
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
|
||||
TempDT = ObjVentas.DtResultados.Copy
|
||||
TempDTOriginal = ObjVentas.DtResultados.Copy
|
||||
@@ -727,6 +747,9 @@ Partial Class Ventas_Promociones
|
||||
If (Not PermisoAutorizPromocionPorcentaje) AndAlso BloqueadoPromocionPorcentaje AndAlso Bloquear Then
|
||||
ChkEstatus.Checked = False
|
||||
ChkEstatus.Enabled = False
|
||||
If CvePromocion <= 0 Then
|
||||
ReqAutorizacion = True
|
||||
End If
|
||||
End If
|
||||
UpGenerales.Update()
|
||||
|
||||
@@ -833,7 +856,8 @@ Partial Class Ventas_Promociones
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero)
|
||||
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero,
|
||||
ReqAutorizacion:=ReqAutorizacion)
|
||||
|
||||
If CvePromocion > 0 Then
|
||||
For Each Dr As DataRow In TempDT.Rows
|
||||
|
||||
Reference in New Issue
Block a user