Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasUsados.aspx.vb" Inherits="Acumuladores_EntradasUsados" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
Partial Class Acumuladores_EntradasUsados
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
End Class
|
||||
104
Acumuladores/EntradasUsadosResumenRep.aspx
Normal file
104
Acumuladores/EntradasUsadosResumenRep.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EntradasUsadosResumenRep.aspx.vb" Inherits="Acumuladores_RepEntradasUsados" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Usados
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnImprimir" OnClick="BtnImprimir_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-file-pdf-o'></i>Imprimir"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList Class="select2me" Width="200px" ID="DdlAlmacenes" data-metodo="getcliente" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssStyle="width: 100%;"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Inicial:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Final:</label>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" 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="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover ScrollAD "
|
||||
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="False" DataKeyNames="CvePSCargo,Codigo,Inicial,E_Almacen,E_Pub,E_Traspaso,E_Compra,E_Otros,S_Almacen,S_Traspaso,S_Otros,Exist_Actual">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Grupo" ReadOnly="true" />
|
||||
<asp:BoundField DataField="Inicial" HeaderText="Inicial" ReadOnly="true" />
|
||||
<asp:BoundField DataField="E_Almacen" HeaderText="E.Alm" ReadOnly="true" />
|
||||
<asp:BoundField DataField="E_Pub" HeaderText="E.Alm" ReadOnly="true" />
|
||||
<asp:BoundField DataField="E_Traspaso" HeaderText="E.Tras" ReadOnly="true" />
|
||||
<asp:BoundField DataField="E_Compra" HeaderText="E.Compra" ReadOnly="true" />
|
||||
<asp:BoundField DataField="E_Otros" HeaderText="Otros" ReadOnly="true" />
|
||||
<asp:BoundField DataField="S_Almacen" HeaderText="E.Alm" ReadOnly="true" />
|
||||
<asp:BoundField DataField="S_Traspaso" HeaderText="S.Tras" ReadOnly="true" />
|
||||
<asp:BoundField DataField="S_Otros" HeaderText="Otros" ReadOnly="true" />
|
||||
<asp:BoundField DataField="Exist_Actual" HeaderText="Exist. Actual" ReadOnly="true" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
66
Acumuladores/EntradasUsadosResumenRep.aspx.vb
Normal file
66
Acumuladores/EntradasUsadosResumenRep.aspx.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Acumuladores_RepEntradasUsados
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private DiasSemana(7) As String
|
||||
Private Meses(12) As String
|
||||
|
||||
Private Property DatosEntradasUsados() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DatosEntradasUsados"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DatosEntradasUsados") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load() Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
|
||||
txtFechaF.Text = Today
|
||||
CargarDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarDatos()
|
||||
DdlAlmacenes.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
DdlAlmacenes.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text, txtFechaF.Text) Then
|
||||
GvAcum.DataSource = ObjAcum.DtResultados
|
||||
DatosEntradasUsados = ObjAcum.DtResultados
|
||||
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
GvAcum.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
|
||||
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
|
||||
|
||||
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
params.Add(New ReportParameter("Direccion", "asdfasdfasdf"))
|
||||
params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
|
||||
params.Add(New ReportParameter("FechaInicial", txtFechaI.Text))
|
||||
params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados}
|
||||
|
||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepEntradasUsados2.rdlc", UsuarioActual.CveEmpresa), DatosEntradasUsados, params, "prueba", "PDF")
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
65
Acumuladores/RepEntradasUsadosClientes.aspx
Normal file
65
Acumuladores/RepEntradasUsadosClientes.aspx
Normal file
@@ -0,0 +1,65 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEntradasUsadosClientes.aspx.vb" Inherits="Acumuladores_RepEntradasUsadosClientes" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="col-md-1 truncate v-center" style="text-align: right!important">Almacen:</div>
|
||||
<div class="col-md-2 v-center">
|
||||
<asp:ListBox ID="DdlAlmacen" CssClass="form-control input-sm select2me" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="row v-center">
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Inicio:</div>
|
||||
<div class="col-md-1 v-center">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="text-align: right!important">Fecha Fin:</div>
|
||||
<div class="col-md-1 v-center">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:GridView runat="server" id="GvDatos"></asp:GridView>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
48
Acumuladores/RepEntradasUsadosClientes.aspx.vb
Normal file
48
Acumuladores/RepEntradasUsadosClientes.aspx.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports Extensiones
|
||||
Imports System
|
||||
|
||||
Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Sub Acumuladores_EntradasUsados_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub CargaCombos()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
TxtFechaI.text = now.Firstdayofmonth
|
||||
txtfechaf.text = now.toshortdatestring
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim FechaI, FechaF As Date
|
||||
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim.todate, minfecha)
|
||||
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim.todate, maxfecha)
|
||||
|
||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue = "", "-1", DdlAlmacen.SelectedValue).ToString.toentero
|
||||
|
||||
Dim Acum As New ClsAcumuladores
|
||||
|
||||
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.datasource = Acum.DtResultados
|
||||
End If
|
||||
|
||||
Acum.Dispose()
|
||||
GvDatos.databind
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -243,12 +243,38 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
Public Function EntradasUsadosGet(CveEmpresa As Integer, CveAlmacen As Integer, FechaInicial As Date, FechaFinal As Date) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_Acum_EntradasUsadosResumenRep")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@FechaInicial", SqlDbType.Date).Value = FechaInicial
|
||||
.Add("@FechaFinal", SqlDbType.Date).Value = FechaFinal
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
|
||||
OnError("Ocurrió un error al traerse el reporte de usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
End Try
|
||||
|
||||
Return retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " TIPOS DEFECTO "
|
||||
|
||||
|
||||
Public Function TiposDefectoGet(CveTipoDefecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
@@ -674,7 +700,7 @@ Public Class ClsAcumuladores
|
||||
|
||||
#Region "GARANTIAS DETALLES"
|
||||
|
||||
Public Function AddGarantiasDetalle(CveVentaDetalle 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,
|
||||
CveTipoDefecto As Integer, NumPoliza As String, Importe As Double,
|
||||
Consecutivo As String) As Boolean
|
||||
@@ -682,6 +708,7 @@ Public Class ClsAcumuladores
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
.Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso
|
||||
.Add("@CodigoEnsamble", SqlDbType.VarChar).Value = CodigoEnsamble
|
||||
@@ -840,11 +867,11 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function EntradasUsadosGet(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function EntradasUsadosClientesRep(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
|
||||
SqlDataAdapter("PA_Acum_EntradasUsadosGet")
|
||||
SqlDataAdapter("PA_Acum_EntradasUsadosClientesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
|
||||
@@ -1778,7 +1778,11 @@ Public Class ClsInventarios
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@Existencia").Value.ToString.ToDecimal()
|
||||
Me.CvePS = SqlAdapter.SelectCommand.Parameters("@CvePSRetorno").Value.ToString.ToEntero
|
||||
Catch Ex1 As SqlException
|
||||
Me.OnError("Ocurrió un error al obtener las existencias del producto.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
If Ex1.Message.Contains("deadlocked") Then
|
||||
Me.OnError("Ocurrió un error al obtener las existencias del producto. Puede intentarlo de nuevo", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al obtener las existencias del producto.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las existencias del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
@@ -3290,8 +3294,27 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function GetMovimientoMetodoNulo(CveMovimiento As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_MovimientoMetodoNulo")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@Valido", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = If(SqlAdapter.SelectCommand.Parameters("@Valido").Value.ToString.ToEntero = 1, True, False)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener El Costo del Producto/Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region " INVENTARIOS - COSTO PS "
|
||||
Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, SerieLote As String, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveTipoAlmacen As Integer = 1) As Decimal
|
||||
Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, SerieLote As String, FechaFin As Datetime, Optional CveSubProyecto As Integer = -1, Optional CveTipoAlmacen As Integer = 1) As Decimal
|
||||
Dim Retorno As Decimal = -1D
|
||||
DataAdapter("PA_Inv_PSCostoGet")
|
||||
|
||||
@@ -3300,7 +3323,7 @@ Public Class ClsInventarios
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||
.Add("@Costo", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -429,7 +429,7 @@ Public Class ClsModulos
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose ( que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
'ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -172,6 +172,25 @@ Public Class ClsNominas
|
||||
|
||||
#Region "ClsNominas_Nominas"
|
||||
|
||||
Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = ejercicio
|
||||
.Add("@Importe", SqlDbType.Float).Value = importe
|
||||
.Add("@CveTipoPeriodo", SqlDbType.Float).Value = CveTipoPeriodo
|
||||
.Add("@CvePeriodo", SqlDbType.Float).Value = CvePeriodo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Realizar el calculo del Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
|
||||
@@ -1890,6 +1909,102 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#Region "MovtosPermanentes"
|
||||
|
||||
Public Function GetMovtoPermanente(CveEmpresa As Int32, CvePersonal As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_GetMovtoPermanente", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
|
||||
.Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
|
||||
.Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
|
||||
.Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
|
||||
.Add("@valor", SqlDbType.Float).Value = (valor)
|
||||
.Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
|
||||
.Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
|
||||
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_UpMovtoPermanente", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
|
||||
.Add("@cveConcepto", SqlDbType.Int).Value = (cveConcepto)
|
||||
.Add("@cvePersonal", SqlDbType.Int).Value = (cvePersonal)
|
||||
.Add("@descripcion", SqlDbType.VarChar).Value = (descripcion)
|
||||
.Add("@tipoDescuento", SqlDbType.Int).Value = (tipoDescuento)
|
||||
.Add("@valor", SqlDbType.Float).Value = (valor)
|
||||
.Add("@vecesAplicar", SqlDbType.Int).Value = (vecesAplicar)
|
||||
.Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite)
|
||||
.Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion)
|
||||
.Add("@estatus", SqlDbType.Bit).Value = (estatus)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function RemoveMovtoPermanente(cveMovtoPermanente As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_RemoveMovtoPermanente", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveMovtoPermanente", SqlDbType.Int).Value = (cveMovtoPermanente)
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -4581,7 +4581,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
|
||||
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
|
||||
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
|
||||
PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
|
||||
'PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543)
|
||||
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
||||
|
||||
|
||||
'Antes de aquí.
|
||||
|
||||
@@ -1696,6 +1696,41 @@ Public Class ClsProductosServicios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdatePSPrecios(Importe As Decimal, CvePrecioLista As Integer, Porcentaje As Decimal, CvePS As Integer, CveUsuario As Integer, Fecha As DateTime, Fijo As Boolean, Optional PrecioMinimo As Decimal = Nothing) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_PSPrecioUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
If Importe = -1 Then
|
||||
.Add("@Importe", SqlDbType.Float).Value = DBNull.Value
|
||||
Else
|
||||
.Add("@Importe", SqlDbType.Float).Value = Importe
|
||||
End If
|
||||
|
||||
If Porcentaje = -1 Then
|
||||
.Add("@Porcentaje", SqlDbType.Money).Value = DBNull.Value
|
||||
Else
|
||||
.Add("@Porcentaje", SqlDbType.Money).Value = Porcentaje
|
||||
End If
|
||||
|
||||
.Add("@PrecioMinimo", SqlDbType.Decimal).Value = PrecioMinimo
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@Fijo", SqlDbType.Bit).Value = Fijo
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar los precios de lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetPSPrecioLista(CvePS As Integer, CveEmpresa As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -131,7 +131,8 @@ Public Class ClsRH
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
|
||||
@@ -143,6 +144,12 @@ Public Class ClsRH
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
.Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
|
||||
.Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
|
||||
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
|
||||
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
|
||||
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -161,7 +168,8 @@ Public Class ClsRH
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer) As Boolean
|
||||
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
|
||||
@@ -172,6 +180,12 @@ Public Class ClsRH
|
||||
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAI
|
||||
|
||||
.Add("@AplicaVacacion", SqlDbType.Bit).Value = chkAplicaVacacion
|
||||
.Add("@AplicaIncapacidad", SqlDbType.Bit).Value = chkAplicaIncapacidad
|
||||
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
|
||||
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
|
||||
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2344,13 +2344,14 @@ Public Class ClsVentas
|
||||
|
||||
|
||||
#Region " ANTICIPOS/NOTASCREDITO - VENTAS "
|
||||
Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer) As Boolean
|
||||
Public Function GetVentasAntNC(CveVenta As Integer, CveVentaNC As Integer, Optional AplicaAmortizacion As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasAntNCGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveVentaNC", SqlDbType.Int).Value = CveVentaNC
|
||||
.Add("@AplicaAmortizacion", SqlDbType.Bit).Value = AplicaAmortizacion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -491,6 +491,10 @@ Namespace Modelos
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion:=EsNCAmortizacion) Then
|
||||
Me.DtAnticipos = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -501,12 +505,6 @@ Namespace Modelos
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'Dim ObjMovtos As New ClsMovimientos()
|
||||
'If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda) Then
|
||||
' Me.DtAnticipos = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(TipoDocto = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
'End If
|
||||
'ObjMovtos.Dispose()
|
||||
|
||||
If Me.RealizarDevolucionAlmacen Then
|
||||
Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta
|
||||
End If
|
||||
@@ -1349,7 +1347,7 @@ Namespace Modelos
|
||||
'Ajustes'
|
||||
If DtAjustes IsNot Nothing AndAlso DtAjustes.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In DtAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").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("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||
@@ -2335,12 +2333,12 @@ Namespace Modelos
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso ValorMultiplicador = -1 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAntNCVinculadas.Rows
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs") AndAlso ValorMultiplicador = -1 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
CveIEAnticipo = -1
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
@@ -2358,38 +2356,40 @@ Namespace Modelos
|
||||
Next
|
||||
End If
|
||||
|
||||
'cuando es anticipo
|
||||
' cuando es amortización de nota de crédito, y es la nc
|
||||
' cuando es amortización por descuento, y es el ingreso
|
||||
' cuando es amortización en cero
|
||||
If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
|
||||
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 3 Then
|
||||
CveIEAnticipo = row2("CveIE").ToString.ToEntero
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString.ToEntero,
|
||||
CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo,
|
||||
ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||
CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If ValorMultiplicador = 1 Then
|
||||
'cuando es anticipo
|
||||
' cuando es amortización de nota de crédito, y es la nc
|
||||
' cuando es amortización por descuento, y es el ingreso
|
||||
' cuando es amortización en cero
|
||||
If ObjFactura.CveTipoAmortizacionAnticipo = 2 AndAlso ObjFactura.TipoDocto.Contiene("Egs") OrElse
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
|
||||
CveIEAnticipo = -1
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal()
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
|
||||
CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo,
|
||||
ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta,
|
||||
CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
'Cuando la funcionalidad de amortizacion en PS esta activa
|
||||
If Not ErrorPrepoliza Then
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS = {ObjFactura.CvePSAmortizacion}")
|
||||
@@ -2667,7 +2667,7 @@ Namespace Modelos
|
||||
|
||||
importeMovimiento = 0
|
||||
Case 150 'Descuento sobre ventas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
||||
|
||||
Dim ConceptoContableAplicar = 150
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
@@ -3858,6 +3858,13 @@ Namespace Modelos
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then
|
||||
Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados."
|
||||
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
|
||||
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
'SI LA REMISION ESTA FACTURADA NO SE PUEDE CANCELAR
|
||||
If ObjFactura.TipoDocto = "Rem" Then
|
||||
Dim ObjV As New ClsVentas
|
||||
@@ -4283,11 +4290,6 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
|
||||
If Not GeneraMovimientosVirtuales(CveVenta, ObjInventario) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
Else
|
||||
'UTILIZA LA DEVOLUCION YA REALIZADA
|
||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
@@ -4298,6 +4300,12 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
|
||||
If Not GeneraMovimientosVirtuales(CveVenta, ObjInventario) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
|
||||
'DEVOLUCION REMISION - REGRESA LAS EXISTENCIAS A ENTREGA POR ADELANTADO SI LA FACTURA VIENE DE REMISION
|
||||
If Not ErrorCancelar AndAlso RevivirRemisiones Then
|
||||
If Not GeneraMovimientosEntregaPorAdelantadoRemision(CveMovimiento, ObjVentas, ObjInventario, DtDevRem, ListaRemisionesCancelar) Then
|
||||
@@ -5057,6 +5065,8 @@ Namespace Modelos
|
||||
Public Property SaldoVentaDevolucion As Decimal
|
||||
Public Property Saldo As Decimal
|
||||
Public Property SaldoAlmacen As Decimal
|
||||
Public Property SaldoAnticipo As Decimal
|
||||
Public Property SaldoAmortizado As Decimal
|
||||
Public Property CvePAC As Integer
|
||||
Public Property CveAnticipo As Integer
|
||||
Public Property RemisionesLista As List(Of Integer)
|
||||
@@ -5544,6 +5554,7 @@ Namespace Modelos
|
||||
Public Property CveVentaRelacion As Integer = -1
|
||||
Public Property ImporteRelacion As Decimal
|
||||
|
||||
Public Property EsNCAmortizacion As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -9736,6 +9747,119 @@ Namespace Modelos
|
||||
Public Property RequierePersonal As Boolean
|
||||
Public Property EsAcumulador As Boolean
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Public Class MPolizaVentaLTHWSD
|
||||
Public Property customer_name As String
|
||||
Public Property customer_last_name1 As String
|
||||
Public Property customer_last_name2 As String
|
||||
Public Property customer_birthday As DateTime
|
||||
Public Property customer_phone As String
|
||||
Public Property customer_email As String
|
||||
Public Property customer_gender As String
|
||||
Public Property customer_advertising As Boolean
|
||||
Public Property sale_date As DateTime
|
||||
Public Property sale_paidby As String
|
||||
Public Property sale_type As String
|
||||
Public Property sale_type_service As String
|
||||
Public Property product_code As String
|
||||
Public Property product_unique_code As String
|
||||
Public Property product_sale_type As String
|
||||
Public Property used_product As Boolean
|
||||
Public Property used_brand As String
|
||||
Public Property used_bci As String
|
||||
Public Property used_month As Integer
|
||||
Public Property used_year As Integer
|
||||
Public Property used_sale_date As DateTime
|
||||
Public Property customer_car_brand As String
|
||||
Public Property customer_car_model As String
|
||||
Public Property customer_car_year As Integer
|
||||
Public Property sale_discount As Decimal
|
||||
Public Property sale_id As String
|
||||
End Class
|
||||
Public Class MPolizaVentaWS
|
||||
Public Property customer_name As String
|
||||
Public Property customer_last_name1 As String
|
||||
Public Property customer_last_name2 As String
|
||||
Public Property customer_birthday As DateTime
|
||||
Public Property customer_phone As String
|
||||
Public Property customer_email As String
|
||||
Public Property customer_gender As String
|
||||
Public Property customer_advertising As Boolean
|
||||
Public Property sale_date As DateTime
|
||||
Public Property sale_paidby As String
|
||||
Public Property sale_type As String
|
||||
Public Property sale_type_service As String
|
||||
Public Property sale_total As Decimal
|
||||
Public Property product_code As String
|
||||
Public Property product_unique_code As String
|
||||
Public Property product_sale_type As String
|
||||
Public Property used_product As Boolean
|
||||
Public Property used_brand As String
|
||||
Public Property used_bci As String
|
||||
Public Property used_month As Integer
|
||||
Public Property used_year As Integer
|
||||
Public Property used_sale_date As DateTime
|
||||
Public Property customer_car_brand As String
|
||||
Public Property customer_car_model As String
|
||||
Public Property customer_car_year As Integer
|
||||
Public Property sale_discount As Decimal
|
||||
Public Property sale_id As String
|
||||
End Class
|
||||
Public Class MIndicador
|
||||
|
||||
Sub New(Optional UsaValoresPrueba As Boolean = False)
|
||||
If UsaValoresPrueba Then
|
||||
Dim Index As Integer = 0
|
||||
For Each p As Reflection.PropertyInfo In Me.GetType().GetProperties()
|
||||
Index = Index + 1
|
||||
p.SetValue(Me, Convert.ChangeType(Index, p.PropertyType), Nothing)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Property v_b_optima As Integer
|
||||
Public Property v_b_fullpower As Integer
|
||||
Public Property v_b_hitec As Integer
|
||||
Public Property v_b_agm As Integer
|
||||
Public Property v_b_suv As Integer
|
||||
Public Property v_b_taxi As Integer
|
||||
Public Property v_b_america As Integer
|
||||
Public Property v_b_lth As Integer
|
||||
Public Property v_b_cronos As Integer
|
||||
Public Property v_b_diener As Integer
|
||||
Public Property v_b_heavyduty As Integer
|
||||
Public Property v_m_lth As Integer
|
||||
Public Property v_o_filtros As Integer
|
||||
Public Property v_o_lub1 As Integer
|
||||
Public Property v_o_lubgalon As Integer
|
||||
Public Property v_o_lub5 As Integer
|
||||
Public Property v_o_aa As Integer
|
||||
Public Property v_o_aaa As Integer
|
||||
Public Property g_b_optima As Integer
|
||||
Public Property g_b_fullpower As Integer
|
||||
Public Property g_b_hitec As Integer
|
||||
Public Property g_b_agm As Integer
|
||||
Public Property g_b_suv As Integer
|
||||
Public Property g_b_taxi As Integer
|
||||
Public Property g_b_america As Integer
|
||||
Public Property g_b_lth As Integer
|
||||
Public Property g_b_cronos As Integer
|
||||
Public Property g_b_diener As Integer
|
||||
Public Property g_b_heavyduty As Integer
|
||||
Public Property g_m_lth As Integer
|
||||
Public Property a_b_optima As Integer
|
||||
Public Property a_b_fullpower As Integer
|
||||
Public Property a_b_hitec As Integer
|
||||
Public Property a_b_agm As Integer
|
||||
Public Property a_b_suv As Integer
|
||||
Public Property a_b_taxi As Integer
|
||||
Public Property a_b_america As Integer
|
||||
Public Property a_b_lth As Integer
|
||||
Public Property a_b_cronos As Integer
|
||||
Public Property a_b_diener As Integer
|
||||
Public Property a_b_heavyduty As Integer
|
||||
End Class
|
||||
#End Region
|
||||
End Namespace
|
||||
@@ -367,9 +367,9 @@ Namespace Extensiones
|
||||
End Sub
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
Public Sub OnError(Obj As Object, Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "", Optional TipoMensaje As TipoMensaje = TipoMensaje.MsgError)
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
Alert(Obj, Mensaje, TipoMensaje.MsgError)
|
||||
Alert(Obj, Mensaje, TipoMensaje)
|
||||
If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
OrdenaDatos()
|
||||
' OrdenaDatos()
|
||||
End Sub
|
||||
Public Sub CargaDatosPoliza(CvePlantillaPoliza As Integer)
|
||||
Dim ObjPlantillaPolizas As New ClsContabilidad
|
||||
|
||||
@@ -371,15 +371,15 @@ Partial Class General_SaldosIniciales
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not dt.Columns(12).ColumnName = "Servicio" Then
|
||||
Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not dt.Columns(12).ColumnName = "Servicio" Then
|
||||
' Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then
|
||||
Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not dt.Columns(13).ColumnName = "Conversion Unidad" Then
|
||||
' Alert("El nombre de la catorceava columna debe ser 'Conversion Unidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
ElseIf RblFormato.SelectedValue = "6" Then
|
||||
If Not dt.Columns(0).ColumnName = "Código" Then
|
||||
@@ -669,8 +669,8 @@ Partial Class General_SaldosIniciales
|
||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||
Dim Tamaño As String = Row("Tamaño").ToString.Trim
|
||||
Dim SATClavePS As String = Row("Código SAT").ToString.Trim
|
||||
Dim Clasificacion2 As String = Row("Servicio").ToString.Trim
|
||||
Dim Litraje As Double = Row("Conversion Unidad").ToString.ToDouble
|
||||
Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString.Trim, "")
|
||||
Dim Litraje As Double = If(dt.Columns.Contains("Conversion Unidad"), Row("Conversion Unidad").ToString.ToDouble, 0)
|
||||
Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "")
|
||||
Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "")
|
||||
Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "")
|
||||
|
||||
@@ -81,23 +81,22 @@ Partial Class Inicio
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
divInd.Visible = True
|
||||
CargaSubProyectos()
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(271) Then MuestraVentasPUE()
|
||||
End If
|
||||
|
||||
'Ventas no timbradas por centro de costo
|
||||
If UsuarioActual.TienePermisoProceso(208) Then MuestraNoTimbradasCentroCosto()
|
||||
|
||||
'Reporte facaturas pendientes por autorizar Oscar 2016-07-06
|
||||
If UsuarioActual.TienePermisoProceso(158) Then
|
||||
RegistraScript("$( document ).ready(function() { AbrirVentana('/Compras/PopUpFacturasPendientesAutorizar.aspx');});", "repFacturas")
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(271) Then MuestraVentasPUE()
|
||||
If UsuarioActual.TienePermisoProceso(270) Then MuestraComprasPUE()
|
||||
|
||||
Dim EsDEV = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString.Contains("Desarrollo2017")
|
||||
Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion
|
||||
If Not EsDEV Then
|
||||
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100) Then MuestraInconsistencias() '100
|
||||
End If
|
||||
|
||||
'Ventas no timbradas por centro de costo
|
||||
If UsuarioActual.TienePermisoProceso(208) Then MuestraNoTimbradasCentroCosto()
|
||||
|
||||
|
||||
'Reporte facaturas pendientes por autorizar Oscar 2016-07-06
|
||||
If UsuarioActual.TienePermisoProceso(158) Then
|
||||
RegistraScript("$( document ).ready(function() { AbrirVentana('/Compras/PopUpFacturasPendientesAutorizar.aspx');});", "repFacturas")
|
||||
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100) Then MuestraInconsistencias() '100
|
||||
End If
|
||||
|
||||
'MUESTRA CALENDARIO SOLO ROL ADMINISTRADOR-AD
|
||||
|
||||
@@ -113,7 +113,6 @@
|
||||
<label class="col-md-1 truncate" style="width:120px">Producto:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlExistencia" runat="server" CssClass="select2me">
|
||||
<asp:ListItem Text="Todos" Value="1" />
|
||||
<asp:ListItem Text="Con existencia" Value="2" />
|
||||
<asp:ListItem Text="Sin existencia" Value="3" />
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -301,10 +301,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteDesarmado.SelectedValue.ToEntero).FiltroPrimeroValor("CveUM").ToEntero
|
||||
CveVendedor = If(RowApartadosDesarmado.Visible, DdlVendedorDesarmado.SelectedValue.ToEntero, -1)
|
||||
CveCliente = If(RowClienteDesarmado.Visible, DdlClienteDesarmado.SelectedValue.ToEntero, -1)
|
||||
Dim FechaFin As String = TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, CveUMTemp, UsuarioActual.CveEmpresa, DdlAlmacenDesarmado.SelectedValue.ToEntero, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
Dim CostoPromedio = ObjInventarios.GetCostoPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenDesarmado.SelectedValue.ToEntero, "-1", TxtFechaDesarmado.Text.ToDate)
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, CveUMTemp, UsuarioActual.CveEmpresa, DdlAlmacenDesarmado.SelectedValue.ToEntero, FechaMovto:=FechaFin, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
Dim CostoPromedio = ObjInventarios.GetCostoPS(DdlPaqueteDesarmado.SelectedValue.ToEntero, TxtCantidadDesarmado.Text.ToDouble, DdlAlmacenDesarmado.SelectedValue.ToEntero, "-1", FechaFin.ToDate, CveTipoAlmacen:=-1)
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If Existencia - TxtCantidadDesarmado.Text.ToDouble < 0 Then
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
<div id="DivVirtualAdvertencia" visible="false" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal Text="" runat="server" ID="Literal1"></asp:Literal>
|
||||
<asp:Literal Text="La mercancía sera trasladada al almacén virtual" runat="server"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2261,10 +2261,38 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End If
|
||||
End If
|
||||
|
||||
'QUEMAR REMISIONES
|
||||
If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
|
||||
Dim DtDevRem As New DataTable
|
||||
|
||||
'CARGA REMISIONES DE LA VENTA DEVUELTA
|
||||
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
|
||||
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0")
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If DtDevRem.Rows.Count > 0 Then
|
||||
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows
|
||||
If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString.ToEntero, 2) Then
|
||||
TextoError = "Ocurrió un error al hacer la devolución hacia la remision. Por favor vuelva a intentar."
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
TextoError = "Ocurrió un error al hacer la devolucion a remisión. Por favor vuelva a intentar."
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'QUEMA DEVOLUCION | QUEMA = LA QUITA DE PENDIENTE POR RECIBIR (DEVOLVER)
|
||||
If Not ErrorMovInv And EsDevolucionVenta = 1 Then
|
||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveVentaSurtir) Then
|
||||
TextoError = "Ocurrió un error al hacer la devolucion. Por favor vuelva a intentar."
|
||||
TextoError = "Ocurrió un error al hacer la devolución. Por favor vuelva a intentar."
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<label class="col-md-1 truncate" style="width: 110px">Movimiento:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:RadioButtonList runat="server" ID="RBLOpcion" RepeatDirection="Horizontal" AutoPostBack="true" Font-Size="18pt">
|
||||
<asp:ListItem Selected="True" Value="2">Entrada</asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="42">Entrada</asp:ListItem>
|
||||
<asp:ListItem Value="3">Salida</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
|
||||
@@ -1066,10 +1066,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
For Each Dr As DataRow In DtMovimientos.Rows
|
||||
|
||||
If CveConcepto = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
|
||||
Else
|
||||
ImporteConcepto = Dr("PU").ToString.ToDouble
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -1083,10 +1083,10 @@ Partial Class Inventarios_RecepcionUsados
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
'si es selectedvalue = 2, es entrada ,3 -salida
|
||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2)
|
||||
'si es selectedvalue = 42, es entrada ,3 -salida
|
||||
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
|
||||
|
||||
If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then
|
||||
If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor Then
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
|
||||
|
||||
@@ -1,19 +1,118 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Aguinaldo.aspx.vb" Inherits="Nomina_Aguinaldo" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Aguinaldo.aspx.cs" Inherits="Nomina_Aguinaldo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<script>$('body').removeClass('rhumanosbody').addClass('rhumanosbody')</script>
|
||||
Aguinaldo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 60px !important;">Ejercicio: </label>
|
||||
<div class="col-md-2" style="width: 140px !important;">
|
||||
<asp:DropDownList ID="DdlEjercicios" DataTextField="Ejercicio" DataValueField="Ejercicio" runat="server" width="100%" CssClass="select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 120px !important;">Tipo Período: </label>
|
||||
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" CssClass="select2me" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 60px !important;"> </label>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button ID="BtnCalcular" runat="server" Text="Calcular" OnClick="BtnCalcular_Click" class="btn btn-primary" />
|
||||
<asp:Button ID="LnkAutorizarModal" runat="server" Text="Autorizar" OnClick="LnkAutorizarModal_Click" Visible="false" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="upDatosPA_N" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVCalcularAguinaldo" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVCalcularUtilidades" AutoGenerateColumns="False"
|
||||
DataKeyNames="Nombre,CvePersonal">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Nombre ">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Días Laborados">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbldiasLaborados" runat="server" Text='<%# Eval("DiasLaborados")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Días Aguinaldo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbldiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Salario Diario">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsueldoDiario" runat="server" Text='<%# Eval("SalarioDiario", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aguinaldo Completo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblsueldoAguinaldoCompleto" runat="server" Text='<%# Eval("AguinaldoCompleto", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aguinaldo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAguinaldo" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign ="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- <asp:TemplateField HeaderText="Gravadas">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbluGravadas" runat="server" Text='<%# Eval("UGravadas", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="ISR">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbluisr" runat="server" Text='<%# Eval("Uisr", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="UTilidades por Pagar">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbluporPagar" runat="server" Text='<%# Eval("UporPagar", "${0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
71
Nomina/Aguinaldo.aspx.cs
Normal file
71
Nomina/Aguinaldo.aspx.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Nomina_Aguinaldo : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
private DataTable DTAguinaldos
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTAguinaldos"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DTAguinaldos"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
|
||||
objnom.GetEjercicios(UsuarioActual.CveEmpresa);
|
||||
DdlEjercicios.DataSource = objnom.DtResultados;
|
||||
}
|
||||
DdlEjercicios.DataBind();
|
||||
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
|
||||
DdlTipoPeriodo.DataBind();
|
||||
DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
if (DdlTipoPeriodo.Items.Count > 0)
|
||||
{
|
||||
DdlTipoPeriodo.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void BtnCalcular_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||
int CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
||||
int CvePeriodo = -1;
|
||||
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
objnom.GetCalculoAguinaldo(ejercicio, UsuarioActual.CveEmpresa, 0, CveTipoPeriodo, CvePeriodo);
|
||||
DTAguinaldos = objnom.DtResultados;
|
||||
GVCalcularAguinaldo.DataSource = DTAguinaldos;
|
||||
}
|
||||
|
||||
GVCalcularAguinaldo.DataBind();
|
||||
LnkAutorizarModal.Visible = true;
|
||||
upDatosPA_N.Update();
|
||||
}
|
||||
|
||||
protected void LnkAutorizarModal_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
Partial Class Nomina_Aguinaldo
|
||||
Inherits ClsPaginas
|
||||
|
||||
End Class
|
||||
@@ -190,7 +190,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporte" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID="DdlConcepto"></asp:Label>
|
||||
<asp:Label runat="server" Text="Importe:" AssociatedControlID="TxtImporte"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -68,15 +68,15 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HypModalNomina" data-target="#DModalNominas" data-toggle="modal" runat="server">Cargar Nomina</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerTablas" OnClick="LnkVerTablas_Click" runat="server">Tablas</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkListaRaya" OnClick="LnkListaRaya_Click" runat="server">Lista de Raya</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -782,7 +782,157 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabMovtosPermanentes" runat="server" HeaderText="Movimientos Permanentes">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpMovtosPermanentes" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="portlet light xspadding bordered " id="pnlListMovtos">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Movimientos</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkAddMovtoPermanente" OnClick="LnkAddMovtoPermanente_Click" CssClass="btn yellow-gold" runat="server">Agregar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
|
||||
<asp:GridView ID="GVMovtoPermanente" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall " AutoGenerateColumns="False"
|
||||
ShowHeader ="false" EmptyDataText="No se encontraron Movimientos"
|
||||
DataKeyNames="CveMovtoPermanente,CveConcepto,CvePersonal,Descripcion,TipoDescuento,Valor,VecesAplicar,MontoLimite,FechaInicioAplicacion,Estatus,FechaRegistro">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditarMovtoPermanente_Click"
|
||||
CssClass="lnkMovotPermanente" runat="server" Text='<%# Eval("Descripcion")%>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Panel runat="server" Visible="false" CssClass="portlet light xspadding bordered " ID="pnlAddupMovto">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="icon-pin font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">
|
||||
<asp:Literal ID="LtlMovtoPermanenteaddup" runat="server"></asp:Literal></span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body ">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario "
|
||||
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Descripción:" AssociatedControlID="TxtDescripcion"></asp:Label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Tipo Concepto:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlTipo" runat="server" AppendDataBoundItems="True" OnSelectedIndexChanged="DdlTipo_SelectedIndexChanged" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="TipoGasto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="P" Text="Percepciones"></asp:ListItem>
|
||||
<asp:ListItem Value="D" Selected ="True" Text="Deducciones"></asp:ListItem>
|
||||
<asp:ListItem Value="O" Text="Obligaciones"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Concepto:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlConcepto" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Tipo Descuento:" AssociatedControlID=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlTipoDescto" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoDescto_SelectedIndexChanged" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Porcentaje"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Importe(Tope Monto)"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Porcentaje(Tope Monto)"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtValor" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvValor" runat="server" ControlToValidate="TxtValor" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Valor''</b> es necesario "
|
||||
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Valor:" AssociatedControlID="TxtValor"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Panel runat="server" ID="pnlVecesAplicar" CssClass="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvVecesAplicar" runat="server" ControlToValidate="TxtVecesAplicar" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Veces por Aplicar''</b> es necesario "
|
||||
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Veces por Aplicar:" AssociatedControlID="TxtVecesAplicar"></asp:Label>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<asp:Panel runat="server" ID="pnlMonto" CssClass="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMontoLimite" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvMontoLimite" runat="server" ControlToValidate="TxtMontoLimite" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Monto Limite''</b> es necesario "
|
||||
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Monto Limite:" AssociatedControlID="TxtMontoLimite"></asp:Label>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFechaAplicacion" runat="server" CausesValidation="True" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario "
|
||||
ValidationGroup="GrpGuardarMovyoPerma"></asp:RequiredFieldValidator>
|
||||
<asp:Label runat="server" Text="Fecha de Aplicación: " AssociatedControlID="TxtFechaAplicacion"></asp:Label>
|
||||
<ajax:MaskedEditExtender ID="MKEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MKEFechaBaja" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEFechaAplicacion" runat="server" TargetControlID="TxtFechaAplicacion" PopupButtonID="ImgFechaBaja" PopupPosition="BottomRight" BehaviorID="_content_CEFechaBaja"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaAplicacion" runat="server" ControlToValidate="TxtFechaAplicacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar" Visible="False"></asp:CompareValidator>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">Activo?</div>
|
||||
<div class="col-md-3">
|
||||
<asp:CheckBox ID="ChkEstatus" CssClass="chksino " Text=" " runat="server" /></div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkAddMovto" OnClick="LnkAddMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-primary" runat="server">Agregar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkUpMovto" OnClick="LnkUpMovto_Click" ValidationGroup="GrpGuardarMovyoPerma" CssClass="btn btn-success" runat="server">Actualizar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
@@ -810,7 +960,7 @@
|
||||
<div class="modal-body">
|
||||
|
||||
<ajax:TabContainer ID="TabTablas" runat="server" Width="100%">
|
||||
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible ="false">
|
||||
<ajax:TabPanel ID="TTAntiguedad" runat="server" HeaderText="Antiguedad" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="gvAntigudad" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -820,18 +970,18 @@
|
||||
<asp:GridView ID="GVFactorDesctInfonavit" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible ="false">
|
||||
<ajax:TabPanel ID="TTFactorSDI" runat="server" HeaderText="Factor SD" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVFactorSDI" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible ="false">
|
||||
|
||||
<ajax:TabPanel ID="TTFiniquito" runat="server" HeaderText="Finiquito" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVFiniquito" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible ="false">
|
||||
<ajax:TabPanel ID="TTRepartoMonetario" runat="server" HeaderText="RepartoMonetario" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVRepartoMonetario" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -851,7 +1001,7 @@
|
||||
<asp:GridView ID="GVInfonavitSegViv" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible ="false">
|
||||
<ajax:TabPanel ID="TTVigISRAnual" runat="server" HeaderText="ISR Anual" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVVigISRAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -861,7 +1011,7 @@
|
||||
<asp:GridView ID="GVVigISRMensual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible ="false">
|
||||
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" Visible="false">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -899,7 +1049,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
||||
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
||||
-No se debe editar el nombre de la hoja 'Nomina'.<br />
|
||||
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
|
||||
-si desea agregar un empleado que no se encuentre en la lista solo debe de ingresar fila y el codigo del empleado.<br />
|
||||
|
||||
@@ -93,6 +93,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
set { ViewState["CvePeriodoSeleccionado"] = value; }
|
||||
}
|
||||
|
||||
protected int CcveMovtoPermanente
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CcveMovtoPermanente"] == null) { return 0; }
|
||||
else { return ViewState["CcveMovtoPermanente"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CcveMovtoPermanente"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -912,6 +923,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LblEmpleado.Text = Nombre;
|
||||
TabPersonal.ActiveTabIndex = 0;
|
||||
mostrarConceptos();
|
||||
pnlAddupMovto.Visible = false;
|
||||
CargaMovtoPermanente();
|
||||
RegistraScript("$('#ModalConceptos').modal();");
|
||||
}
|
||||
private void mostrarConceptos()
|
||||
@@ -1461,7 +1474,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string strFechaFin = "";
|
||||
string strTipo = "";
|
||||
string strPeriodoNum = "";
|
||||
string strUbicacion = string.Format ("{0}, {1}, {2}, {3}",UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado );
|
||||
string strUbicacion = string.Format("{0}, {1}, {2}, {3}", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado);
|
||||
string strRegPatImss = "";
|
||||
string strRFC = UsuarioActual.Empresa.RFC;
|
||||
string strfecha = DateTime.Now.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
||||
@@ -1472,11 +1485,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DataRow rperiodo = dtPeriodos.FiltroPrimero(string.Format("CvePeriodo = {0}", CvePeriodo));
|
||||
if (rperiodo != null)
|
||||
{
|
||||
strFechaInicio =string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
|
||||
strFechaInicio = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]);
|
||||
strFechaFin = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaFin"]);
|
||||
strPeriodoNum = rperiodo["Numero"].ToString();
|
||||
|
||||
strTipo = DdlTipoPeriodo.SelectedItem.Text ;
|
||||
strTipo = DdlTipoPeriodo.SelectedItem.Text;
|
||||
}
|
||||
listaTags.Add(new TagsDocumentos("[Empresa]", strEmpresa));
|
||||
listaTags.Add(new TagsDocumentos("[FechaInicio]", strFechaInicio));
|
||||
@@ -1526,7 +1539,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string SalarioDiariop = "";
|
||||
string FechaIngreso = "", Nombre = "", DiasLaborados = "";*/
|
||||
|
||||
paragraphh = new GemBox.Document.Paragraph(document,string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh);
|
||||
paragraphh.ParagraphFormat.Style = styilostrong;
|
||||
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"])); cell.Blocks.Add(paragraphh);
|
||||
@@ -1625,7 +1638,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero();
|
||||
importe = string.Format("${0:N2}", rowconcept["Importe"]);
|
||||
valor = string.Format("{0:#,###.##}", rowconcept["Valor"]);
|
||||
|
||||
|
||||
Concepto = "";
|
||||
|
||||
rowconcept = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", CveConcepto));
|
||||
@@ -1668,7 +1681,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = "";valor = "";
|
||||
CveConcepto = 0; Concepto = ""; importe = ""; Codigo = ""; valor = "";
|
||||
|
||||
|
||||
rowconcept = dtempleadosConceptos.FiltroPrimero(string.Format("CvePersonal={0} AND Tipo =2 AND Fila ={1}", CvePersonal, cindex));
|
||||
@@ -2122,7 +2135,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
paragraphh = new GemBox.Document.Paragraph(document, string.Format("{0:N0}", dtempleados.COUNT("CvePersonal", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right;
|
||||
paragraphh.ParagraphFormat.Style = styilo;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
||||
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
||||
@@ -2556,7 +2569,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//basura para espacio
|
||||
{
|
||||
rowx = new GemBox.Document.Tables.TableRow(document);
|
||||
tconeptos.Rows.Add(rowx);
|
||||
tconeptos.Rows.Add(rowx);
|
||||
{
|
||||
cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx);
|
||||
cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage);
|
||||
@@ -2852,4 +2865,164 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
ImprimirReporte();
|
||||
}
|
||||
#region Movtos Permanentes
|
||||
|
||||
protected void CargaTipoConcepto()
|
||||
{
|
||||
//DdlTipo.Items.Insert(0, new ListItem("Percepciones", "P"));
|
||||
//DdlTipo.Items.Insert(1, new ListItem("Deducciones", "D"));
|
||||
//DdlTipo.Items.Insert(2, new ListItem("Obligaciones", "O"));
|
||||
//DdlTipo.SelectedValueExist("-1");
|
||||
CargaConcepto();
|
||||
}
|
||||
|
||||
protected void CargaConcepto()
|
||||
{
|
||||
DdlConcepto.Items.Clear();
|
||||
if (DdlTipo.SelectedValue == "-1")
|
||||
{
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa);
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlConcepto.DataSource = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("Tipo ='{0}'", DdlTipo.SelectedValue));
|
||||
}
|
||||
DdlConcepto.DataBind();
|
||||
DdlConcepto.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlConcepto.SelectedValueExist("-1");
|
||||
}
|
||||
private void CargaMovtoPermanente()
|
||||
{
|
||||
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
ObjMovt.GetMovtoPermanente(UsuarioActual.CveEmpresa, SRCvePersonal);
|
||||
GVMovtoPermanente.DataSource = ObjMovt.DtResultados;
|
||||
|
||||
}
|
||||
GVMovtoPermanente.DataBind();
|
||||
UpMovtosPermanentes.Update();
|
||||
}
|
||||
protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaConcepto();
|
||||
}
|
||||
|
||||
protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaConcepto();
|
||||
DdlTipoDescto_SelectedIndexChanged(null, null);
|
||||
pnlAddupMovto.Visible = true;
|
||||
LnkAddMovto.Visible = true;
|
||||
LnkUpMovto.Visible = false;
|
||||
LtlMovtoPermanenteaddup.Text = "Agregar Movimiento";
|
||||
|
||||
TxtDescripcion.Text = "";
|
||||
TxtValor.Text = "";
|
||||
TxtVecesAplicar.Text = "";
|
||||
TxtMontoLimite.Text = "";
|
||||
TxtFechaAplicacion.Text = "";
|
||||
ChkEstatus.Visible = true;
|
||||
}
|
||||
|
||||
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
||||
{
|
||||
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||
string descripcion = TxtDescripcion.Text;
|
||||
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
|
||||
double valor = TxtValor.Text.ToDouble();
|
||||
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
bool estatus = ChkEstatus.Checked;
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
Continuar = ObjMovt.AddMovtoPermanente(cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
|
||||
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
|
||||
CargaMovtoPermanente();
|
||||
UpMovtosPermanentes.Update();
|
||||
this.Alert("El Movto_Permanente Se ha agregado");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void LnkUpMovto_Click(object sender, EventArgs e)
|
||||
{
|
||||
int cveConcepto = DdlConcepto.SelectedValue.ToEntero();
|
||||
string descripcion = TxtDescripcion.Text;
|
||||
int tipoDescuento = DdlTipoDescto.SelectedValue.ToEntero();
|
||||
double valor = TxtValor.Text.ToDouble();
|
||||
int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
|
||||
decimal montoLimite = TxtMontoLimite.Text.ToDecimal();
|
||||
string fechaInicioAplicacion = TxtFechaAplicacion.Text.ToDate().ToString("yyyy/MM/dd");
|
||||
bool estatus = ChkEstatus.Checked;
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
Continuar = ObjMovt.UpMovtoPermanente(CcveMovtoPermanente, cveConcepto, SRCvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus);
|
||||
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
this.RegistraScript("$('#DModalMovtoPermanente').modal('hide');");
|
||||
CargaMovtoPermanente();
|
||||
UpMovtosPermanentes.Update();
|
||||
this.Alert("El Movto_Permanente Se ha agregado");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void DdlTipoDescto_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
pnlMonto.Visible = DdlTipoDescto.SelectedValue.ToEntero() > 2;
|
||||
pnlVecesAplicar.Visible = DdlTipoDescto.SelectedValue.ToEntero() < 3;
|
||||
}
|
||||
|
||||
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero();
|
||||
int cveConcepto = gvRow.DataKey("CveConcepto").ToEntero();
|
||||
int cvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
string descripcion = gvRow.DataKey("Descripcion");
|
||||
int tipoDescuento = gvRow.DataKey("TipoDescuento").ToEntero();
|
||||
double valor = gvRow.DataKey("Valor").ToDouble();
|
||||
int vecesAplicar = gvRow.DataKey("VecesAplicar").ToEntero();
|
||||
decimal montoLimite = gvRow.DataKey("MontoLimite").ToDecimal();
|
||||
DateTime fechaInicioAplicacion = gvRow.DataKey("FechaInicioAplicacion").ToDate();
|
||||
bool estatus = gvRow.DataKey("Estatus") == "1" || gvRow.DataKey("Estatus").ToUpper() == "TRUE";
|
||||
DateTime fechaRegistro = gvRow.DataKey("FechaRegistro").ToDateTime();
|
||||
string tipo = "P";
|
||||
DataRow drow = get_GlobalDTNomConceptos(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("Tipo ='{0}'", cveConcepto));
|
||||
if (drow != null)
|
||||
{
|
||||
tipo = drow["Tipo"].ToString();
|
||||
DdlTipo.SelectedValueExist(tipo);
|
||||
DdlTipo_SelectedIndexChanged(null, null);
|
||||
}
|
||||
DdlConcepto.SelectedValueExist(cveConcepto);
|
||||
TxtDescripcion.Text = descripcion.ToString();
|
||||
DdlTipoDescto.SelectedValueExist(tipoDescuento.ToString());
|
||||
DdlTipoDescto_SelectedIndexChanged(null, null);
|
||||
|
||||
TxtValor.Text = valor.ToString();
|
||||
TxtVecesAplicar.Text = vecesAplicar.ToString();
|
||||
TxtMontoLimite.Text = montoLimite.ToString();
|
||||
TxtFechaAplicacion.Text = $"{fechaInicioAplicacion:dd/MM/yyyy}";
|
||||
ChkEstatus.Checked = estatus;
|
||||
this.RegistraScript("$('#DModalMovtoPermanente').modal();");
|
||||
|
||||
|
||||
pnlAddupMovto.Visible = true;
|
||||
LnkAddMovto.Visible = false;
|
||||
LnkUpMovto.Visible = true;
|
||||
UpMovtosPermanentes.Update();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<script>$('body').removeClass('rhumanosbody').addClass('rhumanosbody')</script>
|
||||
Reparto de Utilidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
@@ -59,10 +59,10 @@ Partial Class Nomina_ReportePTU
|
||||
utilimporte = TxtPA_Nimporte.Text.ToDouble()
|
||||
utilimporteAnt = TxtPA_NimporteA.Text.ToDouble()
|
||||
|
||||
Dim objnom As New ClsNominas()
|
||||
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
||||
DTUtilidades = objnom.DtResultados
|
||||
objnom.Dispose()
|
||||
Using objnom As New ClsNominas()
|
||||
objnom.GetCalculoUtilidades(ejercicio, UsuarioActual.CveEmpresa, utilimporte, utilimporteAnt)
|
||||
DTUtilidades = objnom.DtResultados
|
||||
End Using
|
||||
|
||||
cargaEjercicio(DTUtilidades)
|
||||
LnkAutorizarModal.Visible = True
|
||||
@@ -155,7 +155,7 @@ Partial Class Nomina_ReportePTU
|
||||
If Not IsNothing(rowc) Then
|
||||
CveConcepto = rowc("CveConcepto").ToString().ToEntero()
|
||||
Else
|
||||
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0)
|
||||
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0)
|
||||
End If
|
||||
If CveConcepto < 1 Then
|
||||
continuar = False
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Catálogo de Tipos de Asistencias/Inasistencias
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
|
||||
@@ -21,11 +21,9 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -33,7 +31,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
@@ -58,9 +56,38 @@
|
||||
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString = "Aplica", True, False) %>' />
|
||||
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString() = "Aplica", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Aplica Vacaciones" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAplicaVacacion" runat="server" Text='<%# Eval("AplicaVacacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplica Incapacidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAplica" runat="server" Text='<%# Eval("AplicaIncapacidad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplica Retardo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAplicaRetardo" runat="server" Text='<%# Eval("AplicaRetardo") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplica Aguinaldo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAplicaAguinaldo" runat="server" Text='<%# Eval("AplicaAguinaldo") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Aplica Utilidades" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
||||
@@ -80,7 +107,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<%--<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />--%>
|
||||
</ItemTemplate>
|
||||
@@ -121,21 +148,48 @@
|
||||
<asp:TextBox ID="TipoTxt" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TipoTxt">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<div ID="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="AplicaNoAplica">Aplica Asistencia:</label>
|
||||
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="AplicaNoAplica">Aplica Asistencia:</label><br />
|
||||
<asp:CheckBox ID="AplicaNoAplica" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="display:none;">
|
||||
<label for="AplicaFalta">Aplica Falta:</label><br />
|
||||
<asp:CheckBox ID="AplicaFalta" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="AplicaVacacion">Aplica Vacaciones:</label><br />
|
||||
<asp:CheckBox ID="AplicaVacacion" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="AplicaIncapacidad">Aplica Incapacidad:</label><br />
|
||||
<asp:CheckBox ID="AplicaIncapacidad" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label for="AplicaRetardo">Aplica Retardo:</label><br />
|
||||
<asp:CheckBox ID="AplicaRetardo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="AplicaAguinaldo">Aplica Aguinaldo:</label><br />
|
||||
<asp:CheckBox ID="AplicaAguinaldo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="AplicaUtilidades">Aplica Utilidades:</label><br />
|
||||
<asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
</div>
|
||||
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<label for="ChkEstatus">Activo:</label><br />
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -6,7 +6,7 @@ Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class RH_CatAsistenciasInasistencias
|
||||
Inherits ClsPaginas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property PuedeEditar As Boolean
|
||||
@@ -63,7 +63,13 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
BtnEditarTiposDModal.Visible = False
|
||||
BtnAgregarTiposDModal.Visible = True
|
||||
CheckActiveSection.Visible = False
|
||||
saltoDeLinea.Visible = False
|
||||
AplicaNoAplica.Checked = False
|
||||
AplicaFalta.Checked = False
|
||||
AplicaVacacion.Checked = False
|
||||
AplicaIncapacidad.Checked = False
|
||||
AplicaRetardo.Checked = False
|
||||
AplicaAguinaldo.Checked = False
|
||||
AplicaUtilidades.Checked = False
|
||||
TipoTxt.Text = ""
|
||||
UpModalTiposD.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||
@@ -72,7 +78,16 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
|
||||
Dim ObjAsistenciasInasistencias As New ClsRH
|
||||
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, Not AplicaNoAplica.Checked, AplicaNoAplica.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Dim chkAplicaNoAplica As Boolean = Not AplicaNoAplica.Checked
|
||||
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
||||
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
||||
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
||||
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
|
||||
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
|
||||
|
||||
|
||||
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaNoAplica, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
|
||||
TipoTxt.Text = ""
|
||||
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
@@ -100,11 +115,18 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
BtnAgregarTiposDModal.Visible = False
|
||||
BtnEditarTiposDModal.Visible = True
|
||||
CheckActiveSection.Visible = True
|
||||
saltoDeLinea.Visible = True
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||
TipoTxt.Text = GvRow.DataKey("Tipo")
|
||||
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
|
||||
|
||||
|
||||
AplicaFalta.Checked = If(GvRow.DataKey("AplicaFalta") = "Aplica", True, False)
|
||||
AplicaVacacion.Checked = If(GvRow.DataKey("AplicaVacacion") = "Aplica", True, False)
|
||||
AplicaIncapacidad.Checked = If(GvRow.DataKey("AplicaIncapacidad") = "Aplica", True, False)
|
||||
AplicaRetardo.Checked = If(GvRow.DataKey("AplicaRetardo") = "Aplica", True, False)
|
||||
AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False)
|
||||
AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False)
|
||||
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
|
||||
|
||||
@@ -124,7 +146,17 @@ Partial Class RH_CatAsistenciasInasistencias
|
||||
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
||||
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
||||
|
||||
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, AplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias) Then
|
||||
|
||||
|
||||
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
||||
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
||||
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
||||
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
|
||||
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
|
||||
|
||||
|
||||
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, AplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
|
||||
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="row v-center">
|
||||
<label class="col-md-1 v-center truncate">Precio de Lista:</label>
|
||||
<div class="col-md-1 v-center">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 v-center truncate">Clasificación:</label>
|
||||
<div class="col-md-1 v-center">
|
||||
@@ -303,7 +303,7 @@
|
||||
<div class="col-md-6 v-center">
|
||||
<label class="col-md-6 v-center truncate">Precio de Lista:</label>
|
||||
<div class="col-md-6 v-center">
|
||||
<asp:DropDownList ID="DdlPrecioListaCarga" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlPrecioListaCarga" runat="server" AppendDataBoundItems="true" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPrecioListaCarga" runat="server" ControlToValidate="DdlPrecioListaCarga" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio Lista''</b> es necesario, por favor selecionarlo." ValidationGroup="GrpCargarExcel"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecioListaCarga" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecioListaCarga" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -73,18 +73,27 @@ Partial Class Ventas_ActualizarPrecios
|
||||
DDlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaPreciosLista()
|
||||
Public Sub CargaPreciosLista()
|
||||
|
||||
DdlPrecioLista.ITEMS.CLEAR
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
||||
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
ObjVta.Dispose()
|
||||
|
||||
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioListaCarga.DataBind()
|
||||
DdlPrecioListaCarga.DataBind()
|
||||
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 140) Then
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||
End If
|
||||
|
||||
|
||||
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaPS()
|
||||
@@ -193,7 +202,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
ObjPS.Dispose()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
RegistraScript("$('#divAgregar').modal('hide')")
|
||||
RegistraScript("$('#divAgregar').modal('hide')")
|
||||
TxtImporte.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtPorcentaje.Text = ""
|
||||
@@ -271,7 +280,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
.PS = row.DataKey("PS"),
|
||||
.Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal()
|
||||
}).QueryToDataTable(True)
|
||||
If DtExcel.Rows.Count < 2 Then
|
||||
If DtExcel.Rows.Count < 1 Then
|
||||
Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -350,7 +359,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
End Try
|
||||
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||
|
||||
If DdlPrecioListaCarga.SelectedValue.ToEntero() <= 0 Then
|
||||
If DdlPrecioListaCarga.SelectedValue.ToEntero() = -1 Then
|
||||
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -380,16 +389,26 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Dim Correcto As Boolean = False
|
||||
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa))
|
||||
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
||||
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
||||
Dim Porcentaje As Decimal = -1
|
||||
|
||||
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
||||
Dim Porcentaje As Decimal = -1
|
||||
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
||||
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
||||
|
||||
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||
If Correcto Then
|
||||
RowsCargados += 1
|
||||
End If
|
||||
Else
|
||||
Correcto = False
|
||||
Else
|
||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||
If Correcto Then
|
||||
RowsCargados += 1
|
||||
End If
|
||||
Else
|
||||
Correcto = False
|
||||
End If
|
||||
|
||||
End If
|
||||
If Not Correcto Then
|
||||
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
||||
|
||||
@@ -1071,7 +1071,7 @@ Partial Class PV
|
||||
CargaSucursales()
|
||||
CargaClasificaciones()
|
||||
CargaPS(-1, DdlPS)
|
||||
CargaPS(-1, DdlPSAjuste)
|
||||
CargaPS(-1, DdlPSAjuste, AplicaAlmacen:=False)
|
||||
CargaEmpresa()
|
||||
CreaDTVentas()
|
||||
CargaMetodosPago()
|
||||
@@ -1866,7 +1866,7 @@ Partial Class PV
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaAlmacen As Boolean = True)
|
||||
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString = "1")
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
||||
Objeto.ddl.Items.Clear()
|
||||
@@ -1877,7 +1877,11 @@ Partial Class PV
|
||||
Else
|
||||
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||
If AplicaAlmacen Then
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||
Else
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
|
||||
End If
|
||||
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
|
||||
End If
|
||||
End Sub
|
||||
@@ -1988,8 +1992,6 @@ Partial Class PV
|
||||
CalculaTotalesVenta()
|
||||
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
||||
|
||||
UpContado.Update()
|
||||
End Sub
|
||||
@@ -3071,7 +3073,7 @@ Partial Class PV
|
||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||
|
||||
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||
|
||||
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -3264,7 +3266,8 @@ Partial Class PV
|
||||
Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False) As Integer
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False,
|
||||
Optional ConsecPSPadre As Integer = -1) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
If Not CvePS > 0 Then
|
||||
@@ -3427,6 +3430,10 @@ Partial Class PV
|
||||
Row("CuentaPredial") = CuentaPredial
|
||||
Row("EsCargo") = EsCargo
|
||||
|
||||
If EsCargo AndAlso ConsecPSPadre >= 0 Then
|
||||
Row("ConsecPSPadre") = ConsecPSPadre
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||
|
||||
@@ -5213,8 +5220,6 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
|
||||
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim CveMarca As Integer = -1
|
||||
|
||||
@@ -5570,177 +5575,148 @@ Partial Class PV
|
||||
CalculaTotalesVenta()
|
||||
End Sub
|
||||
Private Function CalculaUsados(Consec As Integer) As List(Of Integer)
|
||||
|
||||
'If Modalidad = "U" Then
|
||||
' EliminarUsados(Consec)
|
||||
'End If
|
||||
If Modalidad = "U" Then
|
||||
EliminarUsados(Consec)
|
||||
End If
|
||||
|
||||
Dim ListaPScargo As New List(Of Integer)
|
||||
|
||||
Dim DTTamanios As New DataTable
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DTTamanios = ObjAcum.DtResultados
|
||||
Dim DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
|
||||
Dim CveUnidadMedidaPSA As Integer = -1
|
||||
Dim UnidadMedidaPSA As String = "Unidad"
|
||||
Dim CveClacificacionPSA As Integer = -1
|
||||
Dim CveUnidadMedidaPSA As Integer = -1
|
||||
Dim UnidadMedidaPSA As String = "Unidad"
|
||||
Dim CveClacificacionPSA As Integer = -1
|
||||
|
||||
Dim ClacificacionPSA As String = ""
|
||||
Dim ClacificacionPSA As String = ""
|
||||
|
||||
Dim CveSubProyectoPSA As Integer = -1
|
||||
Dim SubProyectoPSA As String = ""
|
||||
Dim CveSubProyectoPSA As Integer = -1
|
||||
Dim SubProyectoPSA As String = ""
|
||||
|
||||
Dim PSPSA As String = ""
|
||||
Dim PSPSA As String = ""
|
||||
|
||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||
|
||||
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
||||
DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("Clacificacion", GetType(String))
|
||||
DTPSTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("PS", GetType(String))
|
||||
DTPSTemp.Columns.Add("PU", GetType(Decimal))
|
||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
||||
DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("Clacificacion", GetType(String))
|
||||
DTPSTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("PS", GetType(String))
|
||||
DTPSTemp.Columns.Add("PU", GetType(Decimal))
|
||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||
DTPSTemp.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
For Each DrowPartidas As DataRow In TmpDT.Select($"Consec = {Consec}")
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
For Each DrowPartidas As DataRow In TmpDT.Select($"Consec = {Consec}")
|
||||
|
||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||
|
||||
If CveTamanioTemp > 0 Then
|
||||
If CveTamanioTemp > 0 Then
|
||||
|
||||
Dim DTTamanioTemp As New DataTable
|
||||
Dim CvePsTemp As Integer = DTTamanios.FiltraParametros($"CveTamaño = { CveTamanioTemp } ").Rows(0)("CvePSCargo").ToString.ToEntero
|
||||
Dim DTTamanioTemp As New DataTable
|
||||
Dim CvePsTemp As Integer = DTTamanios.FiltraParametros($"CveTamaño = { CveTamanioTemp } ").Rows(0)("CvePSCargo").ToString.ToEntero
|
||||
|
||||
|
||||
CveSubProyectoPSA = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
SubProyectoPSA = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida
|
||||
CveClacificacionPSA = ObjProductosServicios.CveClasificacion
|
||||
UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida")
|
||||
PSPSA = ObjProductosServicios.PS
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion")
|
||||
End If
|
||||
|
||||
Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal
|
||||
|
||||
|
||||
If DTPSTemp.FiltraParametros($"CvePs = { CvePsTemp }").Rows.Count > 0 Then
|
||||
|
||||
For Each dRowUpdate As DataRow In DTPSTemp.Rows
|
||||
|
||||
If (dRowUpdate("CvePS").ToString.ToEntero = CvePsTemp) Then
|
||||
dRowUpdate("Cantidad") = dRowUpdate("Cantidad").ToString.ToDecimal + DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowUpdate("PU") = Cargo ' dRowUpdate("Total").ToString.ToDecimal + ImporteCargo
|
||||
End If
|
||||
Next
|
||||
|
||||
DTPSTemp.AcceptChanges()
|
||||
|
||||
Else
|
||||
Dim dRowNuevo As DataRow = DTPSTemp.NewRow
|
||||
|
||||
dRowNuevo("Cantidad") = DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowNuevo("PU") = Cargo
|
||||
dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA
|
||||
dRowNuevo("UnidadMedida") = UnidadMedidaPSA
|
||||
dRowNuevo("CveClacificacion") = CveClacificacionPSA
|
||||
dRowNuevo("Clacificacion") = ClacificacionPSA
|
||||
dRowNuevo("CvePS") = CvePsTemp
|
||||
dRowNuevo("PS") = PSPSA
|
||||
|
||||
dRowNuevo("CveSubProyecto") = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
dRowNuevo("SubProyecto") = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
DTPSTemp.Rows.Add(dRowNuevo)
|
||||
DTPSTemp.AcceptChanges()
|
||||
End If
|
||||
CveSubProyectoPSA = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
SubProyectoPSA = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida
|
||||
CveClacificacionPSA = ObjProductosServicios.CveClasificacion
|
||||
UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida")
|
||||
PSPSA = ObjProductosServicios.PS
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion")
|
||||
End If
|
||||
|
||||
Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal
|
||||
|
||||
|
||||
If DTPSTemp.FiltraParametros($"CvePs = { CvePsTemp }").Rows.Count > 0 Then
|
||||
|
||||
For Each dRowUpdate As DataRow In DTPSTemp.Rows
|
||||
|
||||
If (dRowUpdate("CvePS").ToString.ToEntero = CvePsTemp) Then
|
||||
dRowUpdate("Cantidad") = dRowUpdate("Cantidad").ToString.ToDecimal + DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowUpdate("PU") = Cargo ' dRowUpdate("Total").ToString.ToDecimal + ImporteCargo
|
||||
End If
|
||||
Next
|
||||
|
||||
DTPSTemp.AcceptChanges()
|
||||
|
||||
Else
|
||||
Dim dRowNuevo As DataRow = DTPSTemp.NewRow
|
||||
|
||||
dRowNuevo("Cantidad") = DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowNuevo("PU") = Cargo
|
||||
dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA
|
||||
dRowNuevo("UnidadMedida") = UnidadMedidaPSA
|
||||
dRowNuevo("CveClacificacion") = CveClacificacionPSA
|
||||
dRowNuevo("Clacificacion") = ClacificacionPSA
|
||||
dRowNuevo("CvePS") = CvePsTemp
|
||||
dRowNuevo("PS") = PSPSA
|
||||
|
||||
dRowNuevo("CveSubProyecto") = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
dRowNuevo("SubProyecto") = DrowPartidas("SubProyecto").ToString
|
||||
dRowNuevo("ConsecPSPadre") = Consec
|
||||
|
||||
DTPSTemp.Rows.Add(dRowNuevo)
|
||||
DTPSTemp.AcceptChanges()
|
||||
End If
|
||||
Next
|
||||
ObjProductosServicios.Dispose()
|
||||
|
||||
Dim ModalidadBack = Modalidad
|
||||
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
||||
If Modalidad = "U" Then
|
||||
Modalidad = "A"
|
||||
End If
|
||||
Next
|
||||
ObjProductosServicios.Dispose()
|
||||
|
||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||
Dim ModalidadBack = Modalidad
|
||||
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
||||
If Modalidad = "U" Then
|
||||
Modalidad = "A"
|
||||
End If
|
||||
|
||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||
drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True)
|
||||
If Consec > 0 Then
|
||||
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
|
||||
End If
|
||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero)
|
||||
If Consec > 0 Then
|
||||
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
Modalidad = ModalidadBack
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
Modalidad = ModalidadBack
|
||||
|
||||
Return ListaPScargo
|
||||
End Function
|
||||
Private Sub EliminarUsados(Consec As Integer)
|
||||
Dim DTTamanios As New DataTable
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
'ELIMINAR EL USADO EXTRAS
|
||||
For Each drow As DataRow In TmpDT.Select($"ConsecPSPadre ={Consec}")
|
||||
drow.Delete()
|
||||
Next
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DTTamanios = ObjAcum.DtResultados
|
||||
Dim DTCvePSCostos = ObjAcum.DtResultados.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||
End If
|
||||
|
||||
For Each drow As DataRow In TmpDT.FiltraParametros($"Consec ={Consec}").Rows
|
||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||
drow("Eliminar") = 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
|
||||
For Each drow As DataRow In TmpDT.Select($"Consec ={Consec}")
|
||||
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
||||
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then
|
||||
RowRecepcionUsados.Delete()
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Dim TmpDTView As New DataView(TmpDT)
|
||||
TmpDTView.RowFilter = "Eliminar = 1"
|
||||
|
||||
For Each dRowEliminar As DataRowView In TmpDTView
|
||||
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
||||
If (RowRecepcionUsados("CvePS").ToString() = dRowEliminar("CvePS").ToString()) Then
|
||||
RowRecepcionUsados.Delete()
|
||||
End If
|
||||
Next
|
||||
dRowEliminar.Delete()
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -1003,8 +1003,8 @@
|
||||
</table>
|
||||
<%--</asp:Panel>--%>
|
||||
|
||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle"
|
||||
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,CveUM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle"
|
||||
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
@@ -1287,12 +1287,12 @@
|
||||
<div class="col-md-6 ">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false">
|
||||
<table id="TbDescuentosRNC" border="0" rules="none" class="well TextTab" style="float: right;" runat="server" visible="false">
|
||||
<tr align="right">
|
||||
<td style="border: 1px none white"><b>Descuentos. RNC.:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblDescuentosRNC" ClientIDMode="Static" runat="server" Style="text-align: right;" Text="0.00" Width="78px"></asp:Label></td>
|
||||
<td align="right"> <asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" />
|
||||
<td align="right"> <asp:LinkButton ID="LnkDescuentosRNC" runat="server" OnClick="LnkDescuentosRNC_Click" Text="<i class='fa fa-tag fa-lg font-green'></i>" AlternateText="Aplicacion de RNC" Style="cursor: pointer;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="right">
|
||||
@@ -5873,8 +5873,7 @@
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:Button ID = "BtnModalAplicarRemisionesNC" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" data-toggle="modal" data-target="#ModalAplicarRemisionesNC"/>
|
||||
|
||||
<asp:Button ID="BtnModalAplicarRemisionesNC" Text="Aplicar Remisiones" runat="server" OnClick="BtnModalAplicarRemisionesNC_Click" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
@@ -6354,7 +6353,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%--APLICAR REMISIONES DE NC--%>
|
||||
<div id="ModalAplicarDescuentoNC" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpDescNC" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
@@ -7544,28 +7543,34 @@
|
||||
$('#divAgregarCliente').modal('hide');
|
||||
}
|
||||
|
||||
function CompararNC() {
|
||||
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
|
||||
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
|
||||
|
||||
if (TotalRem == TotalNC) {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
var ValidarRNC = false;
|
||||
function AplicarValidarRNC(Valor)
|
||||
{
|
||||
ValidarRNC = Valor;
|
||||
}
|
||||
function CompararNC() {
|
||||
if (ValidarRNC) {
|
||||
var TotalRem = ToDouble(document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').value);
|
||||
var TotalNC = ToDouble(document.getElementById('<%= TxtNCImporte.ClientID %>').value);
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
if (TotalRem == TotalNC) {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
|
||||
} else {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
$('#ModalAplicarRemisionesNC').modal('hide');
|
||||
|
||||
@@ -8,6 +8,7 @@ Imports System.Xml
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
|
||||
Partial Class Ventas
|
||||
Inherits ClsPaginas
|
||||
@@ -4292,7 +4293,7 @@ Partial Class Ventas
|
||||
Retorno = True
|
||||
|
||||
Else
|
||||
CveVenta = -1
|
||||
ViewState("CveVenta") = -1
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
@@ -5748,10 +5749,10 @@ Partial Class Ventas
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||
End If
|
||||
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, 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 Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1)
|
||||
If Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
Dim PrecioMinimo As Decimal = 0
|
||||
@@ -5900,7 +5901,7 @@ Partial Class Ventas
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (Descuento))
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("IEPSPorcentaje").ToString.ToDecimal)
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
|
||||
@@ -6352,7 +6353,7 @@ Partial Class Ventas
|
||||
EsValidoMayor = False
|
||||
EsValidoPU = True
|
||||
PU = dr("PU").ToString.ToDecimal * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)
|
||||
Costo = ObjInventarios.GetCostoPS(dr("CvePS").ToString.ToEntero, dr("Cantidad").ToString.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Costo = ObjInventarios.GetCostoPS(dr("CvePS").ToString.ToEntero, dr("Cantidad").ToString.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, CveTipoAlmacen:=1)
|
||||
|
||||
Dim PrecioMinimo As Decimal = 0
|
||||
'RMF. condicion temporal, para reubicación, precio mínimo
|
||||
@@ -6731,6 +6732,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
If ErrorList.Count = 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 Then
|
||||
|
||||
@@ -7597,7 +7604,6 @@ Partial Class Ventas
|
||||
'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero
|
||||
'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False)
|
||||
'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero
|
||||
'ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero
|
||||
|
||||
|
||||
'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
|
||||
@@ -9121,7 +9127,12 @@ Partial Class Ventas
|
||||
'Si es devolucion se agregan a la tabla de Vta_VentasDetalleDevolucion
|
||||
If factura.AplicaDevolucion Then
|
||||
If Not ObjVentas.AddVentaDetalleDevolucion(Row("CveVentaDetalle").ToString.ToEntero, ObjVentas.CveVentaDetalle, Row("Cantidad").ToString.ToDouble) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolucion.")
|
||||
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||
End If
|
||||
If ErrorList.Count = 0 Then
|
||||
If Not ObjEventos.AddEventoBitacora(String.Format("Se aplicó una devolución en Folio: <a href=""/Ventas/Ventas.aspx?CveVenta={0}"" target=""_blank"">{1}</a>", factura.CveVenta, factura.SerieFolio), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaDevolucion) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la bitacora de devolución.")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -13054,9 +13065,9 @@ Partial Class Ventas
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, 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)
|
||||
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
|
||||
@@ -13631,10 +13642,10 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, 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 Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1)
|
||||
If Costo = 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
Dim PrecioMinimo As Decimal = 0
|
||||
@@ -14238,10 +14249,10 @@ Partial Class Ventas
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSAdicional, DrPoliza("Cantidad").ToString.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSAdicional, DrPoliza("Cantidad").ToString.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, 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(CvePSAdicional, DrPoliza("Cantidad").ToString.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, -1)
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSAdicional, DrPoliza("Cantidad").ToString.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
@@ -20923,9 +20934,11 @@ Partial Class Ventas
|
||||
Protected Sub BtnAplicarNC_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344) = "1" Then
|
||||
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
|
||||
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||
If TxtImportesRemisionesNC.Text.ToDecimal() <> TxtNCImporte.Text.ToDecimal() Then
|
||||
Alert($"Los importes no coinciden", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
DdlTipoComprobante.SelectedValue = "Egs"
|
||||
@@ -23173,6 +23186,8 @@ Partial Class Ventas
|
||||
|
||||
'CUANDO ES CREAR APARTIR DE SE LIMPIAN FUNCIONALIDADES DE DOCUMENTOS YA REGISTRADOS
|
||||
BtnGenerarRemision.Visible = False
|
||||
BtnEditarRemision.Visible = False
|
||||
BtnPermisoEditarRemision.Visible = False
|
||||
BtnPermisoEditarCotizacion.Visible = False
|
||||
BtnEditarCotizacion.Visible = False
|
||||
BtnGenerarOS.Visible = False
|
||||
@@ -23480,154 +23495,136 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Private Sub CalculaUsados()
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
|
||||
|
||||
Dim DTCvePSCostos As DataTable
|
||||
DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||
End If
|
||||
|
||||
For Each drow As DataRow In TmpDT.Rows
|
||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||
drow("Eliminar") = 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Dim TmpDTView As New DataView(TmpDT)
|
||||
TmpDTView.RowFilter = "Eliminar = 1"
|
||||
|
||||
For Each dRowEliminar As DataRowView In TmpDTView
|
||||
dRowEliminar.Delete()
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
If ViewState("CargoUsado").ToString = "False" Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveUnidadMedidaPSA As Integer = -1
|
||||
Dim UnidadMedidaPSA As String = "Unidad"
|
||||
Dim CveClacificacionPSA As Integer = -1
|
||||
|
||||
Dim ClacificacionPSA As String = ""
|
||||
|
||||
Dim CveSubProyectoPSA As Integer = -1
|
||||
Dim SubProyectoPSA As String = ""
|
||||
|
||||
Dim PSPSA As String = ""
|
||||
|
||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||
'AgregarProductoServicio(1, CveUnidadMedidaPSA, UnidadMedidaPSA, CveClacificacionPSA, ClacificacionPSA, CvePSPSA, PSPSA, "", ImporteCargo, 0, -1, "", CveSubProyectoPSA, SubProyectoPSA)
|
||||
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
||||
DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("Clacificacion", GetType(String))
|
||||
DTPSTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("PS", GetType(String))
|
||||
DTPSTemp.Columns.Add("PU", GetType(Decimal))
|
||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||
|
||||
For Each DrowPartidas As DataRow In TmpDT.Rows
|
||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||
|
||||
If CveTamanioTemp > 0 Then
|
||||
|
||||
Dim DTTamanioTemp As New DataTable
|
||||
Dim CvePsTemp As Integer = DTTamanios.FiltraParametros($"CveTamaño = { CveTamanioTemp } ").Rows(0)("CvePSCargo").ToString.ToEntero
|
||||
|
||||
|
||||
'' If ClienteEsDistribuidor Then
|
||||
CveSubProyectoPSA = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
SubProyectoPSA = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
Dim DTTamanios As DataTable = Nothing
|
||||
' Dim ObjAcum As New ClsAcumuladores
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida
|
||||
CveClacificacionPSA = ObjProductosServicios.CveClasificacion
|
||||
UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida")
|
||||
PSPSA = ObjProductosServicios.PS
|
||||
End If
|
||||
ObjProductosServicios.Dispose()
|
||||
|
||||
'If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion")
|
||||
End If
|
||||
|
||||
DTTamanios = GlobalDTAcumTamaños() 'ObjAcum.DtResultados
|
||||
Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal
|
||||
|
||||
Dim DTCvePSCostos As DataTable
|
||||
DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
If Not TmpDT.Columns.Contains("Eliminar") Then
|
||||
TmpDT.Columns.Add("Eliminar", GetType(Integer))
|
||||
End If
|
||||
If DTPSTemp.FiltraParametros($"CvePs = { CvePsTemp }").Rows.Count > 0 Then
|
||||
|
||||
For Each dRowUpdate As DataRow In DTPSTemp.Rows
|
||||
|
||||
If (dRowUpdate("CvePS").ToString.ToEntero = CvePsTemp) Then
|
||||
dRowUpdate("Cantidad") = dRowUpdate("Cantidad").ToString.ToDecimal + DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowUpdate("PU") = Cargo ' dRowUpdate("Total").ToString.ToDecimal + ImporteCargo
|
||||
End If
|
||||
Next
|
||||
|
||||
DTPSTemp.AcceptChanges()
|
||||
|
||||
Else
|
||||
Dim dRowNuevo As DataRow = DTPSTemp.NewRow
|
||||
|
||||
dRowNuevo("Cantidad") = DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowNuevo("PU") = Cargo
|
||||
dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA
|
||||
dRowNuevo("UnidadMedida") = UnidadMedidaPSA
|
||||
dRowNuevo("CveClacificacion") = CveClacificacionPSA
|
||||
dRowNuevo("Clacificacion") = ClacificacionPSA
|
||||
dRowNuevo("CvePS") = CvePsTemp
|
||||
dRowNuevo("PS") = PSPSA
|
||||
|
||||
dRowNuevo("CveSubProyecto") = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
dRowNuevo("SubProyecto") = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
DTPSTemp.Rows.Add(dRowNuevo)
|
||||
DTPSTemp.AcceptChanges()
|
||||
End If
|
||||
|
||||
For Each drow As DataRow In TmpDT.Rows
|
||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||
drow("Eliminar") = 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Dim TmpDTView As New DataView(TmpDT)
|
||||
TmpDTView.RowFilter = "Eliminar = 1"
|
||||
|
||||
For Each dRowEliminar As DataRowView In TmpDTView
|
||||
dRowEliminar.Delete()
|
||||
|
||||
Next
|
||||
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
If ViewState("CargoUsado").ToString = "False" Then
|
||||
Exit Sub
|
||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||
Modalidad = "A"
|
||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||
drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||
drowPsTamaños("SubProyecto").ToString)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
|
||||
Dim CveUnidadMedidaPSA As Integer = -1
|
||||
Dim UnidadMedidaPSA As String = "Unidad"
|
||||
Dim CveClacificacionPSA As Integer = -1
|
||||
|
||||
Dim ClacificacionPSA As String = ""
|
||||
|
||||
Dim CveSubProyectoPSA As Integer = -1
|
||||
Dim SubProyectoPSA As String = ""
|
||||
|
||||
Dim PSPSA As String = ""
|
||||
|
||||
Dim DTPSTemp As New DataTable '= TmpDT.Clone
|
||||
'AgregarProductoServicio(1, CveUnidadMedidaPSA, UnidadMedidaPSA, CveClacificacionPSA, ClacificacionPSA, CvePSPSA, PSPSA, "", ImporteCargo, 0, -1, "", CveSubProyectoPSA, SubProyectoPSA)
|
||||
DTPSTemp.Columns.Add("Cantidad", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("UnidadMedida", GetType(String))
|
||||
DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("Clacificacion", GetType(String))
|
||||
DTPSTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("PS", GetType(String))
|
||||
DTPSTemp.Columns.Add("PU", GetType(Decimal))
|
||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||
|
||||
For Each DrowPartidas As DataRow In TmpDT.Rows
|
||||
Dim CveTamanioTemp As Integer = DrowPartidas("CveTamaño").ToString.ToEntero
|
||||
|
||||
If CveTamanioTemp > 0 Then
|
||||
|
||||
Dim DTTamanioTemp As New DataTable
|
||||
Dim CvePsTemp As Integer = DTTamanios.FiltraParametros($"CveTamaño = { CveTamanioTemp } ").Rows(0)("CvePSCargo").ToString.ToEntero
|
||||
|
||||
|
||||
CveSubProyectoPSA = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
SubProyectoPSA = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then
|
||||
CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida
|
||||
CveClacificacionPSA = ObjProductosServicios.CveClasificacion
|
||||
UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida")
|
||||
PSPSA = ObjProductosServicios.PS
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion")
|
||||
End If
|
||||
|
||||
Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal
|
||||
|
||||
|
||||
If DTPSTemp.FiltraParametros($"CvePs = { CvePsTemp }").Rows.Count > 0 Then
|
||||
|
||||
For Each dRowUpdate As DataRow In DTPSTemp.Rows
|
||||
|
||||
If (dRowUpdate("CvePS").ToString.ToEntero = CvePsTemp) Then
|
||||
dRowUpdate("Cantidad") = dRowUpdate("Cantidad").ToString.ToDecimal + DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowUpdate("PU") = Cargo ' dRowUpdate("Total").ToString.ToDecimal + ImporteCargo
|
||||
End If
|
||||
Next
|
||||
|
||||
DTPSTemp.AcceptChanges()
|
||||
|
||||
Else
|
||||
Dim dRowNuevo As DataRow = DTPSTemp.NewRow
|
||||
|
||||
dRowNuevo("Cantidad") = DrowPartidas("Cantidad").ToString.ToDecimal
|
||||
dRowNuevo("PU") = Cargo
|
||||
dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA
|
||||
dRowNuevo("UnidadMedida") = UnidadMedidaPSA
|
||||
dRowNuevo("CveClacificacion") = CveClacificacionPSA
|
||||
dRowNuevo("Clacificacion") = ClacificacionPSA
|
||||
dRowNuevo("CvePS") = CvePsTemp
|
||||
dRowNuevo("PS") = PSPSA
|
||||
|
||||
dRowNuevo("CveSubProyecto") = DrowPartidas("CveSubProyecto").ToString.ToEntero
|
||||
dRowNuevo("SubProyecto") = DrowPartidas("SubProyecto").ToString
|
||||
|
||||
DTPSTemp.Rows.Add(dRowNuevo)
|
||||
DTPSTemp.AcceptChanges()
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||
Modalidad = "A"
|
||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||
AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||
drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||
drowPsTamaños("SubProyecto").ToString)
|
||||
End If
|
||||
Next
|
||||
|
||||
ObjProductosServicios.Dispose()
|
||||
'End If
|
||||
|
||||
' ObjAcum.Dispose()
|
||||
'End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer) As Boolean
|
||||
@@ -23813,6 +23810,102 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs)
|
||||
CargaRNC()
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal()")
|
||||
RegistraScript("$('#ModalAplicarRemisionesNC').modal({backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
Protected Function GeneraPolizaVentaWS(ObjFactura As Modelos.Factura) As Boolean
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
|
||||
'DATOS DE VENTA
|
||||
obj.sale_date = Now
|
||||
obj.sale_paidby = "01"
|
||||
obj.sale_type = "01" 'PISO
|
||||
obj.sale_type_service = "01" 'PARTICULAR
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.SubTotal
|
||||
obj.sale_id = ObjFactura.CveVenta.ToString()
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = "174925"
|
||||
obj.product_unique_code = "65047187"
|
||||
obj.product_sale_type = "02" 'AJUSTE
|
||||
|
||||
'DATOS DE USADO
|
||||
obj.used_product = True
|
||||
obj.used_brand = "01"
|
||||
obj.used_bci = "25"
|
||||
obj.used_month = 1
|
||||
obj.used_year = 2015
|
||||
obj.used_sale_date = ObjFactura.Fecha
|
||||
|
||||
Return False
|
||||
'EnviarPolizaVentaWS(obj)
|
||||
End Function
|
||||
|
||||
Protected Sub EnviarPolizaVentaWS(obj As Modelos.MPolizaVentaWS)
|
||||
Dim Retorno As String = "[]"
|
||||
|
||||
Dim User As String = "cslth.2809@jcilink.com"
|
||||
Dim Password As String = "ff31580a95f36b51ad27f970428b77a5a9245076"
|
||||
|
||||
Try
|
||||
Using wc As New HttpClient()
|
||||
Dim Url = New Uri("http://polizavirtual.com.mx/webservice/api/Venta")
|
||||
|
||||
Dim Parametros = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("User", User))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("password", Password))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_name", obj.customer_name))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name1", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_last_name2", obj.customer_last_name1))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_birthday", obj.customer_birthday.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_phone", obj.customer_phone))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_email", obj.customer_email))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_gender", obj.customer_gender))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_advertising", obj.customer_advertising.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_date", obj.sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_paidby", obj.sale_paidby))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type", obj.sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_type_service", obj.sale_type_service))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_code", obj.product_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_unique_code", obj.product_unique_code))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("product_sale_type", obj.product_sale_type))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_total", obj.sale_total.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_product", obj.used_product.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_brand", obj.used_brand))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_bci", obj.used_bci))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_month", obj.used_month.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_year", obj.used_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("used_sale_date", obj.used_sale_date.ToString("yyyy-MM-dd HH:mm:ss")))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_brand", obj.customer_car_brand.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_model", obj.customer_car_model.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("customer_car_year", obj.customer_car_year.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_discount", obj.sale_discount.ToString()))
|
||||
Parametros.Add(New KeyValuePair(Of String, String)("sale_id", obj.sale_id.ToString()))
|
||||
|
||||
Dim content As New FormUrlEncodedContent(Parametros)
|
||||
Dim response = wc.PostAsync(Url, content).Result
|
||||
|
||||
Retorno = response.Content.ReadAsStringAsync().Result
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user