-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUit.ideafunc
63 lines (61 loc) · 3.66 KB
/
Uit.ideafunc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-16"?>
<Function xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.caseware-idea.com/">
<Author>Intel</Author>
<DateModified>2020-03-21</DateModified>
<FunctionName>Uit</FunctionName>
<Help>Para obtener la Unidad Impositiva Tributaria en Perú, según la fecha consultada. La función se aplica sobre un campo fecha. El tipo de salida será un campo numérico. Ejemplo: # Uit(“20160807”) Salida: 3,950 (Se aplica desde ejercicio 1999)</Help>
<OutputType>Numeric</OutputType>
<FunctionBody>
Option Explicit
Function Uit(date1 As Date) As Double
If Year(date1) = 2020 Then
uit = 4300
ElseIf Year(date1) = 2019 Then
uit = 4200
ElseIf Year(date1) = 2018 Then
uit = 4150
ElseIf Year(date1) = 2017 Then
uit = 4050
ElseIf Year(date1) = 2016 Then
uit = 3950
ElseIf Year(date1) = 2015 Then
uit = 3850
ElseIf Year(date1) = 2014 Then
uit = 3800
ElseIf Year(date1) = 2013 Then
uit = 3700
ElseIf Year(date1) = 2012 Then
uit = 3650
ElseIf Year(date1) < 2012 And Year(date1) > 2009 Then
uit = 3600
ElseIf Year(date1) = 2009 Then
uit = 3550
ElseIf Year(date1) = 2008Then
uit = 3500
ElseIf Year(date1) = 2007 Then
uit = 3450
ElseIf Year(date1) = 2006 Then
uit = 3400
ElseIf Year(date1) = 2005Then
uit = 3300
ElseIf Year(date1) = 2004 Then
uit = 3200
ElseIf Year(date1) < 2004 And Year(date1) > 2001 Then
uit = 3100
ElseIf Year(date1) = 2001Then
uit = 3000
ElseIf Year(date1) = 2000 Then
uit = 2900
Else
uit = 2800
End If
End Function
</FunctionBody>
<Parameters>
<Parameter>
<Type>Date</Type>
<Name>date1</Name>
<Help>Fecha a consultar</Help>
</Parameter>
</Parameters>
</Function>