-- quitar uso de cvecuenta
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
<asp:DropDownList ID="DdlIngreso" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="RazonSocial" DataValueField="CveIE" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDeudor" runat="server" ControlToValidate="DdlIngreso" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ingresos''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDeudor" runat="server" HighlightCssClass="vco" TargetControlID="RFVDeudor" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:HiddenField ID="HdnIngresoImporte" Value="0" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
@@ -78,22 +78,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("IdCuentaBancariaComplementaria") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCuentaBancaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaBancaria").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaBancaria") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCuentaBancariaComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaBancariaComplementaria").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaBancariaComplementaria") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property NombreComercial As String
|
||||
Get
|
||||
Return ViewState("NombreComercial").ToString
|
||||
@@ -158,38 +143,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveCuentaCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaCliente").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCuentaCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property CveCuentaMonedaExtranjera As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaMonedaExtranjera").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveCuentaComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaComplementaria").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveCuentaRetIVA As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaRetIVA").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property CveCuentaRetISR As Integer
|
||||
Get
|
||||
Return ViewState("CveCuentaRetISR").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Private Property Mail As String
|
||||
Get
|
||||
If ViewState("Mail") Is Nothing Then
|
||||
@@ -301,7 +254,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
If CargaCliente(CveCliente, CveMonedaFiltro) Then
|
||||
|
||||
IdCuentaBancaria = 0
|
||||
CveCuentaBancaria = 0
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
|
||||
@@ -397,12 +349,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||
|
||||
ViewState("CveCuentaCliente") = ObjCliente.CveCuentaClientes
|
||||
ViewState("CveCuentaMonedaExtranjera") = ObjCliente.CveCuentaMonedaExtranjera
|
||||
ViewState("CveCuentaComplementaria") = ObjCliente.CveCuentaComplementaria
|
||||
ViewState("CveCuentaRetIVA") = ObjCliente.CveCuentaRetIVA
|
||||
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
|
||||
|
||||
ViewState("IdCtaAnticipo") = ObjCliente.IdCtaContAnticipos
|
||||
ViewState("IdCtaContMonedaExtranjeraAnticipo") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
|
||||
ViewState("IdCtaContMonedaComplementariaAnticipo") = ObjCliente.IdCtaContCompAnticipos
|
||||
@@ -483,8 +429,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
CveCuentaBancariaComplementaria = dr("IdCtaContableComplementariaSIG").ToString.ToEntero
|
||||
ValidaCuentaDePagoFormaDePago()
|
||||
End If
|
||||
|
||||
@@ -720,6 +664,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'valida que no exceda lo seleccionado. con el valor del ie
|
||||
If (RblTipoPago.SelectedValue = "3" AndAlso HdnIngresoImporte.value.todecimal < txttotal.text.todecimal) Then
|
||||
Alert("Importe excedido para la aplicación", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Cuenta As String = ""
|
||||
Dim CuentaDeposito As String = ""
|
||||
|
||||
@@ -914,7 +864,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim importeMX As Decimal
|
||||
Dim FechaMovimiento As Date = TxtFechaDocumento.Text
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ConceptoMovimiento As String = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.Text.Trim)
|
||||
Dim Referencia As String = gvr.DataKey("SerieFolio").ToString
|
||||
Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
@@ -945,25 +894,22 @@ Partial Class Ventas_ClientesAbonar
|
||||
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente)
|
||||
ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaCliente)
|
||||
Else
|
||||
ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaComplementaria)
|
||||
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
importeMX = ImporteMovimiento
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera)
|
||||
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaMonedaExtranjera)
|
||||
ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable)
|
||||
End If
|
||||
|
||||
If EsAnticipoEspecial Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1010,16 +956,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 313 'Ret Iva Servicios
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1092,16 +1028,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 13 'Iva por Trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1126,15 +1053,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXTrasladar As Integer = 0
|
||||
Dim CveCuentaIVAxTrasladar As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero
|
||||
CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero
|
||||
End If
|
||||
|
||||
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Case 62 'Ret IVA Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1175,16 +1099,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 314 'Ret Iva Servicios Traslado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1257,16 +1171,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetISR <> 0 Then
|
||||
CveCuenta = CveCuentaRetISR
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 61 'Iva Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1291,15 +1196,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVATrasladado As Integer = 0
|
||||
Dim CveCuentaIVATrasladado As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero
|
||||
CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero
|
||||
End If
|
||||
|
||||
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Case 38 'IEPS por trasladar
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
@@ -1324,7 +1226,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveSubProyectoContabilizar = CveSubProyecto
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSxTrasladar
|
||||
Case 39 'IEPS Trasladado
|
||||
If EsAnticipoEspecial Then Exit Select
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -1348,7 +1249,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveSubProyectoContabilizar = CveSubProyecto
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
||||
Case 64 'Ganancia
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
@@ -1530,7 +1430,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
' CveCuenta = CveCuentaCliente
|
||||
' End If
|
||||
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=importeMX, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
|
||||
@@ -1538,7 +1438,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
' IdCtaContable = IdCtaContComplementaria
|
||||
' CveCuenta = CveCuentaComplementaria
|
||||
' If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 227, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, CveCuenta:=CveCuenta, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 227, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, , ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
' importeMX = ImporteMovimiento
|
||||
@@ -1557,7 +1457,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1575,13 +1475,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If (CveCuenta < 1 Or CveCuentaBancaria < 1) Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
@@ -1599,18 +1493,18 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If RblTipoPago.SelectedValue = "1" Then
|
||||
If tipoCambioPago > 1 AndAlso CveMoneda = 2 Then
|
||||
If IdCuentaBancariaComplementaria > 0 OrElse CveCuentaBancariaComplementaria > 0 Then
|
||||
If IdCuentaBancariaComplementaria > 0 Then
|
||||
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
tipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1620,7 +1514,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1631,7 +1525,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1647,11 +1541,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioVenta}", "")), TxtFechaDocumento.Text, IdCtaContMonedaComplementariaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
@@ -1661,7 +1555,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaContMonedaExtranjeraAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -1672,7 +1566,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), CveCuenta:=CveCuentaBancaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, 92, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCtaAnticipo, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
@@ -3179,15 +3073,19 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged
|
||||
'saco la moneda de la selección
|
||||
|
||||
hdnIngresoImporte.Value = 0
|
||||
If DdlIngreso.SelectedValue.ToEntero > 0 Then
|
||||
Dim Banco As New ClsBancos
|
||||
|
||||
If Banco.GetBancosIE(DdlIngreso.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
CveMonedaPago = Banco.CveMoneda
|
||||
Dim Deudores As New ClsMovimientos
|
||||
If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
|
||||
hdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.Selectedvalue))
|
||||
End If
|
||||
Deudores.Dispose()
|
||||
End If
|
||||
IdCuentaBancariaComplementaria = 0
|
||||
CveCuentaBancariaComplementaria = 0
|
||||
Banco.Dispose()
|
||||
Else
|
||||
CveMonedaPago = -1
|
||||
|
||||
Reference in New Issue
Block a user