diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 7c11a3d3b..5cfe5cc22 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -293,7 +293,7 @@ Public Class ClsContabilidad
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1,
- Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean
+ Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional ImporteME As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleUpdate")
@@ -319,6 +319,7 @@ Public Class ClsContabilidad
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveIE", SqlDbType.Int).Value = CveIE
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+ .Add("@ImporteME", SqlDbType.Money).Value = ImporteME.RoundSQL(3)
End With
Try
diff --git a/App_Code/ClsExportaciones.vb b/App_Code/ClsExportaciones.vb
index 45ffee442..ea59fddc9 100644
--- a/App_Code/ClsExportaciones.vb
+++ b/App_Code/ClsExportaciones.vb
@@ -143,9 +143,10 @@ Public Class ClsExportaciones
Public Function AddExportacion(CveSubProyecto As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer,
CveExportacionEstatus As Integer, CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer,
- ClaveAduana As Integer, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String,
- SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer,
- CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean, EsExportacion As Boolean) As Integer
+ ClaveAduana As Integer, DescripcionContenedor As String, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String,
+ Sello2 As String, Sello3 As String, SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer,
+ CveDirImportador As Integer, CveDirConsignatario As Integer, CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer,
+ ITN As String, Vinculacion As Boolean, EsExportacion As Boolean) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Exp_ExportacionesAdd")
With SqlAdapter.SelectCommand.Parameters
@@ -161,6 +162,7 @@ Public Class ClsExportaciones
.Add("@CveClienteConsignatario", SqlDbType.Int).Value = CveClienteConsignatario
.Add("@CveAgente", SqlDbType.Int).Value = CveAgente
.Add("@ClaveAduana", SqlDbType.Int).Value = ClaveAduana
+ .Add("@DescripcionContenedor", SqlDbType.VarChar).Value = DescripcionContenedor
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@MedioTransporte", SqlDbType.Int).Value = MedioTransporte
.Add("@TipoContenedor", SqlDbType.Int).Value = TipoContenedor
@@ -173,6 +175,7 @@ Public Class ClsExportaciones
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveDirExportador", SqlDbType.Int).Value = CveDirExportador
+ .Add("@CveDirImportador", SqlDbType.Int).Value = CveDirImportador
.Add("@CveDirConsignatario", SqlDbType.Int).Value = CveDirConsignatario
.Add("@CveIncoterm", SqlDbType.Int).Value = CveIncoterm
.Add("@Notas", SqlDbType.VarChar).Value = Notas
@@ -196,9 +199,10 @@ Public Class ClsExportaciones
Public Function UpdateExportacion(CveExportacion As Integer, CveSubProyecto As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal,
TipoExportacion As Integer, CveExportacionEstatus As Integer, CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer,
- CveAgente As Integer, ClaveAduana As Integer, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String,
- Sello3 As String, SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer,
- CveDirConsignatario As Integer, CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean
+ CveAgente As Integer, ClaveAduana As Integer, DescripcionContenedor As String, CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer,
+ Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String, CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer,
+ CveDirExportador As Integer, CveDirImportador As Integer, CveDirConsignatario As Integer, CveIncoterm As Integer, Notas As String, CvePedimento As Integer,
+ CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -215,6 +219,7 @@ Public Class ClsExportaciones
.Add("@CveClienteConsignatario", SqlDbType.Int).Value = CveClienteConsignatario
.Add("@CveAgente", SqlDbType.Int).Value = CveAgente
.Add("@ClaveAduana", SqlDbType.Int).Value = ClaveAduana
+ .Add("@DescripcionContenedor", SqlDbType.VarChar).Value = DescripcionContenedor
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@MedioTransporte", SqlDbType.Int).Value = MedioTransporte
.Add("@TipoContenedor", SqlDbType.Int).Value = TipoContenedor
@@ -227,6 +232,7 @@ Public Class ClsExportaciones
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveDirExportador", SqlDbType.Int).Value = CveDirExportador
+ .Add("@CveDirImportador", SqlDbType.Int).Value = CveDirImportador
.Add("@CveDirConsignatario", SqlDbType.Int).Value = CveDirConsignatario
.Add("@CveIncoterm", SqlDbType.Int).Value = CveIncoterm
.Add("@Notas", SqlDbType.VarChar).Value = Notas
diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs
index 9643bbd97..6e6eed7ae 100644
--- a/Bancos/PagoAcreedor.aspx.cs
+++ b/Bancos/PagoAcreedor.aspx.cs
@@ -242,11 +242,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), DdlProveedores.SelectedText.ToString(), ImporteBanco.ToString().ToDouble(), CveMonedaPago,
TCPago.ToString().ToDouble(), TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
-
-
if (CveIE > 0)
{
-
decimal Importe;
decimal ImporteMN;
decimal ImporteComision;
@@ -286,6 +283,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (tCveMoneda > 1 && gvr.DataKey("FechaDocumento").ToDate() < TxtFechaDocumento.Text.ToDate().FirstDayOfMonth())
{
TC = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDate().AddMonths(-1).LastDayOfMonth()).ToDecimal();//obtengo el TC del mes anterior del pago
+ CveConceptoContablePago = 384;
}
ImporteBancosMN = (Importe * TCPago).RoundSQL();
ImporteAcreedorMN = (Importe * TC).RoundSQL();
@@ -323,6 +321,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
ImporteComision = ImporteComision.RoundSQL();
AcumImporteMN += ImporteMN;
+ if (tCveMoneda > 1 ) { CveConceptoContablePago = 384; }
+
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteMN, CveConceptoContablePago, 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";
@@ -619,10 +619,9 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
MsgError = "No se pudo insertar concepto de bancos";
}
-
if (CveMoneda != 1)
{
- if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
+ if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, 383, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor";
}
diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb
index e63a0d6b2..b20d47dcd 100644
--- a/Contabilidad/ContabilidadElectronica.aspx.vb
+++ b/Contabilidad/ContabilidadElectronica.aspx.vb
@@ -186,7 +186,7 @@ Partial Class Contabilidad_ContabilidadElectronica
Dim Archivopfx As String = $"{UsuarioActual.Empresa.Ruta}Certificados\{UsuarioActual.Empresa.FielPFX }"
Dim Clavepfx As String = UsuarioActual.Empresa.FielPassword
- Dim xsltPath As String
+ Dim xsltPath As String = ""
Select Case Opcion
Case 1
xsltPath = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\CatalogoCuentas_1_3.xslt"
@@ -265,7 +265,7 @@ Partial Class Contabilidad_ContabilidadElectronica
Dim DtCuentas As New DataTable
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
Dim objconta As New ClsContabilidad
- If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, -1, -1, -1, UsuarioActual.CveEmpresa, 0) Then
+ If objconta.GetBalanzaComprobacion(FechaI, FechaF, 5, -1, -1, -1, UsuarioActual.CveEmpresa, 0) Then
DtCuentas = objconta.DtResultados
End If
objconta.Dispose()
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 2f2481421..d5d511945 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -1173,33 +1173,44 @@ Partial Class ContabilidadC_RegPrePolizaS
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If CBool(row.DataKey("Modificado")) Then
contador = contador + 1
+ Dim tImporteME As Decimal = 0
+ If CBool(row.DataKey("EsMonedaExtranjera")) Then tImporteME = row.DataKey("ImporteME").ToDecimal
Dim ImporteIE As Decimal = If(row.FCLabel("TxtCargo").Text.ToDecimal <> 0, row.FCLabel("TxtCargo").Text.ToDecimal, row.FCLabel("TxtAbono").Text.ToDecimal)
- If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
- Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
- CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, row.DataKey("ContadoNumeroFolio"),
- row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
- False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If CveIEAgregado < 0 Then
- 'MsgError = "No se pudo registrar movimiento bancario"
+ If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
+ Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
+ Dim tCveMoneda As Integer = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveMoneda", $"CveCuenta = {row.DataKey("ContadoCuenta")}").ToEntero
+ CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, row.DataKey("ContadoNumeroFolio"),
+ row.DataKey("ContadoBeneficiario"), ImporteIE, tCveMoneda, row.DataKey("TC").ToDecimal, row.DataKey("ContadoObservaciones"), "",
+ False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ If CveIEAgregado < 0 Then
+ 'MsgError = "No se pudo registrar movimiento bancario"
+ OcurrioError = True
+ Exit For
+ End If
+ End If
+ If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
+ -1, If(row.DataKey("Cargo").ToDecimal <> 0, False, True),
+ If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
+ CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
+ CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero,
+ CveProveedor:=row.DataKey("CveProveedor").ToEntero,
+ CveCompra:=row.DataKey("CveCompra").ToEntero,
+ CveCliente:=row.DataKey("CveCliente").ToEntero,
+ CveVenta:=row.DataKey("CveVenta").ToEntero,
+ CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
+ CvePersonal:=row.DataKey("CvePersonal").ToEntero,
+ Referencia:=row.FCLiteral("TxtRef").Text,
+ TipoCambio:=row.DataKey("TC").ToDecimal,
+ CveActivoFijo:=row.DataKey("CveActivoFijo").ToEntero,
+ CveCuenta:=row.DataKey("CveCuenta").ToEntero,
+ ImporteME:=tImporteME,
+ CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
OcurrioError = True
Exit For
End If
End If
- If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
- -1, If(row.DataKey("Cargo").ToDecimal <> 0, False, True),
- If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
- CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
- CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
- CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
- CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text,
- TipoCambio:=row.DataKey("TC").ToDecimal, CveActivoFijo:=row.DataKey("CveActivoFijo").ToEntero,
- CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
- OcurrioError = True
- Exit For
- End If
- End If
- Else
+ Else
contador = contador + 1
Dim ImporteIE As Decimal = If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal)
diff --git a/Contabilidad/RepBalanzaComprobacion.aspx b/Contabilidad/RepBalanzaComprobacion.aspx
index 8cedf3845..616f23e5e 100644
--- a/Contabilidad/RepBalanzaComprobacion.aspx
+++ b/Contabilidad/RepBalanzaComprobacion.aspx
@@ -136,15 +136,10 @@
-
-
-
-
-