Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3271,7 +3271,12 @@ Partial Class Ventas
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente, -1, 1) Then
|
||||
If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev")) Then
|
||||
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'")
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'")
|
||||
Else
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True ")
|
||||
End If
|
||||
|
||||
|
||||
If AfterPageLoad Then
|
||||
RegistraScript("window.onload = function MuestraContratos() { document.getElementById(""C_BtnMostrarContrato"").click(); }")
|
||||
@@ -8472,10 +8477,10 @@ Partial Class Ventas
|
||||
If AutoConta Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||
Else
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
|
||||
@@ -8483,7 +8488,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||
|
||||
'If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
||||
|
||||
'RMF, cuando es pedido, se manda autorización.
|
||||
@@ -10693,7 +10698,7 @@ Partial Class Ventas
|
||||
.CuentaPredial = drr("CuentaPredial").ToString(),
|
||||
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal}
|
||||
'verifica suma subtotales
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
|
||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
|
||||
concepto.Importe = totSubTotal
|
||||
End If
|
||||
totSubTotal = totSubTotal - concepto.Importe
|
||||
@@ -10703,19 +10708,19 @@ Partial Class Ventas
|
||||
|
||||
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
|
||||
If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional, .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteIEPS").ToString().ToDouble > 0 Then
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
|
||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
|
||||
End If
|
||||
|
||||
Timbre.Conceptos.Add(concepto)
|
||||
@@ -13256,9 +13261,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
If UsuarioActual.CveUsuario.Contiene(100, 1719) Then
|
||||
ModalidadRefacturacion = 2
|
||||
End If
|
||||
|
||||
'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
|
||||
@@ -20218,7 +20220,7 @@ Partial Class Ventas
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString().ToEntero()
|
||||
If CveVentaDetalle > 0 Then
|
||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString().ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString().ToEntero(), Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("PU").ToString().ToDecimal(), Row("ImporteIEPS").ToString().ToDecimal(), Row("PorcentajeIEPS").ToString().ToDecimal(), Row("ImporteIVA").ToString().ToDecimal(), Row("PorcentajeIVA").ToString().ToDecimal(), Row("Descuento").ToString().ToDecimal(), Row("Obs").ToString(), UsuarioActual.CveUsuario) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -31508,7 +31510,7 @@ Partial Class Ventas
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If EscontratoObra Then
|
||||
If EscontratoObra AndAlso PorAmortizacionAnticipo > 0 Then ' si es contrato de obra y tiene amortización de anticipo
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
|
||||
@@ -31529,7 +31531,7 @@ Partial Class Ventas
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("Debe de seleccioanr un importe de amortización.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Debe de seleccionar un importe de amortización.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user