-- redondeo
-- inicia transaccion de contpaqi, si aplica
This commit is contained in:
@@ -4582,7 +4582,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlVendedor.SelectedValue = DbRowVenta("CveVendedor").ToString()
|
DdlVendedor.SelectedValue = If(DbRowVenta("CveVendedor").ToString = "", "0", DbRowVenta("CveVendedor").ToString) 'si viene dbnull, que ponga cero.
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
'TxtDocto.Enabled = False
|
'TxtDocto.Enabled = False
|
||||||
|
|
||||||
@@ -7668,6 +7668,7 @@ Partial Class Ventas
|
|||||||
'CONTABILIDAD AUTOMATICA Y AC
|
'CONTABILIDAD AUTOMATICA Y AC
|
||||||
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
ObjContPaq.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR
|
'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR
|
||||||
@@ -12845,7 +12846,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then
|
||||||
DtCostos = ObjInventario.DtResultados
|
DtCostos = ObjInventario.DtResultados
|
||||||
TotalCosto = DtCostos.SUMD("Total").RoundSQL
|
TotalCosto = DtCostos.SUMD("Total").RoundAD
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
@@ -12854,7 +12855,7 @@ Partial Class Ventas
|
|||||||
Dim cont As Integer = 1
|
Dim cont As Integer = 1
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL
|
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundAD
|
||||||
TotalCostoAcumulado += ValorInventario
|
TotalCostoAcumulado += ValorInventario
|
||||||
|
|
||||||
'cuando es el último movimiento y hay diferencias en los importes
|
'cuando es el último movimiento y hay diferencias en los importes
|
||||||
@@ -12864,23 +12865,23 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
|
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString())
|
||||||
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||||
CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||||
If ValorInventario <> 0 Then
|
'If ValorInventario <> 0 Then
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
'End If
|
||||||
cont += 1
|
cont += 1
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||||
|
|
||||||
If TotalCosto <> 0 Then
|
'If TotalCosto <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -13503,7 +13504,7 @@ Partial Class Ventas
|
|||||||
divAmortizacionTipoRelacion.Visible = True
|
divAmortizacionTipoRelacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146) Then
|
||||||
If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then
|
If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then
|
||||||
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3"))
|
DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3"))
|
||||||
End If
|
End If
|
||||||
@@ -18220,10 +18221,10 @@ Partial Class Ventas
|
|||||||
Dim ValorInventario As Decimal
|
Dim ValorInventario As Decimal
|
||||||
Dim TotalCostoAcumulado As Decimal = 0D
|
Dim TotalCostoAcumulado As Decimal = 0D
|
||||||
Dim Cont As Integer = 1
|
Dim Cont As Integer = 1
|
||||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
|
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundAD
|
||||||
|
|
||||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
|
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundAD
|
||||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||||
TotalCostoAcumulado += ValorInventario
|
TotalCostoAcumulado += ValorInventario
|
||||||
|
|||||||
Reference in New Issue
Block a user