Soposrte autocontabilidad ajustes de inventario en OC y Compras
Cambio de pocision div de tipo para econollantas
This commit is contained in:
@@ -1126,9 +1126,9 @@ Partial Class Compras_Compras
|
||||
CveCuentaBancaria = 0
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(259) Then
|
||||
DivEsNoDeducible.Visible = True
|
||||
End If
|
||||
'If UsuarioActual.TienePermisoProceso(259) Then
|
||||
DivEsNoDeducible.Visible = True
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(125) = "1" Then 'Seleccionar a quien se abona la Prepoliza
|
||||
'ddlCargoPrePoliza.Visible = True
|
||||
@@ -4642,6 +4642,18 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not ErrorAC Then
|
||||
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
''EMPIEZA: INSERTA DETALLES DE LA COMPRA
|
||||
Dim indiceTR = 0
|
||||
Dim Cont As Integer = 0
|
||||
@@ -4747,7 +4759,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'verifica si fue vinculada con una OC, y si fue la opción de entrega por adelantado, que si hubo cambios de precios
|
||||
If DdlOCVinculaInv.SelectedValue.ToEntero.Contiene(176, 205) Then
|
||||
If Not AjustarPrePolizaVinculacionOC(ObjOC, ObjEventos, ObjInventario, ObjConta) Then
|
||||
If Not AjustarPrePolizaVinculacionOC(ObjOC, ObjEventos, ObjInventario, ObjConta, ObjContaAC) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -5218,16 +5230,7 @@ Partial Class Compras_Compras
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
End If
|
||||
|
||||
'********************** Variables '**********************
|
||||
|
||||
@@ -6226,31 +6229,31 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Dim ContienePSNeteoBonif As Boolean = False
|
||||
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
|
||||
ContienePSNeteoBonif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
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
|
||||
ContienePSNeteoBonif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ContienePSNeteoBonif 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 ").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
If ContienePSNeteoBonif 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 ").ToString.ToDecimal
|
||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not ChkNCInvNC.Checked OrElse Not ListaDocumentos.Count > 0 Then
|
||||
|
||||
If Not ChkNCInvNC.Checked OrElse Not ListaDocumentos.Count > 0 Then
|
||||
'GASTO
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DT = TmpDT
|
||||
@@ -18467,7 +18470,7 @@ Partial Class Compras_Compras
|
||||
|
||||
#End Region
|
||||
|
||||
Private Function AjustarPrePolizaVinculacionOC(ByRef OC As ClsOC, ByRef OCBitacora As ClsOIEventos, ByRef ObjInventarios As ClsInventarios, ByRef ObjConta As ClsContabilidad) As Boolean
|
||||
Private Function AjustarPrePolizaVinculacionOC(ByRef OC As ClsOC, ByRef OCBitacora As ClsOIEventos, ByRef ObjInventarios As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi) As Boolean
|
||||
|
||||
'VARIABLES
|
||||
Dim CveProveedorSucursal As Integer = -1
|
||||
@@ -18687,6 +18690,12 @@ Partial Class Compras_Compras
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ObjAC IsNot Nothing Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -2249,7 +2249,7 @@ Partial Class OC
|
||||
Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
|
||||
|
||||
Dim Conta As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto Then
|
||||
If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Conta.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -2647,6 +2647,13 @@ Partial Class OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso Conta IsNot Nothing Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=Conta) Then
|
||||
TieneError = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row DIVTIPO">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivDdlTipo" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTipoPSDes" CssClass="form-control input-sm select2me " Width="70%" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ClasificacionDetalle" DataValueField="CveClasificacionDetalle" Enabled="true">
|
||||
@@ -201,7 +201,7 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlUsoClasificacion.ClientID.ToString()%>">Uso Clasificación:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivDdlClasificacion" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright DIVCLASIFICACIONCONTABLE" id="DivDdlClasificacion" runat="server">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" AutoPostBack="true" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="350px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación Contable:</label>
|
||||
@@ -210,13 +210,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivClasificacionDetalle" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DropDownList1" CssClass="form-control input-sm select2me " Width="70%" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="ClasificacionDetalle" DataValueField="CveClasificacionDetalle" Enabled="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPSDes.ClientID.ToString()%>">Tipo:</label>
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="BtnAddClasificacionDetalle_Click" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" title="Registrar un Tipo"><i class='fa fa-plus' style="color:black" ></i></asp:LinkButton>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DvTamanio" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTamanio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Tamaño" DataValueField="CveTamaño" Width="350px">
|
||||
@@ -1978,6 +1972,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Literal ID="LtlScripts" runat="server"></asp:Literal>
|
||||
<%-- FIN MODAL PS ADICIONALES --%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
@@ -2154,7 +2149,10 @@
|
||||
|
||||
var initcarusel2 = initcarusel;
|
||||
|
||||
|
||||
function ADSReady()
|
||||
{
|
||||
setPoscicion();
|
||||
}
|
||||
//TERMINA: ECOMMERCE
|
||||
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ Partial Class ProductosyServicios
|
||||
'DivDatos.Attributes("class") = "col-md-12"
|
||||
|
||||
DivDdlTipo.Visible = True
|
||||
DdlTipoPSDes.Attributes.Add("onChange", "CreaDescripcionPS();")
|
||||
'DdlTipoPSDes.Attributes.Add("onChange", "CreaDescripcionPS();")
|
||||
|
||||
End If
|
||||
|
||||
@@ -235,16 +235,11 @@ Partial Class ProductosyServicios
|
||||
If ddlMetodos.SelectedValue.ToEntero = 5 And Not UsuarioActual.TienePermisoProceso(255) Then
|
||||
ddlMetodos.Enabled = False
|
||||
End If
|
||||
Dim posiciontipo As String = If(UsuarioActual.Empresa.Funcionalidad(558).ToString = "1", "$('.DIVCLASIFICACIONCONTABLE').after( $('.DIVTIPO') );", "")
|
||||
|
||||
LtlScripts.Text = $"<script>function setPoscicion(){{{posiciontipo}}}</script>"
|
||||
If Not CvePS > 0 Then MuestraPanel(True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user