-- simplificacion de NC
This commit is contained in:
@@ -19493,7 +19493,7 @@ Partial Class Compras_Compras
|
||||
Dim IdCtaContableRecepcionOCER = -1
|
||||
Dim IdCtaContableRecepcionOCERME = -1
|
||||
Dim IdCtaContableRecepcionOCERComplementaria = -1
|
||||
Dim Fecha As Date = Now
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
Dim CveProveedorInvOC As Integer = -1
|
||||
Dim ProveedorNombre As String = ""
|
||||
Dim SerieFolio As String = ""
|
||||
@@ -19542,7 +19542,7 @@ Partial Class Compras_Compras
|
||||
PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal
|
||||
PS = DrDiferencias("PS").ToString
|
||||
|
||||
Fecha = Now
|
||||
Fecha = TxtFecha.Text.ToDate
|
||||
SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}"
|
||||
CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero
|
||||
ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString
|
||||
|
||||
@@ -1314,7 +1314,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código Único">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCodigoUnico" runat="server" Text='<%# Eval("SerieLote") %>' />
|
||||
<asp:TextBox ID="TxtCodigoUnico" runat="server" Text='<%# Eval("Serie") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -10343,18 +10343,33 @@ Partial Class Ventas
|
||||
|
||||
Next
|
||||
|
||||
If ImporteConcepto12 < ImporteAcumulado91 Then
|
||||
Dim ImporteOtrosIngresos As Decimal = ImporteConcepto12 - ImporteAcumulado91
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteOtrosIngresos, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveUltimaVenta, ImporteMX:=ImporteOtrosIngresos, ImporteME:=0, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ImporteOtrosIngresos, Referencia, 211, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteME:=0, ImporteMX:=ImporteOtrosIngresos, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
If ImporteConcepto12 <> ImporteAcumulado91 Then
|
||||
Dim CveConceptoOtIngresos As Integer = 0
|
||||
Dim IdCuentaContableOt As Integer = 0
|
||||
Dim TipoMovtoOt As Boolean = False
|
||||
|
||||
If ImporteConcepto12 > ImporteAcumulado91 Then
|
||||
IdCuentaContableOt = UsuarioActual.Empresa.Funcionalidad(559).ToEntero()
|
||||
CveConceptoOtIngresos = 211
|
||||
TipoMovtoOt = False
|
||||
Else
|
||||
IdCuentaContableOt = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
CveConceptoOtIngresos = 78
|
||||
TipoMovtoOt = True
|
||||
End If
|
||||
|
||||
|
||||
Dim ImporteOtrosIngresos As Decimal = ImporteConcepto12 - ImporteAcumulado91
|
||||
' If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteOtrosIngresos, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveUltimaVenta, ImporteMX:=ImporteOtrosIngresos, ImporteME:=0, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoOt, ImporteOtrosIngresos, Referencia, CveConceptoOtIngresos, Concepto, FechaMovimiento, IdCuentaContableOt, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteME:=0, ImporteMX:=ImporteOtrosIngresos, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
'Else
|
||||
' ErrorPrepoliza = True
|
||||
'End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
'ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -11344,6 +11359,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Simplificacion de PrePolizas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
@@ -11361,13 +11382,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Simplificacion de PrePolizas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user