-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEconomicQuote.cls
More file actions
111 lines (90 loc) · 3.64 KB
/
Copy pathIEconomicQuote.cls
File metadata and controls
111 lines (90 loc) · 3.64 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "IEconomicQuote"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' ==================================================================
' INTERFAZ DE DOMINIO: IEconomicQuote
' ==================================================================
' Define el contrato para trabajar con UNA valoracion economica.
' El dominio usa esta interfaz sin conocer la implementacion concreta.
'
' Basado en la estructura identificada en VBScript:
' - QuoteNumber: Numero de oferta (9 digitos, ej: "412601015")
' - Revision: Numero de revision
' - Asociacion con calculos tecnicos
'
' Patron de nombre: \d{9}(?:[\-_]\d+)?(?:[ \-_]*rev\.?[ \-_]*\d+)?.*\.xls[xm]$
'
' Implementada por: ExcelEconomicQuoteSource (infraestructura)
' ==================================================================
'@Folder "3-Dominio"
Option Explicit
' ==================================================================
' PROPIEDADES DE IDENTIFICACION
' ==================================================================
'@Description: Numero de oferta/valoracion (9 digitos, ej: "412601015")
Public Property Get quoteNumber() As String
End Property
'@Description: Numero de compresor dentro de la oferta (ej: "01", "02")
Public Property Get CompressorIndex() As String
End Property
'@Description: Identificador completo (QuoteNumber + CompressorIndex si aplica)
Public Property Get quoteId() As String
End Property
'@Description: Numero de revision de la valoracion (0 si es original)
Public Property Get Revision() As Long
End Property
'@Description: Ruta completa del fichero de valoracion
Public Property Get filePath() As String
End Property
'@Description: Nombre del fichero (sin ruta)
Public Property Get fileName() As String
End Property
' ==================================================================
' PROPIEDADES DE ESTADO
' ==================================================================
'@Description: Indica si la valoracion tiene datos validos
Public Property Get IsValid() As Boolean
End Property
'@Description: Indica si la valoracion ha sido modificada sin guardar
Public Property Get IsDirty() As Boolean
End Property
'@Description: Indica si es una valoracion nueva (sin guardar nunca)
Public Property Get IsNew() As Boolean
End Property
'@Description: Fecha de ultima modificacion
Public Property Get LastModified() As Date
End Property
' ==================================================================
' PROPIEDADES DE ASOCIACION
' ==================================================================
'@Description: Codigo del calculo tecnico asociado (si existe)
Public Property Get AssociatedCalcOption() As String
End Property
'@Description: Indica si tiene un calculo tecnico asociado
Public Property Get HasAssociatedCalc() As Boolean
End Property
' ==================================================================
' METODOS DE DATOS
' ==================================================================
'@Description: Obtiene los datos generales de la valoracion
'@Returns: Dictionary con datos (cliente, proyecto, fecha, etc.)
Public Function GetGeneralData() As Object
End Function
'@Description: Obtiene los datos de precios
'@Returns: Dictionary con precios y margenes
Public Function GetPricingData() As Object
End Function
'@Description: Obtiene el numero de "otros" (items adicionales)
Public Property Get OtrosCount() As Long
End Property
'@Description: Obtiene los datos de un item "otro"
'@Param index: Indice del item (base 0)
'@Returns: Dictionary con datos del item
Public Function GetOtroData(ByVal Index As Long) As Object
End Function