Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -5773,7 +5773,8 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesAdd")
|
||||
@@ -5791,6 +5792,7 @@ Public Class ClsContabilidad
|
||||
.Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA
|
||||
.Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina
|
||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -5825,7 +5827,8 @@ Public Class ClsContabilidad
|
||||
Public Function UpdateCuentasAsignaciones(CveConceptoAsignacion As Integer, Optional CveConceptoContable As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||
Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1) As Boolean
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||
@@ -5843,6 +5846,7 @@ Public Class ClsContabilidad
|
||||
.Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA
|
||||
.Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina
|
||||
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1198,6 +1198,26 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetPSContratoDetalle(CveContrato As Integer, DtPS As String) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_GetPSContratoDetalle")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@DtPS", SqlDbType.VarChar).Value = DtPS
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al cargar los Detalles del Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Contratos detalles Avance"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" ClientIDMode="Static" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
<hr />
|
||||
<div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;">
|
||||
<div class="col-md-12">
|
||||
@@ -222,7 +222,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Text="Veces por Aplicar:" AssociatedControlID=""></asp:Label>
|
||||
|
||||
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtVecesAplicar" CssClass="form-control" runat="server" Text="1"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -333,8 +333,11 @@
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#hdnTotal').val(valor);
|
||||
debugger;
|
||||
|
||||
$get('hdnTotal').value = valor;
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
}
|
||||
@@ -354,8 +357,9 @@
|
||||
}
|
||||
}
|
||||
var Suma = SumaValores();
|
||||
let valor = FormatoNumero(SumaValores(), 2);
|
||||
$('#C_hdnTotal').val(valor);
|
||||
let valor = FormatoNumero(Suma, 2);
|
||||
debugger;
|
||||
$get('hdnTotal').value = valor;
|
||||
$get('TxtImporte').value = valor;
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
|
||||
@@ -338,13 +338,14 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
#region"GUARDAR"
|
||||
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
//inician validaciones
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() != 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() != 2 && TxtImporte.Text == "")
|
||||
{
|
||||
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
|
||||
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
|
||||
if (OpcionDevolucion.SelectedValue == "3" && TipoDevolucion.SelectedValue == "2")
|
||||
{
|
||||
if (TxtValor.Text == "")
|
||||
{
|
||||
@@ -353,17 +354,25 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero();
|
||||
int total = hdnTotal.Text.ToEntero();
|
||||
decimal valor = TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal();
|
||||
decimal total = hdnTotal.Text.ToDecimal();
|
||||
if (valor != total)
|
||||
{
|
||||
Alert("La cantidad total debe ser igual a lo seleccionado");
|
||||
Alert("La cantidad total debe ser igual a lo seleccionado", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (valor ==0)
|
||||
{
|
||||
Alert("No se han seleccionado opciones", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//terminan validaciones
|
||||
|
||||
ClsBancos ObjIE = new ClsBancos();
|
||||
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
|
||||
@@ -465,7 +474,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
//Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL();
|
||||
Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal();
|
||||
//GUARDA PREPOLIZAS DETALLE Via Nómina
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal, CveNominaMovtoPermanente: CveMovtoPermanente))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, CveIE: gvr.DataKey("CveIE").ToEntero(), ImporteMX: tTotal, CveNominaMovtoPermanente: CveMovtoPermanente))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de Devolución";
|
||||
}
|
||||
@@ -617,15 +626,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
{
|
||||
archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero()));
|
||||
}
|
||||
|
||||
//if (archivo.Length > 0)
|
||||
//{
|
||||
// if (archivo.Exists)
|
||||
// {
|
||||
// Msg.AppendFormat(@"<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">{1}</a> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem));
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
if (IDPoliza > 0)
|
||||
{
|
||||
Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
|
||||
|
||||
@@ -4087,20 +4087,20 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'DF - 10/04/2017
|
||||
If UsuarioActual.TienePermisoProceso(187) Then
|
||||
If TxtSerie.Text <> SerieVieja Then
|
||||
Dim dtt As DataTable = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa)
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
Dim SerieNueva As String = dtt.FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
|
||||
If SerieNueva = "" Then
|
||||
Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
''DF - 10/04/2017
|
||||
'If UsuarioActual.TienePermisoProceso(187) Then
|
||||
' If TxtSerie.Text <> SerieVieja Then
|
||||
' Dim dtt As DataTable = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa)
|
||||
' If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
' Dim SerieNueva As String = dtt.FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
|
||||
' If SerieNueva = "" Then
|
||||
' Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'Excede el limite de credito
|
||||
If RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac") AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
|
||||
@@ -6037,14 +6037,19 @@ Partial Class Compras_Compras
|
||||
If importeMovimiento <> 0 Then
|
||||
Dim IdCtaIva As Integer = 0
|
||||
IdCtaIva = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
Dim ttConceptoContable As Integer = 14
|
||||
|
||||
If ObjConta.GetRetCuenta(14, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then
|
||||
If ObjConta.GetRetCuenta(ttConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaIva = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 14, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
If chkImportacion.Checked Then
|
||||
ttConceptoContable = 287
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ttConceptoContable, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaIva, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -18084,6 +18089,22 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DtpsTemp As DataTable = Nothing
|
||||
Dim CveContratoDetalle As Integer = -1
|
||||
Dim CveContrato As Integer = GlobalDTContratos(UsuarioActual.CveEmpresa, -1, DdlSubProyecto.SelectedValue.ToString.ToEntero).FiltroPrimeroValor("CveContrato").ToEntero
|
||||
If CveContrato > 0 Then
|
||||
Dim dttemp As New DataTable
|
||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
dttemp.Columns.Add("CvePS", GetType(Integer))
|
||||
Dim DrPS = dttemp.NewRow
|
||||
DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero
|
||||
DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero
|
||||
dttemp.Rows.Add(DrPS)
|
||||
DtpsTemp = GetPSContratoDetalle(CveContrato, dttemp)
|
||||
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
||||
CveContratoDetalle = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", DdlPS.SelectedValue.ToString.ToEntero)).ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
'If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
|
||||
' Dim drContrato As DataRow = dttemp.Rows(0)
|
||||
@@ -18118,20 +18139,6 @@ Partial Class Compras_Compras
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim CveContrato As Integer = GlobalDTContratos(UsuarioActual.CveEmpresa, -1, DdlSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("CveContrato").ToEntero
|
||||
Dim CveContratoDetalle As Integer = -1
|
||||
If CveContrato > 0 Then
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
CveContratoDetalle = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", DdlPS.SelectedValue.ToString)).ToEntero
|
||||
If CveContratoDetalle = 0 Then
|
||||
CveContratoDetalle = -1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
Select Case Modalidad
|
||||
Case "A" 'ADD
|
||||
|
||||
@@ -18146,7 +18153,6 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
AddPS(TxtCantidad.Text.Trim.ToDouble, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
|
||||
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDouble, Total, IVA,
|
||||
TxtRetIVAModal.Text.ToDouble / 100, TxtRetISRModal.Text.ToDouble / 100, TxtIEPSModal.Text.ToDouble / 100, 0, TxtDescuentoModal.Text.ToDouble, OtrosGastos:=TxtOtrosGastos.Text.ToDouble, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
|
||||
@@ -18625,13 +18631,26 @@ Partial Class Compras_Compras
|
||||
CveProyecto = DdlAsignarProyecto.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
Dim CveContrato As Integer = GlobalDTContratos(UsuarioActual.CveEmpresa, -1, DdlAsignaSubProyecto.SelectedValue.ToEntero).FiltroPrimeroValor("CveContrato").ToEntero
|
||||
Dim DtpsTemp As DataTable = Nothing
|
||||
If CveContrato > 0 Then
|
||||
DtpsTemp = GetPSContratoDetalle(CveContrato, TmpDT.FiltraParametros("", "", {"CveSubProyecto", "CvePS"}))
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
Dr("CveProyecto") = CveProyecto
|
||||
Dr("Proyecto") = If(CveSubProyecto = -1, "SE", DdlAsignarProyecto.SelectedItem.Text)
|
||||
Dr("CveSubProyecto") = CveSubProyecto
|
||||
Dr("SubProyecto") = If(CveSubProyecto = -1, "SE", DdlAsignaSubProyecto.SelectedItem.Text)
|
||||
|
||||
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
||||
Dr("CveContratoDetalle") = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", Dr("CvePS"))).ToEntero
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("", "Consec")
|
||||
GvPS.DataBind()
|
||||
UpPS.Update()
|
||||
@@ -18694,9 +18713,22 @@ Partial Class Compras_Compras
|
||||
Dim PS As New ClsProductosServicios
|
||||
Dim CvePS = -1
|
||||
Dim tPS = ""
|
||||
|
||||
Dim CveSubProyecto As Integer = TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSubProyecto").ToString.ToEntero
|
||||
CvePS = DdlPSAlias2.SelectedValue.ToEntero
|
||||
tPS = DdlPSAlias2.SelectedText
|
||||
Dim DtpsTemp As DataTable = Nothing
|
||||
Dim CveContrato As Integer = GlobalDTContratos(UsuarioActual.CveEmpresa, -1, CveSubProyecto).FiltroPrimeroValor("CveContrato").ToEntero
|
||||
If CveContrato > 0 Then
|
||||
Dim dttemp As New DataTable
|
||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
dttemp.Columns.Add("CvePS", GetType(Integer))
|
||||
Dim DrPS = dttemp.NewRow
|
||||
DrPS("CveSubProyecto") = CveSubProyecto
|
||||
DrPS("CvePS") = CvePS
|
||||
dttemp.Rows.Add(DrPS)
|
||||
DtpsTemp = GetPSContratoDetalle(CveContrato, dttemp)
|
||||
End If
|
||||
|
||||
|
||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then
|
||||
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
|
||||
@@ -18711,6 +18743,9 @@ Partial Class Compras_Compras
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPS") = HdnPSAliasCveSATPS.Value.ToEntero
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveSATPSActualizado") = 0
|
||||
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CveContratoDetalle") = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", CvePS)).ToEntero
|
||||
End If
|
||||
|
||||
'busco si el producto está en otros renglones QUE NO LO TENGAN ASIGNADO, LO VINCULE
|
||||
For Each drt As DataRow In TmpDT.Select($"PS ='{TxtPSAlias.Text.Trim}' and ISNULL(CvePS,0) = 0")
|
||||
@@ -18724,7 +18759,9 @@ Partial Class Compras_Compras
|
||||
drt("CveSATPS") = HdnPSAliasCveSATPS.Value.ToEntero
|
||||
drt("SATClaveProductoServicio") = HdnPSAliasSATClavePS.Value
|
||||
drt("CveSATPSActualizado") = 0
|
||||
|
||||
If DtpsTemp IsNot Nothing AndAlso DtpsTemp.Rows.Count > 0 Then
|
||||
drt("CveContratoDetalle") = DtpsTemp.FiltroPrimeroValor("CveContratoDetalle", String.Format("CvePS = {0}", drt("CvePS"))).ToEntero
|
||||
End If
|
||||
|
||||
Next
|
||||
TmpDT.AcceptChanges()
|
||||
@@ -20939,6 +20976,20 @@ Partial Class Compras_Compras
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Private Function GetPSContratoDetalle(CveContrato As Integer, DtPS As DataTable) As DataTable
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim DtpsTemp As DataTable = Nothing
|
||||
|
||||
If DtPS.MAX("CveSubProyecto", "CveSubProyecto IS NOT NULL").ToEntero > 0 AndAlso DtPS.MAX("CvePS", "CvePS IS NOT NULL").ToEntero > 0 Then
|
||||
Dim TempPS As String = JsonConvert.SerializeObject(DtPS).ToString
|
||||
If ObjContratos.GetPSContratoDetalle(CveContrato, TempPS) Then
|
||||
DtpsTemp = ObjContratos.DtResultados
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
End If
|
||||
|
||||
Return DtpsTemp
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user