Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -728,7 +728,7 @@ Public Class ClsAcumuladores
|
|||||||
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
|
Public Function AddGarantiasDetalle(CveVentaDetalle As Integer, CvePS As Integer, CveFolioGarantia As Integer, CveTipoUso As Integer,
|
||||||
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
|
CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String,
|
||||||
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
|
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
|
||||||
Consecutivo As String, FechaAjuste As DateTime) As Boolean
|
Consecutivo As String, FechaAjuste As DateTime, PorcentajeAjuste As Decimal) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
|
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -744,6 +744,7 @@ Public Class ClsAcumuladores
|
|||||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
.Add("@Importe", SqlDbType.Float).Value = Importe
|
||||||
.Add("@Consecutivo", SqlDbType.VarChar).Value = Consecutivo
|
.Add("@Consecutivo", SqlDbType.VarChar).Value = Consecutivo
|
||||||
.Add("@FechaAjuste", SqlDbType.DateTime).Value = FechaAjuste
|
.Add("@FechaAjuste", SqlDbType.DateTime).Value = FechaAjuste
|
||||||
|
.Add("@PorcentajeAjuste", SqlDbType.Float).Value = PorcentajeAjuste
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -926,7 +927,7 @@ Public Class ClsAcumuladores
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional CveVentaRNCCargo As Integer = -1) As Boolean
|
Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional CveVentaRNCCargo As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
'Data = New DataTable
|
'Data = New DataTable
|
||||||
|
|
||||||
@@ -938,6 +939,7 @@ Public Class ClsAcumuladores
|
|||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo
|
.Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo
|
||||||
|
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ Public Class ClsProductosServicios
|
|||||||
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
|
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
|
||||||
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
|
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
|
||||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
|
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
|
||||||
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1) As Integer
|
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1) As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_ProductosServiciosAdd")
|
DataAdapter("PA_ProductosServiciosAdd")
|
||||||
@@ -483,7 +483,9 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
|
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
|
||||||
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
|
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
|
||||||
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
|
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
|
||||||
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
|
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
|
||||||
|
|
||||||
|
.Add("@CvePSAdicionalVigencia", SqlDbType.Int).Value = CvePSAdicionalVigencia
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -630,7 +632,7 @@ Public Class ClsProductosServicios
|
|||||||
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
||||||
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
|
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
|
||||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
|
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
|
||||||
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1) As Boolean
|
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -711,7 +713,9 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
|
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
|
||||||
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
|
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
|
||||||
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
|
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
|
||||||
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
|
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
|
||||||
|
|
||||||
|
.Add("@CvePSAdicionalVigencia", SqlDbType.Int).Value = CvePSAdicionalVigencia
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -6747,6 +6747,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||||
|
|
||||||
|
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
|
||||||
|
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
|
||||||
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
|
||||||
|
ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return ListaTagsDocumentost
|
Return ListaTagsDocumentost
|
||||||
|
|||||||
@@ -1468,7 +1468,7 @@ Namespace Modelos
|
|||||||
For Each Dr As DataRow In DtAjustes.Rows
|
For Each Dr As DataRow In DtAjustes.Rows
|
||||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||||
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime()) Then
|
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal()) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
<asp:BoundField HeaderText="Producto" DataField="PS" />
|
<asp:BoundField HeaderText="Producto" DataField="PS" />
|
||||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="5%" />
|
||||||
<asp:BoundField HeaderText="Sección Actual" DataField="SeccionAlmacen" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Sección Actual" DataField="SeccionAlmacen" ItemStyle-Width="15%" />
|
||||||
<%--<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />--%>
|
<%--<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />--%>
|
||||||
<asp:TemplateField ItemStyle-Width="7%">
|
<asp:TemplateField ItemStyle-Width="7%">
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
|||||||
DdlClasificaciones.DataBind()
|
DdlClasificaciones.DataBind()
|
||||||
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
GvD.Columns(4).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvD.Columns(4).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) : GvD.Columns(10).HeaderText = String.Format("Nueva {0}", UsuarioActual.Empresa.Funcionalidad(147))
|
||||||
GvD.Columns(10).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Nueva Fecha Elaboración", "Nueva Fecha Caducidad")
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||||
@@ -86,6 +86,10 @@
|
|||||||
<asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click"
|
<asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click"
|
||||||
Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton>
|
Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkCambioVigencia" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioVigencia_Click"
|
||||||
|
Text="<i class='fa fa-truck'></i> Cambiar Vigencias"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkAgregarProducto" CssClass="" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Producto"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkAgregarProducto" CssClass="" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Producto"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
@@ -151,6 +155,7 @@
|
|||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información del movimiento
|
<i class="fa fa-info-circle"></i>Información del movimiento
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||||
@@ -198,7 +203,7 @@
|
|||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||||
@@ -289,6 +294,7 @@
|
|||||||
<label class="col-md-1 truncate" style="width: 110px">
|
<label class="col-md-1 truncate" style="width: 110px">
|
||||||
Observaciones:
|
Observaciones:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
||||||
@@ -346,6 +352,7 @@
|
|||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Agregar Producto
|
<i class="fa fa-info-circle"></i>Agregar Producto
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -421,6 +428,7 @@
|
|||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información de registro
|
<i class="fa fa-info-circle"></i>Información de registro
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -428,6 +436,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Usuario:
|
Usuario:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||||
@@ -438,6 +447,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Fecha:
|
Fecha:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||||
@@ -447,6 +457,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Referencia:
|
Referencia:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||||
@@ -460,6 +471,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Consignación:
|
Consignación:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||||
@@ -470,6 +482,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Tipo Cambio:
|
Tipo Cambio:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||||
@@ -479,6 +492,7 @@
|
|||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Mto. Rel.:
|
Mto. Rel.:
|
||||||
|
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||||
@@ -497,6 +511,7 @@
|
|||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -558,8 +573,8 @@
|
|||||||
<td runat="server" visible="false" id="TdSeccionPSAdd">
|
<td runat="server" visible="false" id="TdSeccionPSAdd">
|
||||||
<asp:Panel ID="Panel3" runat="server" DefaultButton="BtnSeccionPSAdd">
|
<asp:Panel ID="Panel3" runat="server" DefaultButton="BtnSeccionPSAdd">
|
||||||
<asp:DropDownList ID="DdlSeccionPSAdd" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
<asp:DropDownList ID="DdlSeccionPSAdd" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Button Text="" ID="BtnSeccionPSAdd" Style="display: none" runat="server" />
|
<asp:Button Text="" ID="BtnSeccionPSAdd" Style="display: none" runat="server" />
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</td>
|
</td>
|
||||||
@@ -593,7 +608,7 @@
|
|||||||
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
|
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
|
||||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" ShowHeader="True" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
@@ -699,7 +714,8 @@
|
|||||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<%--<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false"/>--%>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LbCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LbCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -776,10 +792,8 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<%-- EMPIEZA: BITACORA --%>
|
<%-- EMPIEZA: BITACORA --%>
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -889,6 +903,7 @@
|
|||||||
<div class="col-md-5" style="text-align: right;">
|
<div class="col-md-5" style="text-align: right;">
|
||||||
Cantidad
|
Cantidad
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||||
@@ -1086,7 +1101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaInvFisico" runat="server" ControlToValidate="TxtFechaInvFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="InvFisico"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTxtFechaInvFisico" runat="server" ControlToValidate="TxtFechaInvFisico" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="InvFisico"></asp:RequiredFieldValidator>
|
||||||
@@ -1200,7 +1215,7 @@
|
|||||||
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Caducidad" ReadOnly="true" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Fecha Caducidad" ReadOnly="true" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkRemoveInvFisico" runat="server" AlternateText="Eliminar" OnClick="DeleteRowInvFisicoEntrada" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
<asp:LinkButton ID="LnkRemoveInvFisico" runat="server" AlternateText="Eliminar" OnClick="DeleteRowInvFisicoEntrada" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
||||||
@@ -1312,7 +1327,158 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="text-align: center;">
|
<div class="col-md-12" style="text-align: center;">
|
||||||
<asp:Button ID="BtnAplicarCambioInvFisico" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="InvFisico"/>
|
<asp:Button ID="BtnAplicarCambioInvFisico" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="InvFisico" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="DivModalCambiarVigencias" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog modal-lg" style="width: 50%">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalCambiarVigencias" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="Literal4" runat="server">Cambiar Vigencias</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2 truncate" style="width: 120px">Almacen:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:DropDownList ID="DdlAlmacenCambioVigencias" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="60%" CssClass="form-control input-sm select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDdlAlmacenCambioVigencia" runat="server" InitialValue="-1" ControlToValidate="DdlAlmacenCambioVigencias" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="VGCambioVigencia"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDdlAlmacenCambioVigencia" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlAlmacenCambioVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-2 truncate" style="width: 120px">Fecha:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div style="display: inline-block; vertical-align: text-bottom;">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; text-align: center">
|
||||||
|
<asp:TextBox ID="TxtFechaCambio" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaCambio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaCambio" runat="server" ControlToValidate="TxtFechaCambio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="VGCambioVigencia"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaCambio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaCambio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaCambio" PopupButtonID="ImgFechaCambio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="CVFechaCambio" runat="server" ControlToValidate="TxtFechaCambio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="VGCambioVigencia"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCambio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2 truncate" style="width: 120px">Descripción:</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:TextBox ID="TxtObsCambioVigencia" runat="server" Width="100%" CssClass="form-control input-sm" TextMode="MultiLine"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Traspaso de Vigencia</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpCambioSalida" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<table border="0" class="Widthall grides">
|
||||||
|
<tbody>
|
||||||
|
<tr class="Titulos">
|
||||||
|
<th style="width: 63px">Cant</th>
|
||||||
|
<th style="width: 200px">Producto</th>
|
||||||
|
<th style="width: 10%" runat="server" id="Th5" visible="false">Sección almacén</th>
|
||||||
|
<th style="width: 10%" runat="server" id="Th6" visible="false">Serie</th>
|
||||||
|
<th style="width: 10%" runat="server" id="Th7" visible="false">Lote</th>
|
||||||
|
<th style="width: 10%" runat="server" id="Th8" visible="false">Caducidad</th>
|
||||||
|
<th style="width: 73px;"></th>
|
||||||
|
</tr>
|
||||||
|
<tr align="center">
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="TxtCantCambio" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="AddPSCambioSalida"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtCantCambio" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="psagregar">
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPSCambioSalida" CssStyle="width:100%" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td runat="server" id="Td5" visible="false">
|
||||||
|
<asp:DropDownList ID="DdlSeccionCambio" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
<td runat="server" id="Td6" visible="false">
|
||||||
|
<asp:TextBox ID="TxtSerieCambio" runat="server" Width="50px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
<td runat="server" id="Td7" visible="false">
|
||||||
|
<asp:TextBox ID="TxtLoteCambio" runat="server" Width="50px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
<td runat="server" id="Td8" visible="false">
|
||||||
|
<asp:TextBox ID="TxtCaducidadCambio" runat="server" Width="50px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<asp:LinkButton ID="LnkAddSalidaCambio" runat="server" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-plus'></i>" ValidationGroup="AddPSCambioSalida" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpGvCambioSalidas" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvSalidasCambioVigencia" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" AutoGenerateColumns="False" ShowHeaderWhenEmpty="False" OnRowDataBound="GvSalidasCambioVigencia_RowDataBound">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Cantidad" ReadOnly="true" DataField="Cantidad" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="PS de Salida" ReadOnly="true" DataField="CodigoPS" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Fecha Caducidad" ReadOnly="true" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="PS de Entrada (PS de Vigencia)" ReadOnly="true" DataField="CodigoPSVigencia" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkRemoveInvFisicoSalida" runat="server" AlternateText="Eliminar" OnClick="DeleteRowCambioVigencia" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="text-align: center;">
|
||||||
|
<asp:Button ID="BtnGuardarCambiosVigencia" runat="server" CssClass="btn btn-primary" Text="Aplicar" ValidationGroup="VGCambioVigencia" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1408,6 +1574,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
||||||
@@ -1522,7 +1689,6 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="divDescripcion" class="modal ADS fade" role="dialog">
|
<div id="divDescripcion" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -1550,8 +1716,6 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -1713,4 +1877,3 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,23 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ViewState("DtMovimientosSalidaInvFisico") = value
|
ViewState("DtMovimientosSalidaInvFisico") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public Property DtMovimientosEntradaCambioVigencias() As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtMovimientosEntradaCambioVigencias"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtMovimientosEntradaCambioVigencias") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property DtMovimientosCambioVigencias() As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtMovimientosCambioVigencias"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtMovimientosCambioVigencias") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property CveMovimiento() As Integer
|
Public Property CveMovimiento() As Integer
|
||||||
Get
|
Get
|
||||||
@@ -277,7 +294,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
CveMovimiento = -1
|
CveMovimiento = -1
|
||||||
CveMovimientoRelacionado = -1
|
CveMovimientoRelacionado = -1
|
||||||
TieneRelacionado = -1
|
TieneRelacionado = -1
|
||||||
@@ -366,11 +382,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'HABILITA EL CAMBIO DE VIGENCIAS
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
LnkCambioVigencia.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " PERMISOS PAGINAS "
|
#Region " PERMISOS PAGINAS "
|
||||||
@@ -470,9 +488,16 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CargaGVM(dt)
|
CargaGVM(dt)
|
||||||
|
|
||||||
DtMovimientos = dt.Clone
|
DtMovimientos = dt.Clone
|
||||||
|
|
||||||
DtMovimientosEntradaInvFisico = dt.Clone
|
DtMovimientosEntradaInvFisico = dt.Clone
|
||||||
DtMovimientosSalidaInvFisico = dt.Clone
|
DtMovimientosSalidaInvFisico = dt.Clone
|
||||||
|
|
||||||
|
DtMovimientosCambioVigencias = dt.Clone
|
||||||
|
DtMovimientosCambioVigencias.Columns.Add("CvePSVigencia", Type.GetType("System.Int32"))
|
||||||
|
DtMovimientosCambioVigencias.Columns.Add("CodigoPSVigencia", Type.GetType("System.String"))
|
||||||
|
DtMovimientosCambioVigencias.Columns.Add("CveUMVigencia", Type.GetType("System.Int32"))
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
'Llenar el dropdownlist de Secciones
|
'Llenar el dropdownlist de Secciones
|
||||||
@@ -515,15 +540,19 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
DdlAlmacenInventarioFisico.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
|
DdlAlmacenCambioVigencias.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (9,11)")
|
||||||
|
|
||||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlAlmacenInventarioFisico.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlAlmacenInventarioFisico.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DdlAlmacenCambioVigencias.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlAlmacen.SelectedValue = "-1"
|
DdlAlmacen.SelectedValue = "-1"
|
||||||
DdlAlmacenInventarioFisico.SelectedValue = "-1"
|
DdlAlmacenInventarioFisico.SelectedValue = "-1"
|
||||||
|
DdlAlmacenCambioVigencias.SelectedValue = "-1"
|
||||||
|
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
DdlAlmacenInventarioFisico.DataBind()
|
DdlAlmacenInventarioFisico.DataBind()
|
||||||
|
DdlAlmacenCambioVigencias.DataBind()
|
||||||
|
|
||||||
If IsNothing(Request("CveMovimiento")) Then
|
If IsNothing(Request("CveMovimiento")) Then
|
||||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||||
@@ -546,6 +575,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlProducto2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
DdlPSSalida.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPSSalida.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
|
DdlPSCambioSalida.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 66 Then
|
If UsuarioActual.CveEmpresa = 66 Then
|
||||||
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
DdlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||||
@@ -555,14 +585,17 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||||
DdlPSSalida.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
DdlPSSalida.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||||
|
DdlPSCambioSalida.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoPS = 2")
|
||||||
|
|
||||||
DdlProducto2.DataBind()
|
DdlProducto2.DataBind()
|
||||||
DdlPS.DataBind()
|
DdlPS.DataBind()
|
||||||
DdlPSSalida.DataBind()
|
DdlPSSalida.DataBind()
|
||||||
|
DdlPSCambioSalida.DataBind()
|
||||||
|
|
||||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlPSSalida.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlPSSalida.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DdlPSCambioSalida.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -962,9 +995,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtFechaInvFisico.Enabled = False
|
TxtFechaInvFisico.Enabled = False
|
||||||
ImgFechaInvFisico.Visible = False
|
ImgFechaInvFisico.Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpModalInventarioFisico.Update()
|
UpModalInventarioFisico.Update()
|
||||||
@@ -2324,6 +2354,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'TrSerieLote.Visible = False
|
'TrSerieLote.Visible = False
|
||||||
'TrSerieLote2.Visible = False
|
'TrSerieLote2.Visible = False
|
||||||
|
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(11).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
|
||||||
GvM.Columns(9).Visible = False
|
GvM.Columns(9).Visible = False
|
||||||
'PERMISO SOLO PARA EDITAR SERIELOTE
|
'PERMISO SOLO PARA EDITAR SERIELOTE
|
||||||
If UsuarioActual.TienePermisoProceso(245) Then
|
If UsuarioActual.TienePermisoProceso(245) Then
|
||||||
@@ -2369,7 +2401,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
GvM.Columns(12).Visible = DtTemp.MAX("CveSeccionAlmacen").ToEntero > 0
|
GvM.Columns(12).Visible = DtTemp.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
'UppGrid.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
@@ -2492,7 +2524,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'codigo provisional, hay entradas con productos, que al asignar serie, debe de tener e ncantidad = 1
|
'codigo provisional, hay entradas con productos, que al asignar serie, debe de tener e ncantidad = 1
|
||||||
If GvRow.DataKey("Cantidad").ToEntero() > 1 Then txtCantidad.Enabled = True
|
If GvRow.DataKey("Cantidad").ToEntero() > 1 Then txtCantidad.Enabled = True
|
||||||
End If
|
End If
|
||||||
txtCantidad.Text = GvRow.DataKey("Cantidad").ToEntero().ToString
|
txtCantidad.Text = GvRow.DataKey("Cantidad").ToEntero().ToString
|
||||||
DdlProducto2.SelectedValue = GvRow.DataKey("CvePS")
|
DdlProducto2.SelectedValue = GvRow.DataKey("CvePS")
|
||||||
DdlProducto2.SelectedText = GvRow.DataKey("CodigoPS")
|
DdlProducto2.SelectedText = GvRow.DataKey("CodigoPS")
|
||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
@@ -2653,6 +2685,25 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
|
|
||||||
#Region " CONTABILIZAR "
|
#Region " CONTABILIZAR "
|
||||||
|
|
||||||
|
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
|
||||||
|
Dim Retorno As Integer = -1
|
||||||
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
|
||||||
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Protected Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
Protected Sub BtnContabilizar_Click(sender As Object, e As EventArgs) Handles BtnContabilizar.Click
|
||||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
@@ -3609,6 +3660,10 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambioFisico"))
|
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambioFisico"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkCambioVigencia_Click(sender As Object, e As EventArgs)
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambiarVigencias"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "ENTRADAS"
|
#Region "ENTRADAS"
|
||||||
Private Sub BtnAgregarEntrada_Click(sender As Object, e As EventArgs) Handles BtnAgregarEntrada.Click
|
Private Sub BtnAgregarEntrada_Click(sender As Object, e As EventArgs) Handles BtnAgregarEntrada.Click
|
||||||
If Not DdlPS.SelectedValue.ToEntero > 0 Then
|
If Not DdlPS.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -3674,7 +3729,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
GvEntradas.Columns(4).Visible = DtTemp.MAX("Serie") <> ""
|
GvEntradas.Columns(4).Visible = DtTemp.MAX("Serie") <> ""
|
||||||
GvEntradas.Columns(5).Visible = DtTemp.MAX("Lote") <> ""
|
GvEntradas.Columns(5).Visible = DtTemp.MAX("Lote") <> ""
|
||||||
GvEntradas.Columns(6).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
GvEntradas.Columns(6).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
||||||
GvEntradas.Columns(6).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvEntradas.Columns(6).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -3809,6 +3864,127 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
CargaGvSalidas(DtMovimientosSalidaInvFisico)
|
CargaGvSalidas(DtMovimientosSalidaInvFisico)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "CAMBIO VIGENCIA"
|
||||||
|
Private Sub LnkAddSalidaCambio_Click(sender As Object, e As EventArgs) Handles LnkAddSalidaCambio.Click
|
||||||
|
If Not DdlPSCambioSalida.SelectedValue.ToEntero > 0 Then
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
AddPSCambioSalida(DdlPSCambioSalida.SelectedValue.ToEntero, TxtCantCambio.Text.ToDouble)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub AddPSCambioSalida(CvePS As Integer, Cantidad As Double)
|
||||||
|
If DdlAlmacenCambioVigencias.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlPSCambioSalida.SelectedText = "" : Exit Sub
|
||||||
|
|
||||||
|
Dim Valido As Boolean = True
|
||||||
|
|
||||||
|
If Valido Then
|
||||||
|
Dim CveClasificacion As Integer
|
||||||
|
Dim CveUM As Double
|
||||||
|
Dim CodigoPS As String = ""
|
||||||
|
Dim PS As String = ""
|
||||||
|
|
||||||
|
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacenSalida.SelectedValue.ToEntero
|
||||||
|
Dim Serie As String = If(TxtSerieSalida.Text = "", "", TxtSerieSalida.Text)
|
||||||
|
Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text)
|
||||||
|
Dim Caducidad As String = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text)
|
||||||
|
|
||||||
|
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
CveClasificacion = dr("CveClasificacion").ToString.ToEntero
|
||||||
|
CveUM = dr("CveUM").ToString.ToEntero
|
||||||
|
CodigoPS = dr("PSCodigo").ToString.ToString
|
||||||
|
PS = dr("PS").ToString.ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
|
||||||
|
registro.Item("Cantidad") = Cantidad
|
||||||
|
registro.Item("CveUM") = CveUM
|
||||||
|
registro.Item("CvePS") = CvePS
|
||||||
|
registro.Item("CodigoPS") = CodigoPS
|
||||||
|
registro.Item("PS") = PS
|
||||||
|
registro.Item("PU") = 0
|
||||||
|
registro.Item("Total") = 0
|
||||||
|
registro.Item("CveClasificacion") = CveClasificacion
|
||||||
|
registro.Item("Estatus") = ""
|
||||||
|
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||||
|
registro.Item("Serie") = Serie
|
||||||
|
registro.Item("Lote") = Lote
|
||||||
|
registro.Item("FechaCaducidad") = Caducidad
|
||||||
|
|
||||||
|
If CvePS > 0 Then
|
||||||
|
Using ObjPS As New ClsProductosServicios()
|
||||||
|
If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim CvePSAdicionalVigencia = ObjPS.DtResultados.Rows(0)("CvePSAdicionalVigencia").ToString.ToEntero()
|
||||||
|
Dim CodigoPSVigencia As String = ObjPS.DtResultados.Rows(0)("CodigoPSVigencia").ToString
|
||||||
|
'SI EXISTE UN MOVIMIENTO DE VIGENCIA
|
||||||
|
If CvePSAdicionalVigencia > 0 Then
|
||||||
|
|
||||||
|
If ObjPS.GetPS(CvePSAdicionalVigencia, -1, UsuarioActual.CveEmpresa) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
|
||||||
|
registro.Item("CvePSVigencia") = CvePSAdicionalVigencia
|
||||||
|
registro.Item("CodigoPSVigencia") = CodigoPSVigencia
|
||||||
|
registro.Item("CveUMVigencia") = ObjPS.DtResultados.Rows(0)("CveUM").ToString.ToEntero()
|
||||||
|
|
||||||
|
DtMovimientosCambioVigencias.Rows.Add(registro)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Este producto no tiene un producto de vigencia relacionado", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargaGvCambioSalidas(DtMovimientosCambioVigencias)
|
||||||
|
|
||||||
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DeleteRowCambioVigencia(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton)
|
||||||
|
|
||||||
|
If DtMovimientosCambioVigencias.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then
|
||||||
|
Dim i As Integer
|
||||||
|
i = lnkRemove.CommandArgument.ToString.ToEntero
|
||||||
|
Dim Drs As DataRow() = DtMovimientosCambioVigencias.Select(String.Format("No = {0}", i))
|
||||||
|
If Drs.Count > 0 Then
|
||||||
|
|
||||||
|
Drs(0).Delete()
|
||||||
|
End If
|
||||||
|
DtMovimientosCambioVigencias.AcceptChanges()
|
||||||
|
End If
|
||||||
|
|
||||||
|
GvSalidasCambioVigencia.EditIndex = -1
|
||||||
|
|
||||||
|
CargaGvCambioSalidas(DtMovimientosCambioVigencias)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaGvCambioSalidas(DtTemp As DataTable)
|
||||||
|
GvSalidasCambioVigencia.DataSource = DtTemp
|
||||||
|
GvSalidasCambioVigencia.DataBind()
|
||||||
|
|
||||||
|
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||||
|
GvSalidasCambioVigencia.Columns(2).Visible = DtTemp.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||||
|
GvSalidasCambioVigencia.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
|
||||||
|
GvSalidasCambioVigencia.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
|
||||||
|
GvSalidasCambioVigencia.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
||||||
|
GvSalidasCambioVigencia.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||||
|
End If
|
||||||
|
UpGvCambioSalidas.Update()
|
||||||
|
End Sub
|
||||||
|
Protected Sub GvSalidasCambioVigencia_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
e.Row.Cells(1).CssClass = "SubTotales"
|
||||||
|
e.Row.Cells(6).CssClass = "Totales"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "GUARDAR"
|
#Region "GUARDAR"
|
||||||
@@ -4034,6 +4210,133 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ObjInventario.Dispose() 'elimino la instancia
|
ObjInventario.Dispose() 'elimino la instancia
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click
|
||||||
|
|
||||||
|
If GvSalidasCambioVigencia.Rows.Count = 0 Then
|
||||||
|
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivModalCambioFisico"))
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ObjInventario As New ClsInventarios
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
|
Dim CveMovimientoEntrada As Integer = -1
|
||||||
|
Dim CveMovimientoSalida As Integer = -1
|
||||||
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
Dim Mensaje As String = ""
|
||||||
|
Dim ValorEntrada As Decimal = 0
|
||||||
|
Dim ValorSalida As Decimal = 0
|
||||||
|
Dim ImporteConcepto As Decimal = 0
|
||||||
|
Dim tConcepto As String = TxtObsCambioVigencia.Text.Trim
|
||||||
|
Dim Fecha = TxtFechaCambio.Text.ToDate.ToString("yyyy/MM/dd").ToDate
|
||||||
|
Dim tCveSubProyecto As Integer = -1
|
||||||
|
Dim TipoMovto As Boolean = False
|
||||||
|
Dim idCtaContableEntrada As Integer = 0
|
||||||
|
Dim idCtaContableSalida As Integer = 0
|
||||||
|
|
||||||
|
Dim FolioSalida As Integer = 0
|
||||||
|
Dim FolioEntrada As Integer = 0
|
||||||
|
|
||||||
|
Dim IdCuentaOtrosIngresos As Integer = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||||
|
|
||||||
|
Dim CveAlmacen As Integer = DdlAlmacenCambioVigencias.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveModalidad").ToEntero()
|
||||||
|
|
||||||
|
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
||||||
|
|
||||||
|
'MOVIMIENTOS
|
||||||
|
If DtMovimientosCambioVigencias.Rows.Count > 0 Then
|
||||||
|
FolioSalida = ObjInventario.GetFolioSiguiente(8, UsuarioActual.CveEmpresa)
|
||||||
|
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
|
||||||
|
|
||||||
|
FolioEntrada = ObjInventario.GetFolioSiguiente(9, UsuarioActual.CveEmpresa)
|
||||||
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 9, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'VALIDA, sino hay registrado ningun movimiento, que no siga
|
||||||
|
If (CveMovimientoEntrada <= 0 AndAlso CveMovimientoSalida <= 0) Then
|
||||||
|
Alert("Ocurrió un error al realizar los registros. Por favor verifique y vuelva a intentar", TipoMensaje.MsgError)
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
ObjInventario.RollBack() 'deshace lo insertado.
|
||||||
|
ObjInventario.Dispose() 'elimino la instancia
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
'VALIDA EXISTENCIAS SALIDA E INSERTA DETALLES
|
||||||
|
For Each Dr As DataRow In DtMovimientosCambioVigencias.Rows
|
||||||
|
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1) >= Dr("Cantidad").ToString.ToDouble Then
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
||||||
|
Dr("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||||
|
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||||
|
Mensaje = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
Else
|
||||||
|
'OBTIENE EL COSTO DE LA SALIDA
|
||||||
|
If Not ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa, CveMovimientoDetalle:=ObjInventario.CveMovimientoDetalle) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
Mensaje = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
Else
|
||||||
|
Dim PUEntrada As Decimal = ObjInventario.DtResultados.Rows(0)("PU").ToString().ToDecimal()
|
||||||
|
ImporteConcepto += PUEntrada * Dr("Cantidad").ToString.ToDecimal()
|
||||||
|
|
||||||
|
'INSERTA EL MOVIMIENTO DE ENTRADA
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUMVigencia").ToString.ToEntero, Dr("CvePSVigencia").ToString.ToEntero, PUEntrada, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
|
||||||
|
Mensaje = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", Dr("PS"))
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'CONTABILIZAR MOVIMIENTOS
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
If Not ContabilizaMovimientoAlmacen(ObjConta, Now, "CAMBIO DE VIGENCIA", "ES/CV", CveMovimientoSalida, CveMovimientoEntrada, ImporteConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) > 0 Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Mensaje = "No se pudo generar el movimiento de prepoliza"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||||
|
|
||||||
|
Dim Msg As New StringBuilder
|
||||||
|
Msg.AppendFormat("<br/>El Movimiento de entrada se registró con el Folio: <b><a class=""Texto"" target='_blank' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||||
|
If CveMovimientoEntrada > 0 Then Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento Entrada</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||||
|
Msg.AppendFormat("<br/><br/>El Movimiento de salida se registró con el Folio: <b><a class=""Texto"" target='_blank' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
||||||
|
If CveMovimientoSalida > 0 Then Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento Salida</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida)))
|
||||||
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
RegistraScript("playsonidito('beep-07.wav');$('#DivModalCambiarVigencias').modal('hide');")
|
||||||
|
|
||||||
|
DtMovimientosCambioVigencias.Clear()
|
||||||
|
|
||||||
|
GvSalidasCambioVigencia.DataSource = DtMovimientosCambioVigencias
|
||||||
|
GvSalidasCambioVigencia.DataBind()
|
||||||
|
|
||||||
|
TxtObsCambioVigencia.Text = ""
|
||||||
|
|
||||||
|
Else
|
||||||
|
ObjInventario.RollBack()
|
||||||
|
|
||||||
|
Alert(Mensaje, TipoMensaje.MsgError)
|
||||||
|
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
End If
|
||||||
|
ObjInventario.Dispose() 'elimino la instancia
|
||||||
|
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -4530,4 +4833,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -519,7 +519,7 @@
|
|||||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ Imports Microsoft.Reporting.WebForms
|
|||||||
Imports Stimulsoft.Base.Indicator
|
Imports Stimulsoft.Base.Indicator
|
||||||
|
|
||||||
Partial Class Inventarios_EntregaAlmacen
|
Partial Class Inventarios_EntregaAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
Private Property CveVentaAD As Integer
|
Private Property CveVentaAD As Integer
|
||||||
Get
|
Get
|
||||||
@@ -261,10 +261,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("FormaPaqueteria") = value
|
ViewState("FormaPaqueteria") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
|
||||||
@@ -849,13 +849,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
||||||
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
||||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||||
GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvDatos.Columns(9).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
|
||||||
'SugerirFecha()
|
|
||||||
|
'SugerirFecha()
|
||||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||||
SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero)
|
SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
GvDatos.DataSource = DtDatos
|
GvDatos.DataSource = DtDatos
|
||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
|
|||||||
@@ -481,7 +481,7 @@
|
|||||||
<asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
|
||||||
|
|||||||
@@ -1315,7 +1315,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If AplicaSeccion Then GvInv.Columns(11).Visible = True
|
If AplicaSeccion Then GvInv.Columns(11).Visible = True
|
||||||
If AplicaLote Then GvInv.Columns(12).Visible = True
|
If AplicaLote Then GvInv.Columns(12).Visible = True
|
||||||
GvInv.Columns(13).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvInv.Columns(13).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
If AplicaCaducidad Then GvInv.Columns(13).Visible = True
|
If AplicaCaducidad Then GvInv.Columns(13).Visible = True
|
||||||
|
|
||||||
If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then
|
If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then
|
||||||
|
|||||||
@@ -2676,6 +2676,48 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
HdnPSAjusteMarca.Value = CveMarca.ToString()
|
HdnPSAjusteMarca.Value = CveMarca.ToString()
|
||||||
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
|
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
|
||||||
|
|
||||||
|
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||||
|
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||||
|
' si es 10. primero el cliente
|
||||||
|
Dim CvePrecioListaPS As Integer
|
||||||
|
Dim PorcentajePrecio As Decimal = 0
|
||||||
|
|
||||||
|
If TipoPrecioLista = 10 Then
|
||||||
|
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=DdlClientes.SelectedValue.ToEntero()).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||||
|
If CvePrecioListaPS <= 0 Then
|
||||||
|
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||||
|
If CvePrecioListaPS <= 0 Then
|
||||||
|
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=DdlClientes.SelectedValue.ToEntero()).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CvePrecioListaPS > 0 Then
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||||
|
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PrecioSugerido = 0 Then
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, txtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, CveSubProyecto, CveTipoAlmacen:=1)
|
||||||
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
|
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, txtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||||
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'CvePrecioLista = CvePrecioListaPS
|
||||||
|
End If
|
||||||
|
|
||||||
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
|
||||||
If MarcaPorcentaje IsNot Nothing Then
|
If MarcaPorcentaje IsNot Nothing Then
|
||||||
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
|
||||||
@@ -2705,6 +2747,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
UpModalAgregar.Update()
|
UpModalAgregar.Update()
|
||||||
|
UpAjuste.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaBCIAjuste()
|
Private Sub CargaBCIAjuste()
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
|
|
||||||
private void CargarDatos()
|
private void CargarDatos()
|
||||||
{
|
{
|
||||||
|
if (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147))) { GvDatos.Columns[3].HeaderText = UsuarioActual.Empresa.Funcionalidad(147); }
|
||||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||||
DdlClasificacion.SelectedValue.ToEntero()))
|
DdlClasificacion.SelectedValue.ToEntero()))
|
||||||
@@ -134,7 +135,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
|||||||
{
|
{
|
||||||
@params.Add(new ReportParameter("LogoPath", ""));
|
@params.Add(new ReportParameter("LogoPath", ""));
|
||||||
}
|
}
|
||||||
@params.Add(new ReportParameter("FechaCaducidadHeader", (UsuarioActual.Empresa.Funcionalidad(147) == "Fecha Elaboración" ? "Fecha Elaboración" : "Fecha Caducidad")));
|
@params.Add(new ReportParameter("FechaCaducidadHeader", (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) ? UsuarioActual.Empresa.Funcionalidad(147) : "Fecha Caducidad")));
|
||||||
|
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
|
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,7 +387,7 @@
|
|||||||
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
<th style="width: 88px" runat="server" id="ThSeccionAlmacen" visible="false">Sección Almacen</th>
|
||||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Caducidad</th>
|
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
||||||
|
|
||||||
<th width="160px">Comandos</th>
|
<th width="160px">Comandos</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1072,21 +1072,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
LimpiaMovimiento()
|
LimpiaMovimiento()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
Alert(TextoError, TipoMensaje.MsgError)
|
Alert(TextoError, TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||||
|
|
||||||
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||||
If ErrorExistencia Then
|
If ErrorExistencia Then
|
||||||
CargaGvDatos()
|
CargaGvDatos()
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean
|
Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -1265,7 +1265,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
||||||
|
|
||||||
|
|||||||
@@ -424,6 +424,13 @@
|
|||||||
<tr><td>{Puesto}</td><td></td></tr>
|
<tr><td>{Puesto}</td><td></td></tr>
|
||||||
<tr><td>{FechaActual}</td><td></td></tr>
|
<tr><td>{FechaActual}</td><td></td></tr>
|
||||||
<tr><td>{FechaActualDF}</td><td></td></tr>
|
<tr><td>{FechaActualDF}</td><td></td></tr>
|
||||||
|
<%--<tr><td>{TiempoContrato}</td><td></td></tr>--%>
|
||||||
|
<tr><td>{HoraInicioJornada}</td><td>Hora de inicio de jornada entre semana</td></tr>
|
||||||
|
<tr><td>{HoraFinJornada}</td><td>Hora de fin de jornada entre semana</td></tr>
|
||||||
|
<%--<tr><td>{HoraInicioJornadaSabado}</td><td>Hora de inicio de jornada en sábado</td></tr>
|
||||||
|
<tr><td>{HoraFinJornadaSabado}</td><td>Hora de fin de jornada en sábado</td></tr>--%>
|
||||||
|
<tr><td>{Salario}</td><td>Salario del personal</td></tr>
|
||||||
|
<tr><td>{MetodoPago}</td><td>Metodo de pago</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -4223,15 +4223,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
<asp:GridView ID="GvUsadosResumen" Width="100%" runat="server" GridLines="None"
|
<asp:UpdatePanel ID="UpGvUsadosResumen" runat="server" UpdateMode="Conditional">
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
<ContentTemplate>
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
<asp:GridView ID="GvUsadosResumen" Width="100%" runat="server" GridLines="None"
|
||||||
<Columns>
|
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
<asp:BoundField DataField="SaldoCliente" HeaderText="" />
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
<Columns>
|
||||||
<asp:BoundField DataField="Valor" HeaderText="Valor $" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
<asp:BoundField DataField="SaldoCliente" HeaderText="" />
|
||||||
</Columns>
|
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||||
</asp:GridView>
|
<asp:BoundField DataField="Valor" HeaderText="Valor $" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -4294,6 +4298,14 @@
|
|||||||
<asp:CompareValidator ID="CVFechaFUsados" runat="server" ControlToValidate="TxtFechaFUsados" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="ValidaUsados"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaFUsados" runat="server" ControlToValidate="TxtFechaFUsados" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="ValidaUsados"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFUsados" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFUsados" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEFechaFUsados" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFUsados" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="col-md-1 " style="width: 120px; text-align: right">Concepto:</label>
|
||||||
|
<div class="col-md-2" style="width: 120px">
|
||||||
|
<asp:DropDownList ID="DdlConceptoUsado" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Entradas" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Salidas" Value="2"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9137,7 +9137,7 @@ Partial Class Clientes
|
|||||||
Dim ImporteCargo As Decimal = 0D
|
Dim ImporteCargo As Decimal = 0D
|
||||||
Dim ImporteBonificacion As Decimal = 0D
|
Dim ImporteBonificacion As Decimal = 0D
|
||||||
|
|
||||||
If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate) Then
|
If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate, CveConcepto:=DdlConceptoUsado.SelectedValue.ToEntero()) Then
|
||||||
|
|
||||||
GvAcum.DataSource = ObjAcum.DtResultados
|
GvAcum.DataSource = ObjAcum.DtResultados
|
||||||
|
|
||||||
@@ -9174,6 +9174,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
UpAcciones.Update()
|
UpAcciones.Update()
|
||||||
UpUsadosResumen.Update()
|
UpUsadosResumen.Update()
|
||||||
|
UpGvUsadosResumen.Update()
|
||||||
UpAcum.Update()
|
UpAcum.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1902,7 +1902,7 @@ Partial Class PV
|
|||||||
For Each Dr As DataRow In TmpDTAjustes.Rows
|
For Each Dr As DataRow In TmpDTAjustes.Rows
|
||||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||||
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime()) Then
|
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal()) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -224,12 +224,13 @@
|
|||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
|
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSSAT">
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 46%;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
|
<ADS:Dropdownlost runat="server" ID="DdlSATPS" CssStyle="width: 46%;" CssClass="form-control input-sm select2me" DataTextField="Descripcion" DataValueField="CveSATPS" />
|
||||||
<%-- <asp:DropDownList ID="DdlSATPS" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="Descripcion" DataValueField="CveSATPS" Width="350px" Enabled="true">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>--%>
|
|
||||||
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
|
<label for="<%= DdlSATPS.ClientID.ToString()%>">Producto Servicio SAT:</label>
|
||||||
<%-- <asp:RequiredFieldValidator ID="Rfvpssat" runat="server" ControlToValidate="DdlSATPS" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Productos Servicios SAT''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<i></i>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcepssat" runat="server" HighlightCssClass="vco" TargetControlID="Rfvpssat" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="form-group form-md-line-input input-iconright" runat="server" id="DivPSAdicionalVigencia" visible="false">
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPSAdicionalVigencia" CssStyle="width: 46%;" CssClass="form-control input-sm select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
|
<label for="<%= DdlPSAdicionalVigencia.ClientID.ToString()%>">Producto de vigencia:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -212,6 +212,11 @@ Partial Class ProductosyServicios
|
|||||||
DdlIVA.Enabled = False
|
DdlIVA.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
DivPSAdicionalVigencia.Visible = True
|
||||||
|
CargaPSAdicionalesVigencias()
|
||||||
|
End If
|
||||||
|
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
CargaEquivalencias()
|
CargaEquivalencias()
|
||||||
CargaPSAdicionales()
|
CargaPSAdicionales()
|
||||||
@@ -769,6 +774,12 @@ Partial Class ProductosyServicios
|
|||||||
DdlSATPS.SelectedText = $"{ObjProductosServicios.SATClavePS} - {ObjProductosServicios.SATDescripcion}"
|
DdlSATPS.SelectedText = $"{ObjProductosServicios.SATClavePS} - {ObjProductosServicios.SATDescripcion}"
|
||||||
CveSATPS = ObjProductosServicios.CveSATPS
|
CveSATPS = ObjProductosServicios.CveSATPS
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ObjProductosServicios.DtResultados.Rows(0)("CvePSAdicionalVigencia").ToString.ToEntero() > 0 Then
|
||||||
|
DdlPSAdicionalVigencia.SelectedValue = ObjProductosServicios.DtResultados.Rows(0)("CvePSAdicionalVigencia").ToString
|
||||||
|
DdlPSAdicionalVigencia.SelectedText = ObjProductosServicios.DtResultados.Rows(0)("CodigoPSVigencia").ToString
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjProductosServicios.CveFraccionArancelaria.ToString <> Nothing Then
|
If ObjProductosServicios.CveFraccionArancelaria.ToString <> Nothing Then
|
||||||
DdlFraccionArancelaria.SelectedValue = ObjProductosServicios.CveFraccionArancelaria.ToString
|
DdlFraccionArancelaria.SelectedValue = ObjProductosServicios.CveFraccionArancelaria.ToString
|
||||||
DdlFraccionArancelaria.SelectedText = ObjProductosServicios.ClaveSATFraccionArancelariaDescripcion
|
DdlFraccionArancelaria.SelectedText = ObjProductosServicios.ClaveSATFraccionArancelariaDescripcion
|
||||||
@@ -918,6 +929,14 @@ Partial Class ProductosyServicios
|
|||||||
DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat")
|
DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub CargaPSAdicionalesVigencias()
|
||||||
|
DdlPSAdicionalVigencia.setEsWebService(True)
|
||||||
|
DdlPSAdicionalVigencia.Attributes.Add("data-cvesubproyecto", "-1")
|
||||||
|
DdlPSAdicionalVigencia.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||||
|
DdlPSAdicionalVigencia.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||||
|
DdlPSAdicionalVigencia.ddlWS.Attributes.Add("data-Estatus", "1")
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaDdlFraccionArancelaria()
|
Public Sub CargaDdlFraccionArancelaria()
|
||||||
DdlFraccionArancelaria.setEsWebService(True)
|
DdlFraccionArancelaria.setEsWebService(True)
|
||||||
DdlFraccionArancelaria.Attributes.Add("data-metodo", "getfraccionarancelaria")
|
DdlFraccionArancelaria.Attributes.Add("data-metodo", "getfraccionarancelaria")
|
||||||
@@ -1218,7 +1237,7 @@ Partial Class ProductosyServicios
|
|||||||
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero,
|
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero,
|
||||||
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
|
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
|
||||||
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
||||||
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad) > 0 Then
|
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero()) > 0 Then
|
||||||
ViewState("CvePS") = ObjProductosServicios.CvePS
|
ViewState("CvePS") = ObjProductosServicios.CvePS
|
||||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||||
@@ -1267,7 +1286,7 @@ Partial Class ProductosyServicios
|
|||||||
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
|
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
|
||||||
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
||||||
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
|
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
|
||||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad) Then
|
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero()) Then
|
||||||
|
|
||||||
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 ">Cliente:</label>
|
<label class="col-md-1 ">Cliente:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<ADS:Dropdownlost ID="DdlCliente" runat="server" CssStyle="width: 95%;" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
<ADS:Dropdownlost ID="DdlCliente" runat="server" CssStyle="width: 95%;" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 ">Vendedor:</label>
|
<label class="col-md-1 ">Vendedor:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@@ -86,26 +86,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-1" >Esquema Nuevo:</div>
|
<div class="col-md-1">Esquema Nuevo:</div>
|
||||||
<div class="col-md-2" style="vertical-align:bottom;align-items:initial">
|
<div class="col-md-2" style="vertical-align: bottom; align-items: initial">
|
||||||
<asp:CheckBox runat="server" ID ="ChkEsquemaNuevo" CssClass="md-checksd" />
|
<asp:CheckBox runat="server" ID="ChkEsquemaNuevo" CssClass="md-checksd" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server"
|
<asp:GridView ID="GvDatos" runat="server"
|
||||||
DataKeyNames="Nombre,FolioPago,SerieFolio,CveVenta,CveIE,CveCliente,Transaccion,CveVendedor,CveSubProyecto,Vendedor,SubProyecto,CveCategoria,CveMoneda,Costo,CostoDolares"
|
DataKeyNames="Nombre,FolioPago,SerieFolio,CveVenta,CveIE,CveCliente,Transaccion,CveVendedor,CveSubProyecto,Vendedor,SubProyecto,CveCategoria,CveMoneda,Costo,CostoDolares,Comision,PorcentajeComision,TieneCategoriaValida,CodigoPS"
|
||||||
EmptyDataText="No se han encontrado datos con los filtros especificados." data-sort="true" GridLines="None"
|
EmptyDataText="No se han encontrado datos con los filtros especificados." data-sort="true" GridLines="None"
|
||||||
CssClass="table table-hover table-striped Widthall ScrollAD " Width="100%" AutoGenerateColumns="False"
|
CssClass="table table-hover table-striped Widthall ScrollAD " Width="100%" AutoGenerateColumns="False"
|
||||||
OnRowDataBound="GvDatos_RowDataBound" OnPreRender="GvDatos_PreRender" >
|
OnRowDataBound="GvDatos_RowDataBound" OnPreRender="GvDatos_PreRender">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%-- 0 --%>
|
<%-- 0 --%>
|
||||||
<asp:HyperLinkField DataTextField="Nombre" Target="_blank" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField DataTextField="Nombre" Target="_blank" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
<%-- 10 --%>
|
<%-- 10 --%>
|
||||||
<asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%-- 11 --%>
|
<%-- 11 --%>
|
||||||
<asp:BoundField DataField="SubTotalPago" HeaderText="SubTotal Pago" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="SubTotalPago" HeaderText="SubTotal Pago" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%-- 12 --%>
|
<%-- 12 --%>
|
||||||
<asp:BoundField DataField="Moneda" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Moneda" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
|
||||||
<%-- 13 --%>
|
<%-- 13 --%>
|
||||||
@@ -150,13 +150,42 @@
|
|||||||
<%-- 20 --%>
|
<%-- 20 --%>
|
||||||
<asp:BoundField DataField="DescNC" HeaderText="Descto NC." DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="DescNC" HeaderText="Descto NC." DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%-- 21 --%>
|
<%-- 21 --%>
|
||||||
<asp:BoundField DataField="Comision" HeaderText="Comision" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Utilidad" HeaderText="Utilidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%-- 22 --%>
|
<%-- 22 --%>
|
||||||
|
<asp:BoundField DataField="PorcentajeUtilidad" HeaderText="% Utilidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%-- 23 --%>
|
||||||
|
<asp:BoundField DataField="Comision" HeaderText="Comision" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%-- 24 --%>
|
||||||
<asp:BoundField DataField="PorcentajeComision" HeaderText="% Comision" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="PorcentajeComision" HeaderText="% Comision" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<%-- 25 --%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Info">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton data-toggle="tooltip" Visible="false" title="Info" ID="LnkInfo" OnClick="LnkInfo_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-info-circle'></i>"></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<div id="DModalInfo" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog modal" runat="server" ID="UpModalInformacion" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal Text="Información" runat="server"> </asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:Label ID="LblInfo" runat="server"> </asp:Label>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
|||||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString());
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString());
|
||||||
DdlVendedor.Attributes.Add("disabled", "disabled");
|
DdlVendedor.Attributes.Add("disabled", "disabled");
|
||||||
DdlVendedor.Enabled = false;
|
DdlVendedor.Enabled = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GvDatos.Columns[15].Visible = UsuarioActual.TienePermisoProceso(201);
|
GvDatos.Columns[15].Visible = UsuarioActual.TienePermisoProceso(201);
|
||||||
|
|
||||||
GvDatos.Columns[21].Visible = UsuarioActual.TienePermisoProceso(311);
|
GvDatos.Columns[21].Visible = UsuarioActual.TienePermisoProceso(311);
|
||||||
@@ -106,29 +110,33 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
|||||||
//e.Row.Cells[0].Text = e.Row.DBCampo("SubProyecto").ToString();
|
//e.Row.Cells[0].Text = e.Row.DBCampo("SubProyecto").ToString();
|
||||||
}
|
}
|
||||||
else if (e.Row.DBCampo("CveVenta").ToEntero() < 1)
|
else if (e.Row.DBCampo("CveVenta").ToEntero() < 1)
|
||||||
{
|
{
|
||||||
e.Row.CssClass = "SubTotales2";
|
e.Row.CssClass = "SubTotales2";
|
||||||
//e.Row.Cells[0].Text = e.Row.DBCampo("Vendedor").ToString();
|
//e.Row.Cells[0].Text = e.Row.DBCampo("Vendedor").ToString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e.Row.DBCampo("Transaccion").ToString() == "Pago")
|
if (e.Row.DBCampo("Transaccion").ToString() == "Pago" && ChkEsquemaNuevo.Checked)
|
||||||
{
|
{
|
||||||
if (e.Row.DBCampo("CveCategoria").ToEntero() < 1 && e.Row.DBCampo("Comision").ToDouble() == 0)
|
e.Row.FCLinkButton("LnkInfo").Visible = true;
|
||||||
{
|
//if (e.Row.DBCampo("CveCategoria").ToEntero() < 1 && e.Row.DBCampo("Comision").ToDouble() == 0)
|
||||||
//if (UsuarioActual.TienePermisoProceso(201))
|
//{
|
||||||
//{
|
// //if (UsuarioActual.TienePermisoProceso(201))
|
||||||
// e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
// //{
|
||||||
// e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
// // e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||||
//}
|
// // e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||||
//else
|
// //}
|
||||||
//{
|
// //else
|
||||||
e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
// //{
|
||||||
e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
// e.Row.Cells[21].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||||
//}
|
// e.Row.Cells[22].ToolTip = "No se encuentra dentro de alguna categoria que de comision ni a alguno de los productos especiales.";
|
||||||
}else if (e.Row.DBCampo("CveCategoria").ToEntero() > 0 )
|
// //}
|
||||||
{
|
//}else if (e.Row.DBCampo("CveCategoria").ToEntero() > 0 )
|
||||||
e.Row.Cells[21].ToolTip = $"El producto obtuvo la comision porque se encuentra en la categoria: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria",$"CveCategoria = {e.Row.DBCampo("CveCategoria").ToString()}")}.";
|
//{
|
||||||
|
// e.Row.Cells[21].ToolTip = $"El producto obtuvo la comision porque se encuentra en la categoria: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria",$"CveCategoria = {e.Row.DBCampo("CveCategoria").ToString()}")}.";
|
||||||
|
// e.Row.Cells[22].ToolTip = $"El producto obtuvo la comision porque se encuentra en la categoria: {get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = {e.Row.DBCampo("CveCategoria").ToString()}")}.";
|
||||||
|
//}else if(e.Row.DBCampo("Comision").ToDouble() > 0)
|
||||||
|
//{
|
||||||
// e.Row.Cells[21].ToolTip = "El producto obtuvo comision porque esta dentro de los de las comisiones especiales.";
|
// e.Row.Cells[21].ToolTip = "El producto obtuvo comision porque esta dentro de los de las comisiones especiales.";
|
||||||
// e.Row.Cells[22].ToolTip = "El producto obtuvo comision porque esta dentro de los de las comisiones especiales.";
|
// e.Row.Cells[22].ToolTip = "El producto obtuvo comision porque esta dentro de los de las comisiones especiales.";
|
||||||
//}
|
//}
|
||||||
@@ -342,4 +350,28 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
lista.Add(new CrystalParametro("ImagenPath", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/119/Formatos/RepComisionesJAM.rpt"), DtDatos, lista, "RepComisionesJAM", Formato), "RepComisionesJAM", Formato);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void LnkInfo_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
|
|
||||||
|
if (!Convert.ToBoolean(gvRow.DataKey("TieneCategoriaValida")) && gvRow.DataKey("Comision").ToDouble() == 0)
|
||||||
|
{
|
||||||
|
LblInfo.Text = $"No se encuentra dentro de alguna categoria que de comision ni alguno de los productos especiales.<br/> La categoria del producto es: <b>{get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = { gvRow.DataKey("CveCategoria").ToString()}")}</b>. ";
|
||||||
|
}
|
||||||
|
else if (Convert.ToBoolean(gvRow.DataKey("TieneCategoriaValida")) && gvRow.DataKey("Comision").ToDouble() > 0)
|
||||||
|
{
|
||||||
|
LblInfo.Text = $"El producto obtuvo la comision porque se encuentra en la categoria: <b>{get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = {gvRow.DataKey("CveCategoria").ToString()}")}</b> y esta dentro de los rangos de precio publico y dias validos. ";
|
||||||
|
}
|
||||||
|
else if (Convert.ToBoolean(gvRow.DataKey("TieneCategoriaValida")) && gvRow.DataKey("Comision").ToDouble() == 0)
|
||||||
|
{
|
||||||
|
LblInfo.Text = $"El producto se encuentra en la categoria: <b>{get_GlobalDTGralCategorias(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Categoria", $"CveCategoria = {gvRow.DataKey("CveCategoria").ToString()}")}</b> que da comision, pero no se encuentra dentro de los rangos de precio publico y dias validos.";
|
||||||
|
}
|
||||||
|
else if (gvRow.DataKey("Comision").ToDouble() > 0)
|
||||||
{
|
{
|
||||||
@@ -6152,7 +6152,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="col-md-12" style="height: 440px; overflow: auto">
|
<div class="col-md-12" style="height: 440px; overflow: auto">
|
||||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound"
|
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvCxC_RowDataBound"
|
||||||
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
DataKeyNames="CveVenta,CveMetodoPago33,CveFormaPago33" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -6427,16 +6427,19 @@
|
|||||||
<h4 class="modal-title">Aplicar Devolución</h4>
|
<h4 class="modal-title">Aplicar Devolución</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row" id="">
|
<div class="row" id="DivPenalizacion" runat="server" visible="false">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>Aplicar % de Penalización</label>
|
<label>Aplicar % de Penalización</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-2">
|
||||||
<asp:TextBox ID="TxtPorPenalizacion" runat="server" CssClass="form-control input-sm" Text="0" onkeyup="CalculaPenalizacionDevolucion(this);"></asp:TextBox>
|
<asp:TextBox ID="TxtPorPenalizacion" runat="server" CssClass="form-control input-sm" Text="" onkeyup="LimitaPenalizacionDevolucion(this);"></asp:TextBox>
|
||||||
<asp:RangeValidator ID="RFVPenalizacion" runat="server" Type="Integer" MinimumValue="0" MaximumValue="100" ErrorMessage="El campo <b>''Penalización''</b> es necesario, por favor ingréselo." ControlToValidate="TxtPorPenalizacion" Display="None"></asp:RangeValidator>
|
<asp:RangeValidator ID="RFVPenalizacion" runat="server" Type="Integer" MinimumValue="0" MaximumValue="100" ErrorMessage="El campo <b>''Penalización''</b> es necesario, por favor ingréselo." ControlToValidate="TxtPorPenalizacion" Display="None"></asp:RangeValidator>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBPenalizacion" runat="server" TargetControlID="TxtPorPenalizacion" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="FTBPenalizacion" runat="server" TargetControlID="TxtPorPenalizacion" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6"></div>
|
<div class="col-md-2">
|
||||||
|
<asp:Button ID="BtnCalcularPenalizacion" runat="server" CssClass="btn btn-primary btn-sm" Text="Calcular" OnClick="BtnCalcularPenalizacion_Click" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="margin-bottom: 10px;">
|
<div class="row" style="margin-bottom: 10px;">
|
||||||
<div class="text-right col-md-offset-8 col-md-4">
|
<div class="text-right col-md-offset-8 col-md-4">
|
||||||
@@ -6480,7 +6483,7 @@
|
|||||||
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField HeaderText="PU Editado" Visible="false">
|
<asp:TemplateField HeaderText="PU Editado" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="90%" Height="24px" CssClass="ImporteDevolucion"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="50%" Height="24px" CssClass="ImporteDevolucion"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros1Editado" runat="server" TargetControlID="TxtPrecioEditado" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros1Editado" runat="server" TargetControlID="TxtPrecioEditado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -7351,14 +7354,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalculaPenalizacionDevolucion(TxtPenalizacion) {
|
function LimitaPenalizacionDevolucion(TxtPenalizacion) {
|
||||||
const Porcentaje = ToDouble(TxtPenalizacion.value) / ToDouble(100);
|
const Porcentaje = ToDouble(TxtPenalizacion.value)
|
||||||
if (Porcentaje <= 1) {
|
if (Porcentaje >= 100) {
|
||||||
$('.ImporteDevolucion').each(function () {
|
TxtPenalizacion.value = "100"
|
||||||
const importe = ToDouble($(this).val());
|
|
||||||
const resta = importe * Porcentaje;
|
|
||||||
$(this).val(FormatoNumero((importe - resta), 2));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7931,7 +7930,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
||||||
debugger;
|
|
||||||
var totalAnt = 0;
|
var totalAnt = 0;
|
||||||
|
|
||||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||||
|
|||||||
@@ -2053,6 +2053,10 @@ Partial Class Ventas
|
|||||||
thPoliza2.Visible = True
|
thPoliza2.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.CveUsuario = 100 Then
|
||||||
|
DivPenalizacion.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
DdlSATPS.setEsWebService(True) : DdlSATPS.Attributes.Add("data-metodo", "getpssat")
|
DdlSATPS.setEsWebService(True) : DdlSATPS.Attributes.Add("data-metodo", "getpssat")
|
||||||
DivPSSAT.Visible = True
|
DivPSSAT.Visible = True
|
||||||
@@ -5229,6 +5233,7 @@ Partial Class Ventas
|
|||||||
ChkEnviarFactura.Checked = False
|
ChkEnviarFactura.Checked = False
|
||||||
ChkEnviarFactura.Visible = True
|
ChkEnviarFactura.Visible = True
|
||||||
LblEnviarMail.Visible = True
|
LblEnviarMail.Visible = True
|
||||||
|
If CveVenta > 0 AndAlso EnviarCorreoCliente Then ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||||
Else
|
Else
|
||||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||||
ChkEnviarFactura.Visible = True
|
ChkEnviarFactura.Visible = True
|
||||||
@@ -5859,6 +5864,7 @@ Partial Class Ventas
|
|||||||
ChkEnviarFactura.Checked = False
|
ChkEnviarFactura.Checked = False
|
||||||
ChkEnviarFactura.Visible = True
|
ChkEnviarFactura.Visible = True
|
||||||
LblEnviarMail.Visible = True
|
LblEnviarMail.Visible = True
|
||||||
|
If CveVenta > 0 AndAlso EnviarCorreoCliente Then ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||||
Else
|
Else
|
||||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||||
ChkEnviarFactura.Visible = True
|
ChkEnviarFactura.Visible = True
|
||||||
@@ -23892,263 +23898,278 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False)
|
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False)
|
||||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
|
||||||
If DrPS Is Nothing Then
|
Try
|
||||||
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
Exit Sub
|
If DrPS Is Nothing Then
|
||||||
Else
|
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
||||||
'VALIDA CLAVES SAT
|
|
||||||
If DrPS("SATClavePS").ToString() = "" Then
|
|
||||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
Else
|
||||||
|
'VALIDA CLAVES SAT
|
||||||
|
If DrPS("SATClavePS").ToString() = "" Then
|
||||||
|
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
||||||
|
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
|
||||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
If Not AplicaImpuestosLocales Then
|
||||||
Exit Sub
|
If TmpDTImpuestos IsNot Nothing Then
|
||||||
|
TmpDTImpuestos.Rows.Clear()
|
||||||
|
GvImpuestosLocales2.DataSource = TmpDTImpuestos
|
||||||
|
GvImpuestosLocales2.DataBind()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If Not AplicaImpuestosLocales Then
|
Me.AplicoNCFacturaActual = AplicoNCFacturaActual
|
||||||
If TmpDTImpuestos IsNot Nothing Then
|
|
||||||
TmpDTImpuestos.Rows.Clear()
|
|
||||||
GvImpuestosLocales2.DataSource = TmpDTImpuestos
|
|
||||||
GvImpuestosLocales2.DataBind()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Me.AplicoNCFacturaActual = AplicoNCFacturaActual
|
'CREAMOS DT PARA UTILIZAR AL TIMBRAR
|
||||||
|
InicializaDTVentasNC()
|
||||||
|
|
||||||
'CREAMOS DT PARA UTILIZAR AL TIMBRAR
|
Dim DtImpuestos As New DataTable
|
||||||
InicializaDTVentasNC()
|
DtImpuestos.Columns.Add("ImportePU", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("ImporteTotal", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("ImporteIVA", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("ImporteRetISR", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("ImporteIEPS", GetType(Decimal))
|
||||||
|
DtImpuestos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
|
DtImpuestos.AcceptChanges()
|
||||||
|
Dim AcumuladoNC As Decimal = 0
|
||||||
|
|
||||||
Dim DtImpuestos As New DataTable
|
Dim DtImpuestosBonificacion As DataTable = DtImpuestos.Copy()
|
||||||
DtImpuestos.Columns.Add("ImportePU", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("ImporteTotal", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("ImporteIVA", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("ImporteRetISR", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("ImporteIEPS", GetType(Decimal))
|
|
||||||
DtImpuestos.Columns.Add("CveSubProyecto", GetType(Integer))
|
|
||||||
DtImpuestos.AcceptChanges()
|
|
||||||
Dim AcumuladoNC As Decimal = 0
|
|
||||||
|
|
||||||
Dim DtImpuestosBonificacion As DataTable = DtImpuestos.Copy()
|
If Not AplicaNuevoDocumento Then
|
||||||
|
If AplicaNCMasiva Then
|
||||||
|
If NCDescuento Then
|
||||||
|
For Each RNC In ListaNCDesc
|
||||||
|
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
||||||
|
Next
|
||||||
|
|
||||||
If Not AplicaNuevoDocumento Then
|
'SI HAY RNC DE BONIFICACION SE AGREGAN
|
||||||
If AplicaNCMasiva Then
|
If ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0 Then
|
||||||
If NCDescuento Then
|
For Each RNC In ListaNCBonificacion
|
||||||
For Each RNC In ListaNCDesc
|
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
||||||
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
Next
|
||||||
Next
|
End If
|
||||||
|
Else
|
||||||
'SI HAY RNC DE BONIFICACION SE AGREGAN
|
Dim NumVentasAplicar As Integer = 1
|
||||||
If ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0 Then
|
For Each Gvr As GridViewRow In GvCxC.Rows
|
||||||
For Each RNC In ListaNCBonificacion
|
If Gvr.FCCheckBox("ChkCxC").Checked Then
|
||||||
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
||||||
|
'CARGA FACTURA A LA CUAL SE APLICA LA NC
|
||||||
|
AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
|
||||||
|
CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
|
||||||
|
If UsuarioActual.CveEmpresa = 140 AndAlso NumVentasAplicar = 1 Then
|
||||||
|
DdlMetodoPago33.Enabled = True
|
||||||
|
DdlMetodoPago33.SelectedValueExist(Gvr.DataKey("CveMetodoPago33").ToString())
|
||||||
|
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
|
||||||
|
DdlFormaPago33.Enabled = True
|
||||||
|
DdlFormaPago33.SelectedValueExist(Gvr.DataKey("CveFormaPago33").ToString())
|
||||||
|
End If
|
||||||
|
NumVentasAplicar += 1
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero())
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvCxC.Rows
|
If EsNCAmortizacion Then
|
||||||
If Gvr.FCCheckBox("ChkCxC").Checked Then
|
If DtAnticipoAmortizacion Is Nothing Then
|
||||||
DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
InicializaDTAnticiposAmortizacion()
|
||||||
'CARGA FACTURA A LA CUAL SE APLICA LA NC
|
|
||||||
AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
|
|
||||||
CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
|
|
||||||
End If
|
End If
|
||||||
|
Dim PorcentajeAplicado As Decimal = (TxtNCPorcentaje.Text.ToDecimal / 100D)
|
||||||
|
|
||||||
|
Dim RowAnticipo As DataRow = DtAnticipoAmortizacion.NewRow
|
||||||
|
RowAnticipo("CveVenta") = Me.CveVenta
|
||||||
|
RowAnticipo("Importe") = TxtNCImporte.Text.Trim.ToDecimal
|
||||||
|
RowAnticipo("SaldoAnticipo") = SaldoAnticipo * PorcentajeAplicado
|
||||||
|
|
||||||
|
DtAnticipoAmortizacion.Rows.Add(RowAnticipo)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
For Each RNC In ListaRemisionesNC
|
||||||
|
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
||||||
|
Next
|
||||||
|
For Each RNC In ListaNCBonificacion
|
||||||
|
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim query = From dr In DtImpuestos
|
||||||
|
Group By PorcentajeIVA = dr("PorcentajeIVA").ToString().ToDecimal,
|
||||||
|
PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString().ToDecimal,
|
||||||
|
PorcentajeRetISR = dr("PorcentajeRetISR").ToString().ToDecimal,
|
||||||
|
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
||||||
|
Into x = Group
|
||||||
|
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||||
|
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||||
|
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||||
|
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||||
|
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||||
|
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||||
|
PorcentajeIVA = PorcentajeIVA,
|
||||||
|
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||||
|
PorcentajeRetISR = PorcentajeRetISR,
|
||||||
|
PorcentajeIEPS = PorcentajeIEPS
|
||||||
|
|
||||||
|
|
||||||
|
Dim queryBonificacion = From dr In DtImpuestosBonificacion
|
||||||
|
Group By PorcentajeIVA = dr("PorcentajeIVA").ToString().ToDecimal,
|
||||||
|
PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString().ToDecimal,
|
||||||
|
PorcentajeRetISR = dr("PorcentajeRetISR").ToString().ToDecimal,
|
||||||
|
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
||||||
|
Into x = Group
|
||||||
|
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||||
|
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||||
|
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||||
|
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||||
|
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||||
|
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||||
|
PorcentajeIVA = PorcentajeIVA,
|
||||||
|
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||||
|
PorcentajeRetISR = PorcentajeRetISR,
|
||||||
|
PorcentajeIEPS = PorcentajeIEPS
|
||||||
|
|
||||||
|
|
||||||
|
Dim DrSubProyecto = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
|
||||||
|
|
||||||
|
If DrSubProyecto Is Nothing Then
|
||||||
|
Alert("Ocurrió un error al cargar la información de centro de costos. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
DtImpuestos = query.QueryToDataTable(False)
|
||||||
|
DtImpuestosBonificacion = queryBonificacion.QueryToDataTable(False)
|
||||||
|
|
||||||
|
If Not NCDescuento Then
|
||||||
|
LimpiaDocumentoNC()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveSubProyecto = DrSubProyecto("CveSubProyecto").ToString().ToEntero()
|
||||||
|
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString()
|
||||||
|
Dim CveProyecto = DrSubProyecto("CveProyecto").ToString().ToEntero()
|
||||||
|
Dim Proyecto = DrSubProyecto("Proyecto").ToString()
|
||||||
|
|
||||||
|
AplicaNC = True
|
||||||
|
|
||||||
|
If NCDescuento Then
|
||||||
|
TmpDTDescNC = TmpDT.Clone()
|
||||||
|
TmpDTDescNC.Clear()
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
|
||||||
|
CrearDTNCCargo(ListaNCDesc, DtImpuestos, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
|
||||||
|
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
|
||||||
|
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
|
||||||
|
If DrPSBonificacion IsNot Nothing Then
|
||||||
|
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
Else
|
||||||
|
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
|
||||||
|
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
For Each Dr As DataRow In DtImpuestos.Rows
|
||||||
|
AgregaTempDT(TmpDTDescNC, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||||
|
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||||
|
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||||
|
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1,
|
||||||
|
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero())
|
|
||||||
|
|
||||||
If EsNCAmortizacion Then
|
TrTipoRelacion.Visible = True
|
||||||
If DtAnticipoAmortizacion Is Nothing Then
|
DdlTiposRelacion.SelectedValueExist("1")
|
||||||
InicializaDTAnticiposAmortizacion()
|
|
||||||
|
'verifica el tipo de cambio que se actualice
|
||||||
|
If DdlMoneda.SelectedValue <> "1" Then
|
||||||
|
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
||||||
|
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Egs")
|
||||||
|
'verifica el total de multiples facturas
|
||||||
|
Dim Acumulado12 As Decimal = 0
|
||||||
|
Dim UltimoRenglon As Integer = 1
|
||||||
|
Dim Ajuste As Decimal = 0
|
||||||
|
|
||||||
|
'DEBE AGREGAR LOS USADOS DE LA REMISION EN LA NOTA DE CREDITO
|
||||||
|
If UsuarioActual.CveEmpresa = 140 AndAlso (ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0) Then
|
||||||
|
|
||||||
|
CrearDTNCCargo(ListaRemisionesNC, DtImpuestos, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
|
||||||
|
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
|
||||||
|
If DrPSBonificacion IsNot Nothing Then
|
||||||
|
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
|
Else
|
||||||
|
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
|
||||||
|
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
End If
|
End If
|
||||||
Dim PorcentajeAplicado As Decimal = (TxtNCPorcentaje.Text.ToDecimal / 100D)
|
|
||||||
|
|
||||||
Dim RowAnticipo As DataRow = DtAnticipoAmortizacion.NewRow
|
|
||||||
RowAnticipo("CveVenta") = Me.CveVenta
|
|
||||||
RowAnticipo("Importe") = TxtNCImporte.Text.Trim.ToDecimal
|
|
||||||
RowAnticipo("SaldoAnticipo") = SaldoAnticipo * PorcentajeAplicado
|
|
||||||
|
|
||||||
DtAnticipoAmortizacion.Rows.Add(RowAnticipo)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
For Each RNC In ListaRemisionesNC
|
|
||||||
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
|
||||||
Next
|
|
||||||
For Each RNC In ListaNCBonificacion
|
|
||||||
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim query = From dr In DtImpuestos
|
|
||||||
Group By PorcentajeIVA = dr("PorcentajeIVA").ToString().ToDecimal,
|
|
||||||
PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString().ToDecimal,
|
|
||||||
PorcentajeRetISR = dr("PorcentajeRetISR").ToString().ToDecimal,
|
|
||||||
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
|
||||||
Into x = Group
|
|
||||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
|
||||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
|
||||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
|
||||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
|
||||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
|
||||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
|
||||||
PorcentajeIVA = PorcentajeIVA,
|
|
||||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
|
||||||
PorcentajeRetISR = PorcentajeRetISR,
|
|
||||||
PorcentajeIEPS = PorcentajeIEPS
|
|
||||||
|
|
||||||
|
|
||||||
Dim queryBonificacion = From dr In DtImpuestosBonificacion
|
|
||||||
Group By PorcentajeIVA = dr("PorcentajeIVA").ToString().ToDecimal,
|
|
||||||
PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString().ToDecimal,
|
|
||||||
PorcentajeRetISR = dr("PorcentajeRetISR").ToString().ToDecimal,
|
|
||||||
PorcentajeIEPS = dr("PorcentajeIEPS").ToString().ToDecimal
|
|
||||||
Into x = Group
|
|
||||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
|
||||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
|
||||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
|
||||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
|
||||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
|
||||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
|
||||||
PorcentajeIVA = PorcentajeIVA,
|
|
||||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
|
||||||
PorcentajeRetISR = PorcentajeRetISR,
|
|
||||||
PorcentajeIEPS = PorcentajeIEPS
|
|
||||||
|
|
||||||
|
|
||||||
Dim DrSubProyecto = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
|
|
||||||
|
|
||||||
If DrSubProyecto Is Nothing Then
|
|
||||||
Alert("Ocurrió un error al cargar la información de centro de costos. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
DtImpuestos = query.QueryToDataTable(False)
|
|
||||||
DtImpuestosBonificacion = queryBonificacion.QueryToDataTable(False)
|
|
||||||
|
|
||||||
If Not NCDescuento Then
|
|
||||||
LimpiaDocumentoNC()
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CveSubProyecto = DrSubProyecto("CveSubProyecto").ToString().ToEntero()
|
|
||||||
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString()
|
|
||||||
Dim CveProyecto = DrSubProyecto("CveProyecto").ToString().ToEntero()
|
|
||||||
Dim Proyecto = DrSubProyecto("Proyecto").ToString()
|
|
||||||
|
|
||||||
AplicaNC = True
|
|
||||||
|
|
||||||
If NCDescuento Then
|
|
||||||
TmpDTDescNC = TmpDT.Clone()
|
|
||||||
TmpDTDescNC.Clear()
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 140 Then
|
|
||||||
|
|
||||||
CrearDTNCCargo(ListaNCDesc, DtImpuestos, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
|
||||||
|
|
||||||
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
|
|
||||||
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
|
|
||||||
If DrPSBonificacion IsNot Nothing Then
|
|
||||||
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
|
||||||
Else
|
Else
|
||||||
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
|
For Each Dr As DataRow In DtImpuestos.Rows
|
||||||
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
Acumulado12 += Dr("ImportePU").ToString().ToDecimal.RoundSQL + Dr("ImporteIVA").ToString().ToDecimal.RoundSQL + Dr("ImporteIEPS").ToString().ToDecimal
|
||||||
End If
|
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
||||||
|
'ajusta 5 centavos de diferencia
|
||||||
Else
|
If Acumulado12 <> AcumuladoNC And Math.Abs(Acumulado12 - AcumuladoNC) <= 0.05 Then
|
||||||
For Each Dr As DataRow In DtImpuestos.Rows
|
Ajuste = (Acumulado12 - AcumuladoNC)
|
||||||
AgregaTempDT(TmpDTDescNC, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
End If
|
||||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
|
||||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
|
||||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1,
|
|
||||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
TrTipoRelacion.Visible = True
|
|
||||||
DdlTiposRelacion.SelectedValueExist("1")
|
|
||||||
|
|
||||||
'verifica el tipo de cambio que se actualice
|
|
||||||
If DdlMoneda.SelectedValue <> "1" Then
|
|
||||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValueExist("Egs")
|
|
||||||
'verifica el total de multiples facturas
|
|
||||||
Dim Acumulado12 As Decimal = 0
|
|
||||||
Dim UltimoRenglon As Integer = 1
|
|
||||||
Dim Ajuste As Decimal = 0
|
|
||||||
|
|
||||||
'DEBE AGREGAR LOS USADOS DE LA REMISION EN LA NOTA DE CREDITO
|
|
||||||
If UsuarioActual.CveEmpresa = 140 AndAlso ListaRemisionesNC.Count > 0 Then
|
|
||||||
|
|
||||||
CrearDTNCCargo(ListaRemisionesNC, DtImpuestos, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
|
||||||
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
|
|
||||||
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
|
|
||||||
If DrPSBonificacion IsNot Nothing Then
|
|
||||||
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
|
||||||
Else
|
|
||||||
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
|
|
||||||
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
For Each Dr As DataRow In DtImpuestos.Rows
|
|
||||||
Acumulado12 += Dr("ImportePU").ToString().ToDecimal.RoundSQL + Dr("ImporteIVA").ToString().ToDecimal.RoundSQL + Dr("ImporteIEPS").ToString().ToDecimal
|
|
||||||
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
|
||||||
'ajusta 5 centavos de diferencia
|
|
||||||
If Acumulado12 <> AcumuladoNC And Math.Abs(Acumulado12 - AcumuladoNC) <= 0.05 Then
|
|
||||||
Ajuste = (Acumulado12 - AcumuladoNC)
|
|
||||||
End If
|
End If
|
||||||
End If
|
UltimoRenglon += 1
|
||||||
UltimoRenglon += 1
|
|
||||||
|
|
||||||
AgregaTempDT(TmpDT, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
AgregaTempDT(TmpDT, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1,
|
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1,
|
||||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
GvPS.DataSource = TmpDT
|
||||||
|
GvPS.DataBind()
|
||||||
|
|
||||||
|
CalculaTotalesVenta(RecalculaImpuestosLocales:=AplicaImpuestosLocales)
|
||||||
|
|
||||||
|
TrTipoRelacion.Visible = True
|
||||||
|
DdlTiposRelacion.SelectedValueExist("1")
|
||||||
|
DdlSubProyectoDatos.Enabled = False
|
||||||
|
|
||||||
|
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||||
|
If Not AplicaNCMasiva Then
|
||||||
|
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
||||||
|
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||||
|
CargaNCDT(CveVenta, TT)
|
||||||
|
End If
|
||||||
|
'verifica el tipo de cambio que se actualice
|
||||||
|
If DdlMoneda.SelectedValue <> "1" Then
|
||||||
|
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||||
|
End If
|
||||||
|
LblTCValuacion.Visible = False
|
||||||
|
UpPS.Update()
|
||||||
|
|
||||||
|
LBNotaCredito.Visible = False
|
||||||
|
CambiaTipoDocto()
|
||||||
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al aplicar NC", ex)
|
||||||
GvPS.DataSource = TmpDT
|
End Try
|
||||||
GvPS.DataBind()
|
UPCondicionesPago.Update()
|
||||||
|
|
||||||
CalculaTotalesVenta(RecalculaImpuestosLocales:=AplicaImpuestosLocales)
|
|
||||||
|
|
||||||
TrTipoRelacion.Visible = True
|
|
||||||
DdlTiposRelacion.SelectedValueExist("1")
|
|
||||||
DdlSubProyectoDatos.Enabled = False
|
|
||||||
|
|
||||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
|
||||||
If Not AplicaNCMasiva Then
|
|
||||||
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
|
||||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
|
||||||
CargaNCDT(CveVenta, TT)
|
|
||||||
End If
|
|
||||||
'verifica el tipo de cambio que se actualice
|
|
||||||
If DdlMoneda.SelectedValue <> "1" Then
|
|
||||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
|
||||||
End If
|
|
||||||
LblTCValuacion.Visible = False
|
|
||||||
UpPS.Update()
|
|
||||||
|
|
||||||
LBNotaCredito.Visible = False
|
|
||||||
CambiaTipoDocto()
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CrearDTNCCargo(ListaNC As List(Of Modelos.Factura), DtImpuestos As DataTable, ByRef TmpDTCargo As DataTable, DrPS As DataRow, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String)
|
Private Sub CrearDTNCCargo(ListaNC As List(Of Modelos.Factura), DtImpuestos As DataTable, ByRef TmpDTCargo As DataTable, DrPS As DataRow, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String)
|
||||||
@@ -24467,11 +24488,13 @@ Partial Class Ventas
|
|||||||
'ACTIVA CONDICIONES DE PAGO
|
'ACTIVA CONDICIONES DE PAGO
|
||||||
DdlUsoCFDI.Enabled = True
|
DdlUsoCFDI.Enabled = True
|
||||||
DdlUsoCFDI.SelectedValueExist("2")
|
DdlUsoCFDI.SelectedValueExist("2")
|
||||||
DdlMetodoPago33.Enabled = True
|
If UsuarioActual.CveEmpresa <> 140 Then
|
||||||
DdlMetodoPago33.SelectedValueExist("1") ' PUE
|
DdlMetodoPago33.Enabled = True
|
||||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
|
DdlMetodoPago33.SelectedValueExist("1") ' PUE
|
||||||
DdlFormaPago33.Enabled = True
|
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
|
||||||
DdlFormaPago33.SelectedValueExist("11") ' condonación por default
|
DdlFormaPago33.Enabled = True
|
||||||
|
DdlFormaPago33.SelectedValueExist("11") ' condonación por default
|
||||||
|
End If
|
||||||
|
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
@@ -24595,6 +24618,22 @@ Partial Class Ventas
|
|||||||
UpDevolucion.Update()
|
UpDevolucion.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub BtnCalcularPenalizacion_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim PorcentajePenalizacion As Decimal = (TxtPorPenalizacion.Text.ToDecimal() / 100D)
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvAplicaDevolucion.Rows
|
||||||
|
If GvRow.FCCheckBox("Chk").Checked Then
|
||||||
|
|
||||||
|
Dim Total As Decimal = GvRow.DataKey("PU").ToDecimal() - (GvRow.DataKey("Descuento").ToDecimal() / GvRow.DataKey("Cantidad").ToDecimal())
|
||||||
|
|
||||||
|
'APLICA EL PORCENTAJE DE PENALIZACION
|
||||||
|
GvRow.FCTextBox("TxtPrecioEditado").Text = (Total - (Total * PorcentajePenalizacion)).FormatoNumero(2)
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
UpDevolucion.Update()
|
||||||
|
End Sub
|
||||||
Protected Sub BtnAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
'VALIDACIONES
|
'VALIDACIONES
|
||||||
@@ -27229,6 +27268,33 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'SI TIENE ALGUN AJUSTE O GARANTIA
|
||||||
|
If ListaRemisionesNC.Any(Function(RNC) RNC.Num2 = 1) Then
|
||||||
|
For Each RNC In ListaRemisionesNC.Where(Function(x) x.Num2 = 1)
|
||||||
|
Dim Salir As Boolean = False
|
||||||
|
Using ObjAcum As New ClsAcumuladores
|
||||||
|
If ObjAcum.GetGarantiasDetalle(RNC.CveVenta) Then
|
||||||
|
'SI ES GARANTIA TOTAL
|
||||||
|
If ObjAcum.DtResultados.MAX("PorcentajeAjuste") = "1" Then
|
||||||
|
DdlNCPS.SelectedValueExist(443174)
|
||||||
|
DdlNCPS.Enabled = False
|
||||||
|
Salir = True
|
||||||
|
Else
|
||||||
|
DdlNCPS.SelectedValueExist(443173)
|
||||||
|
DdlNCPS.Enabled = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If Salir Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
DdlNCPS.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
||||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||||
@@ -27304,6 +27370,28 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'SI TIENE ALGUN AJUSTE O GARANTIA
|
||||||
|
If ListaNCDesc.Any(Function(RNC) RNC.Num2 = 1) Then
|
||||||
|
For Each RNC In ListaRemisionesNC.Where(Function(x) x.Num2 = 1)
|
||||||
|
Dim Salir As Boolean = False
|
||||||
|
Using ObjAcum As New ClsAcumuladores
|
||||||
|
If ObjAcum.GetGarantiasDetalle(RNC.CveVenta) Then
|
||||||
|
'SI ES GARANTIA TOTAL
|
||||||
|
If ObjAcum.DtResultados.MAX("PorcentajeAjuste") = "1" Then
|
||||||
|
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=443174, AplicaParaVenta:=1).Rows(0)
|
||||||
|
Salir = True
|
||||||
|
Else
|
||||||
|
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=443173, AplicaParaVenta:=1).Rows(0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If Salir Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Dim LimiteUsados As Decimal = LblSaldoMaximoUsados.Text.Trim().ToDecimal()
|
Dim LimiteUsados As Decimal = LblSaldoMaximoUsados.Text.Trim().ToDecimal()
|
||||||
|
|
||||||
'VERIFICA EL LIMITE DE LOS USADOS
|
'VERIFICA EL LIMITE DE LOS USADOS
|
||||||
|
|||||||
@@ -132,6 +132,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user