This commit is contained in:
2022-05-30 15:52:35 -07:00
32 changed files with 2164 additions and 1732 deletions

View File

@@ -142,36 +142,49 @@
<ContentTemplate>
<div class="row" style="margin-bottom:5px">
<div class="col-md-6" runat="server" >
<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>
<div class="col-md-1" runat="server" >
<label style=" ">Cuenta Depósito:</label>
</div>
<div class="col-md-3" runat="server" >
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
</div>
<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;">Fecha:</label>
</div>
<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>
<div class="col-md-2" runat="server" style="text-align: left;">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFecha" PopupButtonID="ImgCalendarioFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida2"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida2"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<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>
</div>
</div>
</div>
<div class="col-md-1" >
<label style="width:70px;">Observaciones:</label>
</div>
<div class="col-md-2" runat="server" style="text-align: left;">
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtObservaciones" runat="server" ControlToValidate="TxtObservaciones" Display="None" ErrorMessage="El campo <b>''Observaciones''</b> es requerido por la aplicación." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceRfvTxtObservaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtObservaciones" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="true">
<div class="col-md-2" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="true">
<asp:label runat="server">Seleccionado: $</asp:label>
<asp:label runat="server" ID="lblValorTotal">0.00</asp:label>
<asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label>
</div>
</div>
</ContentTemplate>
@@ -282,10 +295,10 @@
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)">
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)" checked="checked" disabled >
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="ChkFactura" CssClass="CssSelector" runat="server"/>
<asp:CheckBox ID="ChkFactura" CssClass="CssSelector" runat="server" Checked="true" Enabled="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Factura">
@@ -335,7 +348,7 @@
<br />
<br />
<asp:Button ID="BtnDepositar" runat="server" Text="Depósitar" CssClass="btn btn-primary" />
<asp:Button ID="BtnDepositar" runat="server" Text="Depósitar" CssClass="btn btn-primary" ValidationGroup="Valida" />
</div>
</div>
</ContentTemplate>

View File

@@ -97,6 +97,8 @@ Partial Class Bancos_DepositosCaja
ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero, DdlTipoPago.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, MSI:=MSI)
GvFacturas.DataSource = ObjBancos.DtResultados
lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00")
ObjBancos.Dispose()
@@ -108,7 +110,7 @@ Partial Class Bancos_DepositosCaja
TxtDescuento.Text = ""
TxtIVA.Text = ""
TxtComisionIntermediario.Text = ""
lblValorTotal.Text = "0.0"
'lblValorTotal.Text = "0.0"
lblValorTotalSeleccionado.Text = "0.0"
divLabelTotal.Visible = True
DdlSubProyectoDeposito.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero)
@@ -116,7 +118,11 @@ Partial Class Bancos_DepositosCaja
DdlSubProyectoIntermediario.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero)
UpGvFacturas.Update()
UpParametros.Update()
UpComisiones.Update()
UpComisiones.Update()
End Sub
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
@@ -247,7 +253,7 @@ Partial Class Bancos_DepositosCaja
If Not FolioIE > 0 Then
OcurrioError = True
End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE)
@@ -295,7 +301,7 @@ Partial Class Bancos_DepositosCaja
OcurrioError = True
Exit For
End If
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)
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then

View File

@@ -247,6 +247,23 @@
</div>
</div>
</div>
<asp:UpdatePanel runat="server" >
<ContentTemplate>
<div class="col-md-6" runat="server" id="DvComprobante">
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="row text-center">

View File

@@ -108,7 +108,10 @@ public partial class Bancos_Devoluciones : ClsPaginas
divTipoDevolucion.Visible = false;
break;
}
ComprobanteMuestraOculta();
CargaTipoTransaccion(tipo);
}
protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e)
@@ -125,6 +128,23 @@ public partial class Bancos_Devoluciones : ClsPaginas
break;
}
ComprobanteMuestraOculta();
}
private void ComprobanteMuestraOculta()
{
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
{
Anexo.Text = "";
DvComprobante.Visible = false;
}
else
{
DvComprobante.Visible = true;
}
}
protected void CargaTipoTransaccion(string tipo)
@@ -374,6 +394,19 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
//terminan validaciones
List<Archivo> filesgral = Anexo.getfiles().Archivos;
string filemove = "";
string Comprobante = "";
foreach(Archivo fileItem in filesgral){
Comprobante = System.IO.Path.GetExtension(String.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
filemove = fileItem.filename;
}
ClsBancos ObjIE = new ClsBancos();
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());
@@ -489,7 +522,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
{
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda,
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
if (CveIE > 0)
{
//GUARDA PREPOLIZAS DETALLE DEVOLUCION
@@ -648,6 +681,12 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
ObjIE.Commit();
if (filemove != "")
{
filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
if (!Msg.ToString().Equals(""))
{
string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);

View File

@@ -231,7 +231,7 @@
<asp:Literal ID="LtlTotalIngreso" runat="server" Text='<%# Eval("TotalIngresos", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="Devoluciones" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
@@ -240,7 +240,16 @@
<asp:Literal ID="LtlDevoluciones" runat="server" Text='<%# Eval("Devoluciones", "{0:#,###.##}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="Importe Inicial" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlImporteInicial" runat="server" Text='<%# Eval("ImporteInicial", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="Total Caja" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>

View File

@@ -8,10 +8,17 @@ Imports System.Collections.Generic
Partial Class Bancos_RepCortes
Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES"
Private Property DtCortes As DataTable
Get
Return CType(ViewState("DtCortes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtCortes") = value
End Set
End Property
Private Property DtCortesVentasResumen As DataTable
Get
Return CType(ViewState("DtCortesVentasResumen"), DataTable)
@@ -67,16 +74,20 @@ Partial Class Bancos_RepCortes
#Region " C A R G A - D A T O S "
Public Sub CargaDatos()
Dim ObjPuntoVenta As New ClsPuntoVenta
Public Sub CargaDatos()
Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha)
Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha)
Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha)
Dim ObjPuntoVenta As New ClsPuntoVenta
If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjPuntoVenta.DtResultados
GvDatos.DataBind()
UPDatos.Update()
DtCortes = ObjPuntoVenta.DtResultados.Copy()
End If
ObjPuntoVenta.Dispose()
ObjPuntoVenta.Dispose()
GvDatos.DataSource = DtCortes
GvDatos.DataBind()
UPDatos.Update()
End Sub
#End Region
@@ -85,6 +96,9 @@ Partial Class Bancos_RepCortes
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCorte").ToString = "" Then
e.Row.CssClass = "SubTotales2"
If DtCortes IsNot Nothing Then
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
End If
End If
End If
End Sub