Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -630,7 +630,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim CveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)("CveMoneda").ToString.ToEntero
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.FiltraParametros($"IdCompaq = {GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)("IdCtaContable").ToString}").Rows.Count > 0 Then
|
||||
If ObjConta.DtResultados.FiltraParametros($"IdCompaq = {GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)("IdCtaContable").ToString}").Rows.Count > 0 Then
|
||||
CveCuenta = ObjConta.DtResultados.FiltraParametros($"IdCompaq = {GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)("IdCtaContable").ToString}").Rows(0)("CveCuenta").ToString.ToEntero
|
||||
If CveMoneda > 1 Then
|
||||
CveCuentaComplementaria = ObjConta.DtResultados.FiltraParametros($"IdCompaq = {GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)("IdCtaContableComplementaria").ToString}").Rows(0)("CveCuenta").ToString.ToEntero
|
||||
|
||||
@@ -48,6 +48,7 @@ Partial Class Bancos_DepositosCaja
|
||||
DdlCajaChica.Items.Add(New ListItem("Todas", "-1"))
|
||||
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Solidaridad", "7850"))
|
||||
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Obregón", "7853"))
|
||||
DdlCuentaDeposito.Items.Add(New ListItem("Cuadre Matriz", "7861"))
|
||||
divFolio.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -368,6 +369,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -644,6 +646,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -694,6 +697,7 @@
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||
<asp:BoundField DataField="FechaDocumento" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="Fluctuacion" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -274,7 +274,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
GvAcreedores.DataSource = ObjBancos.DtResultados
|
||||
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||
Else
|
||||
GvAcreedoresAnt.DataSource = Nothing
|
||||
GvAcreedores.DataSource = Nothing
|
||||
Alert("Ocurrio un error al cargar los acreedores", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
@@ -2779,7 +2779,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
Dim UsaComplementariaBancos As Boolean = False
|
||||
UsaComplementariaBancos = True
|
||||
UsaComplementariaBancos = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
|
||||
|
||||
If MsgError = "" Then
|
||||
|
||||
@@ -3712,8 +3712,16 @@ Partial Class Bancos_IE
|
||||
IDCtaBeneficiario = IdCtaAnticipoExtranjera
|
||||
End If
|
||||
|
||||
|
||||
Dim Importe30 As Decimal = TxtImporte.Text.ToDecimal
|
||||
|
||||
If Not UsaComplementariaBancos AndAlso tCveMoneda > 1 Then
|
||||
Importe30 = TxtImporte.Text.ToDecimal + (TxtImporte.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal - TxtImporte.Text.ToDecimal).RoundSQL()
|
||||
End If
|
||||
|
||||
|
||||
'MOVIMIENTOS EGRESOS
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=Importe30, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
|
||||
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||
@@ -3731,7 +3739,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
'BANCOS COMPLEMENTARIA
|
||||
If tCveMoneda > 1 Then
|
||||
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||
|
||||
@@ -954,7 +954,7 @@ Partial Class Bancos_PolizaCheque
|
||||
Importe = Importe * TC
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(gvr.DataKey("IDCuenta").ToEntero, UsuarioActual.CveEmpresa), -1), TipoCambio:=TC) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC) Then
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
End If
|
||||
|
||||
|
||||
@@ -549,7 +549,12 @@
|
||||
<div class="col-xs-7">
|
||||
<asp:TextBox ID="TxtImporte" runat="server" MaxLength="12" Width="100%" ClientIDMode="Static" onkeyup="CambioTipoMoneda();" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="+-.," />
|
||||
<asp:RangeValidator ID="RVImporte" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue="0" ErrorMessage="Importe Excedido" ControlToValidate="TxtImporte" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
|
||||
<%--<asp:RangeValidator ID="RVImporte" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue="0" ErrorMessage="Importe Excedido" ControlToValidate="TxtImporte" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:RangeValidator>--%>
|
||||
|
||||
<asp:CustomValidator ID="CVTxtImporte" runat="server" Enabled="true" ControlToValidate="TxtImporte" OnServerValidate="CVTxtImporte_ServerValidate"
|
||||
ErrorMessage="Importe Excedido" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:CustomValidator>
|
||||
|
||||
<asp:CustomValidator ID="CVImporteDolares" runat="server" Enabled="false" ControlToValidate="LbImporteME" OnServerValidate="CVImporteDolares_ServerValidate" ErrorMessage="Importe Excedido" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:CustomValidator>
|
||||
<asp:CustomValidator ID="CVImportePesos" runat="server" Enabled="false" ControlToValidate="LbImporteMN" OnServerValidate="CVImportePesos_ServerValidate" ErrorMessage="Importe Excedido" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:CustomValidator>
|
||||
</div>
|
||||
@@ -801,6 +806,7 @@
|
||||
CambiaPesosDolares()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -685,10 +685,10 @@ Partial Class Bancos_PopIECompras
|
||||
DdlTipoTransaccion.Enabled = True
|
||||
TxtObservaciones.Enabled = True
|
||||
BtnGuardar.Visible = True
|
||||
RVImporte.Enabled = True
|
||||
'RVImporte.Enabled = True
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||
'RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||
TxtImporte.Text = dr("Saldo").ToString.ToDecimal.FormatoNumero
|
||||
|
||||
SaldoVenta = dr("Saldo").ToString.ToDecimal
|
||||
@@ -1185,9 +1185,9 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = True
|
||||
GvDeudores.Columns(6).Visible = True
|
||||
|
||||
RVImporte.Enabled = False
|
||||
RVImporte.MaximumValue = "0.00"
|
||||
|
||||
'RVImporte.Enabled = False
|
||||
' RVImporte.MaximumValue = "0.00"
|
||||
|
||||
CVImporteDolares.Enabled = True
|
||||
Else
|
||||
DivTipoCambio.Visible = False
|
||||
@@ -1205,8 +1205,8 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = False
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
'RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -1244,8 +1244,8 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(5).Visible = True
|
||||
GvDeudores.Columns(6).Visible = True
|
||||
|
||||
RVImporte.Enabled = False
|
||||
RVImporte.MaximumValue = "0.00"
|
||||
'RVImporte.Enabled = False
|
||||
'RVImporte.MaximumValue = "0.00"
|
||||
|
||||
CVImportePesos.Enabled = True
|
||||
Else
|
||||
@@ -1262,10 +1262,10 @@ Partial Class Bancos_PopIECompras
|
||||
GvIngresos.Columns(6).Visible = False
|
||||
|
||||
GvDeudores.Columns(5).Visible = False
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
' RVImporte.Enabled = True
|
||||
'RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -3439,4 +3439,35 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub CVTxtImporte_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
|
||||
Dim Saldo As Decimal = LtlSaldo.Text.Replace("USD", "").Replace("MXN", "").Replace(",", "").ToDecimal
|
||||
Dim ImportePagado As Decimal = TxtImporte.Text.ToDecimal
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
|
||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
Dim PagoEnDollares As Decimal = (ImportePagado / TC).RoundSQL()
|
||||
|
||||
If PagoEnDollares <= Saldo Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If ImportePagado <= Saldo Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -366,7 +366,7 @@ Partial Class Bancos_ProductosFinancieros
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, "", If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, 42, ConceptoContable), DdlTipoMovimiento.SelectedItem.Text & If(TxtConcepto.Text.Trim.Length > 0, " - " & TxtConcepto.Text.Trim, ""), FechaMovimiento, If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), -1, CveIE, ImporteMX:=importeMovimiento, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), UsuarioActual.CveEmpresa), -1)) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, "", If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, 42, ConceptoContable), DdlTipoMovimiento.SelectedItem.Text & If(TxtConcepto.Text.Trim.Length > 0, " - " & TxtConcepto.Text.Trim, ""), FechaMovimiento, If(DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 AndAlso ConceptoContable = 30, DdlTarjeta.SelectedValue.ToEntero, IdCtaContablePP), -1, CveIE, ImporteMX:=importeMovimiento) Then
|
||||
ErrorTransaccion = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -887,7 +887,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
|
||||
If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0 Or ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero > 0) Then
|
||||
If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0) Then
|
||||
IdCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
@@ -99,7 +99,9 @@
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 "><span>Proveedor:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" CssClassDdl="select2me" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
@@ -108,46 +110,67 @@
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Clasificaciones:</span></div>
|
||||
<div class="col-md-1 " style="width: 120px;">
|
||||
<div class="col-md-1 " >
|
||||
|
||||
<asp:DropDownList CssClass="form-control select2me input-sm" ID="DdlProveedoresClasificaciones" runat="server" AppendDataBoundItems="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" id="tsubprocto" style="padding-right: 2px; padding-left: 2px; display: none;">
|
||||
Proyecto:
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="Div1">Aplica NC/Dev:</div>
|
||||
<div class="col-md-1" id="ds" style="width: 120px;">
|
||||
<asp:DropDownList CssClass="form-control select2me input-sm" ID="DdlAplicaNC" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:CheckBox ID="ChkAplicaNotaCredito" CssClass="make-switchsd" runat="server" />--%>
|
||||
|
||||
<div class="col-md-2" id="subproyecto" style="margin-top: 3px;">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" runat="server" id="Div1">Aplica NC/Dev:</div>
|
||||
<div class="col-md-6" id="ds" >
|
||||
<asp:DropDownList CssClass="form-control select2me input-sm" ID="DdlAplicaNC" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" id="subproyecto" style="margin-top: 3px; margin-left: -20px">
|
||||
|
||||
|
||||
<div class="col-md-3" style="margin-top: 3px;">
|
||||
<asp:UpdatePanel ID="UpProgramadas" runat="server" UpdateMode="Conditional" RenderMode="Inline ">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="width: 100%;">
|
||||
|
||||
<asp:CheckBox ID="ChkProgramadas" AutoPostBack="true" Width="34%" data-size="small" CssClass="col-md-1 md-checksd2 text" runat="server" Text="Programadas" />
|
||||
|
||||
<asp:DropDownList CssClass=" input-sm" ID="DdlUsuarioProgramo" Width="20%" runat="server" DataTextField="Nombre" ClientIDMode="Static" DataValueField="CveUsuario" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList CssClass=" input-sm" Width="20%" ID="DdlCodigoProgramacion" runat="server" DataTextField="CodigoProgramacion" DataValueField="CodigoProgramacion" Visible="False">
|
||||
<Items>
|
||||
<asp:ListItem Text=" - " Value="-1"></asp:ListItem>
|
||||
</Items>
|
||||
</asp:DropDownList>
|
||||
<div class="row" >
|
||||
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="ChkProgramadas" class="md-check" AutoPostBack="true" runat="server" Text="Programadas" Width="100px" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList CssClass="form-control select2me input-sm" ID="DdlUsuarioProgramo" Width="80px" runat="server" DataTextField="Nombre" ClientIDMode="Static" DataValueField="CveUsuario" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<asp:DropDownList CssClass="form-control select2me input-sm" Width="60px" ID="DdlCodigoProgramacion" runat="server" DataTextField="CodigoProgramacion" DataValueField="CodigoProgramacion" Visible="False">
|
||||
<Items>
|
||||
<asp:ListItem Text=" - " Value="-1"></asp:ListItem>
|
||||
</Items>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
@@ -170,7 +170,7 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlSubProyecto.DataBind()
|
||||
' DdlEstatusCompra.SelectedValue = "2" 'las programadas
|
||||
DdlAgrupador.SelectedValue = "2"
|
||||
'DdlAgrupador.SelectedValue = "2"
|
||||
'Gv.Columns(8).Visible = True
|
||||
DdlSubProyecto.Items.Insert(1, New ListItem("Sin Proyecto", "-2"))
|
||||
|
||||
|
||||
@@ -253,7 +253,8 @@ Partial Class Bancos_Transferencias
|
||||
|
||||
If CveMonedaOrigen = 1 AndAlso CveMonedaDestino <> 1 Then
|
||||
'pesos a otra moneda se divide
|
||||
ImporteMXDestino = Math.Round(TxtImporte.Text.Trim.ToDouble / TxtTipoCambio.Text.ToDouble, 2)
|
||||
ImporteDestino = Math.Round(TxtImporte.Text.Trim.ToDouble / TxtTipoCambio.Text.ToDouble, 2)
|
||||
ImporteMXDestino = TxtImporte.Text.Trim.ToDouble
|
||||
ElseIf CveMonedaOrigen <> 1 AndAlso CveMonedaDestino = 1 Then
|
||||
'de otra moneda a pesos se multiplica
|
||||
ImporteDestino = Math.Round(TxtImporte.Text.Trim.ToDouble * TxtTipoCambio.Text.ToDouble, 2)
|
||||
@@ -269,6 +270,7 @@ Partial Class Bancos_Transferencias
|
||||
TipoCambio = TxtTipoCambio.Text.ToDouble 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate)
|
||||
End If
|
||||
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/Transferencias", 13, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TxtFechaDocumento.Text.ToDate, $"Transferencia entre cuentas {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 48 Then
|
||||
@@ -363,11 +365,21 @@ Partial Class Bancos_Transferencias
|
||||
If RBLOpcion.SelectedValue = "2" Then TipoMovtoDetalle = False ' cuando sea un reembolso/devoluci<63>n, es ingreso a bancos
|
||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle, TxtImporte.Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableOrigen, -1, CveIE, ImporteMX:=If(UsuarioActual.CveEmpresa = 119, TxtImporte.Text.ToDouble, ImporteMXOrigen), ImporteME:=If(CveMonedaOrigen > 1, TxtImporte.Text.ToDouble * TC, 0), CveCuenta:=CveCuentaOrigen, CveIEDevolucion:=CveIEDevolucion) Then
|
||||
If CveMonedaOrigen > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle,
|
||||
TxtImporte.Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableOrigen, -1, CveIE,
|
||||
ImporteMX:=If(Not UsuarioActual.CveEmpresa.Contiene(13, 83), TxtImporte.Text.ToDouble, ImporteMXOrigen),
|
||||
ImporteME:=If(CveMonedaOrigen > 1, TxtImporte.Text.ToDouble * TC, 0),
|
||||
CveCuenta:=CveCuentaOrigen,
|
||||
CveIEDevolucion:=CveIEDevolucion) Then
|
||||
|
||||
If CveMonedaOrigen > 1 AndAlso Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'Agregamos complementaria
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle, 0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaOrigen, -1, CveIE:=CveIE, ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL, ImporteME:=TxtImporte.Text.ToDouble, TipoCambio:=TC) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle,
|
||||
0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaOrigen, -1, CveIE:=CveIE,
|
||||
ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL,
|
||||
ImporteME:=TxtImporte.Text.ToDouble,
|
||||
TipoCambio:=TC) Then
|
||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
|
||||
@@ -378,20 +390,27 @@ Partial Class Bancos_Transferencias
|
||||
|
||||
For Each row As GridViewRow In GvTC.Rows
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 41, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, If(row.DataKey("IdCtaContableTarjeta").ToEntero > 0, row.DataKey("IdCtaContableTarjeta").ToEntero, row.DataKey("IdCtaContable").ToEntero), -1, CveIEDestino, ImporteMX:=row.FCTextBox("TxtAbono").Text.ToDouble, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(If(row.DataKey("IdCtaContableTarjeta").ToEntero > 0, row.DataKey("IdCtaContableTarjeta").ToEntero, row.DataKey("IdCtaContable").ToEntero), UsuarioActual.CveEmpresa), -1)) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 41, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, If(row.DataKey("IdCtaContableTarjeta").ToEntero > 0, row.DataKey("IdCtaContableTarjeta").ToEntero, row.DataKey("IdCtaContable").ToEntero), -1, CveIEDestino, ImporteMX:=row.FCTextBox("TxtAbono").Text.ToDouble) Then
|
||||
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
||||
End If
|
||||
Next
|
||||
|
||||
'Agregamos la contraria a bancos cuando es cuenta
|
||||
Else
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, ImporteDestino, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableDestino, -1, CveIEDestino, ImporteMX:=If(UsuarioActual.CveEmpresa = 119, ImporteDestino, ImporteMXDestino), ImporteME:=If(CveMonedaDestino > 1, TxtImporte.Text.ToDouble * TC, 0), CveCuenta:=CveCuentaDestino) Then
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle,
|
||||
ImporteDestino, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableDestino, -1, CveIEDestino,
|
||||
ImporteMX:=If(Not UsuarioActual.CveEmpresa.Contiene(13, 83), ImporteDestino, ImporteMXDestino),
|
||||
ImporteME:=If(CveMonedaDestino > 1, ImporteDestino, 0), CveCuenta:=CveCuentaDestino) Then
|
||||
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
||||
End If
|
||||
|
||||
If CveMonedaDestino > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||
If CveMonedaDestino > 1 AndAlso Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'Agregamos complementaria
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, 0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL, ImporteME:=TxtImporte.Text.ToDouble, TipoCambio:=TC) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle,
|
||||
0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaDestino, -1, CveIE:=CveIEDestino,
|
||||
ImporteMX:=(ImporteMXDestino - ImporteDestino).RoundSQL,
|
||||
ImporteME:=ImporteDestino, TipoCambio:=TC) Then
|
||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user