-
This commit is contained in:
@@ -425,7 +425,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Código Prov.</Value>
|
<Value># Parte</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>MYRIAd Pro</FontFamily>
|
<FontFamily>MYRIAd Pro</FontFamily>
|
||||||
<FontSize>7.5pt</FontSize>
|
<FontSize>7.5pt</FontSize>
|
||||||
|
|||||||
@@ -359,7 +359,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Código Prov.</Value>
|
<Value># Parte</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>9.5pt</FontSize>
|
<FontSize>9.5pt</FontSize>
|
||||||
@@ -875,6 +875,7 @@
|
|||||||
</TablixMembers>
|
</TablixMembers>
|
||||||
</TablixRowHierarchy>
|
</TablixRowHierarchy>
|
||||||
<DataSetName>DsOC</DataSetName>
|
<DataSetName>DsOC</DataSetName>
|
||||||
|
<Top>0cm</Top>
|
||||||
<Left>0.04788in</Left>
|
<Left>0.04788in</Left>
|
||||||
<Height>0.34081in</Height>
|
<Height>0.34081in</Height>
|
||||||
<Width>8.21665in</Width>
|
<Width>8.21665in</Width>
|
||||||
@@ -1700,7 +1701,7 @@
|
|||||||
<Height>3.83039in</Height>
|
<Height>3.83039in</Height>
|
||||||
<Style />
|
<Style />
|
||||||
</Body>
|
</Body>
|
||||||
<Width>8.26453in</Width>
|
<Width>8.29578in</Width>
|
||||||
<Page>
|
<Page>
|
||||||
<PageHeader>
|
<PageHeader>
|
||||||
<Height>5.96613cm</Height>
|
<Height>5.96613cm</Height>
|
||||||
@@ -1884,7 +1885,7 @@
|
|||||||
<Top>0.98635in</Top>
|
<Top>0.98635in</Top>
|
||||||
<Left>0.16378cm</Left>
|
<Left>0.16378cm</Left>
|
||||||
<Height>1.36252in</Height>
|
<Height>1.36252in</Height>
|
||||||
<Width>2.82301in</Width>
|
<Width>4.02093in</Width>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
@@ -1902,7 +1903,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=IIF(LEN(Parameters!SubProyectoEntrega.Value) > 0,"Lugar de Entrega: " + Parameters!SubProyectoEntrega.Value,"")</Value>
|
<Value>=IIF(LEN(Parameters!SubProyectoEntrega.Value) > 0 or LEN(Parameters!ProveedorLugar.Value) > 0,"Lugar de Entrega: " + Parameters!SubProyectoEntrega.Value,"")</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9.16pt</FontSize>
|
<FontSize>9.16pt</FontSize>
|
||||||
@@ -1932,6 +1933,14 @@
|
|||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!ProveedorLugar.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style>
|
<Style>
|
||||||
<TextAlign>Left</TextAlign>
|
<TextAlign>Left</TextAlign>
|
||||||
@@ -1942,7 +1951,7 @@
|
|||||||
<Top>2.50885cm</Top>
|
<Top>2.50885cm</Top>
|
||||||
<Left>12.69644cm</Left>
|
<Left>12.69644cm</Left>
|
||||||
<Height>3.45728cm</Height>
|
<Height>3.45728cm</Height>
|
||||||
<Width>7.11877cm</Width>
|
<Width>8.00264cm</Width>
|
||||||
<ZIndex>1</ZIndex>
|
<ZIndex>1</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -1629,7 +1629,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim Existencia As Decimal = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(Serie = "", "-1", Serie), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
Dim Existencia As Decimal = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(Serie = "", "-1", Serie), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
||||||
' LbAgregar.ToolTip = Existencia.ToString
|
' LbAgregar.ToolTip = Existencia.ToString
|
||||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
|
|
||||||
|
Dim Acunmulado As Decimal = DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}")
|
||||||
|
|
||||||
|
If FechaCaducidadVal > MinFecha Then
|
||||||
|
Acunmulado = DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} and Lote = '{Lote}' and FechaCaducidad = '{FechaCaducidadVal}' ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Existencia - Cantidad - Acunmulado < 0 Then
|
||||||
If Existencia <= 0 Then
|
If Existencia <= 0 Then
|
||||||
Alert("No hay existencia del producto: " & PS, TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto: " & PS, TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
|||||||
@@ -1983,7 +1983,6 @@
|
|||||||
<HeaderTemplate>Producto</HeaderTemplate>
|
<HeaderTemplate>Producto</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||||
<asp:HyperLink ID="HlPS" runat="server" Text='<%# Eval("CodigoPS") %>' Visible="false" Target="_blank"></asp:HyperLink>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ Imports System.Security.Cryptography.X509Certificates
|
|||||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||||
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||||
Imports ADSTimbrado
|
Imports ADSTimbrado
|
||||||
Imports com.itextpdf.text.pdf.languages
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Modelos
|
Imports Modelos
|
||||||
@@ -2387,18 +2386,7 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property TienePermisoKardex As Boolean
|
|
||||||
Get
|
|
||||||
If ViewState("TienePermisoKardex") Is Nothing Then
|
|
||||||
ViewState("TienePermisoKardex") = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Boolean.Parse(ViewState("TienePermisoKardex").ToString)
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
ViewState("TienePermisoKardex") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
#Region "VENTA MEDICA"
|
#Region "VENTA MEDICA"
|
||||||
@@ -2457,7 +2445,7 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TienePermisoKardex = If(UsuarioActual.TienePermisoPagina(224), True, False)
|
|
||||||
|
|
||||||
Modalidad = ""
|
Modalidad = ""
|
||||||
Opcion = ""
|
Opcion = ""
|
||||||
@@ -8300,7 +8288,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SOLO HABILITAR PARA GENERAR NOTAS DE CREDITO
|
'SOLO HABILITAR PARA GENERAR NOTAS DE CREDITO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Not PermiteCredito AndAlso Not LnkSolicitarCredito.Visible Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not PermiteCredito AndAlso Not LnkSolicitarCredito.Visible Then
|
||||||
LnkSolicitarCredito.Visible = True
|
LnkSolicitarCredito.Visible = True
|
||||||
|
|
||||||
If DdlSolCreditoTipoDocto.Items.FindByValue("Ing") IsNot Nothing Then
|
If DdlSolCreditoTipoDocto.Items.FindByValue("Ing") IsNot Nothing Then
|
||||||
@@ -9052,10 +9040,14 @@ Partial Class Ventas
|
|||||||
Protected Sub GvPS_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvPS.RowEditing
|
Protected Sub GvPS_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvPS.RowEditing
|
||||||
GvPS.EditIndex = e.NewEditIndex
|
GvPS.EditIndex = e.NewEditIndex
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
Dim gvr As GridViewRow = GvPS.Rows(e.NewEditIndex)
|
Dim gvr As GridViewRow = GvPS.Rows(e.NewEditIndex)
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(253) Then
|
||||||
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
gvr.FCDropDownList("DdlUnidadMedida").Enabled = False
|
gvr.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||||
gvr.FCDropDownList("DdlClasificacion").Enabled = False
|
gvr.FCDropDownList("DdlClasificacion").Enabled = False
|
||||||
@@ -9137,9 +9129,27 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvPS_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvPS.RowCancelingEdit
|
Protected Sub GvPS_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvPS.RowCancelingEdit
|
||||||
GvPS.EditIndex = -1
|
GvPS.EditIndex = -1
|
||||||
GvPS.DataSource = TmpDT
|
|
||||||
|
OrdenarPS()
|
||||||
|
|
||||||
|
If GvPS.Columns(21).Visible Then
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvPS.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.Header Then
|
||||||
|
GvRow.FCLinkButton("LnkOrdenarGvPS").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
GvRow.FCTextBox("TxtOrden").Visible = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
GvPS.DataBind()
|
CargaGVInv(DtInv)
|
||||||
|
|
||||||
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
|
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
|
||||||
|
|
||||||
@@ -9212,6 +9222,7 @@ Partial Class Ventas
|
|||||||
'eliminar y cargar el ps ***
|
'eliminar y cargar el ps ***
|
||||||
|
|
||||||
Dim ConsecutivoActual As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
Dim ConsecutivoActual As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||||
|
Dim OrdenOriginal As Integer = TmpDT.Rows(e.RowIndex)("Orden").ToString().ToEntero()
|
||||||
|
|
||||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||||
ObjDescuento = CalcularDescuentos(CvePSNuevo, Cantidad, PU)
|
ObjDescuento = CalcularDescuentos(CvePSNuevo, Cantidad, PU)
|
||||||
@@ -9270,14 +9281,14 @@ Partial Class Ventas
|
|||||||
CveProyecto, Proyecto,
|
CveProyecto, Proyecto,
|
||||||
CveSubProyecto, SubProyecto,
|
CveSubProyecto, SubProyecto,
|
||||||
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
||||||
ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista, ConsecutivoManual:=ConsecutivoActual)
|
ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos, CvePrecioLista:=CvePrecioLista, PrecioLista:=PrecioLista, ConsecutivoManual:=ConsecutivoActual, OrdenManual:=OrdenOriginal)
|
||||||
|
|
||||||
' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue
|
' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue
|
||||||
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text
|
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text
|
||||||
GvPS.EditIndex = -1
|
GvPS.EditIndex = -1
|
||||||
GvPS.DataSource = TmpDT
|
OrdenarPS(False)
|
||||||
|
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
GvPS.DataBind()
|
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero() > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(533).ToEntero() > 0 Then
|
||||||
@@ -9408,13 +9419,13 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CalculaPSPromocionFiltrosLubricantes(TmpDT.Rows(e.RowIndex))
|
CalculaPSPromocionFiltrosLubricantes(TmpDT.Rows(e.RowIndex))
|
||||||
|
|
||||||
|
|
||||||
DrPS = Nothing
|
DrPS = Nothing
|
||||||
|
|
||||||
GvPS.EditIndex = -1
|
GvPS.EditIndex = -1
|
||||||
GvPS.DataSource = TmpDT
|
OrdenarPS(False)
|
||||||
|
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
GvPS.DataBind()
|
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
CalculaUsados()
|
CalculaUsados()
|
||||||
End If
|
End If
|
||||||
@@ -9434,6 +9445,18 @@ Partial Class Ventas
|
|||||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||||
|
|
||||||
|
If GvPS.Columns(21).Visible Then
|
||||||
|
For Each GvRow As GridViewRow In GvPS.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.Header Then
|
||||||
|
GvRow.FCLinkButton("LnkOrdenarGvPS").Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
GvRow.FCTextBox("TxtOrden").Visible = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
|
|
||||||
@@ -9546,11 +9569,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TienePermisoKardex Then
|
|
||||||
e.Row.FCLiteral("LtlPS").Visible = False
|
|
||||||
e.Row.FCHyperLink("HlPS").Visible = True
|
|
||||||
e.Row.FCHyperLink("HLPS").NavigateUrl = $"../Inventarios/Kardex.aspx?CvePS={e.Row.DBCampo("CvePS").ToString}"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -20139,6 +20158,8 @@ Partial Class Ventas
|
|||||||
TxtCantidad.Text = "1"
|
TxtCantidad.Text = "1"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
OrdenarPS()
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar el producto", ex)
|
OnError("Ocurrió un error al agregar el producto", ex)
|
||||||
@@ -20384,7 +20405,7 @@ Partial Class Ventas
|
|||||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
||||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0,
|
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0,
|
||||||
Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1, Optional ConsecutivoManual As Integer = 0) As Boolean
|
Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1, Optional ConsecutivoManual As Integer = 0, Optional OrdenManual As Integer = 0) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Try
|
Try
|
||||||
@@ -20428,17 +20449,17 @@ Partial Class Ventas
|
|||||||
Row("Serie") = Serie
|
Row("Serie") = Serie
|
||||||
Row("TiempoEntrega") = TiempoEntrega
|
Row("TiempoEntrega") = TiempoEntrega
|
||||||
|
|
||||||
If ConsecutivoManual > 0 Then
|
If OrdenManual > 0 Then
|
||||||
Row("Orden") = ConsecutivoManual
|
Row("Orden") = OrdenManual
|
||||||
Else
|
Else
|
||||||
If Modalidad = "U" Then
|
If Modalidad = "U" Then
|
||||||
Row("Orden") = Index
|
Row("Orden") = Index
|
||||||
Else
|
Else
|
||||||
Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
|
Dim OrdenActual As Integer = TmpDT.MAX("Orden").ToEntero()
|
||||||
If ConsecutivoActual < 0 Then
|
If OrdenActual < 0 Then
|
||||||
ConsecutivoActual = 0
|
OrdenActual = 0
|
||||||
End If
|
End If
|
||||||
Row("Orden") = ConsecutivoActual + 1
|
Row("Orden") = OrdenActual + 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -21354,7 +21375,7 @@ Partial Class Ventas
|
|||||||
ConfiguraTipoDocto()
|
ConfiguraTipoDocto()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True, Optional NCDescuento As Boolean = False, Optional ValidarDescuentos As Boolean = False, Optional RecalcularTotalOriginal As Boolean = True)
|
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True, Optional NCDescuento As Boolean = False, Optional ValidarDescuentos As Boolean = False, Optional RecalcularTotalOriginal As Boolean = True, Optional Reordenar As Boolean = False)
|
||||||
|
|
||||||
Dim TotalSubTotal As Decimal = TmpDT.SUMD("TotalImporte")
|
Dim TotalSubTotal As Decimal = TmpDT.SUMD("TotalImporte")
|
||||||
Dim TotalSubTotalRef As Decimal = TotalSubTotal
|
Dim TotalSubTotalRef As Decimal = TotalSubTotal
|
||||||
@@ -21480,11 +21501,15 @@ Partial Class Ventas
|
|||||||
Alert($"Los siguientes conceptos hace falta especificar clave SAT <br/><br/> {MensajeCveSAT.ToString()}", TipoMensaje.MsgAdvertencia)
|
Alert($"Los siguientes conceptos hace falta especificar clave SAT <br/><br/> {MensajeCveSAT.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||||
MensajeCveSAT.Clear()
|
MensajeCveSAT.Clear()
|
||||||
End If
|
End If
|
||||||
|
If Reordenar Then
|
||||||
Dim view As DataView = New DataView(TmpDT)
|
Dim view As DataView = New DataView(TmpDT)
|
||||||
view.Sort = "Consec"
|
view.Sort = "Orden"
|
||||||
GvPS.DataSource = view
|
GvPS.DataSource = view
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
Else
|
||||||
|
GvPS.DataSource = TmpDT
|
||||||
|
GvPS.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
'RECARGA GV INVENTARIO
|
'RECARGA GV INVENTARIO
|
||||||
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso EsCreaApartirDe) Then
|
If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso EsCreaApartirDe) Then
|
||||||
@@ -23914,6 +23939,12 @@ Partial Class Ventas
|
|||||||
LiCalcularPromociones.Visible = True
|
LiCalcularPromociones.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'NO PERMITE EDITAR FECHA DEL PAGO
|
||||||
|
If Not UsuarioActual.TienePermisoProceso(260) Then
|
||||||
|
TxtFechaPago.Enabled = False
|
||||||
|
imgCalendario.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
TxtAtencionA.Enabled = True
|
TxtAtencionA.Enabled = True
|
||||||
|
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
@@ -26348,22 +26379,34 @@ Partial Class Ventas
|
|||||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
|
|
||||||
|
|
||||||
For Each row As GridViewRow In GvPS.Rows
|
Private Sub OrdenarPS(Optional Reeordenar As Boolean = True)
|
||||||
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero()
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim resultados = From OrdenDT In TmpDT
|
If Reeordenar Then
|
||||||
Order By OrdenDT("Orden").ToString().ToEntero()
|
For Each row As GridViewRow In GvPS.Rows
|
||||||
Select OrdenDT
|
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero()
|
||||||
TmpDT = resultados.CopyToDataTable
|
Next
|
||||||
CalculaTotalesVenta()
|
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim resultados = From OrdenDT In TmpDT
|
||||||
|
' Order By OrdenDT("Orden").ToString().ToEntero()
|
||||||
|
' Select OrdenDT
|
||||||
|
'TmpDT = resultados.CopyToDataTable
|
||||||
|
|
||||||
|
TmpDT = TmpDT.FiltraParametros("", "Orden").Copy()
|
||||||
|
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
UpPS.Update()
|
End Sub
|
||||||
|
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
OrdenarPS()
|
||||||
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LkCotizacionAutorizar_Click(sender As Object, e As EventArgs) Handles LkCotizacionAutorizar.Click
|
Private Sub LkCotizacionAutorizar_Click(sender As Object, e As EventArgs) Handles LkCotizacionAutorizar.Click
|
||||||
EsSupervisor = True
|
EsSupervisor = True
|
||||||
@@ -33072,6 +33115,12 @@ Partial Class Ventas
|
|||||||
LiCalcularPromociones.Visible = True
|
LiCalcularPromociones.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'NO PERMITE EDITAR FECHA DEL PAGO
|
||||||
|
If Not UsuarioActual.TienePermisoProceso(260) Then
|
||||||
|
TxtFechaPago.Enabled = False
|
||||||
|
imgCalendario.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UPPDescuento.Update()
|
UPPDescuento.Update()
|
||||||
UPObservaciones.Update()
|
UPObservaciones.Update()
|
||||||
@@ -34911,6 +34960,8 @@ Partial Class Ventas
|
|||||||
CargaListasPrecios()
|
CargaListasPrecios()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'BloqueaCondicionesPago()
|
||||||
|
|
||||||
BtnEditar.Visible = False
|
BtnEditar.Visible = False
|
||||||
BtnEmitir.Visible = False
|
BtnEmitir.Visible = False
|
||||||
BtnPermisoEditarCotizacion.Visible = False
|
BtnPermisoEditarCotizacion.Visible = False
|
||||||
@@ -35378,6 +35429,8 @@ Partial Class Ventas
|
|||||||
dRowEliminar.Delete()
|
dRowEliminar.Delete()
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
'SI ES VENTA NUEVA O SI VA SER DEVOLUCION CONSIDERAR TODOS
|
'SI ES VENTA NUEVA O SI VA SER DEVOLUCION CONSIDERAR TODOS
|
||||||
If Me.CveVenta <= 0 OrElse DtUsadosDevolucion IsNot Nothing Then
|
If Me.CveVenta <= 0 OrElse DtUsadosDevolucion IsNot Nothing Then
|
||||||
TmpDTCalculo = TmpDT.Rows.Cast(Of DataRow).ToArray()
|
TmpDTCalculo = TmpDT.Rows.Cast(Of DataRow).ToArray()
|
||||||
@@ -35387,10 +35440,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
|
||||||
|
|
||||||
|
|
||||||
Dim CveUnidadMedidaPSA As Integer = -1
|
Dim CveUnidadMedidaPSA As Integer = -1
|
||||||
Dim UnidadMedidaPSA As String = "Unidad"
|
Dim UnidadMedidaPSA As String = "Unidad"
|
||||||
Dim CveClasificacionPSA As Integer = -1
|
Dim CveClasificacionPSA As Integer = -1
|
||||||
@@ -36667,6 +36716,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'NO PERMITE EDITAR FECHA DEL PAGO
|
||||||
|
If Not UsuarioActual.TienePermisoProceso(260) Then
|
||||||
|
TxtFechaPago.Enabled = False
|
||||||
|
imgCalendario.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
UPObservaciones.Update()
|
UPObservaciones.Update()
|
||||||
@@ -39916,7 +39971,7 @@ Partial Class Ventas
|
|||||||
RegistraScript("MuestraAnticipos();", "AE")
|
RegistraScript("MuestraAnticipos();", "AE")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional ForzarRecalculo As Boolean = False)
|
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False)
|
||||||
Dim PuedeRecalcular As Boolean = False
|
Dim PuedeRecalcular As Boolean = False
|
||||||
|
|
||||||
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse (ModalidadEdicion AndAlso Not DdlTipoComprobante.SelectedValue = "Cot") Then
|
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse (ModalidadEdicion AndAlso Not DdlTipoComprobante.SelectedValue = "Cot") Then
|
||||||
@@ -39928,7 +39983,7 @@ Partial Class Ventas
|
|||||||
PuedeRecalcular = False
|
PuedeRecalcular = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ForzarRecalculo Then
|
If AplicarPromociones Then
|
||||||
PuedeRecalcular = True
|
PuedeRecalcular = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -39938,7 +39993,18 @@ Partial Class Ventas
|
|||||||
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
||||||
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero
|
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero
|
||||||
|
|
||||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
Dim CvePrecioListaSugerido As Integer = -1
|
||||||
|
|
||||||
|
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = Nothing
|
||||||
|
|
||||||
|
If AplicarPromociones Then
|
||||||
|
ObjPrecioSugerido = New Modelos.MPrecioSugerido()
|
||||||
|
ObjPrecioSugerido.PrecioSugerido = Row("PU").ToString().ToDecimal()
|
||||||
|
ObjPrecioSugerido.CvePrecioLista = Row("CvePrecioLista").ToString().ToEntero()
|
||||||
|
Else
|
||||||
|
ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
If ObjPrecioSugerido.PrecioSugerido > 0 Then
|
||||||
Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6)
|
Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6)
|
||||||
|
|
||||||
@@ -39947,6 +40013,11 @@ Partial Class Ventas
|
|||||||
PU = ObjDescuento.PU
|
PU = ObjDescuento.PU
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'SI NO TIENE PROMOCION, NO MODIFICAR NADA
|
||||||
|
If AplicarPromociones AndAlso ObjDescuento.CvePromocionDetalle <= 0 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
Row("PU") = PU
|
Row("PU") = PU
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||||
@@ -40413,12 +40484,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Protected Sub LnkCalcularPromociones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCalcularPromociones_Click(sender As Object, e As EventArgs)
|
||||||
Dim Recalculo As Boolean = False
|
Dim Recalculo As Boolean = False
|
||||||
RecalculaPrecios(Recalculo, ForzarRecalculo:=True)
|
RecalculaPrecios(Recalculo, AplicarPromociones:=True)
|
||||||
|
|
||||||
If Recalculo Then
|
If Recalculo Then
|
||||||
Alert("Se han recalculado los precios y promociones en base a las condiciones actuales")
|
Alert("Se han recalculado los precios y promociones en base a las condiciones actuales")
|
||||||
Else
|
Else
|
||||||
Alert("No se han encontrado cambios para los precios y promociones")
|
Alert("No se han encontrado cambios para las promociones")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user