registro de gasto, con producto con funcionalidad 562
This commit is contained in:
@@ -6281,7 +6281,7 @@ Partial Class Compras_Compras
|
|||||||
'falta el registro de la NC cuando es
|
'falta el registro de la NC cuando es
|
||||||
Dim RegistroCuentaPuente As Boolean = False
|
Dim RegistroCuentaPuente As Boolean = False
|
||||||
'NC CON PRODUCTOS - CUENTA PUENTE
|
'NC CON PRODUCTOS - CUENTA PUENTE
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||||
|
|
||||||
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
|
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
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
@@ -6315,6 +6315,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||||
Dim ContienePSNeteoBonif As Boolean = False
|
Dim ContienePSNeteoBonif As Boolean = False
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Then 'clasificación de Bonificación, no se incluirá en el neteo
|
If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Then 'clasificación de Bonificación, no se incluirá en el neteo
|
||||||
@@ -6335,6 +6337,8 @@ Partial Class Compras_Compras
|
|||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9626,7 +9630,7 @@ Partial Class Compras_Compras
|
|||||||
CveCuenta = 0
|
CveCuenta = 0
|
||||||
|
|
||||||
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ]
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
|
If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then
|
||||||
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
|
|
||||||
@@ -15323,6 +15327,16 @@ Partial Class Compras_Compras
|
|||||||
TotalFlete = 0
|
TotalFlete = 0
|
||||||
TotalAlmacen = 0
|
TotalAlmacen = 0
|
||||||
|
|
||||||
|
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
||||||
|
For Each Dr2 As DataRow In DtInv.Rows
|
||||||
|
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
||||||
|
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
||||||
|
Next
|
||||||
|
|
||||||
|
'sino hay producto en almacen para aplciarle un servicio, no se debe de amrcar como costo indirecto
|
||||||
|
'esto aplica cuando la factura solo trae un concepto, y es el de servicio
|
||||||
|
If TotalAlmacen = 0 Then Exit Sub
|
||||||
|
|
||||||
'Obtenemos el total del flete y marcamos los conceptos que pertenecen a flete
|
'Obtenemos el total del flete y marcamos los conceptos que pertenecen a flete
|
||||||
For Each gvr As GridViewRow In GVServicios.Rows
|
For Each gvr As GridViewRow In GVServicios.Rows
|
||||||
If gvr.DataKey("CvePS").ToEntero = CvePS Or gvr.FCCheckBox("chkServicios").Checked Then
|
If gvr.DataKey("CvePS").ToEntero = CvePS Or gvr.FCCheckBox("chkServicios").Checked Then
|
||||||
@@ -15337,11 +15351,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If Not TotalFlete > 0 Then Exit Sub
|
If Not TotalFlete > 0 Then Exit Sub
|
||||||
|
|
||||||
'Obtenemos el total del almacen y guardamos las consecutivas pertenecientes al mismo
|
|
||||||
For Each Dr2 As DataRow In DtInv.Rows
|
|
||||||
TotalAlmacen += Math.Round(Dr2("Total").ToString.ToDecimal, 2)
|
|
||||||
ListaConsecutivas.Add(Dr2("Consec").ToString)
|
|
||||||
Next
|
|
||||||
|
|
||||||
'Asignamos los costos indirectos y los indices
|
'Asignamos los costos indirectos y los indices
|
||||||
For Each Drt As DataRow In TmpDT.Rows
|
For Each Drt As DataRow In TmpDT.Rows
|
||||||
|
|||||||
Reference in New Issue
Block a user