Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4526,9 +4526,9 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
||||
|
||||
If Not CveSubProyectoPrincipal > 0 Then
|
||||
Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
'If Not CveSubProyectoPrincipal > 0 Then
|
||||
' Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
|
||||
If Not ValidaVinculacionNotaFactura() Then
|
||||
Alert("Se requiere que la nota este aplicada a las facturas", TipoMensaje.MsgAdvertencia)
|
||||
@@ -4868,13 +4868,13 @@ Partial Class Compras_Compras
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
|
||||
'VALIDACION DE CENTRO DE COSTO
|
||||
If UsuarioActual.Empresa.RequiereCentroCostos AndAlso Row("CveSubProyecto").ToString.ToEntero <= 0 Then
|
||||
RequiereCentroCosto = True
|
||||
UM.Dispose()
|
||||
PSS.Dispose()
|
||||
Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'If UsuarioActual.Empresa.RequiereCentroCostos AndAlso Row("CveSubProyecto").ToString.ToEntero <= 0 Then
|
||||
' RequiereCentroCosto = True
|
||||
' UM.Dispose()
|
||||
' PSS.Dispose()
|
||||
' Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
'REGISTRO LAS UNIDADES DE MEDIDA
|
||||
If Row("CveUM").ToString.ToEntero = 0 Then
|
||||
@@ -7967,11 +7967,19 @@ Partial Class Compras_Compras
|
||||
CvePreComprobacion = ObjConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If ObjCompras.AddComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then
|
||||
|
||||
Alert("Apertura de nueva comprobación.", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
Else
|
||||
'si ya existe, obtenemos la prepóliza
|
||||
CvePreComprobacion = ObjCompras.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero
|
||||
If ObjCompras.DtResultados.FiltroPrimeroValor("FolioPoliza").ToEntero > 0 Then
|
||||
TieneError = True
|
||||
ErrorPrepoliza = True
|
||||
Alert($"La Comprobación con folio '{TxtNumeroReembolso.Text.Trim}' está previamente contabilizada. No se puede asociar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
Alert("Factura agregada a una comprobación ya creada.", TipoMensaje.ToastInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjConta.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza)
|
||||
@@ -8074,8 +8082,8 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
ObjCompras.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||
End If
|
||||
' Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -8194,7 +8202,6 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If DTSubProyectoPrincipal.Rows.Count > 0 Then
|
||||
DTSubProyectoPrincipal = DTSubProyectoPrincipal.FiltraParametros("", "Total DESC ")
|
||||
CveSubProyectoPrincioal = DTSubProyectoPrincipal.FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
|
||||
86
Inicio.aspx
86
Inicio.aspx
@@ -549,27 +549,75 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="row" style="width: 95%; margin-right: 2.5%; margin-left: 2.5%;" runat="server" id="divsms1" visible="false">
|
||||
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
|
||||
<asp:UpdatePanel ID="UPPSMS" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" >
|
||||
<div class="col-md-1">Opción:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSMSOpciones" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSOpciones_SelectedIndexChanged">
|
||||
<asp:ListItem Text="Vendedor" Value="1" />
|
||||
<asp:ListItem Text="Gerente Ventas" Value="2" Selected="True" />
|
||||
<asp:ListItem Text="Almacen" Value="3" />
|
||||
<asp:ListItem Text="Técnico" Value="4" />
|
||||
<asp:ListItem Text="Gerente Técnico" Value="5" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlSMSVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSVendedores_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSMSTecnico" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSTecnico_SelectedIndexChanged" >
|
||||
</asp:DropDownList>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnSMSAplicarFecha" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnSMSAplicarFecha_Click"/>
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="height: 32px;">
|
||||
<label class="col-md-1">Opción: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSMSOpciones" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSOpciones_SelectedIndexChanged">
|
||||
<asp:ListItem Text="Vendedor" Value="1" />
|
||||
<asp:ListItem Text="Gerente Ventas" Value="2" Selected="True" />
|
||||
<asp:ListItem Text="Almacen" Value="3" />
|
||||
<asp:ListItem Text="Técnico" Value="4" />
|
||||
<asp:ListItem Text="Gerente Técnico" Value="5" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSMSVendedores" runat="server" CssClass="form-control input-sm select2me" DataTextField="Vendedor" DataValueField="CveVendedor" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSVendedores_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSMSTecnico" runat="server" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" Visible="false" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSTecnico_SelectedIndexChanged" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha. Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaInicioSMS" runat="server" CssClass="form-control" CausesValidation="true" 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="txtFechaInicioSMS" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaInicioSMS" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaInicioSMS" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaInicioSMS" 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="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha. Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaFinSMS" runat="server" CssClass="form-control" CausesValidation="true" 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="txtFechaFinSMS" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaFinSMS" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaFinSMS" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaFinSMS" 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="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" >
|
||||
|
||||
<div class="row" >
|
||||
<div id="divsmsdash" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -142,7 +142,7 @@ Partial Class Inicio
|
||||
If UsuarioActual.TienePermisoProceso(343) Then MuestraPsProximosAVencer()
|
||||
If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso (UsuarioActual.CveUsuario = 3964 Or UsuarioActual.CveRol = 1639) Then 'AndAlso UsuarioActual.CveRol.Contiene(1577, 1639, 1573) Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso (UsuarioActual.CveUsuario = 3964 OrElse UsuarioActual.CveRol = 1639) Then 'AndAlso UsuarioActual.CveRol.Contiene(1577, 1639, 1573) Then
|
||||
'Dim Opcion As Integer = 1
|
||||
'Dim CveVendedor As Integer = -1
|
||||
'Dim CveUsuarioTecnico As Integer = -1
|
||||
@@ -155,6 +155,8 @@ Partial Class Inicio
|
||||
' Opcion = 2 'gerente ventas
|
||||
'End If
|
||||
divsms1.Visible = True
|
||||
txtFechaInicioSMS.Text = Now.FirstDayOfMonth.ToString
|
||||
txtFechaFinSMS.Text = Now.LastDayOfMonth.ToString
|
||||
If UsuarioActual.CveUsuario = 3964 Then
|
||||
DdlSMSOpciones.SelectedValue = "2"
|
||||
DdlSMSVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveEstatus=1 ")
|
||||
@@ -1641,8 +1643,8 @@ Partial Class Inicio
|
||||
|
||||
Dim Gral As New ClsVentas
|
||||
Dim ds As DataSet = Nothing
|
||||
Dim FechaI As Date = Now.FirstDayOfMonth
|
||||
Dim FechaF As Date = Now.LastDayOfMonth
|
||||
Dim FechaI As Date = txtFechaInicioSMS.Text.ToDate ' Now.FirstDayOfMonth
|
||||
Dim FechaF As Date = txtFechaFinSMS.Text.ToDate 'Now.LastDayOfMonth
|
||||
|
||||
If Gral.GetSMSIndicadores(Opcion, FechaI, FechaF, UsuarioActual.CveUsuario, CveVendedor, CveGerenteVendedor, CveUsuarioTecnico, UsuarioActual.CveEmpresa) Then
|
||||
ds = Gral.DataSetResultados
|
||||
@@ -2576,4 +2578,8 @@ Partial Class Inicio
|
||||
Protected Sub DdlSMSTecnico_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaKPICirugias(DdlSMSOpciones.SelectedValue.ToEntero, -1, DdlSMSTecnico.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnSMSAplicarFecha_Click(sender As Object, e As EventArgs)
|
||||
CargaSMSKPI()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -821,14 +821,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
'comparativo.
|
||||
For Each gvr As GridViewRow In GvCxC.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero
|
||||
If CveMonedaVenta = CveMonedaPago Then
|
||||
ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal()
|
||||
ElseIf CveMonedaVenta = 2 And CveMonedaPago = 1 Then
|
||||
ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TxtTC.Text.ToDecimal)
|
||||
ElseIf CveMonedaVenta = 1 And CveMonedaPago = 2 Then
|
||||
ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() / TxtTC.Text.ToDecimal)
|
||||
End If
|
||||
TC = 1
|
||||
If tCveMonedaIE = 1 AndAlso gvr.DataKey("CveMoneda") = "2" Then TC = TxtTC.Text.ToDecimal
|
||||
If tCveMonedaIE = 2 AndAlso gvr.DataKey("CveMoneda") = "1" Then TC = 1D / TxtTC.Text.ToDecimal
|
||||
ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TC).RoundSQL(2)
|
||||
End If
|
||||
Next
|
||||
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
|
||||
@@ -948,21 +944,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
Else
|
||||
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
||||
|
||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
||||
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
CveMoneda = ObjIE.CveMoneda
|
||||
Else
|
||||
MsgError = "Error al obtener la moneda de ingreso por comprobar"
|
||||
End If
|
||||
|
||||
'If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2
|
||||
'If ChkPagarDolares.Checked Then CveMoneda = 2
|
||||
'If ChkPagarPesos.Checked Then CveMoneda = 1
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If CveIE > 0 OrElse RblTipoPago.SelectedValue.Contiene("2", "3") Then
|
||||
@@ -988,10 +971,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||
|
||||
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
Dim ImportePrestamo As Decimal = 0
|
||||
Dim TCPrestamo As Decimal = 0
|
||||
|
||||
@@ -1087,10 +1068,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
'Tipos de cambio
|
||||
If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||
Pago.TCPago = TxtTC.Text.ToDecimal
|
||||
Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||
'Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal
|
||||
'ImportePagadoVenta = (ImportePagadoVenta / TxtTipoCambio.Text.ToDecimal).RoundSQL
|
||||
Pago.ImportePago = (Pago.ImportePago * TxtTC.Text.ToDecimal).RoundSQL
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||
Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal)
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
|
||||
Reference in New Issue
Block a user