## Appendix A. ASL Specification of the IMS Application
1/* ASL specification of the Invoice Management System (IMS) */
2
3 Package ins
4
5/************************************************
6 System definition
7************************************************
8
9 System IMS \"Invoice Management System\": Application : Application_Web
10
11
12 Dataview: Data Entities
13
14
15 Datentity e VAT \"VAT Category\" : Reference [  
16 attribute VATcode \"VAT code\" : String [constraints (PrimaryKey NotNull Unique)]  
17 attribute VATName \"VAT name\": String  
18 attribute VATValue \"VAT value\": String  
19]
20
21 DataEntity e_Product \"Product\" : Master [  
22 attribute ID \"Product ID\" : Integer [constraints (PrimaryKey NotNull Unique)]  
23 attribute vATcode \"VAT code\" : Integer [ constraints (NotNull ForeignKey(e_VAT)) ]  
24 attribute productName \"Name\" : String(100)  
25 attribute valueMultiMourt \"Value without VAT\" : Decimal(16.2) [constraints (NotNull)]  
26 attribute valueMultiMourt \"VAT value\" : Decimal [6.2) [constraints (NotNull)]  
27 attribute VATValue \"VAT value\" : Decimal [ formula arithmetic (e_VAT.VATValue) ]  
28]
29
30 Datentity e_Customer \"Customer\" : Master [  
31 attribute ID \"Customer ID\" : Integer [constraints (PrimaryKey NotNull Unique)]  
32 attribute customerName \"Name\" : String(100)  
33 attribute fiscalID \"FiscalID\" : String(9)  
33 attribute logImage \"Logo image\" : Image  
34 attribute address \"Address\" : String(200)  
35 attribute IBRAN \"IBAN\": String(34)  
36 attribute SWIFT \"SHIFT\" : String(8)  
37
38]
39
40 DataEntity e CustomerVIP \"CustomerVIP\" : Master [  
41 attribute ID \"CustomerVIP ID\" : Integer [constraints (PrimaryKey NotNull Unique)]  
42 attribute customerID \"Customer ID\" : Integer [ constraints (NotNull ForeignKey(e_Customer)) ]43 attribute discountRate \"Discount rate\" : Integer
44]
45
46 Datatentity e_Invice \"Invice\" : Document [
47 attribute ID \"Invice ID\" : Integer [constraints (PrimaryKey NotNull Unique)]
48 attribute type \"Type\" : Datatentirean pen_DocumentType
49 attribute customerID \"CustomerID\" : Integer [ constraints (NotNull ForeignKey(e_Customer)) ]
50 attribute detectionCreationDate : date {defaultValue \"today\" constraints (NotNull)]
51 attribute dateApproval \"Approval date\" : Date
52 attribute dateApval \"Payment Date\" : Date
53 attribute dateDetected \"Date\" : Date
54 attribute isApproved \"Is Approved\" : Boolean [defaultValue \"False\"]
55 attribute totalValuewithoutVM\" \"Total Value Without VAT\" : Decimal(16.2) [
56 formula details : sum (e_Invicetime.valueWithoutVAT)
57 constraints (NotNull)
58]
59 attribute totalValueWithVAT \"Total Value With VAT\" : Decimal(16.2) [
60 formula details : sum (e_Invicetime.valueWithVAT)
61 constraints (NotNull)
62]
63 attribute totalInvoiceines \"Total invice lines\": Integer [
64 formula details : count (e_Inviceline)
65]
66]
67
68 datentity e_Invicetime \"Invicetime\" : Document
69 attribute ID \"Invicetime ID\" : Integer [constraints (PrimaryKey NotNull Unique)]
70 attribute invoiceID\" : Invice ID\" : Integer [constraints (NotNull ForeignKey(e_Invice))]
71 attribute productID\" : Project [constraints (NotNull ForeignKey(e_Product))]
72 attribute order \"Invicetime Order\" : Integer [constraints (NotNull)]
73 attribute valueWithoutVAT\" : Decimal
74 attribute valueWithVAT\" : Decimal [
75 formula arithmetic (e_InviceLine.valueWithoutVAT' * e_Product.VATValue)
76]
77]
78
79/
80 Data view: Data enumerations
81
82
83 Datatuneration enum_DocumentType \"Document Type\" values (
84 SI\" \"Standard Invice\",
85 CI\"Credit Invice\",
86 DI\"Detoll Invice\",
87 MI\"fixed Invice\"
88)
89
90/
91 User interface view: Forms
92
93
94//\"Invice\" Form
95
96 component uio_Inviceform \"Invice\" : Form [
97 datashinding e_Invice
98
99 part customer \"Customer\" : Field : Field_Input
100[ dataAttributeBinding e_Customer.customerName]
101 part datecration \"CreationDate\" : Field : Field_Input
102[ dataAttributeBinding e_Invice.datetimeCreation]
103 part dateApproval \"Apposed Value\" : Field : Field_Input
104[ should e_Invice.datetime1 ==) datatAttributeBinding e_Invice.dateApproval ]
105 part datePaid \"Payment Date\" : Field : Field_Input
106[ should e_Invice.datetimePayment ==) datatAttributeBinding e_Invice.datePaid ]
107 part datechedeed \"DateDate\" : Field : Field_Input
108[ datatAttributeBinding e_Invice.datetimeDetected ]
109 part totalValuewithoutVAT\" : Total Value without VAT\" : Field : Field_Input
110[ datatAttributeBinding e_Invice.totalValueWithoutVAT]
111 part totalValueWithVAT\" : Total Value With VAT\" : Field : Field_Input
112[ datatAttributeBinding e_Invice.totalValueWithVAT]
113]
114
115 UIContainer uict_InvoiceCreator : Window [
116 component uico_Invoiceform
117
118 event ev_cancel \"Back\": Submit: Submit.Back [navigationFlowTo Invoices]
119 event ev_save \"Save\": Submit: Submit.Create [navigationFlowTo Invoices]
120]
121
122 UIcontainer uict_InvoiceReader : Window [
123 component uico_Invoiceform
124
125 event ev_cancel \"Back\" : Submit : Submit_Back [ navigationFlowTo Invoices ]
126]
127
128 UIcontainer uict_InvoiceEditor : Window [129 componentuiCo_Invoiceform
130
131 eventev_cancel\"Back\":Submit:Submit_Back[ navigationflowToInvoices]
132 eventev_save\"Swue:Submit:Submit_Update[ navigationflowToInvoices]
133
134
135//\"Customer\"Form
136
137 componentuiCo_CustomerForm\"Customer\":Form[
138 dataBinding_Customer
139
140 partcutconserName\"Name\":field
141{datattribetbinding_Customer.CustomerName}
142 part\"fics10\"Fics10\"Fics10\"Fics10\"Fics10\"Fics10\"
143{datattribetbinding_Customer.fics10}
144 part_logImage\":Log2\":Field
145{datattribetbinding_Customer.logImage}
146 part_doses\"Address\":Field
147{datattribetbinding_Customer.address}
148 part\"IR8 AM\":Field
149{datattribetbinding_Customer.IBM}
150 part\"SHIFT\":Field
151{datattribetbinding_Customer.SHIFT}
152}
153
154 UIcontaineruict_CustomerCreator:Window[
155 componentuiCo_Customerform
156 eventev_cancel\"Back\":Submit:Submit_Back[ navigationflowToCustomers]
157 eventex_save\"Swue\":Submit:Submit_Create[ navigationflowToCustomers]
158]
159
160 UIcontaineruict_CustomerReader:Window[
161 componentuiCo_Customerform
162 eventev_cancel\"Back\":Submit:Submit_Back[ navigationflowToCustomers]
163]
164
165 UIcontaineruict_CustomerEottor:Window[
166 componentuict_Customerfrom
167 eventev_cancel\"Back\":Submit:Submit_Back[ navigationflowToInvoices]
168 eventev_save\"Swue\":Submit:Submit_Update[ navigationflowToInvoices]
169]
170
171
172/
173 Usecaseview:Actors&UseCases
174
175
176 Actoralu_TechnicalAdmin\":User[description\"Admin manageUsers,VAT,etc.\"]
177 Actoralu_Operator\"Operator\":User[description\"OperatornamesInvoicesand( customers\"]
178 Actoralu_Manager\"Manager\":User[description\"ManagerapprovesInvoices,etc.\"]
179 Actoralu_Customer\"Customer\":User[description\"CustomerrecetivesInvoicestopay\"]
180 Actoras_EB\"EB\":Extremalsystem[description\"EB\"receivesinfoofpaidinvices\"]
181
182//TechnicalAdmin
183
184 usCaceusCaceusCaceusCace Products\"ManageProducts\":EntitiesManager[
185 etcortInitiatesu_Icd_CriticalAdmin
186 datentitye_Product
187 actionsdcreate,aRead,update,delete
188]
189
190 usC