-- si es nc, vinculada a una devolución y no s va a recibir..
This commit is contained in:
@@ -6635,7 +6635,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Dim diferenciaTransito As Decimal = 0
|
|
||||||
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||||
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||||
Dim importeMNTemp As Decimal = 0
|
Dim importeMNTemp As Decimal = 0
|
||||||
@@ -6643,6 +6643,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DifTC As Decimal = tipoCambioActual - Gvr.DataKey("TipoCambio").ToDecimal
|
Dim DifTC As Decimal = tipoCambioActual - Gvr.DataKey("TipoCambio").ToDecimal
|
||||||
'diferenciaTransito = DifTC * (Gvr.DataKey("IVA").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal)
|
'diferenciaTransito = DifTC * (Gvr.DataKey("IVA").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal)
|
||||||
'diferenciaTransito += DifTC * (Gvr.DataKey("IEPSPS").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal)
|
'diferenciaTransito += DifTC * (Gvr.DataKey("IEPSPS").ToDecimal / Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDecimal)
|
||||||
@@ -6654,23 +6655,28 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'si se marca que no se va a recibir, falta validación
|
||||||
|
If Not ErrorMovInv AndAlso Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 1, UsuarioActual.CveUsuario) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Dim diferenciaTransito As Decimal = 0
|
||||||
'la diferencia se va aplicar sobre los
|
'la diferencia se va aplicar sobre los
|
||||||
|
|
||||||
'Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL
|
|
||||||
|
|
||||||
If diferenciaTransito <> 0 Then
|
If diferenciaTransito <> 0 Then
|
||||||
Dim tCveCon As Integer = 65
|
Dim tCveCon As Integer = 65
|
||||||
If diferenciaTransito < 0 Then
|
If diferenciaTransito < 0 Then
|
||||||
tCveCon = 64
|
tCveCon = 64
|
||||||
End If
|
End If
|
||||||
diferenciaTransito = Math.Abs(diferenciaTransito)
|
diferenciaTransito = Math.Abs(diferenciaTransito)
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, Referencia, tCveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=diferenciaTransito, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, If(tCveCon = 64, True, False), diferenciaTransito, Referencia, tCveCon, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=diferenciaTransito, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=1, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Else
|
||||||
Else
|
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
||||||
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
|
||||||
If TotalRealDevolucion <> 0 Then
|
If TotalRealDevolucion <> 0 Then
|
||||||
|
|
||||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user