Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -8312,7 +8312,7 @@ Partial Class Ventas
|
||||
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
ObjFacturaDevolucion.Serie = DT.Rows(0)("Serie").ToString()
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
@@ -8590,7 +8590,7 @@ Partial Class Ventas
|
||||
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
ObjFacturaBonificacion.Serie = DT.Rows(0)("Serie").ToString()
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
@@ -9117,7 +9117,7 @@ Partial Class Ventas
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Egs" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
@@ -16417,6 +16417,10 @@ Partial Class Ventas
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
|
||||
If Not TmpDT.Columns.Contains("RetIVA") Then
|
||||
TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||
End If
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Row("CveProyecto") = CveProyecto
|
||||
Row("Proyecto") = Proyecto
|
||||
@@ -16543,7 +16547,11 @@ Partial Class Ventas
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales)
|
||||
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||
|
||||
|
||||
|
||||
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||
|
||||
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
|
||||
Row("PorcentajeRetIVA") = ClienteRetIVA
|
||||
Row("PorcentajeRetISR") = ClienteRetISR
|
||||
@@ -16741,6 +16749,8 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
TmpDT.Columns.Add("RetIVA", GetType(Decimal))
|
||||
TmpDT.Columns.Add("RetISR", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
|
||||
@@ -22613,6 +22623,42 @@ Partial Class Ventas
|
||||
If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoSalidaGeneral, CveAlmacenOrigenContrato) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim RealizarMovimientoVirtual As Boolean = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
RealizarMovimientoVirtual = True
|
||||
End If
|
||||
|
||||
'VIRTUAL SALIDA
|
||||
If RealizarMovimientoVirtual Then
|
||||
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenOrigenContrato).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
Dim CveMovimientoVirtualSalida As Integer
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaGeneral, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
|
||||
'FolioVirtualSalida = ObjInventario.Folio
|
||||
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
@@ -28910,11 +28956,11 @@ Partial Class Ventas
|
||||
Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
ElseIf DdlTipoComprobante.SelectedValue = "Ant" Or DdlTipoComprobante.SelectedValue = "Egs" Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = True
|
||||
Respuesta = False
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user