Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1805,6 +1805,7 @@ Partial Class Compras_Compras
|
||||
DdlTipoCompra.Items.Clear()
|
||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
||||
|
||||
|
||||
@@ -2704,72 +2705,72 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
GvPS.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CargaHidendsAC()
|
||||
End If
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
CargaHidendsAC()
|
||||
End If
|
||||
|
||||
CalculaTotales(True)
|
||||
CalculaTotales(True)
|
||||
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
||||
|
||||
If dr("Inventario").ToString = "1" Then
|
||||
If dr("Inventario").ToString = "1" Then
|
||||
|
||||
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
||||
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
||||
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
||||
Dim Inv As New ClsInventarios
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
||||
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
||||
|
||||
ImgImprimirAlmacen.Visible = True
|
||||
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
||||
ImgImprimirAlmacen.Visible = True
|
||||
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
||||
|
||||
Dim drt As DataRow
|
||||
'actualizo el almacen
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
Dim drt As DataRow
|
||||
'actualizo el almacen
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
||||
|
||||
dri("CveAlmacen") = drt("CveAlmacen")
|
||||
dri("CveAlmacen") = drt("CveAlmacen")
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'Proceso Super Tramposo de Charlie
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
||||
Dim drt As DataRow
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Inv.Dispose()
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
CargaGvInv()
|
||||
'Proceso Super Tramposo de Charlie
|
||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
||||
Dim drt As DataRow
|
||||
For Each dri As DataRow In DtInv.Rows
|
||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||
If drt IsNot Nothing Then
|
||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
||||
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'Ocultamos "Recibir Aqui"
|
||||
GvInv.Columns(6).Visible = False
|
||||
GvInv.Columns(7).Visible = False
|
||||
Inv.Dispose()
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
CargaGvInv()
|
||||
|
||||
'Ocultamos "Recibir Aqui"
|
||||
GvInv.Columns(6).Visible = False
|
||||
GvInv.Columns(7).Visible = False
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlTipoComprobante.Enabled = False
|
||||
DdlTipoComprobante.SelectedValue = dr("TipoDocto").ToString
|
||||
If dr("TipoDocto").ToString = "Fac" Then
|
||||
ChkAplicaNotaCredito.Enabled = True
|
||||
@@ -3969,6 +3970,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
'------------------INICIA VALIDACIONES------------------
|
||||
Dim EstatusCredito As Integer = 0
|
||||
Dim CveSubProyecto As Integer = 0
|
||||
@@ -6806,6 +6808,19 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'cuando es emp acumuladora
|
||||
|
||||
Dim Valor = (From dr1 In GlobalDTAcumTamaños().FiltraParametros("CveEmpresa = 140").AsEnumerable()
|
||||
Join dr2 In TmpDT.AsEnumerable On dr1.Field(Of Integer)("CvePSCargo") Equals dr2.Field(Of Integer)("CvePS")
|
||||
Select New With
|
||||
{
|
||||
.Total = dr2.Field(Of Double)("Total")
|
||||
}).Sum(Function(item) item.Total)
|
||||
|
||||
importeMovimiento += Valor.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
End If
|
||||
|
||||
Dim ConceptoContabilizacionNC = 225
|
||||
Dim CveMovimientoDevolucion As Integer = -1
|
||||
|
||||
|
||||
@@ -1140,6 +1140,19 @@ Partial Class PopUpVerFactura
|
||||
Vta.Timbre.CFDIRelacionados.UUID.Add(dtVentas(0)("FolioFiscalPadre").ToString)
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso"
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(592) = "1" Then
|
||||
|
||||
Dim RowTipoRelacion As DataRow = GlobalDTVtaTiposRelacion().FiltroPrimero($"CveTipoRelacion = {dtVentas(0)("CveTipoRelacion").ToString.ToEntero}")
|
||||
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacion = RowTipoRelacion("SATClaveTipoRelacion").ToString()
|
||||
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = RowTipoRelacion("SATTipoRelacion").ToString()
|
||||
|
||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
@@ -1183,6 +1196,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'End If
|
||||
|
||||
'If Vta.TipoDocto.Contiene("Egs", "Dev", "Ant") Then
|
||||
|
||||
Reference in New Issue
Block a user