Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -6230,7 +6230,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||||
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output
|
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||||
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -5266,7 +5266,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
sw.Stop()
|
sw.Stop()
|
||||||
If sw.Elapsed.TotalSeconds > 1 Then
|
If sw.Elapsed.TotalSeconds > 5 Then
|
||||||
GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
|
GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1263,8 +1263,8 @@ Public Class Timbrado
|
|||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
|
||||||
'RECEPTOR
|
'RECEPTOR
|
||||||
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
|
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib,
|
||||||
cfdi.agregarComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
|
||||||
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,
|
||||||
|
|||||||
@@ -2090,54 +2090,82 @@ Partial Class Bancos_PopIEVentas
|
|||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
Dim tImporteVenta, tImportePago, Diferencia As Decimal
|
||||||
TimpocambioGeneral = TCImpuestos
|
ImporteMovimiento = 0
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
If CveMonedaVenta = 1 And CveMoneda = 2 Then
|
||||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
'factura pesos, pago en dolares
|
||||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta / tipoCambioPago).RoundSQL
|
||||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
ElseIf CveMonedaVenta = 2 And CveMoneda = 2 Then
|
||||||
Diferencia = Math.Round(Diferencia, 2)
|
'factura dolares, pago en dolares
|
||||||
|
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||||
|
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
|
||||||
|
ElseIf CveMonedaVenta = 2 And CveMoneda = 1 Then
|
||||||
|
'factura dolares, pago en pesos
|
||||||
|
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
|
||||||
|
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
|
||||||
|
End If
|
||||||
|
|
||||||
|
If tImporteVenta <> tImportePago Then
|
||||||
|
If tImporteVenta < tImportePago Then
|
||||||
|
CveConcepto = 64
|
||||||
|
Else
|
||||||
|
CveConcepto = 65
|
||||||
|
End If
|
||||||
|
Diferencia = Math.Abs(tImporteVenta - tImportePago)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
|
||||||
|
If FuncionalidadFluctuacionImpuestos Then
|
||||||
|
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||||
|
TimpocambioGeneral = TCImpuestos
|
||||||
|
|
||||||
|
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
Diferencia = Math.Round(Diferencia, 2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
||||||
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
|
'If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
|
||||||
ImporteMovimiento = Math.Abs(Diferencia)
|
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
ImporteMX = ImporteMovimiento
|
' ImporteMX = ImporteMovimiento
|
||||||
End If
|
'End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
Case 65 'Perdida
|
'Case 65 'Perdida
|
||||||
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
|
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
TimpocambioGeneral = TCImpuestos
|
' TimpocambioGeneral = TCImpuestos
|
||||||
|
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
Diferencia = Math.Round(Diferencia, 2)
|
' Diferencia = Math.Round(Diferencia, 2)
|
||||||
|
|
||||||
'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
||||||
If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
|
' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
|
||||||
ImporteMovimiento = Math.Abs(Diferencia)
|
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
ImporteMX = ImporteMovimiento
|
' ImporteMX = ImporteMovimiento
|
||||||
End If
|
' End If
|
||||||
Else
|
' Else
|
||||||
ImporteMovimiento = 0
|
' ImporteMovimiento = 0
|
||||||
End If
|
' End If
|
||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
' CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
Case 30
|
Case 30
|
||||||
If RBLContado.SelectedValue = "1" Then
|
If RBLContado.SelectedValue = "1" Then
|
||||||
|
|||||||
BIN
Bin/RVCFDI33.dll
BIN
Bin/RVCFDI33.dll
Binary file not shown.
@@ -4335,7 +4335,7 @@ Partial Class Compras_Compras
|
|||||||
Try
|
Try
|
||||||
Dim FolioFijo As Integer = 0
|
Dim FolioFijo As Integer = 0
|
||||||
'cheque
|
'cheque
|
||||||
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
|
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = TxtFolio.Text.ToEntero
|
||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
@@ -4471,6 +4471,8 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
'si el registro es manual, toma el mismo dato
|
||||||
|
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
|
||||||
|
|
||||||
'Compra
|
'Compra
|
||||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
||||||
@@ -6305,7 +6307,7 @@ Partial Class Compras_Compras
|
|||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
|
||||||
@@ -6643,18 +6645,22 @@ Partial Class Compras_Compras
|
|||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
|
||||||
|
|
||||||
'CLASIFICACION
|
'CLASIFICACION
|
||||||
If Row2("CveClasificacion").ToString.ToEntero > 0 Then
|
If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "FAC" Then
|
||||||
|
|
||||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
|
||||||
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
|
||||||
Else
|
Else
|
||||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'SEGMENTO DE NEGOCIO
|
'SEGMENTO DE NEGOCIO
|
||||||
Dim IdSegmentoNegocio As Integer = -1
|
Dim IdSegmentoNegocio As Integer = -1
|
||||||
Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
|
Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
|
||||||
@@ -6684,6 +6690,11 @@ Partial Class Compras_Compras
|
|||||||
If DdlMoneda.SelectedValue = "2" Then
|
If DdlMoneda.SelectedValue = "2" Then
|
||||||
tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
|
tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ElseIf DdlTipoComprobante.SelectedValue = "NC" Then
|
||||||
|
tcvecon = 259
|
||||||
|
tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim usacomplementariaProveedor As Boolean = False
|
Dim usacomplementariaProveedor As Boolean = False
|
||||||
|
|||||||
@@ -412,6 +412,10 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
|||||||
|
|
||||||
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
|
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza,5))// por default manda la opcion 5, para ajustar a fluctuacion
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
|
|
||||||
GVPendientes.DataBind()
|
GVPendientes.DataBind()
|
||||||
UpPendientes.Update()
|
UpPendientes.Update()
|
||||||
DtPendientes.Dispose()
|
If DtPendientes IsNot Nothing Then DtPendientes.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound
|
Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound
|
||||||
@@ -632,10 +632,7 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
|
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
|
|
||||||
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
|
|
||||||
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
|
|
||||||
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
|
||||||
If Not DtDatos.Columns.Contains("Lote") Then
|
If Not DtDatos.Columns.Contains("Lote") Then
|
||||||
DtDatos.Columns.Add("Lote", GetType(String))
|
DtDatos.Columns.Add("Lote", GetType(String))
|
||||||
End If
|
End If
|
||||||
@@ -1749,7 +1746,7 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
|
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
|
||||||
|
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
If CBool(Dr("AplicaSerieLote")) Then
|
||||||
|
|
||||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||||
@@ -1882,7 +1879,12 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
|
|
||||||
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
|
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1,
|
||||||
|
SerieLote:=Dr("SerieLote").ToString,
|
||||||
|
CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero,
|
||||||
|
FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha),
|
||||||
|
Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"),
|
||||||
|
CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1894,7 +1896,8 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If ErrorMovInv Then Exit For
|
If ErrorMovInv Then Exit For
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1038,7 +1038,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
Dim GenerarRNC As Boolean = False
|
Dim GenerarRNC As Boolean = False
|
||||||
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
|
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
|
||||||
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
|
If Me.CveRemisionRecibida <= 0 Then 'EsDistribuidor AndAlso , comentado, 2020.04.21 RMF
|
||||||
GenerarRNC = True
|
GenerarRNC = True
|
||||||
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
|
||||||
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Private Sub CargaAlmacenOrigen()
|
Private Sub CargaAlmacenOrigen()
|
||||||
DdlAlmacenOrigen.Enabled = True
|
DdlAlmacenOrigen.Enabled = True
|
||||||
DdlAlmacenOrigen.Items.Clear()
|
DdlAlmacenOrigen.Items.Clear()
|
||||||
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
|
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11)")
|
||||||
DdlAlmacenOrigen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
DdlAlmacenOrigen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||||
DdlAlmacenOrigen.SelectedValue = "-1"
|
DdlAlmacenOrigen.SelectedValue = "-1"
|
||||||
DdlAlmacenOrigen.DataBind()
|
DdlAlmacenOrigen.DataBind()
|
||||||
@@ -1598,6 +1598,43 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
' TextoError = "Ocurrió un error al obtener los movimientos de salida"
|
' TextoError = "Ocurrió un error al obtener los movimientos de salida"
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
'VIRTUAL ENTRADA
|
||||||
|
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||||
|
Dim FolioVirtualEntrada As Integer = 0
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||||
|
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenRecepcion.SelectedValue}").ToEntero()
|
||||||
|
|
||||||
|
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||||
|
|
||||||
|
If CveAlmacenVirtual > 0 Then
|
||||||
|
|
||||||
|
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/S2")
|
||||||
|
FolioVirtualEntrada = ObjInventario.Folio
|
||||||
|
Dim dtvirtual As DataTable = Nothing
|
||||||
|
|
||||||
|
If CveMovimientoVirtualEntrada > 0 AndAlso ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
|
dtvirtual = ObjInventario.DtResultados
|
||||||
|
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||||
|
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||||
|
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||||
|
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
TextoError = "No se pudo registrar el movimiento virtual"
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
TextoError = "La Sucursal no tiene creado un almacen virtual"
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||||
|
|||||||
@@ -800,7 +800,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
'inserto las ventas que voy a pagar
|
'inserto las ventas que voy a pagar
|
||||||
For Each gvr As GridViewRow In GvCxC.Rows
|
For Each gvr As GridViewRow In GvCxC.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
Dim ObjFactura As Modelos.Factura
|
Dim ObjFactura As Modelos.Factura = Nothing
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||||
@@ -1282,26 +1282,73 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
|
||||||
Case 64 'Ganancia
|
Case 64 'Ganancia
|
||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero
|
||||||
|
Dim tImporteVenta, tImportePago As Decimal
|
||||||
|
Dim Diferencia As Decimal = 0
|
||||||
|
ImporteMovimiento = 0
|
||||||
|
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
|
||||||
|
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
|
||||||
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
If CveMonedaVenta = 1 And CveMoneda <> 1 Then
|
||||||
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
'factura pesos, pago en dolares
|
||||||
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
|
||||||
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
tImportePago = (((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL
|
||||||
Diferencia = Math.Round(Diferencia, 2)
|
ElseIf CveMonedaVenta <> 1 And CveMoneda <> 1 Then
|
||||||
|
'factura dolares, pago en dolares
|
||||||
|
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
|
||||||
|
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
|
||||||
|
ElseIf CveMonedaVenta <> 1 And CveMoneda = 1 Then
|
||||||
|
'factura dolares, pago en pesos
|
||||||
|
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
|
||||||
|
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
|
||||||
|
End If
|
||||||
|
|
||||||
|
If tImporteVenta <> tImportePago Then
|
||||||
|
If tImporteVenta < tImportePago Then
|
||||||
|
ConceptoContable = 64
|
||||||
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
|
TipoMovimiento = True
|
||||||
|
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
|
Else
|
||||||
|
ConceptoContable = 65
|
||||||
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
|
TipoMovimiento = False
|
||||||
|
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
|
End If
|
||||||
|
Diferencia = tImporteVenta - tImportePago
|
||||||
|
End If
|
||||||
|
|
||||||
|
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
|
||||||
|
If FuncionalidadFluctuacionImpuestos Then
|
||||||
|
Dim TCImpuestos As Decimal = tipoCambioPago
|
||||||
|
|
||||||
|
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
Diferencia = Math.Round(Diferencia, 2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
|
|
||||||
|
'Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
|
'Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
'Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
'Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
'Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
'Diferencia = Math.Round(Diferencia, 2)
|
||||||
|
|
||||||
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
||||||
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
'If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = Math.Abs(Diferencia)
|
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
@@ -1318,47 +1365,47 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 65 'Perdida
|
'Case 65 'Perdida
|
||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
' If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
' tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
|
||||||
|
|
||||||
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
' Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
' Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
' Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
' Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
' Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
Diferencia = Math.Round(Diferencia, 2)
|
' Diferencia = Math.Round(Diferencia, 2)
|
||||||
'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
||||||
If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = Math.Abs(Diferencia)
|
' ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
importeMX = ImporteMovimiento
|
' importeMX = ImporteMovimiento
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
' '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
'If tipoCambioPago < tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
' 'If tipoCambioPago < tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
' ' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
' ' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)
|
' ' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)
|
||||||
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
' ' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
' ' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
' ' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
||||||
' importeMX = ImporteMovimiento
|
' ' importeMX = ImporteMovimiento
|
||||||
' 'ElseIf tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
' ' 'ElseIf tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
' ' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - (Math.Abs(Math.Round(gvr.FCTextBox("TxtAbonar").Text.ToDecimal / tipoCambioPago, 2)) * tipoCambioPago)
|
' ' ' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - (Math.Abs(Math.Round(gvr.FCTextBox("TxtAbonar").Text.ToDecimal / tipoCambioPago, 2)) * tipoCambioPago)
|
||||||
' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IVA
|
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetIVA
|
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetISR
|
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IEPS
|
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
' ' ImporteMovimiento = ImporteMovimiento
|
' ' ' ImporteMovimiento = ImporteMovimiento
|
||||||
' ' importeMX = ImporteMovimiento
|
' ' ' importeMX = ImporteMovimiento
|
||||||
'End If
|
' 'End If
|
||||||
CveSubProyectoContabilizar = CveSubProyecto
|
' CveSubProyectoContabilizar = CveSubProyecto
|
||||||
Else
|
' Else
|
||||||
ImporteMovimiento = 0
|
' ImporteMovimiento = 0
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Case 78 'Otros Ingresos
|
Case 78 'Otros Ingresos
|
||||||
If ChkAjusteOI.Checked Then
|
If ChkAjusteOI.Checked Then
|
||||||
@@ -1494,7 +1541,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -5802,8 +5802,12 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||||
End If
|
End If
|
||||||
'e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
|
||||||
'e.Row.FCDropDownLost("DdlPS").Enabled = False
|
'cuando ya tiene una salida, no se puede cambiar el producto
|
||||||
|
If e.Row.DBCampo("CantidadInventario").ToDouble > 0 Then
|
||||||
|
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||||
|
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtTiempoEntrega").Enabled = False
|
e.Row.FCTextBox("TxtTiempoEntrega").Enabled = False
|
||||||
e.Row.FCDropDownList("DdlProyecto").Enabled = False
|
e.Row.FCDropDownList("DdlProyecto").Enabled = False
|
||||||
@@ -5948,6 +5952,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
|
||||||
|
Dim CveUM As Integer = DatarowPS("CveUM").ToString.ToEntero
|
||||||
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero
|
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero
|
||||||
|
|
||||||
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
|
||||||
@@ -5962,7 +5967,7 @@ Partial Class Ventas
|
|||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia As Decimal
|
Dim Existencia As Decimal
|
||||||
If ValidaExistencia Then
|
If ValidaExistencia Then
|
||||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, CveTipoAlmacen:=1)
|
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, CveTipoAlmacen:=1)
|
||||||
@@ -10935,7 +10940,7 @@ Partial Class Ventas
|
|||||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.")
|
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -11076,7 +11081,7 @@ Partial Class Ventas
|
|||||||
CveConceptoAlmacen = 18
|
CveConceptoAlmacen = 18
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
|
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEnteroca
|
||||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
|
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
|
||||||
|
|
||||||
If CveMovimientoInventario <= 0 Then
|
If CveMovimientoInventario <= 0 Then
|
||||||
@@ -11248,7 +11253,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If factura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
If factura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
||||||
|
|
||||||
'Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
|
|
||||||
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, factura)
|
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, factura)
|
||||||
|
|
||||||
If IDPoliza.IdPoliza > 0 Then
|
If IDPoliza.IdPoliza > 0 Then
|
||||||
@@ -24894,6 +24898,7 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
|
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
|
|
||||||
UpModalRemisionesNC.Update()
|
UpModalRemisionesNC.Update()
|
||||||
UpAplicarNC.Update()
|
UpAplicarNC.Update()
|
||||||
|
|||||||
Reference in New Issue
Block a user