Correciones de carga de almacen, concepto 301 con NC en dolares

This commit is contained in:
2023-03-16 19:02:30 -07:00
parent 2ddd967b16
commit 4c41f28a3e
2 changed files with 42 additions and 12 deletions

View File

@@ -592,6 +592,7 @@
<asp:UpdatePanel ID="UpParametros" runat="server" UpdateMode="Conditional" class="portlet light xspadding .nolineheight bordered whitoutcol" style="width: 310px;"> <asp:UpdatePanel ID="UpParametros" runat="server" UpdateMode="Conditional" class="portlet light xspadding .nolineheight bordered whitoutcol" style="width: 310px;">
<ContentTemplate> <ContentTemplate>
<asp:HiddenField ID="HdnCargarInventario" runat="server" ClientIDMode="Static" Value="True" />
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
@@ -1719,7 +1720,6 @@
<asp:UpdatePanel ID="UpINV" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpINV" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:HiddenField ID="HdnCargarInventario" runat="server" ClientIDMode="Static" Value="True"/>
<asp:Button ID="BtnCargarInventario" runat="server" ClientIDMode="Static" Text="" Style="display: none;" OnClick="BtnCargarInventario_Click" /> <asp:Button ID="BtnCargarInventario" runat="server" ClientIDMode="Static" Text="" Style="display: none;" OnClick="BtnCargarInventario_Click" />
<div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server"> <div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server">
<div class="portlet-title"> <div class="portlet-title">
@@ -9497,10 +9497,12 @@
step: 30 step: 30
}); });
if(HdnCargarInventario.value == 'True'){ if(HdnCargarInventario.value == 'True'){
$("#TabAlmacen_tab .ajax__tab_inner").click(function () { $("#TabAlmacen_tab .ajax__tab_inner").click(function () {
CargaMovimientosInventario(); CargaMovimientosInventario();
}); });
}else {
$("#TabAlmacen_tab .ajax__tab_inner").unbind();
} }
} }

View File

@@ -2401,6 +2401,7 @@ Partial Class Ventas
ViewState("ClienteRetISR") = 0 ViewState("ClienteRetISR") = 0
ViewState("CvePrecioLista") = 0 ViewState("CvePrecioLista") = 0
ViewState("CvePrecioListaCliente") = 0 ViewState("CvePrecioListaCliente") = 0
HdnCargarInventario.Value = "True"
Me.CveVendedorVenta = -1 Me.CveVendedorVenta = -1
Me.CveVendedorCliente = -1 Me.CveVendedorCliente = -1
Me.CveVendedorClienteSucursal = -1 Me.CveVendedorClienteSucursal = -1
@@ -2851,8 +2852,7 @@ Partial Class Ventas
'REMOVER EVENTO PARA RECARGAR ALMACEN 'REMOVER EVENTO PARA RECARGAR ALMACEN
HdnCargarInventario.Value = "False" HdnCargarInventario.Value = "False"
'spanAlmacen.Attributes.Remove("onclick") 'spanAlmacen.Attributes.Remove("onclick")
Tab.ActiveTabIndex = 1 UpParametros.Update()
Updatetabs.Update()
End If End If
'Modalidad Devoluciones y Refacturacion 'Modalidad Devoluciones y Refacturacion
@@ -14198,14 +14198,26 @@ Partial Class Ventas
End If End If
ElseIf AplicoNCFacturaActual AndAlso ChkAplicaNCAnticipo.Checked Then ElseIf AplicoNCFacturaActual AndAlso ChkAplicaNCAnticipo.Checked Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
Dim CveConceptoPagoNC As Integer = 251
If ObjFactura.CveMoneda > 1 Then
CveConceptoPagoNC = 301
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
Dim CveConceptoPagoNC As Integer = 251
If ObjFactura.CveMoneda > 1 Then
CveConceptoPagoNC = 301
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, Importe251, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteMN251, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, Importe251), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -14317,7 +14329,12 @@ Partial Class Ventas
End If End If
End If End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then Dim CveConceptoPagoNC As Integer = 251
If ObjFactura.CveMoneda > 1 Then
CveConceptoPagoNC = 301
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -14526,7 +14543,12 @@ Partial Class Ventas
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then Dim CveConceptoPagoNC As Integer = 251
If ObjFactura.CveMoneda > 1 Then
CveConceptoPagoNC = 301
End If
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVentaNC").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimiento, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2.DataKey("CveVentaNC").ToString().ToEntero(), ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
@@ -14647,7 +14669,13 @@ Partial Class Ventas
If sumaAmorticaciones <> 0 Then If sumaAmorticaciones <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, 251, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
Dim CveConceptoPagoNC As Integer = 251
If ObjFactura.CveMoneda > 1 Then
CveConceptoPagoNC = 301
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, sumaAmorticaciones, Referencia, CveConceptoPagoNC, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=sumaAmorticaciones * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True
@@ -32910,9 +32938,9 @@ Partial Class Ventas
'REMOVER EVENTO PARA RECARGAR ALMACEN 'REMOVER EVENTO PARA RECARGAR ALMACEN
'spanAlmacen.Attributes.Remove("onclick") 'spanAlmacen.Attributes.Remove("onclick")
Tab.ActiveTabIndex = 1
HdnCargarInventario.Value = "False" HdnCargarInventario.Value = "False"
Updatetabs.Update() UpParametros.Update()
UpnTools.Update() UpnTools.Update()
@@ -36601,7 +36629,7 @@ Partial Class Ventas
'Tab.ActiveTabIndex = 1 'Tab.ActiveTabIndex = 1
HdnCargarInventario.Value = "False" HdnCargarInventario.Value = "False"
'Updatetabs.Update() 'Updatetabs.Update()
UpINV.Update() UpParametros.Update()
End Sub End Sub
Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs) Protected Sub LBAplicaDevolucion_Click(sender As Object, e As EventArgs)