- option
This commit is contained in:
@@ -218,7 +218,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
CveMonedaPago = ObjIE.CveMoneda
|
CveMonedaPago = ObjIE.CveMoneda
|
||||||
TipoCambioPago = ObjIE.TipoCambio
|
TipoCambioPago = ObjIE.TipoCambio
|
||||||
|
|
||||||
Dim IndexCheque = If(UsuarioActual.TienePermisoProceso(113), DDlCheques.SelectedIndex - 1, DDlCheques.SelectedIndex)
|
Dim IndexCheque As Integer = If(UsuarioActual.TienePermisoProceso(113), DDlCheques.SelectedIndex - 1, DDlCheques.SelectedIndex)
|
||||||
|
|
||||||
TxtChequeSaldo.Text = DtCheques.Rows(DDlCheques.SelectedIndex - 1)("Saldo").ToString.FormatoNumero
|
TxtChequeSaldo.Text = DtCheques.Rows(DDlCheques.SelectedIndex - 1)("Saldo").ToString.FormatoNumero
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
Dim filemove As String = ""
|
Dim filemove As String = ""
|
||||||
Dim Comprobante As String = ""
|
Dim Comprobante As String = ""
|
||||||
Dim ComprobanteIE = ""
|
Dim ComprobanteIE As String = ""
|
||||||
|
|
||||||
For Each fileItem As Archivo In filesgral
|
For Each fileItem As Archivo In filesgral
|
||||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
@@ -498,7 +498,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
'AGREGO PREPOLIZA IE BANCOS
|
'AGREGO PREPOLIZA IE BANCOS
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal * tipoCambio, 30, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtObservaciones.Text, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal)) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal * tipoCambio, 30, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtObservaciones.Text, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal)) Then
|
||||||
@@ -563,7 +563,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
|
|
||||||
'AGREGO PREPOLIZA IE BANCOS
|
'AGREGO PREPOLIZA IE BANCOS
|
||||||
@@ -587,7 +587,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
'SI ES CAJA CHICA REGISTRO IE CAJA CHICA
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
|
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 2).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 2).ToString
|
||||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 2, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 2, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
'8
|
'8
|
||||||
'AGREGO PREPOLIZA IE BANCOS
|
'AGREGO PREPOLIZA IE BANCOS
|
||||||
@@ -605,13 +605,13 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If CveIERegistrado > 0 Or CveIEExcedente > 0 Or ChkReembolsarSinBancos.Checked Then
|
If CveIERegistrado > 0 Or CveIEExcedente > 0 Or ChkReembolsarSinBancos.Checked Then
|
||||||
'inserto los movimientos de la conta para abonar al saldo
|
'inserto los movimientos de la conta para abonar al saldo
|
||||||
If ((TxtImporte.Text.ToDecimal > 0 Or ChkReembolsarSinBancos.Checked) And CvePrePolizaIERegistrado > 0) Or ((TxtImporteVinculado.Text.ToDecimal > 0 And HdnCheque.Value.ToEntero > 0) Or ChkReembolsarSinBancos.Checked) Then
|
If ((TxtImporte.Text.ToDecimal > 0 Or ChkReembolsarSinBancos.Checked) And CvePrePolizaIERegistrado > 0) Or ((TxtImporteVinculado.Text.ToDecimal > 0 And HdnCheque.Value.ToEntero > 0) Or ChkReembolsarSinBancos.Checked) Then
|
||||||
Dim SaldoCheque = If(HdnCheque.Value.ToEntero > 0, TxtChequeSaldo.Text.ToDecimal, TxtImporte.Text.ToDecimal)
|
Dim SaldoCheque As Decimal = If(HdnCheque.Value.ToEntero > 0, TxtChequeSaldo.Text.ToDecimal, TxtImporte.Text.ToDecimal)
|
||||||
|
|
||||||
Dim PorcentajePago As Decimal = 1
|
Dim PorcentajePago As Decimal = 1
|
||||||
|
|
||||||
Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate
|
||||||
Dim CvePrePolizaUnificar As Integer = 0
|
Dim CvePrePolizaUnificar As Integer = 0
|
||||||
Dim SeUnifico = False
|
Dim SeUnifico As Boolean = False
|
||||||
'inserto las compras que voy a pagar
|
'inserto las compras que voy a pagar
|
||||||
For Each gvr As GridViewRow In GvCxP.Rows
|
For Each gvr As GridViewRow In GvCxP.Rows
|
||||||
|
|
||||||
@@ -660,7 +660,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
'registramos el nuevo IE
|
'registramos el nuevo IE
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
CveIEPago = 0
|
CveIEPago = 0
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.ToDate), FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.ToDate), FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
TipoCambioPago = 1
|
TipoCambioPago = 1
|
||||||
Else
|
Else
|
||||||
@@ -735,7 +735,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
'registramos el nuevo IE
|
'registramos el nuevo IE
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
CveIEPago = 0
|
CveIEPago = 0
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
TipoCambioPago = 1
|
TipoCambioPago = 1
|
||||||
End If
|
End If
|
||||||
@@ -798,9 +798,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
|
||||||
AutoConta = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
||||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user