-- mejora en mensajes de error

- código 510 en póliza virtual
This commit is contained in:
2021-09-14 13:33:39 -07:00
parent 8687166aab
commit bfe18df5e4

View File

@@ -10689,7 +10689,7 @@ Partial Class Ventas
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal,
.Descripcion = tPS,
.ValorUnitario = drr("PU").ToString().ToDecimal,
.Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal, drr("TotalImporte").ToString().ToDecimal),
.Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal.RoundSQL(2), drr("TotalImporte").ToString().ToDecimal),
.Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2),
.Unidad = drr("UM").ToString(),
.ClaveUnidad = drr("SATClaveUM").ToString(),
@@ -13287,6 +13287,7 @@ Partial Class Ventas
'El almacen general es el Primer Almacen de Material en la Sucursal
If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al verificar inventario de remisiones.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
End If
Next
@@ -13462,11 +13463,13 @@ Partial Class Ventas
'If TotalCosto <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al guardar movimiento de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
'End If
Else
OcurrioError = True
ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
factura.Inv_CveMovimiento = CveMovimientoInventario
factura.Inv_ValorInventario = ValorInventario
@@ -13481,6 +13484,7 @@ Partial Class Ventas
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
OcurrioError = True
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If
End If
@@ -31106,9 +31110,9 @@ Partial Class Ventas
If resp.Count > 0 Then
Dim Msg As New StringBuilder()
Msg.AppendFormat("Mensaje Póliza Virtual: {0}", resp(0)("Descripcion").ToString())
Msg.AppendFormat("Mensaje Póliza Virtual: {0} - Código: {1}", resp(0)("Descripcion").ToString(), resp(0)("Codigo"))
If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508") Then
If resp(0)("Codigo").ToString().Contiene("500", "501", "502", "503", "504", "505", "506", "507", "508", "510") Then
Retorno = True
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.UpdateEnvioPolizaVirutal(CvePolizaVirtual, True, Now, obj.product_unique_code) Then