This commit is contained in:
2024-06-19 11:04:19 -07:00
10 changed files with 226 additions and 185 deletions

View File

@@ -1448,11 +1448,33 @@ Partial Class Bancos_IE
'RecargaCuentas
CargaCuenta(CveMoneda)
RecargaCuentasDepositos()
ValidaFechaDocumentoDiasPosteriores()
UpDatos.Update()
BtnGuardar.Enabled = True
End Sub
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
Calendario.EndDate = NowADS().AddDays(3)
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
Calendario.EndDate = NowADS().AddMonths(3)
End If
If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
Calendario.EndDate = NowADS().AddDays(21)
End If
UpDatos.Update()
UpGuardar.Update()
End Sub
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
'si solo es de egreso el movimiento debe de generar el siguiente folio.

View File

@@ -268,6 +268,7 @@
<asp:DropDownList ID="DdlOtrosPagos" Width="100%" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlOtrosPagos_SelectedIndexChanged">
<asp:ListItem Value="-1">-</asp:ListItem>
<asp:ListItem Value="2">Otros Egresos</asp:ListItem>
<asp:ListItem Value="3">Deudores Diversos</asp:ListItem>
</asp:DropDownList>
</div>
</div>

View File

@@ -348,7 +348,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (ImporteComision != 0 && MsgError == "")
{
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, 255, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
int tTipoConceptoOtro = 255;
if (DdlOtrosPagos.SelectedValue == "3") tTipoConceptoOtro = 43; //deudores diversos
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, tTipoConceptoOtro, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de pago acreedor";
break;
@@ -394,9 +397,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (MsgError.Equals(""))
{
ObjIE.Commit();
if (Msg.ToString().Equals(""))
{
Msg.AppendFormat("El Documento se guardo correctamente. Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b> <br/>", CveIE, ObjIE.Folio);
Msg.AppendFormat("El Documento se guardo correctamente. <br/> Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b> <br/>", CveIE, ObjIE.Folio);
}
//GUARDA COMPROBANTE
@@ -432,11 +436,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
// }
//}
if (IDPoliza > 0)
{
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
}
ObjIE.Commit();
//if (IDPoliza > 0)
//{
// Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
//}
Msg.AppendFormat(@"<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"">Ver Póliza</a><br/>", CvePrePoliza);
Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
}
else
{
@@ -616,9 +623,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (MsgError.Equals(""))
{
ObjIE.Commit();
if (Msg.ToString().Equals(""))
{
Msg.Append("El Documento se guardo correctamente");
Msg.Append("El Documento se guardo correctamente.<br/>");
}
System.IO.FileInfo archivo = null;
@@ -648,11 +656,13 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
// }
//}
if (IDPoliza > 0)
{
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
}
ObjIE.Commit();
//if (IDPoliza > 0)
//{
// Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
//}
Msg.AppendFormat(@"<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"">Ver Póliza</a><br/>", CvePrePoliza);
Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
}
else
{

View File

@@ -311,12 +311,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (MsgError.Equals(""))
{
ObjIE.Commit();
if (Msg.ToString().Equals(""))
{
Msg.Append("El Documento se guardo correctamente");
Msg.Append("El Documento se guardo correctamente.<br/>");
}
System.IO.FileInfo archivo = null;
Msg.AppendFormat("<br/><br/> Folio: <a class='Texto' target='_blank' href='/Bancos/IE.aspx?CveIE={0}'>{1}</a><br/>", CveIE, TxtFolioPrestamo.Text.Trim());
Msg.AppendFormat("Folio: <a class='Texto' target='_blank' href='/Bancos/IE.aspx?CveIE={0}'>{1}</a><br/>", CveIE, TxtFolioPrestamo.Text.Trim());
if (DdlTipoTransaccionPrestamo.SelectedValue.ToEntero().Contiene(2, 8, 9))
{
@@ -335,7 +336,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
{
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuentaPrestamo.SelectedValue.ToEntero()));
}
//if (archivo.Length > 0)
//{
// if (archivo.Exists)
@@ -344,11 +345,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
// }
//}
if (IDPoliza > 0)
{
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
}
ObjIE.Commit();
//if (IDPoliza > 0)
//{
// Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
//}
Msg.AppendFormat(@"<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"">Ver Póliza</a><br/>", CvePrePoliza);
Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
}
else
{
@@ -682,12 +685,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (MsgError.Equals(""))
{
ObjIE.Commit();
if (Msg.ToString().Equals(""))
{
Msg.Append("El Documento se guardo correctamente");
Msg.Append("El Documento se guardo correctamente.<br/>");
}
System.IO.FileInfo archivo = null;
Msg.AppendFormat("<br/><br/> Folio: <a class='Texto' target='_blank' href='/Bancos/IE.aspx?CveIE={0}'>{1}</a><br/>", CveIE, TxtFolio.Text.Trim());
Msg.AppendFormat("Folio: <a class='Texto' target='_blank' href='/Bancos/IE.aspx?CveIE={0}'>{1}</a><br/>", CveIE, TxtFolio.Text.Trim());
if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(2, 8, 9))
{
@@ -715,11 +719,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
// }
//}
if (IDPoliza > 0)
{
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
}
ObjIE.Commit();
//if (IDPoliza > 0)
//{
// Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
//}
Msg.AppendFormat(@"<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"">Ver Póliza</a><br/>", CvePrePoliza);
Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
}
else
{

View File

@@ -848,13 +848,12 @@ Partial Class Bancos_PopIECompras
#Region "DDL'S CHANGED"
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
Select Case valor
Case 1
LblPagueseA.Text = "Páguese a"
Case 2
LblPagueseA.Text = "Beneficiario"
End Select
@@ -1723,17 +1722,20 @@ Partial Class Bancos_PopIECompras
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
Calendario.EndDate = NowADS().AddDays(3)
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
Calendario.EndDate = NowADS().AddDays(2)
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
Calendario.EndDate = NowADS().AddDays(30)
If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
Calendario.EndDate = NowADS().AddMonths(3)
End If
If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
Calendario.EndDate = NowADS().AddDays(21)
End If
UpDatos.Update()
UpGuardar.Update()

View File

@@ -161,7 +161,7 @@
</div>
</div>
<div class="row" runat="server" id="rowComisiones" visible="false">
<div class="row" runat="server" id="rowComisiones" >
<label class="col-xs-4" runat="server" id="lblpagocomisiones">Comisiones:</label>
<div class="col-xs-8">
<asp:DropDownList ID="DdlOtrosPagos" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" Width="100%">

View File

@@ -325,9 +325,7 @@ Partial Class Bancos_PopIEVentas
ViewState("CveIE") = -1
End If
If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
rowComisiones.Visible = True
End If
'rowComisiones.Visible = True
'SI USUARIO USA AMORTIZACIÓN CONTABLE
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
@@ -547,10 +545,11 @@ Partial Class Bancos_PopIEVentas
CargaCorteCaja()
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'toma como proridad el que viene de
If UsuarioActual.Empresa.Funcionalidad(531) = "1" OrElse (dr("CveCorte").ToString.ToEntero > 0) Then 'toma como proridad el que viene de
CveCorte = dr("CveCorte").ToString.ToEntero
End If
If RFCCliente.ToUpper <> "XAXX010101000" Then
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=RFCCliente.ToUpper).FiltroPrimeroValor("CveProveedor").ToEntero
@@ -753,7 +752,7 @@ Partial Class Bancos_PopIEVentas
#Region "DDL'S CHANGED"
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
Select Case valor
Case 1
@@ -1239,162 +1238,162 @@ Partial Class Bancos_PopIEVentas
Pago.CveMonedaPago = CveMoneda
Pago.Referencia = VentaActual.SerieFolio
If DdlOtrosPagos.SelectedValue = "2" Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL - TxtComision.Text.ToDecimal
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL + TxtComision.Text.ToDecimal
Else
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
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 = 1 / TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
End If
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal
Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
End If
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
Select Case RBLContado.SelectedValue
Case "1" ' Banco
Select Case RBLContado.SelectedValue
Case "1" ' Banco
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "",
True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito,
Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte, FechaEmision:=FechaEmision)
If CveIE > 0 Then
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado
Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso
Pago.CveIE = CveIE
Pago.TipoPago = "B"
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
Inserta = False
End If
Case "2" ' FyE
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso
Pago.TipoPago = "FyE"
Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
Inserta = False
End If
Case "2" ' FyE
Case "3" 'Ingresos x Comprobar
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado
Pago.TipoPago = "FyE"
Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString
CveCliente = DdlIngreso.SelectedValue.ToEntero
CveIE = -1
ImportePagado = TxtImporte.Text.Trim.ToDecimal
Pago.ImportePago = ImportePagado
Pago.TipoPago = "I"
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
For Each rw As GridViewRow In GvIngresos.Rows
If rw.FCCheckBox("Chk").Checked Then
CveIE = rw.DataKey("CveIE").ToEntero
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate
Pago.CveIE = CveIE
Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
Case "3" 'Ingresos x Comprobar
CveCliente = DdlIngreso.SelectedValue.ToEntero
CveIE = -1
ImportePagado = TxtImporte.Text.Trim.ToDecimal
Pago.ImportePago = ImportePagado
Pago.TipoPago = "I"
For Each rw As GridViewRow In GvIngresos.Rows
If rw.FCCheckBox("Chk").Checked Then
CveIE = rw.DataKey("CveIE").ToEntero
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate
Pago.CveIE = CveIE
Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
Else
Exit For
End If
End If
Next
Case "4" 'Deudores Diversos
ImportePagado = TxtImporte.Text.Trim.ToDecimal
'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
CveIE = -1
If DdlDeudor.SelectedValue.ToEntero <= 0 Then
Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
For Each rw As GridViewRow In GvDeudores.Rows
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
Pago.CveIE = rw.DataKey("CveIE").ToEntero
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero
Pago.TipoPago = "DD"
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
Else
Exit For
End If
End If
Next
Case "5" 'Compras
ImportePagado = TxtImporte.Text.Trim.ToDecimal
CveIE = -1
For Each rw As GridViewRow In GvCompras.Rows
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
Pago.CveMonedaPago = 1
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TipoPago = "Compra"
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
If MsgError = "" Then
Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero}
Dim PagoCompra As New CompraPago
PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal
PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero
PagoCompra.CveVentaRelacionada = CveVenta
PagoCompra.TipoPago = "Venta"
If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
Else
Exit For
End If
End If
Next
Case "4" 'Deudores Diversos
ImportePagado = TxtImporte.Text.Trim.ToDecimal
'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
CveIE = -1
If DdlDeudor.SelectedValue.ToEntero <= 0 Then
Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Next
Case Else
'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO
If RBLContado.SelectedValue <> "2" Then
MsgError = "No se ha especificada opcion."
End If
End Select
If MsgError = "" Then
If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
For Each rw As GridViewRow In GvDeudores.Rows
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
Pago.CveIE = rw.DataKey("CveIE").ToEntero
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
'Pago.CveProveedor = DdlDeudor.SelectedValue.ToEntero
Pago.TipoPago = "DD"
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
Else
Exit For
End If
End If
Next
Case "5" 'Compras
ImportePagado = TxtImporte.Text.Trim.ToDecimal
CveIE = -1
For Each rw As GridViewRow In GvCompras.Rows
If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
Pago.CveMonedaPago = 1
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TipoPago = "Compra"
If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
If MsgError = "" Then
Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero}
Dim PagoCompra As New CompraPago
PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal
PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero
PagoCompra.CveVentaRelacionada = CveVenta
PagoCompra.TipoPago = "Venta"
If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
End If
Next
Case Else
'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO
If RBLContado.SelectedValue <> "2" Then
MsgError = "No se ha especificada opcion."
End If
End Select
If MsgError = "" Then
If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
End If
End If
Else
MsgError = "No se pudo insertar la poliza detalle"
End If
Else
MsgError = "No se pudo insertar la poliza detalle"
End If
End If
Else
Else
MsgError = "venta no identificada"
End If
Else

View File

@@ -1627,20 +1627,21 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
Calendario.EndDate = NowADS().AddDays(3)
Calendario.EndDate = NowADS().AddDays(2)
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(182).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(182).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
Calendario.EndDate = NowADS().AddDays(182)
If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
Calendario.EndDate = NowADS().AddMonths(3)
End If
If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
Calendario.EndDate = NowADS().AddDays(21)
End If
UpDatos.Update()

View File

@@ -468,7 +468,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DtMovimientos = ObjContabilidad.DtResultados
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then
BtnEliminar.Enabled = False

View File

@@ -87,8 +87,8 @@
<div class="titlefiltros caption">
<div class="row">
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:ListBox ID="DdlSubProyectos" CssClass="select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
<div runat="server" id="DivSubProyecto" class="col-md-3">
<asp:ListBox ID="DdlSubProyectos" CssClass="form-control ddlFiltros input-sm select2me Widthall" Height="30px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
</div>
<div class="col-md-1 truncate">
Fecha Inicio: