Compras autocatabilizar amortizacion de anticipos
This commit is contained in:
@@ -8372,6 +8372,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If CveCompra > 0 Then
|
If CveCompra > 0 Then
|
||||||
|
|
||||||
|
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||||
|
|
||||||
'INICIALIZA OBJETOS
|
'INICIALIZA OBJETOS
|
||||||
If Not (ObjComprasParametro IsNot Nothing And ObjContaParametro IsNot Nothing) Then
|
If Not (ObjComprasParametro IsNot Nothing And ObjContaParametro IsNot Nothing) Then
|
||||||
ObjCompra = New ClsCompras
|
ObjCompra = New ClsCompras
|
||||||
@@ -8478,8 +8480,33 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ErrorMovtosCxP = 0 And CvePrePolizaNueva > 0 Then
|
||||||
|
|
||||||
|
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
If ObjContaAC Is Nothing Then
|
||||||
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, "", ObjContaAC) Then
|
||||||
|
ErrorMovtosCxP = 3
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case ErrorMovtosCxP
|
Select Case ErrorMovtosCxP
|
||||||
Case 0
|
Case 0
|
||||||
|
|
||||||
|
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
If ObjContaAC IsNot Nothing Then
|
||||||
|
ObjContaAC.Commit()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Alert("El movimiento se aplicó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El movimiento se aplicó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ObjCompra.Commit()
|
ObjCompra.Commit()
|
||||||
|
|
||||||
@@ -8501,18 +8528,40 @@ Partial Class Compras_Compras
|
|||||||
UpAnticipos.Update()
|
UpAnticipos.Update()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
dtnc.Dispose()
|
dtnc.Dispose()
|
||||||
|
|
||||||
Case 1
|
Case 1
|
||||||
Alert("Ocurrió un error al amortizar la nota de crédito<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al amortizar la nota de crédito<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
||||||
ObjCompra.RollBack()
|
ObjCompra.RollBack()
|
||||||
Case 2
|
Case 2
|
||||||
Alert("Ocurrió un error al amortizar la nota de crédito<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al amortizar la nota de crédito<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia)
|
||||||
|
ObjCompra.RollBack()
|
||||||
|
Case 3
|
||||||
|
Alert("Ocurrió un error al contabilizar la la amortizacion del anticipo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
If ObjContaAC IsNot Nothing Then
|
||||||
|
Try
|
||||||
|
ObjContaAC.RollBack()
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
ObjCompra.RollBack()
|
ObjCompra.RollBack()
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjCompra.RollBack()
|
ObjCompra.RollBack()
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
If ObjContaAC IsNot Nothing Then
|
||||||
|
ObjContaAC.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
ObjCompra.Dispose()
|
ObjCompra.Dispose()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'sino se ha guardado la compra, se registra temporal que anticpos van a cargarle
|
'sino se ha guardado la compra, se registra temporal que anticpos van a cargarle
|
||||||
|
|
||||||
|
|||||||
@@ -4468,6 +4468,9 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
Dim CuentaPadre = -1
|
Dim CuentaPadre = -1
|
||||||
|
|
||||||
|
Dim TipoCuenta As String = "D"
|
||||||
|
|
||||||
|
|
||||||
Select Case btn.CommandArgument.ToString
|
Select Case btn.CommandArgument.ToString
|
||||||
Case "Proveedores"
|
Case "Proveedores"
|
||||||
CuentaPadre = If(DdlCveTipoProveedor.SelectedValue = "2", UsuarioActual.Empresa.Funcionalidad(202).ToEntero, UsuarioActual.Empresa.Funcionalidad(201).ToEntero)
|
CuentaPadre = If(DdlCveTipoProveedor.SelectedValue = "2", UsuarioActual.Empresa.Funcionalidad(202).ToEntero, UsuarioActual.Empresa.Funcionalidad(201).ToEntero)
|
||||||
@@ -4477,6 +4480,7 @@ Partial Class Compras_Proveedores
|
|||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(203).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(203).ToEntero
|
||||||
Case "Anticipos"
|
Case "Anticipos"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(204).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(204).ToEntero
|
||||||
|
TipoCuenta = "A"
|
||||||
Case "Deudores"
|
Case "Deudores"
|
||||||
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(205).ToEntero
|
CuentaPadre = UsuarioActual.Empresa.Funcionalidad(205).ToEntero
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ProductosServicios.aspx.vb" Inherits="ProductosyServicios" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ProductosServicios.aspx.vb" Inherits="ProductosyServicios" %>
|
||||||
|
|
||||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
<script runat="server">
|
|
||||||
|
|
||||||
Protected Sub RBLCantidad_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
<link href="/Metronic/assets/global/plugins/cubeportfolio/css/cubeportfolio.css" rel="stylesheet" type="text/css" />
|
<link href="/Metronic/assets/global/plugins/cubeportfolio/css/cubeportfolio.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -1907,9 +1902,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
El producto seleccionado en el recuadro de arriba sera unificado en el producto actual
|
El producto seleccionado en el recuadro de arriba sera unificado en el producto actual
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<b>
|
<b>
|
||||||
<asp:Literal Text="" ID="LtProductoUnificar" runat="server" /></b>
|
<asp:Literal Text="" ID="LtProductoUnificar" runat="server" /></b>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1993,7 +1993,7 @@ Partial Class ProductosyServicios
|
|||||||
RegistraScript("$('#DivUnificar').modal();LimpiaModalUnificar()")
|
RegistraScript("$('#DivUnificar').modal();LimpiaModalUnificar()")
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub CargaPSUnificar()
|
Public Sub CargaPSUnificar()
|
||||||
DdlPsUnificar.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
DdlPsUnificar.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||||
DdlPsUnificar.DataBind()
|
DdlPsUnificar.DataBind()
|
||||||
'DdlPsUnificar.setEsWebService(True)
|
'DdlPsUnificar.setEsWebService(True)
|
||||||
'DdlPsUnificar.ddlWS.Attributes.Add("data-clear", "1")
|
'DdlPsUnificar.ddlWS.Attributes.Add("data-clear", "1")
|
||||||
|
|||||||
Reference in New Issue
Block a user