0 Comp: Dias de credito en OC que afecte a la compra, que se imprima en el PDF y que afecte al registro de la compra
This commit is contained in:
@@ -14914,6 +14914,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Sub VinculaOC()
|
||||
CveIEAnticipo = -1
|
||||
Dim DiasCredito As Integer = 0
|
||||
If TxtOC.Text <> "" Then
|
||||
|
||||
'VARIABLES
|
||||
@@ -14935,6 +14936,8 @@ Partial Class Compras_Compras
|
||||
Dim FoliosOCAnticipo As String = "", FoliosOCAnticipoIE As String = ""
|
||||
Dim StrPromos As New StringBuilder
|
||||
|
||||
|
||||
|
||||
For Each CveOCItem As String In ArrayCveOC.Distinct
|
||||
If ObjOC.GetOrdenesDetalle(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
If IsNothing(DTOCTemp) Then
|
||||
@@ -14943,6 +14946,14 @@ Partial Class Compras_Compras
|
||||
DTOCTemp.Merge(ObjOC.DtResultados)
|
||||
End If
|
||||
|
||||
|
||||
Dim DiasCreditoOCActual As Integer = DTOCTemp.FiltroPrimeroValor("DiasCreditoOC").ToEntero
|
||||
|
||||
If DiasCreditoOCActual > DiasCredito Then
|
||||
DiasCredito = DiasCreditoOCActual
|
||||
End If
|
||||
|
||||
|
||||
IvaAcumulado += ObjOC.DtResultados.Rows(0)("IVA").ToString.ToDouble
|
||||
TextoObservaciones += ObjOC.DtResultados.Rows(0)("Descripcion").ToString
|
||||
|
||||
@@ -15063,9 +15074,16 @@ Partial Class Compras_Compras
|
||||
DivOCPromocion.Visible = True
|
||||
End If
|
||||
|
||||
If DiasCredito > 0 Then
|
||||
TxtFechaPago.Text = Now.AddDays(DiasCredito).ToString("dd/MM/yyyy")
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
|
||||
'CARGA DATOS DE OC
|
||||
CargaVinculacionOC(True)
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlOCVinculaInv_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -15136,6 +15154,10 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
Private Sub CargaGvsOC()
|
||||
|
||||
If Not TmpDT.Columns.Contains("NoIdentificacion") Then
|
||||
TmpDT.Columns.Add("NoIdentificacion")
|
||||
End If
|
||||
|
||||
'SI ES MAS DE UNA OC ORDENA POR PRODUCTO
|
||||
Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c})
|
||||
'DTOCGV = If(ArrayCveOC.Length > 1, DTOCGV.FiltraParametros("", "Producto"), DTOCGV)
|
||||
|
||||
Reference in New Issue
Block a user