Local
This commit is contained in:
@@ -619,7 +619,7 @@ Public Class CFDIComplementoPago
|
||||
TRetenciones = tRetorno.GroupBy(Function(t) New With {Key t.Impuesto}) _
|
||||
.Select(Function(t) New CFDIRetenciones With {.Impuesto = t.Key.Impuesto,
|
||||
.Importe = t.Sum(Function(tt) tt.Importe),
|
||||
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN)}) _
|
||||
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN).TruncateDecimal}) _
|
||||
.OrderBy(Function(x) x.Impuesto).ToList
|
||||
End If
|
||||
|
||||
@@ -640,7 +640,7 @@ Public Class CFDIComplementoPago
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
'ya generado todos los registros posibles, los agrupo y los sumo
|
||||
'ya generado todos los registros posibles, los agrupo y los sumo
|
||||
If tRetorno.Count > 0 Then
|
||||
TTraslados = tRetorno.GroupBy(Function(t) New With {Key t.TipoFactor, Key t.Impuesto, Key t.TasaOCuota}) _
|
||||
.Select(Function(t) New CFDITraslados With {.Impuesto = t.Key.Impuesto,
|
||||
@@ -648,7 +648,7 @@ Public Class CFDIComplementoPago
|
||||
.TasaOCuota = t.Key.TasaOCuota,
|
||||
.Base = t.Sum(Function(tt) tt.Base),
|
||||
.Importe = t.Sum(Function(tt) tt.Importe),
|
||||
.BaseMN = t.Sum(Function(tt) tt.BaseMN),
|
||||
.BaseMN = t.Sum(Function(tt) tt.BaseMN).TruncateDecimal, '' se trunca solo al final, NO EN EL DESGLOSE
|
||||
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN)}) _
|
||||
.OrderBy(Function(x) x.Impuesto).ToList
|
||||
|
||||
|
||||
@@ -773,8 +773,6 @@ Public Class ClsBancos
|
||||
BancoNumCuentaMoneda = Data.Rows(0)("BancoNumCuentaMoneda").ToString
|
||||
IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
IdCtaContableComplementaria = Data.Rows(0)("IdCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaConta = Data.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
CveCuentaContaComplementaria = Data.Rows(0)("IdCtaContableComplementariaSIG").ToString.ToEntero
|
||||
CveCuentaDeposito = Data.Rows(0)("CveCuentaDeposito").ToString.ToEntero
|
||||
DepositoBanco = Data.Rows(0)("DepositoBanco").ToString
|
||||
DepositoCuenta = Data.Rows(0)("DepositoCuenta").ToString
|
||||
|
||||
@@ -63,6 +63,8 @@ Public Class ClsInventarios
|
||||
Public Property FolioRelacionado As Integer
|
||||
Public Property TieneRelacionado As Integer
|
||||
Public Property ConceptoRelacionado As String
|
||||
Public Property CveMovimientoVirtual As Integer
|
||||
Public Property FolioVirtual As Integer
|
||||
Public Property Folio As Integer
|
||||
Public Property IDPoliza As Integer
|
||||
Public Property CvePrePoliza As Integer
|
||||
@@ -826,6 +828,9 @@ Public Class ClsInventarios
|
||||
FolioRelacionado = dr("FolioRelacionado").ToString.ToEntero
|
||||
TieneRelacionado = If(dr("TieneRelacionado").ToString.ToEntero > 0, 1, -1)
|
||||
ConceptoRelacionado = dr("ConceptoRelacionado").ToString
|
||||
CveMovimientoVirtual = dr("CveMovimientoVirtual").ToString.ToEntero
|
||||
FolioVirtual = dr("FolioVirtual").ToString.ToEntero
|
||||
|
||||
TipoCambio = dr("TipoCambio").ToString.ToDouble
|
||||
FolioVenta = dr("FolioVenta").ToString
|
||||
CveOrdenCompra = dr("CveOrdenCompra").ToString.ToEntero
|
||||
|
||||
@@ -2213,11 +2213,12 @@ Namespace Modelos
|
||||
|
||||
End Function
|
||||
|
||||
Private Function CancelarInventarioUsado(factura As Modelos.Factura, CveAlmacenUsado As Integer, CveMovimientoEntrada As Integer, ByRef ObjInventario As ClsInventarios) As Integer
|
||||
Private Function CancelarInventarioUsado(factura As Modelos.Factura, CveAlmacenUsado As Integer, CveMovimientoEntrada As Integer, ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad) As Integer
|
||||
Dim CveMovimiento As Integer = -1
|
||||
Try
|
||||
Dim CveConceptoSalidaUsado As Integer = 45
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta,
|
||||
Dim tFecha As DateTime = Now
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, tFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta,
|
||||
factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU")
|
||||
If CveMovimiento <= 0 Then
|
||||
CveMovimiento = -1
|
||||
@@ -2229,11 +2230,34 @@ Namespace Modelos
|
||||
|
||||
If DtMovimientosEntrada IsNot Nothing Then
|
||||
For Each Dr As DataRow In DtMovimientosEntrada.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
CveMovimiento = -1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim tCveConcepto As Integer = 278
|
||||
Dim ValorInventario As Decimal = 0
|
||||
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
|
||||
|
||||
For Each RowInv As DataRow In DtMovimientosEntrada.Rows
|
||||
ValorInventario = DtMovimientosEntrada.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, -ValorInventario, Concepto, tCveConcepto, Concepto, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
CveMovimiento = -1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If CveMovimiento > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, -DtMovimientosEntrada.SUMD("Total").RoundSQL, Concepto, 68, Concepto, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-DtMovimientosEntrada.SUMD("Total").RoundSQL) Then
|
||||
CveMovimiento = -1
|
||||
End If
|
||||
End If
|
||||
|
||||
DtMovimientosEntrada.Dispose()
|
||||
DtMovimientosEntrada = Nothing
|
||||
End If
|
||||
@@ -2470,7 +2494,7 @@ Namespace Modelos
|
||||
Dim TipoMovto68 = TipoMovimiento
|
||||
'SI ES CANCELACION DEBE GENERAR EL MOVIMIENTO DE SALIDA DE USADOS
|
||||
If ValorMultiplicador = -1 Then
|
||||
CveMovimientoReferencia = CancelarInventarioUsado(ObjFactura, CveAlmacen, CveMovimiento, ObjInventario)
|
||||
CveMovimientoReferencia = CancelarInventarioUsado(ObjFactura, CveAlmacen, CveMovimiento, ObjInventario, ObjConta)
|
||||
Else
|
||||
CveMovimientoReferencia = CveMovimiento
|
||||
End If
|
||||
@@ -5585,7 +5609,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
If Not ErrorCancelar AndAlso CveMovimientoUsado > 0 AndAlso SaldoAlmacenUsados <> 0 Then
|
||||
If CancelarInventarioUsado(ObjRemision, CveAlmacenUsado, CveMovimientoUsado, ObjInventario) <= 0 Then
|
||||
If CancelarInventarioUsado(ObjRemision, CveAlmacenUsado, CveMovimientoUsado, ObjInventario, ObjConta) <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los usados. Por favor vuelva a intentar."
|
||||
End If
|
||||
@@ -5691,7 +5715,7 @@ Namespace Modelos
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE USADOS SI TIENE
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not ErrorCancelar AndAlso CveMovimientoUsado > 0 AndAlso SaldoAlmacenUsados <> 0 Then
|
||||
If CancelarInventarioUsado(ObjFactura, CveAlmacenUsado, CveMovimientoUsado, ObjInventario) <= 0 Then
|
||||
If CancelarInventarioUsado(ObjFactura, CveAlmacenUsado, CveMovimientoUsado, ObjInventario, ObjConta) <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cancelar los movimientos de usados."
|
||||
End If
|
||||
|
||||
@@ -1166,8 +1166,8 @@ Public Class Timbrado
|
||||
.TasaOCuota = drp("PorcentajeImpuesto").ToString().ToDecimal,
|
||||
.Impuesto = drp("TipoImpuesto").ToString,
|
||||
.Importe = drp("Importe").ToString().ToDecimal.RoundSQL,
|
||||
.BaseMN = Math.Round((drp("Base").ToString.ToDecimal / Equivalencia), 2),
|
||||
.ImporteMN = Math.Round((drp("Importe").ToString.ToDecimal / Equivalencia), 2)
|
||||
.BaseMN = (drp("Base").ToString.ToDecimal / Equivalencia).RoundSQL(6),
|
||||
.ImporteMN = (drp("Importe").ToString.ToDecimal / Equivalencia).RoundSQL(6)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -29,23 +29,7 @@ Partial Class Bancos_DepositoTerminal
|
||||
Set(value As Integer)
|
||||
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
|
||||
End Property
|
||||
Private Property IdCuentaCliente As Integer
|
||||
Get
|
||||
Return ViewState("IdCuentaCliente").ToString.ToEntero
|
||||
@@ -154,9 +138,6 @@ Partial Class Bancos_DepositoTerminal
|
||||
If dr IsNot Nothing Then
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
CveCuentaBancariaComplementaria = dr("IdCtaContableComplementariaSIG").ToString.ToEntero
|
||||
Else
|
||||
IdCuentaBancaria = 0
|
||||
IdCuentaBancariaComplementaria = 0
|
||||
@@ -258,9 +239,8 @@ Partial Class Bancos_DepositoTerminal
|
||||
Dim tipoCambioVenta As Decimal
|
||||
Dim tipoCambioActual As Decimal
|
||||
Dim tipoCambioManual As Decimal
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
|
||||
If ObjContabilidad.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
dtConceptos = ObjContabilidad.DtResultados
|
||||
End If
|
||||
@@ -455,7 +435,7 @@ Partial Class Bancos_DepositoTerminal
|
||||
End If
|
||||
Next
|
||||
|
||||
If IdCuentaBancariaComplementaria > 0 OrElse CveCuentaBancariaComplementaria > 0 Then
|
||||
If IdCuentaBancariaComplementaria > 0 Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TxtImporte.Text.ToDecimal, "", 30, "", TxtFecha.Text.ToDate, IdCuentaBancaria, -1, CveIE, -1, -1, -1, -1, ImporteMX:=TxtImporte.Text.ToDecimal, CveCuenta:=CveCuentaBancaria) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
@@ -194,8 +194,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim IdCuentaBancariaOrigen As Integer = 0
|
||||
Dim IdCuentaBancariaDestino As Integer = 0
|
||||
Dim CveCuentaBancariaOrigen As Integer = 0
|
||||
Dim CveCuentaBancariaDestino As Integer = 0
|
||||
Dim CveCuentaBancariaOrigen As Integer = 0
|
||||
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectos.SelectedValue.ToEntero
|
||||
@@ -215,14 +214,12 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
If drOrigen IsNot Nothing Then
|
||||
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancariaOrigen = drOrigen("IdCtaContableSIG").ToString.ToEntero
|
||||
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If drDestino IsNot Nothing Then
|
||||
CveMoneda = drDestino("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancariaDestino = drDestino("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero
|
||||
IdCuentaBancariaDestino = drDestino("IdCtaContable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||
|
||||
@@ -1060,7 +1060,6 @@ Partial Class Bancos_PopIEVentas
|
||||
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
|
||||
If dr("UsaTarjeta").ToString = "True" Then
|
||||
CargaGridTarjetas()
|
||||
|
||||
@@ -22,14 +22,6 @@ Partial Class Bancos_PagosIntermediarios
|
||||
ViewState("IdCuentaBancaria") = 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 CveMoneda As Integer
|
||||
Get
|
||||
Return ViewState("CveMoneda").ToString.ToEntero
|
||||
@@ -89,7 +81,6 @@ Partial Class Bancos_PagosIntermediarios
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then
|
||||
@@ -215,7 +206,7 @@ Partial Class Bancos_PagosIntermediarios
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtTotalBancos.Text.ToDecimal, ConceptoMovimientoBancos, 30, ConceptoMovimientoBancos, FechaMovimiento, IdCuentaBancaria, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=TxtTotalBancos.Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaBancaria) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtTotalBancos.Text.ToDecimal, ConceptoMovimientoBancos, 30, ConceptoMovimientoBancos, FechaMovimiento, IdCuentaBancaria, -1, CveIE, -1, -1, -1, CveCliente, ImporteMX:=TxtTotalBancos.Text.ToDecimal * tipoCambio) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
|
||||
|
||||
@@ -330,12 +330,10 @@ Partial Class Bancos_Transferencias
|
||||
If RowCuentaOrigen IsNot Nothing Then
|
||||
IdCtaContableOrigen = RowCuentaOrigen("IdCtaContable").ToString.ToEntero
|
||||
IDCtaContableComplementariaOrigen = RowCuentaOrigen("IDCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaOrigen = RowCuentaOrigen("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
If RowCuentaDestino IsNot Nothing Then
|
||||
IdCtaContableDestino = RowCuentaDestino("IdCtaContable").ToString.ToEntero
|
||||
IDCtaContableComplementariaDestino = RowCuentaDestino("IDCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaDestino = RowCuentaDestino("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
'Conta ContPAQ
|
||||
|
||||
@@ -385,14 +385,6 @@ Partial Class Compras_Compras
|
||||
ViewState("IdCuentaBancaria") = 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 IdCuentaBancariaComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("IdCuentaBancariaComplementaria").ToString.ToEntero
|
||||
@@ -401,14 +393,6 @@ Partial Class Compras_Compras
|
||||
ViewState("IdCuentaBancariaComplementaria") = 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 IvaAcumulado As Double
|
||||
Get
|
||||
Return ViewState("IvaAcumulado").ToString.ToDouble
|
||||
@@ -1210,11 +1194,9 @@ Partial Class Compras_Compras
|
||||
CompraSaldo = 0
|
||||
ViewState("CvePersonal") = -1
|
||||
IdCuentaBancaria = 0
|
||||
CveCuentaBancaria = 0
|
||||
End If
|
||||
|
||||
IdCuentaBancariaComplementaria = 0
|
||||
CveCuentaBancariaComplementaria = 0
|
||||
|
||||
'If UsuarioActual.TienePermisoProceso(259) Then
|
||||
DivEsNoDeducible.Visible = True
|
||||
@@ -12871,9 +12853,7 @@ Partial Class Compras_Compras
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaBancariaComplementaria = dr("IdCtaContableComplementariaSIG").ToString.ToEntero
|
||||
If dr("UsaTarjeta").ToString = "True" Then
|
||||
CargaGridTarjetas()
|
||||
Else
|
||||
@@ -12898,7 +12878,6 @@ Partial Class Compras_Compras
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
EstaAsociadoACajaChica = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
IdPoliza = drp("IdPoliza").ToString.ToEntero
|
||||
Else
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso CvePrePolizaComprobacion > 0 Then
|
||||
CvePrePolizaIERegistrado = CvePrePolizaComprobacion
|
||||
Else
|
||||
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero
|
||||
@@ -1197,21 +1197,20 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
MsgError = "No se pudo simplificar los movimientos"
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePolizaExcedente, UsuarioActual.CveEmpresa) Then
|
||||
If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso Not ObjMov.PrePolizaSimplificacion(CvePrePolizaExcedente, UsuarioActual.CveEmpresa) Then
|
||||
MsgError = "No se pudo simplificar los movimientos"
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1) Then
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/ReembolsosComprobaciones | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaPago}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaExcedente, 1) Then
|
||||
If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaExcedente, 1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/ReembolsosComprobaciones | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaExcedente}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
|
||||
@@ -1713,14 +1713,14 @@ Partial Class General_SaldosIniciales
|
||||
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
||||
Dim YaExiste As Boolean = False
|
||||
Dim DataTemp As DataTable
|
||||
|
||||
Dim Afectable As Boolean = False
|
||||
|
||||
|
||||
Cuenta = Cuenta.Replace(" ", "")
|
||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", "").Trim, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
|
||||
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
|
||||
Afectable = ObjConta.DtResultados().FiltroPrimeroValor("Afectable") = "True"
|
||||
Else
|
||||
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
|
||||
TieneError = True
|
||||
@@ -1747,7 +1747,7 @@ Partial Class General_SaldosIniciales
|
||||
' CargoAbono = False
|
||||
'End If
|
||||
|
||||
If YaExiste = False Then
|
||||
If YaExiste = False AndAlso Afectable Then
|
||||
If IdCuenta > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.ToDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
|
||||
TieneError = True
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2" Text="SubProyecto"></asp:Label>
|
||||
<div class="col-md-9" style="padding-left: 5px;">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
@@ -205,7 +205,7 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirTimbrado_CheckedChanged" AutoPostBack="true" Enabled="false" />
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " Checked="true" OnCheckedChanged="ChkEmitirTimbrado_CheckedChanged" AutoPostBack="true" Enabled="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkEmitirCartaPorte" Checked="true" runat="server" Text="Carta Porte" Visible="true" Enabled="false" /></td>
|
||||
|
||||
@@ -294,8 +294,10 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
|
||||
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ")
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
DdlChofer.DataSource = GlobalDTChoferes(UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -185,53 +185,7 @@
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvConcepto" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlConcepto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RfvConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="DivCliente" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivClienteSucursal" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Sucursal:</label>
|
||||
<div class="col-md-2 " id="DivDdlClienteSucursal" runat="server">
|
||||
<asp:DropDownList ID="DdlClientesSucursales" AutoPostBack="true" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvSucursalCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlClientesSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Sucursal''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvSucursalCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div id="DivVendedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblDepartamentoEntrega"> Depto. entrega:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtDepartamentoEntrega" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblPedidoContrato">Con./Pedido:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtPedidoContrato" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Fecha:</label>
|
||||
@@ -277,6 +231,49 @@
|
||||
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivCliente" runat="server" visible="false">
|
||||
<div >
|
||||
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlClientes" AutoPostBack="true" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivClienteSucursal" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Sucursal:</label>
|
||||
<div class="col-md-2 " id="DivDdlClienteSucursal" runat="server">
|
||||
<asp:DropDownList ID="DdlClientesSucursales" AutoPostBack="true" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvSucursalCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlClientesSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Sucursal''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvSucursalCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivVendedor" runat="server" visible="false">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Vendedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="LblVendedor" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivDepartamentoEntrega" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblDepartamentoEntrega"> Depto. entrega:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtDepartamentoEntrega" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblPedidoContrato">Con./Pedido:</asp:Label>
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtPedidoContrato" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="divMonedaSeccion" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">Moneda:</label>
|
||||
<div class="col-md-2 ">
|
||||
@@ -286,8 +283,8 @@
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="divGuia" runat="server" visible="False">
|
||||
|
||||
<div class="row" id="divGuia" runat="server" visible="False">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
<asp:Label runat="server" ID="LblGuia">Guía:</asp:Label>
|
||||
</label>
|
||||
@@ -300,9 +297,9 @@
|
||||
<asp:TextBox runat="server" Text="" ID="TxtResponsable" Width="100%" />
|
||||
<%--<asp:DropDownList ID="DdlResponsable" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm" Style="width: 200px !important;"></asp:DropDownList>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 110px">
|
||||
Observaciones:
|
||||
@@ -454,33 +451,27 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">
|
||||
Usuario:
|
||||
|
||||
|
||||
<label class="col-md-4 truncate">
|
||||
Usuario:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Fecha:
|
||||
|
||||
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Fecha:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Referencia:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplVenta" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Venta</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplPoliza" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Póliza</asp:HyperLink>
|
||||
@@ -488,35 +479,38 @@
|
||||
<asp:HiddenField ID="HdnCveOrdenCompra" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Consignación:
|
||||
|
||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Consignación:
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||
<%--<asp:Label Text="" ID="LbConsignacion" runat="server" />--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Tipo Cambio:
|
||||
|
||||
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8">
|
||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
||||
<label class="col-md-3 truncate">
|
||||
Mto. Rel.:
|
||||
|
||||
|
||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Mto. Rel.:
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="lnkMtoRelacionado" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DivMovtoVirtual" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
Mto. Virtual.:
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplMtoVirtual" CssClass="Texto" runat="server" Target="_blank">Virtual</asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -724,12 +724,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim TMDsTR = DtMov.Rows(0)("CveMtoRel").ToString
|
||||
If DtMov.Rows(0)("CveMtoRel").ToString.Length > 0 Then
|
||||
RowMtoRel.Visible = True
|
||||
lnkMtoRelacionado.NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" & DtMov.Rows(0)("CveMtoRel").ToString
|
||||
End If
|
||||
|
||||
lnkMtoRelaioando.NavigateUrl = "./EntradasSalidas.aspx?CveMovimiento=" & DtMov.Rows(0)("CveMtoRel").ToString
|
||||
'lnkMtoRelaioando.Attributes.Add("hreh", "./EntradasSalidas.aspx?CveMoviento=" & DtMov.Rows(0)("CveMtoRel").ToString)
|
||||
'lnkMtoRelaioando.Attributes.Add("target", "_blank")
|
||||
Else
|
||||
RowMtoRel.Visible = False
|
||||
If Mov.CveMovimientoVirtual > 0 Then
|
||||
DivMovtoVirtual.Visible = True
|
||||
HplMtoVirtual.NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" & Mov.CveMovimientoVirtual
|
||||
End If
|
||||
|
||||
If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then
|
||||
@@ -944,13 +944,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlClientesSucursales.SelectedValueExist(Mov.CveClienteSucursal.ToString)
|
||||
End If
|
||||
|
||||
'DivDepartamentoEntrega.Visible = True
|
||||
'TxtDepartamentoEntrega.Enabled = False
|
||||
'TxtDepartamentoEntrega.Text = Mov.DepartamentoEntrega
|
||||
|
||||
DivDepartamentoEntrega.Visible = True
|
||||
TxtDepartamentoEntrega.Enabled = False
|
||||
TxtDepartamentoEntrega.Text = Mov.DepartamentoEntrega
|
||||
|
||||
TxtPedidoContrato.Enabled = False
|
||||
TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||
'TxtPedidoContrato.Enabled = False
|
||||
'TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||
|
||||
If Mov.CveProveedor > 0 Then
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
|
||||
@@ -3781,45 +3780,51 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
If ObjInventario.Modulo.Contiene("Consig") Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.Modulo = "ASA/G1" Then
|
||||
Contabilizable = False
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
|
||||
'genero las prepolizas manuales
|
||||
Dim tCveConcepto As Integer = 95
|
||||
Dim CveCuenta As Integer
|
||||
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
|
||||
IdCtaContable = 1
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
|
||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim tCveConcepto As Integer = 69
|
||||
If DdlConcepto.SelectedValue = "30" Then
|
||||
tCveConcepto = 181
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
|
||||
End If
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
If tCveConcepto = 69 Then
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -4456,8 +4461,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
|
||||
@@ -4470,12 +4473,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
RetornoVirtual = GenerarMovimientoVirtual(CveMovimiento, ObjInventario)
|
||||
If CveMovimientoSalida > 0 Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoSalida, ObjInventario)
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||
|
||||
If CveMovimientoEntrada > 0 AndAlso Not ErrorMovInv Then RetornoVirtual = GenerarMovimientoVirtual(CveMovimientoEntrada, ObjInventario)
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then ErrorMovInv = RetornoVirtual.TieneError
|
||||
End If
|
||||
|
||||
If RetornoVirtual IsNot Nothing Then
|
||||
ErrorMovInv = RetornoVirtual.TieneError
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
@@ -5266,7 +5272,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ObjInventario As ClsInventarios) As MMovimientoVirtual
|
||||
Private Function GenerarMovimientoVirtual(CveMovimiento As Integer, ByRef ObjInventario As ClsInventarios) As MMovimientoVirtual
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
@@ -1612,7 +1612,7 @@ Partial Class Clientes
|
||||
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
|
||||
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString())
|
||||
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
|
||||
DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
|
||||
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
|
||||
|
||||
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
|
||||
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
|
||||
@@ -1870,10 +1870,9 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0")
|
||||
|
||||
RdTipoPersona_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0")
|
||||
RdTipoPersona_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
End If
|
||||
UpActivacionPortal.Update()
|
||||
UpModalPersonaFisica.Update()
|
||||
@@ -4716,10 +4715,10 @@ Partial Class Clientes
|
||||
If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then
|
||||
|
||||
Importe = Gvr.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||
IVA = Importe / Gvr.DataKey("Original").ToString().ToDecimal() * Gvr.DataKey("IVA").ToString().ToDecimal() 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE
|
||||
ImporteAplicar = -(Importe - IVA)
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString().ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then
|
||||
IVA = Importe / Gvr.DataKey("Original").ToDecimal() * Gvr.DataKey("IVA").ToDecimal() 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE
|
||||
ImporteAplicar = (Importe - IVA)
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToEntero(), ImporteMX:=ImporteAplicar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToEntero(), ImporteMX:=ImporteAplicar) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
@@ -4737,8 +4736,6 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
@@ -10233,6 +10230,9 @@ Partial Class Clientes
|
||||
Else
|
||||
TxtNombreComercial.Enabled = True
|
||||
End If
|
||||
' DdlRegimenFiscal.SelectedIndex = -1
|
||||
DdlRegimenFiscal.Items.Clear()
|
||||
DdlRegimenFiscal.SelectedValue = Nothing
|
||||
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||
DdlRegimenFiscal.DataBind()
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
Saldo = Gv.DataKey("Saldo").ToDecimal();
|
||||
}
|
||||
|
||||
int IdCtaContable = 0, CveCuenta = 0;
|
||||
int IdCtaContable = 0;
|
||||
if (ObjConta.GetRetCuenta(ConceptoContable1, Gv.DataKey("CveCliente").ToEntero()))
|
||||
{
|
||||
if (ObjConta.DtResultados.Rows.Count > 0)
|
||||
@@ -366,13 +366,10 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
if (Tipo == 1 || Tipo == 2)
|
||||
{
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||
CveCuenta = ObjConta.DtResultados.Rows[0]["IdCtaContableSIG"].ToString().ToEntero();
|
||||
|
||||
}
|
||||
else if (Tipo == 3)
|
||||
{
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContClientes"].ToString().ToEntero();
|
||||
CveCuenta = ObjConta.DtResultados.Rows[0]["CveCuentaCliente"].ToString().ToEntero();
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContClientes"].ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,13 +379,13 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
}
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("CveMoneda").ToEntero(), TxtFecha.Text.ToDate(), "Saldo de NC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("Folio").ToString(), ConceptoContable2, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: Saldo, CveCuenta: CveCuenta))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Saldo, Gv.DataKey("Folio").ToString(), ConceptoContable2, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: Saldo))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
|
||||
@@ -197,7 +197,7 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
{
|
||||
if (Gv.FCCheckBox("Chk").Checked)
|
||||
{
|
||||
int IdCtaContable = 0, CveCuenta = 0;
|
||||
int IdCtaContable = 0;
|
||||
if (ObjConta.GetRetCuenta(91, Gv.DataKey("CveCliente").ToEntero()))
|
||||
{
|
||||
if (ObjConta.DtResultados.Rows.Count > 0)
|
||||
@@ -205,13 +205,11 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
|
||||
if (Gv.DataKey("CveMoneda").ToEntero() > 1)
|
||||
{
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContMonedaExtranjera"].ToString().ToEntero();
|
||||
CveCuenta = -1;
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContMonedaExtranjera"].ToString().ToEntero();
|
||||
}
|
||||
else
|
||||
{
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||
CveCuenta = ObjConta.DtResultados.Rows[0]["IdCtaContableSIG"].ToString().ToEntero();
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -220,7 +218,7 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
string ConceptoPartida = string.Format("{0} {1} ", TxtConcepto.Text, Gv.DataKey("Folio").ToString());
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 11, Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("Saldo").ToDouble(), Gv.DataKey("CveMoneda").ToEntero(), TxtFecha.Text.ToDate(), $"{TextAdicionalJAM} {TxtConcepto.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, -Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 12, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, -1, Gv.DataKey("CveVenta").ToEntero(), CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: -Gv.DataKey("Saldo").ToDecimal(), CveCuenta: CveCuenta))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, -Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 12, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, -1, Gv.DataKey("CveVenta").ToEntero(), CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: -Gv.DataKey("Saldo").ToDecimal()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
}
|
||||
@@ -231,11 +229,10 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
{
|
||||
if (ObjConta.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||
CveCuenta = ObjConta.DtResultados.Rows[0]["IdCtaContableSIG"].ToString().ToEntero();
|
||||
IdCtaContable = ObjConta.DtResultados.Rows[0]["IdCtaContable"].ToString().ToEntero();
|
||||
}
|
||||
}
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, -Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 203, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, -1, Gv.DataKey("CveVenta").ToEntero(), CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: -((Gv.DataKey("Saldo").ToDecimal() * Gv.DataKey("TipoCambioValuacion").ToDecimal()) - Gv.DataKey("Saldo").ToDecimal()), CveCuenta: CveCuenta, TipoCambio: Gv.DataKey("TipoCambioValuacion").ToString().ToDecimal(), ImporteME: -Gv.DataKey("Saldo").ToDecimal()))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, -Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 203, TxtConcepto.Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, -1, Gv.DataKey("CveVenta").ToEntero(), CveCliente: Gv.DataKey("CveCliente").ToEntero(), ImporteMX: -((Gv.DataKey("Saldo").ToDecimal() * Gv.DataKey("TipoCambioValuacion").ToDecimal()) - Gv.DataKey("Saldo").ToDecimal()), TipoCambio: Gv.DataKey("TipoCambioValuacion").ToString().ToDecimal(), ImporteME: -Gv.DataKey("Saldo").ToDecimal()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
}
|
||||
|
||||
@@ -4581,6 +4581,11 @@ Partial Class Ventas
|
||||
End If
|
||||
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
|
||||
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
|
||||
Case "RNC"
|
||||
Trsaldo.Visible = True
|
||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
HplPagado.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||
|
||||
Case "OP"
|
||||
TdOrdenPago.Visible = True
|
||||
DdlOrdenPago.SelectedValue = DbRowVenta("Num3").ToString()
|
||||
@@ -20205,7 +20210,6 @@ Partial Class Ventas
|
||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
@@ -20215,7 +20219,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
'If ValorInventario <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -20229,7 +20233,7 @@ Partial Class Ventas
|
||||
|
||||
If Not OcurrioError Then
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -20239,18 +20243,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'VALIDA QUE SE HALLAN AGREGADO DETALLES AL MOVIMIENTO
|
||||
If ContadorMovtosDetalles = 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If OcurrioError Then
|
||||
Return -1
|
||||
Else
|
||||
@@ -34469,7 +34469,7 @@ Partial Class Ventas
|
||||
|
||||
Dim Distancia As Integer = TxtDistancia.Text.ToEntero()
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyectoDatos.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaEntrega, Fechallegada, "T", "-1", "-1", Fechallegada, 1, 1, Distancia,
|
||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(DdlSubProyectoDatos.SelectedValue.ToEntero, CveDireccionOrigen, CveDireccionDestino, -1, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, FechaEntrega, Fechallegada, "I", "-1", "-1", Fechallegada, 1, 1, Distancia,
|
||||
CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero)
|
||||
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user