This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-04-16 09:49:55 -07:00
15 changed files with 1837 additions and 268 deletions

View File

@@ -10,7 +10,7 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Depositos de Caja"></asp:Literal>&nbsp;<asp:Literal ID="LtlDepositoCaja" runat="server"></asp:Literal> <asp:Literal ID="LtlTitulo" runat="server" Text="Depósitos de Caja"></asp:Literal>&nbsp;<asp:Literal ID="LtlDepositoCaja" runat="server"></asp:Literal>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
@@ -32,9 +32,9 @@
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
<label class="col-md-1 truncate" style="width: 110px;">Cuenta:</label> <label class="col-md-1 truncate" style="width: 70px;">Cuenta:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlCajaChica" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlCajaChica" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me" style="width:200px">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -77,7 +77,7 @@
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem> <asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem> <asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem> <asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -85,7 +85,14 @@
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none"> <div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 truncate" style="width: 100px;">SubProyecto:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -97,13 +104,13 @@
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-6" runat="server" style="text-align: right;"> <div class="col-md-6" runat="server" >
<label style="font-size:1.2em">Cuenta Deposito:</label> <label style=" ">Cuenta Depósito:</label>
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList>
</div> </div>
<div class="col-md-3" runat="server" style="text-align: left;"> <div class="col-md-3" runat="server" style="text-align: left;">
<div class="col-md-1" > <div class="col-md-1" >
<label style="width:70px; font-size:1.2em;">Fecha:</label> <label style="width:70px;">Fecha:</label>
</div> </div>
<div class="col-md-1" > <div class="col-md-1" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
@@ -118,15 +125,13 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="false"> <div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="false">
<asp:label runat="server">Seleccionado: $</asp:label> <asp:label runat="server">Seleccionado: $</asp:label>
<asp:label runat="server" ID="lblValorTotal">00.00</asp:label> <asp:label runat="server" ID="lblValorTotal">0.00</asp:label>
<asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label> <asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label>
</div> </div>
@@ -134,25 +139,25 @@
<div class="row"> <div class="row">
<div class="col-md-3" runat="server" Id="DivComision" Visible="false"> <div class="col-md-3" runat="server" Id="DivComision" Visible="false">
<label style="width: 70px; font-size:1.2em">Comisión:</label> <label style="width: 105px; ">Faltante/Sobrante:</label>
<asp:TextBox runat="server" ID="TxtComision" Class="table-group-action-input form-control input-inline input-small input-sm select2me" style="width: 70px;"></asp:TextBox> <asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
</div> </div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblSubproyecto" >SubProyecto:</label> <label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblSubproyecto" >SubProyecto:</label>
<div class="col-md-2" style="display: none" id="divSubProyecton"> <div class="col-md-2" style="display: none" id="divSubProyecto">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblClasificacion">Clasificación:</label> <label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacion">Clasificación:</label>
<div class="col-md-2" style="display: none" id="divClasificacion"> <div class="col-md-2" style="display: none" id="divClasificacion">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="50%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion"> <asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<br /> <br />
<div style="height:550px;overflow-x:scroll"> <div style="height:550px;overflow-x:scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None"> <asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@@ -193,7 +198,7 @@
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
<RowStyle Font-Size="Smaller" />
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
</asp:GridView> </asp:GridView>
</div> </div>
@@ -208,7 +213,7 @@
<br /> <br />
<br /> <br />
<asp:Button ID="BtnDepositar" runat="server" Text="Depositar" CssClass="btn btn-primary" /> <asp:Button ID="BtnDepositar" runat="server" Text="Depósitar" CssClass="btn btn-primary" />
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -222,40 +227,39 @@
var ValorTotalSeleccionado = 0 var ValorTotalSeleccionado = 0
var comision = 0; var comision = 0;
var comisionNegativa = 0;
function FnSuma(chk, cantidad) { function FnSuma(chk, cantidad) {
debugger;
var saldo = ToDouble($('#C_lblValorTotal').text()); var saldo = ToDouble($('#C_lblValorTotal').text());
debugger;
if (chk.checked == false) { if (chk.checked == false) {
cantidad = cantidad * -1; cantidad = cantidad * -1;
debugger;
} }
saldo = saldo + cantidad; saldo = saldo + cantidad;
debugger;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2));
ValorTotalSeleccionado = saldo ValorTotalSeleccionado = saldo
debugger;
} }
function txtSuma(txt) { function txtSuma(txt) {
var saldo = ToDouble($('#C_lblValorTotal').text()); var saldo = ToDouble($('#C_lblValorTotal').text());
var comision2 = ToDouble($('#C_TxtComision').val()); var comision2 = ToDouble($('#C_TxtComision').val());
if (comision2 < ValorTotalSeleccionado) { if (comision2 < 0) {
comision2 = comision2 - comision comisionNegativa = comision2 * -1
saldo = saldo - comision2; }
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); if (comision2 > ValorTotalSeleccionado || comisionNegativa > ValorTotalSeleccionado) {
comision = ToDouble($('#C_TxtComision').val())
} else {
$('#C_TxtComision').val(comision) $('#C_TxtComision').val(comision)
alert("No es posible poner una comision superior a lo seleccionado") alert("No es posible poner una comision superior a lo seleccionado")
} else {
comision2 = comision2 - comision
saldo = saldo + comision2;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
comision = ToDouble($('#C_TxtComision').val())
} }
if (comision > 0) { if (comision != 0) {
$('#LblSubproyecto').css("display", "block"); $('#LblSubproyecto').css("display", "block");
$('#divSubProyecton').css("display", "block"); $('#divSubProyecto').css("display", "block");
$('#LblClasificacion').css("display", "block"); $('#LblClasificacion').css("display", "block");
$('#divClasificacion').css("display", "block"); $('#divClasificacion').css("display", "block");
@@ -263,12 +267,11 @@
} else { } else {
$('#LblSubproyecto').css("display", "none"); $('#LblSubproyecto').css("display", "none");
$('#divSubProyecton').css("display", "none"); $('#divSubProyecto').css("display", "none");
$('#LblClasificacion').css("display", "none"); $('#LblClasificacion').css("display", "none");
$('#divClasificacion').css("display", "none"); $('#divClasificacion').css("display", "none");
debugger; debugger;
} }
} }

View File

@@ -38,9 +38,11 @@ Partial Class Bancos_DepositosCaja
DdlSubProyectos.DataBind() DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlSubProyectoDeposito.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoDeposito.DataBind()
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
DdlClasificacion.DataBind() DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -60,7 +62,7 @@ Partial Class Bancos_DepositosCaja
UpGvFacturas.Update() UpGvFacturas.Update()
GvFacturas.DataBind() GvFacturas.DataBind()
lblValorTotal.Text = "00.00" lblValorTotal.Text = "0.00"
divLabelTotal.Visible = True divLabelTotal.Visible = True
DivComision.Visible = True DivComision.Visible = True
End Sub End Sub
@@ -69,20 +71,22 @@ Partial Class Bancos_DepositosCaja
Dim TotalImporte As Decimal = 0 Dim TotalImporte As Decimal = 0
Dim TotalImportePrePoliza As Decimal Dim TotalImportePrePoliza As Decimal
Dim Comision As Decimal = TxtComision.Text.Todecimal
For Each Gvr As GridViewRow In GvFacturas.Rows For Each Gvr As GridViewRow In GvFacturas.Rows
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
Next Next
If TotalImporte = 0 Then If TotalImporte = 0 Then
Alert("Seleccion una factura para realizar el deposito", TipoMensaje.MsgAdvertencia) Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
TotalImportePrePoliza = TotalImporte TotalImportePrePoliza = TotalImporte
If TxtComision.Text.ToEntero > 0 Then If Comision <> 0 Then
TotalImporte = TotalImporte - TxtComision.Text.ToEntero TotalImporte = TotalImporte + Comision
If DdlSubProyectos.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then Comision = -(Comision) ' se inverte el valor, va cargada
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
@@ -123,28 +127,28 @@ Partial Class Bancos_DepositosCaja
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Entrada a bancos
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8)
'Salida de Caja Chica
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
If Not FolioIE > 0 Then If Not FolioIE > 0 Then
OcurrioError = True OcurrioError = True
End If End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If TxtComision.Text.ToEntero > 0 Then documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE)
CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
If Comision <> 0 Then
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, "Comisión", 51, "Depósito Bancario ", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True OcurrioError = True
End If End If
Else OcurrioError = True
End If End If
Else Else
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True
OcurrioError = True
End If
End If End If
For Each Gvr As GridViewRow In GvFacturas.Rows For Each Gvr As GridViewRow In GvFacturas.Rows
@@ -153,7 +157,7 @@ Partial Class Bancos_DepositosCaja
'Datos de las Nuevas PrePolizas 'Datos de las Nuevas PrePolizas
'Entrada a Bancos 'Entrada a Bancos
Dim Importe As Double = Gvr.DataKey("Importe").ToDouble Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
'Datos de las Prepolizas A Cancelar 'Datos de las Prepolizas A Cancelar
@@ -161,14 +165,14 @@ Partial Class Bancos_DepositosCaja
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
If Not FolioIE > 0 Then If Not FolioIE > 0 Then
OcurrioError = True OcurrioError = True
End If End If
CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
OcurrioError = True OcurrioError = True
End If End If
@@ -177,15 +181,13 @@ Partial Class Bancos_DepositosCaja
OcurrioError = True OcurrioError = True
End If End If
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Documento {1}</a> &nbsp &nbsp ", CveIEDestino.ToString, SerieFolio)
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio) 'documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio)
End If End If
Next Next
If OcurrioError Then If OcurrioError Then
ObjContabilidad.RollBack() ObjContabilidad.RollBack()
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
@@ -193,8 +195,11 @@ Partial Class Bancos_DepositosCaja
ObjContabilidad.Commit() ObjContabilidad.Commit()
CargaDatos() CargaDatos()
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
Alert(documentos.ToString) Alert(documentos.ToString)
End If End If
ObjContabilidad.Dispose() ObjContabilidad.Dispose()

View File

@@ -732,14 +732,15 @@ Partial Class Bancos_ProveedoresAbonar
Dim AnioDocumento As Integer = FechaDocumento.Year Dim AnioDocumento As Integer = FechaDocumento.Year
Dim MesDocumento As Integer = FechaDocumento.Month Dim MesDocumento As Integer = FechaDocumento.Month
If AnioFactura > AnioDocumento Then If UsuarioActual.Empresa.UsaAC = False Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>") If AnioFactura > AnioDocumento Then
ValFechaDocumento = True FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then ValFechaDocumento = True
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>") ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
ValFechaDocumento = True FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
End If
End If End If
End If End If
Next Next
@@ -782,7 +783,7 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub Exit Sub
End If End If
Dim ImporteSeleccionado As Decimal = 0 Dim ImporteSeleccionado As Decimal = 0
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
Dim Validada As Boolean = False Dim Validada As Boolean = False
Dim MsgValidadas As New StringBuilder Dim MsgValidadas As New StringBuilder

View File

@@ -103,8 +103,8 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label class="col-md-1 " style="width: 110px; margin-top: 5px;" runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label> <asp:Label class="col-md-1 " style="width: 110px; margin-top: 5px; display: none;" runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
<div class="col-md-2"> <div class="col-md-2" style="display: none;">
<asp:DropDownList ID="DdlGrupo2" runat="server" Width="100%" CssClass="form-control input-sm select2me Widthall"> <asp:DropDownList ID="DdlGrupo2" runat="server" Width="100%" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem> <asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem> <asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
@@ -154,7 +154,7 @@
</div> </div>
<asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False" <asp:GridView ID="GVRepAcercamientosEtapas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRep" AutoGenerateColumns="False"
DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true"> DataKeyNames="CveGrupo1,Grupo1,CveGrupo2,Grupo2" ShowHeaderWhenEmpty="true" OnRowDataBound="GVRepAcercamientosEtapas_RowDataBound">
<Columns> <Columns>
<asp:TemplateField HeaderText="Grupo1"> <asp:TemplateField HeaderText="Grupo1">
<ItemTemplate> <ItemTemplate>

View File

@@ -165,7 +165,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
hypt.HeaderText = $"Total"; hypt.HeaderText = $"Total";
hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1" }; hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1" };
string strfilstros =string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento); string strfilstros =string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlTipoProceso.SelectedValue}&CveGrupo1={DdlGrupo1.SelectedValue}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
switch (idgrupo1) switch (idgrupo1)
{ {
case 1: case 1:
@@ -183,7 +183,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
case 4: case 4:
test.HeaderText = "Fecha"; test.HeaderText = "Fecha";
Agrupador = "Fecha"; Agrupador = "Fecha";
hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}"; hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={{2}}&FechaFin={{2}}{strfilstros}";
break; break;
case 6: case 6:
test.HeaderText = "Giro"; test.HeaderText = "Giro";
@@ -203,7 +203,7 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
hyp.DataTextField = $"C_{row["CveEtapaProceso"]}"; hyp.DataTextField = $"C_{row["CveEtapaProceso"]}";
hyp.HeaderText = $"{row["EtapaProceso"]}"; hyp.HeaderText = $"{row["EtapaProceso"]}";
hyp.DataNavigateUrlFields = new string[]{ "CveGrupo1","CveGrupo2"}; hyp.DataNavigateUrlFields = new string[]{ "CveGrupo1","CveGrupo2"};
hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&cveEtapaProceso={row["CveEtapaProceso"]}"; hyp.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.aspx?CveTipoProceso={DdlGrupo1.SelectedValue}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}&cveEtapaProceso={row["CveEtapaProceso"]}";
GVRepAcercamientosEtapas.Columns.Add(hyp); GVRepAcercamientosEtapas.Columns.Add(hyp);
} }
} }
@@ -603,4 +603,17 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
{ {
} }
protected void GVRepAcercamientosEtapas_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.DataKey("Grupo1") == "Total")
{
e.Row.CssClass = "Totales";
}
}
}
} }

View File

@@ -29,28 +29,11 @@
height: 500px; height: 500px;
} }
.GVRepAcercamientosDetalle a { .chkChoice input
-webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; {
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease; margin-right: 5px;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
color: #3699FF !important;
text-decoration: none;
font-weight: 700;
width: 100%;
} }
.GVRepAcercamientosDetalle a:hover {
-webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
}
.chkChoice input
{
margin-right: 5px;
}
</style>cc </style>cc
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -64,13 +47,17 @@
<li> <li>
<asp:LinkButton ID="LnkEditargv" runat="server" OnClick="LnkEditargv_Click"><i class="fa fa-edit" ></i><span style="padding-left:5px;">Personalizar Columnas</span></asp:LinkButton> <asp:LinkButton ID="LnkEditargv" runat="server" OnClick="LnkEditargv_Click"><i class="fa fa-edit" ></i><span style="padding-left:5px;">Personalizar Columnas</span></asp:LinkButton>
</li> </li>
<%-- <li> <li>
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton> <asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton> <asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
</li>--%> </li>
</ContentTemplate> </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPDF" />
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
@@ -174,54 +161,54 @@
</div> </div>
</div>--%> </div>--%>
<div class="Filtros"> <div class="portlet solid grey-cascade portlet-filter">
<div class="row"> <div class="portlet-title portlet-filterT smalltitle">
<div class="col-sm-3"> <div class="tools">
<div class="form-group form-md-line-input input-iconright"> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="LnkConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList> <a href="javascript:;" class="expand"></a>
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
</div>
</div> </div>
<div class="col-sm-3"> <div class="titlefiltros caption">
<div class="form-group form-md-line-input input-iconright"> <div class="row" style="margin-left: 10px;">
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList> <asp:Label class="col-md-1 " style="width: 100px; margin-top: 5px; display: none;" runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label> <div class="col-md-2" style="display: none;">
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
</div>
<asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
</div>
<asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
</div>
<asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
<div class="col-sm-3">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
</div>
</div>
<div class="col-md-2">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall"></asp:DropDownList>
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
</div>
</div>
<div class="col-sm-1 text-right">
<br />
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
</div>
</div> </div>
<div class="row"> <div class="portlet-body" style="display: none;">
<div class="row" style="margin-left: 10px; margin-top: 10px;">
<div class="col-md-3" style="display: none;"> <asp:Label class="col-md-1 " style="width: 100px; margin-top: 5px;" runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
<div class="form-group form-md-line-input input-iconright "> <div class="col-md-2">
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall"> <asp:DropDownList ID="DdlGrupo1" runat="server" Width="100%" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem> <asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem> <asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem> <asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem> <asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem> <asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
<asp:ListItem Value="6" Text="Giro"></asp:ListItem>
<asp:ListItem Value="7" Text="Producto Servicio"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
</div> </div>
</div>
<div class="col-md-3" style="display: none;"> <asp:Label class="col-md-1 " style="width: 110px; margin-top: 5px; display: none;" runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-2" style="display: none;">
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall"> <asp:DropDownList ID="DdlGrupo2" runat="server" Width="100%" CssClass="form-control input-sm select2me Widthall">
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem> <asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem> <asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem> <asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
@@ -229,13 +216,11 @@
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem> <asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem> <asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
</div> </div>
</div>
<div class="col-md-2"> <asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
<div class=""> <div class="col-sm-1">
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top:5px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -244,11 +229,10 @@
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </div>
</div>
<div class="col-md-2"> <asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
<div class=""> <div class="col-sm-1">
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top:5px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -257,12 +241,22 @@
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </div>
</div>
<div class="row">
<asp:Label class="col-md-1 " style="width: 124px; margin-top: 5px;" runat="server" Text="Producto Servicio:" AssociatedControlID="DdlPS"></asp:Label>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
<asp:Label class="col-md-1 " style="width: 90px; margin-top: 5px;" runat="server" Text="Giro:" AssociatedControlID="DdlGiroClasificacion"></asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGiroClasificacion" Width="100%" runat="server" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" AppendDataBoundItems="true" CssClass="form-control select2me"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>
<asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVRepAcercamientosDetalle" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento" OnRowDataBound="GVRepAcercamientosDetalle_RowDataBound"> <asp:GridView ID="GVRepAcercamientosDetalle" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" DataKeyNames="CveAcercamiento" OnRowDataBound="GVRepAcercamientosDetalle_RowDataBound">
<Columns> <Columns>
<asp:TemplateField HeaderText="Prospecto"> <asp:TemplateField HeaderText="Prospecto">
<ItemTemplate> <ItemTemplate>

View File

@@ -6,6 +6,9 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using Extensiones; using Extensiones;
using System.Data; using System.Data;
using System.Text;
using System.IO;
using Microsoft.Reporting.WebForms;
public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
{ {
@@ -75,6 +78,19 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
ViewState["DtProbabilidadAcercamiento"] = value; ViewState["DtProbabilidadAcercamiento"] = value;
} }
} }
private DataTable DTRepAcercamientosDetalle
{
get
{
return (DataTable)ViewState["DTRepAcercamientosDetalle"];
}
set
{
ViewState["DTRepAcercamientosDetalle"] = value;
}
}
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@@ -88,6 +104,8 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RsFecha = Request["Fecha"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["Fecha"].ToString(); RsFecha = Request["Fecha"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["Fecha"].ToString();
RsFechaIni = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString(); RsFechaIni = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString();
RsFechaFin = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString(); RsFechaFin = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString();
TxtFechaInicio.Text = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString();
TxtFechaFin.Text = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString();
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); } try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); }
catch (Exception) { RsFechaIni = ""; } catch (Exception) { RsFechaIni = ""; }
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); } try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); }
@@ -128,6 +146,11 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
DdlMedioCaptacion.DataSource = null; DdlMedioCaptacion.DataSource = null;
DdlProbabilidad.DataSource = null; DdlProbabilidad.DataSource = null;
DdlPS.setEsWebService(true);
DdlPS.SelectedValue = "-1";
DdlPS.SelectedText = "Seleccione";
if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1)) if (ObjCRM.GetTipoProceso(UsuarioActual.CveEmpresa, 1))
{ {
DdlTipoProceso.DataSource = ObjCRM.DtResultados; DdlTipoProceso.DataSource = ObjCRM.DtResultados;
@@ -146,6 +169,8 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
} }
ObjCRM.Dispose(); ObjCRM.Dispose();
DdlTipoProceso.DataBind(); DdlTipoProceso.DataBind();
DdlVendedor.DataBind(); DdlVendedor.DataBind();
DdlMedioCaptacion.DataBind(); DdlMedioCaptacion.DataBind();
@@ -159,6 +184,11 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
DdlProbabilidad.SelectedValue = "-1"; DdlProbabilidad.SelectedValue = "-1";
DdlTipoProceso.SelectedIndex = 0; DdlTipoProceso.SelectedIndex = 0;
DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlGiroClasificacion.DataSource = dtGiroClasificaciones;
DdlGiroClasificacion.DataBind();
DdlGiroClasificacion.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Seleccione", "-1"));
int n; int n;
string CveProbabilidadAcercamiento = Request["CveProbabilidadAcercamiento"]; string CveProbabilidadAcercamiento = Request["CveProbabilidadAcercamiento"];
bool isNumeric = int.TryParse(CveProbabilidadAcercamiento, out n); bool isNumeric = int.TryParse(CveProbabilidadAcercamiento, out n);
@@ -194,6 +224,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
ClsCRM ObjRepA = new ClsCRM(); ClsCRM ObjRepA = new ClsCRM();
ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin,CveTipoProceso:DdlTipoProceso.SelectedValue.ToEntero()); ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin,CveTipoProceso:DdlTipoProceso.SelectedValue.ToEntero());
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados; GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
DTRepAcercamientosDetalle = ObjRepA.DtResultados;
ObjRepA.Dispose(); ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind(); GVRepAcercamientosDetalle.DataBind();
this.GVRepAcercamientosDetalle.Columns[9].Visible = false; this.GVRepAcercamientosDetalle.Columns[9].Visible = false;
@@ -269,7 +300,65 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
} }
upDatosRepA.Update(); upDatosRepA.Update();
RegistraScript("$('#ModalEditar').modal('hide')"); RegistraScript("$('#ModalEditar').modal('hide')");
}
protected void LnkPdf_Click(object sender, EventArgs e)
{
Imprime("PDF");
} }
protected void LnkExcel_Click(object sender, EventArgs e)
{
Imprime("EXCEL");
}
protected void Imprime(string formato)
{
if (GVRepAcercamientosDetalle.Rows.Count > 0)
{
StringBuilder StrFiltro = new StringBuilder();
if (TxtFechaInicio.Text != "") { StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio:</b> {0}", TxtFechaInicio.Text.ToDate().ToShortDateString()); }
if (TxtFechaFin.Text != "") { StrFiltro.AppendFormat("&emsp;<b>Fecha Fin:</b> {0}", TxtFechaFin.Text.ToDate().ToShortDateString()); }
if (DdlVendedor.SelectedValue.ToEntero() > 0) { StrFiltro.AppendFormat("&emsp;<b>Vendedor:</b> {0}", DdlVendedor.SelectedItem.ToString()); }
if (DdlMedioCaptacion.SelectedValue.ToEntero() > 0) { StrFiltro.AppendFormat("&emsp;<b>Medio Captación:</b> {0}", DdlMedioCaptacion.SelectedItem.ToString()); }
if (DdlProbabilidad.SelectedValue.ToEntero() > 0) { StrFiltro.AppendFormat("&emsp;<b>Probabilidad:</b> {0}", DdlProbabilidad.SelectedItem.ToString()); }
if (DdlPS.SelectedValue.ToEntero() > 0) { StrFiltro.AppendFormat("&emsp;<b>Producto Servicio:</b> {0}", DdlPS.SelectedText.ToString()); }
if (DdlGiroClasificacion.SelectedValue.ToEntero() > 0) { StrFiltro.AppendFormat("&emsp;<b>Clasificación:</b> {0}", DdlGiroClasificacion.SelectedItem.ToString()); }
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
var Imagen = new FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
string FechaI, FechaF;
if(TxtFechaInicio.Text == "" || TxtFechaInicio.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = TxtFechaInicio.Text; }
if (TxtFechaFin.Text == "" || TxtFechaFin.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = TxtFechaFin.Text; }
List<ReportParameter> parametros = new List<ReportParameter>();
parametros.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new ReportParameter("FechaInicio", FechaI));
parametros.Add(new ReportParameter("FechaFin", FechaF));
parametros.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
parametros.Add(new ReportParameter("Filtros", StrFiltro.ToString()));
parametros.Add(new ReportParameter("FechaImprimio", DateTime.Now.ToShortDateString()));
if (Imagen.Exists)
{
parametros.Add(new ReportParameter("LogoPath", logouri));
}
else
{
parametros.Add(new ReportParameter("LogoPath", ""));
}
ImprimirPDF("Empresas/Grales/Formatos/RepAcercamientoProcesoDetalle.rdlc", DTRepAcercamientosDetalle, parametros, String.Format("RepTraspasoAlmacen-{0}", DateTime.Now.ToShortDateString()), formato);
}
else
{
Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
} }

View File

@@ -351,7 +351,7 @@
</div> </div>
</div> </div>
<div class="row" id="TrProveedor" runat="server"> <div class="row" id="TrProveedor" runat="server" visible="false">
<label class="col-md-3 truncate "> <label class="col-md-3 truncate ">
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label> <asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
<div class="col-md-9"> <div class="col-md-9">
@@ -841,7 +841,7 @@
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox> <asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</EditItemTemplate> </EditItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="50px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -974,67 +974,7 @@
<ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Presupuesto de Control"> <ajax:TabPanel ID="TabPVInsumos" runat="server" HeaderText="Presupuesto de Control">
<ContentTemplate> <ContentTemplate>
<%-- <asp:UpdatePanel ID="UpTitulosInsumos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="PanelContratosInsumos" runat="server">
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaInsumos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaInsumos','{0}');sumagvx2();", GvInsumos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaInsumos','{0}');sumagvx2();", GvInsumos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<table class="table Widthall">
<tr class="Titulos">
<td style="width: 150px">Cantidad</td>
<td style="width: 75px">Limitar</td>
<td style="width: 75px">Clave Interna</td>
<td style="width: 400px">Producto/Servicio</td>
<td style="width: 100px">U. M.</td>
<td style="width: 150px">Precio Unitario</td>
<td style="width: 150px">Total</td>
<td style="width: 150px" id="THAvanceInsumos" runat="server" visible="false">Permite Avance</td>
<td style="width: 100px">Comandos</td>
</tr>
<tr class="Titulos">
<td>
<asp:TextBox ID="TxtCantidadInsumos" runat="server" Width="70px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" TargetControlID="TxtCantidadInsumos" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVCantidadInsumos" runat="server" ControlToValidate="TxtCantidadInsumos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInsumos"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadInsumos" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:CheckBox ID="ChkLimitar" runat="server" />
</td>
<td>
<asp:TextBox ID="TxtNoIdentificacionvInsumos" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
</td>
<td>
<div style="max-width: 550px;">
<asp:DropDownList ID="DdlClasificacionAddInsumos" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="table-group-action-input form-control input-inline input-sm select2me" Style="width: 100%;"></asp:DropDownList>
<br />
<ADS:Dropdownlost runat="server" ID="DdlProductowsInsumos" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</td>
<td>
<asp:DropDownList ID="DdlUMInsumos" runat="server" AutoPostBack="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList></td>
<td style="width: 75px">
<asp:TextBox ID="TxtPUInsumos" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender12" runat="server" TargetControlID="TxtPUInsumos" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVPUInsumos" runat="server" ControlToValidate="TxtPUInsumos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInsumos"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CVEPUInsumos" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUInsumos" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td></td>
<td id="TDAvanceInsumos" runat="server" visible="false"></td>
<td>
<asp:Button Text="Agregar" runat="server" ID="BtnAgregarDetalleInsumos" Width="100px" OnClick="BtnAgregarDetalleInsumos_Click" ValidationGroup="GrpAgregarInsumos" class="btn btn-default" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>--%>
@@ -1063,7 +1003,7 @@
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox> <asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadContratada") %>' Width="90px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</EditItemTemplate> </EditItemTemplate>
<ItemStyle Width="150px" /> <ItemStyle Width="50px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -1906,7 +1846,7 @@
<%--
<ajax:TabPanel ID="TabPanel2" runat="server" HeaderText="Utilidad o Perdida"> <ajax:TabPanel ID="TabPanel2" runat="server" HeaderText="Utilidad o Perdida">
<ContentTemplate> <ContentTemplate>
@@ -2027,7 +1967,7 @@
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>--%>

View File

@@ -738,8 +738,8 @@ Partial Class Contratos_ContratoObra
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString) DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
If ObjContratos.CveProveedor > 0 Then If ObjContratos.CveProveedor > 0 Then
TrProveedor.Visible = True ' TrProveedor.Visible = True
TrCliente.Visible = False TrCliente.Visible = False
CargaContratista() CargaContratista()
DdlContratista.SelectedValue = ObjContratos.CveProveedor.ToString DdlContratista.SelectedValue = ObjContratos.CveProveedor.ToString
@@ -1621,6 +1621,7 @@ Partial Class Contratos_ContratoObra
End Sub End Sub
#Region "GV PRESUPUESTOS" #Region "GV PRESUPUESTOS"
Protected Sub EstClick(sender As Object, e As System.EventArgs) Protected Sub EstClick(sender As Object, e As System.EventArgs)
'Get the button that raised the event 'Get the button that raised the event
Dim btn As CheckBox = DirectCast(sender, CheckBox) Dim btn As CheckBox = DirectCast(sender, CheckBox)
@@ -2420,19 +2421,12 @@ Partial Class Contratos_ContratoObra
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow) Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
Dim CodigoPS As String = GvRow.DataKey("CodigoPS") Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
Dim Clasificacion As String = GvRow.DataKey("Clasificacion") Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
Dim CveRubro As Integer = GvRow.DataKey("CveRubro").ToEntero Dim CveRubro As Integer = GvRow.DataKey("CveRubro").ToEntero
GvDatosVentasAvance.Visible = False GvDatosVentasAvance.Visible = False
If CveRubro = 3 Then If CveRubro = 3 Then
@@ -3308,17 +3302,21 @@ Partial Class Contratos_ContratoObra
Private Function GetPS(Opt As String, Valor As String) As String Private Function GetPS(Opt As String, Valor As String) As String
Dim StrReturn As String = String.Empty Dim StrReturn As String = String.Empty
Dim CvePS As Integer = 0 Dim CvePS As Integer = 0
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero
If CvePS > 0 Then If CvePS > 0 Then
StrReturn = "True|" & CvePS.ToString StrReturn = "True|" & CvePS.ToString
Else Else
StrReturn = "False|" & Valor & " en la fila " & NumRow & ", columna " & Opt StrReturn = "False|" & Valor & " en la fila " & NumRow & ", columna " & Opt
End If End If
Return StrReturn Return StrReturn
End Function End Function
Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click Private Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
@@ -4503,7 +4501,7 @@ Partial Class Contratos_ContratoObra
{ {
.ColumnHeaders = True, .ColumnHeaders = True,
.StartRow = 0, .StartRow = 0,
.NumberOfColumns = 4, .NumberOfColumns = 5,
.NumberOfRows = worksheet.Rows.Count, .NumberOfRows = worksheet.Rows.Count,
.Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture .Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture
}) })
@@ -4543,10 +4541,6 @@ Partial Class Contratos_ContratoObra
Dim ErrorProceso = False Dim ErrorProceso = False
Dim DTPS = New DataTable Dim DTPS = New DataTable
DTPS.Columns.Add("CveContratoDetalle", GetType(Integer)) DTPS.Columns.Add("CveContratoDetalle", GetType(Integer))
DTPS.Columns.Add("Cantidad", GetType(Double)) DTPS.Columns.Add("Cantidad", GetType(Double))
@@ -4584,21 +4578,65 @@ Partial Class Contratos_ContratoObra
Dim RowNoEncontrados As String = "" Dim RowNoEncontrados As String = ""
If Not DTPresupuesto Is Nothing Then If Not DTPresupuesto Is Nothing Then
For Each DrowPS As DataRow In DTPresupuesto.Rows For Each DrowPS As DataRow In DTPresupuesto.Rows
Dim CvePS As Integer = -1
Dim CveUM As Integer = -1
Dim StrArray() As String
Dim StrArray() As String = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
Dim CvePS As Integer StrArray = GetPS("Codigo", DrowPS("Codigo").ToString).Split("|"c)
Dim CveUM As Integer
If StrArray.Length > 0 Then If StrArray.Length > 0 Then
If CBool(StrArray(0)) = True Then If CBool(StrArray(0)) = True Then
CvePS = StrArray(1).ToEntero CvePS = StrArray(1).ToEntero
Else
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
End If End If
End If End If
If CvePS = -1 Then
StrArray = GetPS("PS", DrowPS("Producto").ToString).Split("|"c)
If StrArray.Length > 0 Then
If CBool(StrArray(0)) = True Then
CvePS = StrArray(1).ToEntero
End If
End If
If CvePS = -1 Then
Dim ObjPS As New ClsProductosServicios
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{ DrowPS("UnidadMedida").ToString}' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString}'").ToString.ToEntero
If Not CveUnidadMedida > 0 Then
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
End If
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, -1, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
CvePS = ObjPS.CvePS
Else
CvePS = -1
RowNoEncontrados &= "Producto: " & StrArray(1) & "<\BR>"
End If
ObjPS.Dispose()
End If
End If
If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then
CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero

View File

@@ -277,7 +277,8 @@
<asp:TemplateField HeaderText="Descripción"> <asp:TemplateField HeaderText="Descripción">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
<asp:HyperLink ID="HplDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato") %>' NavigateUrl='<%# Eval("CveContrato", "ContratoObra.aspx?CveContrato={0}")%>' Target="_blank" ></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

File diff suppressed because it is too large Load Diff

View File

@@ -2177,8 +2177,10 @@ Partial Class Inventarios_EntradasSalidas
End If End If
If UsuarioActual.CveUsuario.Contiene(2185, 100) And DdlAlmacen.SelectedValue.ToEntero.Contiene(651, 658) Then If UsuarioActual.CveUsuario.Contiene(2185, 100) Then
DdlConcepto.Items.Add(New ListItem("Entrada por Ajuste", "32")) DdlConcepto.Items.Add(New ListItem("Entrada por Ajuste", "32"))
DdlConcepto.Items.Add(New ListItem("Salida por Ajuste", "34"))
End If End If
@@ -4658,7 +4660,7 @@ Partial Class Inventarios_EntradasSalidas
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero() CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}") UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
End If End If
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "", AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", Codigo, "-1", "",
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False) Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
NumAgregados = NumAgregados + 1 NumAgregados = NumAgregados + 1

View File

@@ -568,6 +568,7 @@ Partial Class OC
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaDatosAgregarPS() CargaDatosAgregarPS()

View File

@@ -671,14 +671,16 @@ Partial Class Ventas_ClientesAbonar
Dim AnioDocumento As Integer = FechaDocumento.Year Dim AnioDocumento As Integer = FechaDocumento.Year
Dim MesDocumento As Integer = FechaDocumento.Month Dim MesDocumento As Integer = FechaDocumento.Month
If AnioFactura > AnioDocumento Then If UsuarioActual.Empresa.UsaAC = False Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>") If AnioFactura > AnioDocumento Then
ValFechaDocumento = True FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then ValFechaDocumento = True
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>") ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
ValFechaDocumento = True FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
End If ValFechaDocumento = True
End If
End If
End If End If
Next Next
@@ -973,8 +975,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento * tipoCambioVenta importeMX = ImporteMovimiento * tipoCambioVenta
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = tipoCambioVenta TipoCambioGeneral = tipoCambioVenta
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1020,8 +1022,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento * tipoCambioVenta importeMX = ImporteMovimiento * tipoCambioVenta
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = tipoCambioVenta TipoCambioGeneral = tipoCambioVenta
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1055,8 +1057,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento * tipoCambioVenta importeMX = ImporteMovimiento * tipoCambioVenta
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = tipoCambioVenta TipoCambioGeneral = tipoCambioVenta
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1137,8 +1139,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1185,8 +1187,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1220,8 +1222,8 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago) ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago)
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) importeMX = importeMX.RoundSQL
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
@@ -1484,8 +1486,8 @@ Partial Class Ventas_ClientesAbonar
TipoMovimiento = True TipoMovimiento = True
End If End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = Math.Round(importeMX, 2) importeMX = importeMX.RoundSQL
TipoCambioGeneral = tipoCambioPago TipoCambioGeneral = tipoCambioPago
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto

View File

@@ -16898,7 +16898,7 @@ Partial Class Ventas
End If End If
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento TotalCalculableImpuestos = ((Cantidad * (PU)) - Descuento).RoundSQL
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
Row("PU") = PU Row("PU") = PU
@@ -16968,7 +16968,7 @@ Partial Class Ventas
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales) Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
Row("TipoDescuento") = HdnTipoDescuento.Value Row("TipoDescuento") = HdnTipoDescuento.Value
Row("CvePromocionDetalle") = CvePromocionDetalle Row("CvePromocionDetalle") = CvePromocionDetalle
Row("Total") = (Cantidad * PU) Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales)
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales) Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas") 'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
@@ -17089,7 +17089,7 @@ Partial Class Ventas
End If End If
PU = PU.RoundSQL(6) PU = PU.RoundSQL(6)
DrPoliza("PU") = PU DrPoliza("PU") = PU
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)) TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)).RoundSQL
If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then
DrPoliza("PorcentajeIVA") = PorcentajeIVA DrPoliza("PorcentajeIVA") = PorcentajeIVA
@@ -17107,7 +17107,7 @@ Partial Class Ventas
DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
DrPoliza("Descuento") = 0 ' Descuento DrPoliza("Descuento") = 0 ' Descuento
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")