Project

General

Profile

Specification » History » Version 15

Soh Keong, 06/05/2024 11:57 AM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Programming Guide
6
7
h2. Jar version 
8
9
|_. version |_. Description                                |
10
| 1.0       | Init                                         |
11
12
h2. Jar File Download
13
14
"Jar":
15
"Properties":
16
17
h3. Classes
18
19
* *my.aisino.einvoice.bean* 
20
* *my.aisino.einvoice.bean.transaction* 
21
* *my.aisino.einvoice.constant* 
22
* *my.aisino.einvoice.service* 
23
* *my.aisino.einvoice.util* 
24
25
h3. properties file
26
27
* *service.properties*
28
29
# *merchant.id*       -
30
31
h2. Aisino Service
32
33
<pre>
34
my.aisino.einvoice.service.TransactionService service = new my.aisino.einvoice.service.TransactionService();
35
</pre>
36
37 8 Soh Keong
h3. submitEInvoice
38 1 Soh Keong
39
<pre>
40 13 Soh Keong
InvoiceSubmissionResponseBean responseBean = service.submitEInvoice(Connection conn, List<InvoiceSubmissionRequestBean> beanList);
41 1 Soh Keong
</pre>
42
43 10 Soh Keong
<pre>
44
CommonConstant = my.aisino.einvoice.constant.CommonConstant
45
</pre>
46
47 1 Soh Keong
# *conn*           - Database connection.
48 13 Soh Keong
# *beanList*       - InvoiceSubmissionRequestBean List.
49 1 Soh Keong
> * *orderId*
50 10 Soh Keong
> * *orderDate*     - Format(yyyy-MM-dd)
51
> * *orderTime*     - Format(HH:mm:ssZ)
52 11 Soh Keong
> * *orderTypeCode* - CommonConstant.INVOICE_TYPE_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/)
53 10 Soh Keong
> * *currencyCode*  - CommonConstant.CURRENCY_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/currencies/)
54 1 Soh Keong
> * *totalExcludingTax* 
55
> * *totalIncludingTax* 
56
> * *totalPayableAmount* 
57
58 14 Soh Keong
> * *supplierBean*
59
> ** *addressBean* 
60
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
61
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
62
> *** *city*     - Max length : 50
63
> *** *postal*   - Max length : 50
64
> *** *address1* - Max length : 150
65
> *** *address2* - Max length : 150
66
> *** *address3* - Max length : 150
67
> ** *contactNumber* - Max length : 20
68
> ** *name*          - Max length : 300
69
> ** *registrationBean*
70
> *** *brn*      (Optional)
71
> *** *tin*      (Optional)
72
> *** *nric*     (Optional)
73
> *** *passport* (Optional)
74
> *** *army*     (Optional)
75
> *** *sst*      (Optional)
76
77 1 Soh Keong
> * *buyerBean* 
78 14 Soh Keong
> ** *addressBean* 
79 11 Soh Keong
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
80 10 Soh Keong
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
81
> *** *city*     - Max length : 50
82
> *** *address1* - Max length : 150
83
> *** *address2* - Max length : 150
84
> *** *address3* - Max length : 150
85 1 Soh Keong
> ** *contactNumber* - Max length : 20
86 10 Soh Keong
> ** *name*          - Max length : 300
87 14 Soh Keong
> ** *registrationBean*
88 8 Soh Keong
> *** *brn*      (Optional)
89
> *** *tin*      (Optional)
90
> *** *nric*     (Optional)
91
> *** *passport* (Optional)
92 2 Soh Keong
> *** *army*     (Optional)
93
> *** *sst*      (Optional)
94 6 Soh Keong
95 11 Soh Keong
> * *productList*
96
> ** *productName*        - Max length : 300
97
> ** *productCode*        - Max length :  18
98 6 Soh Keong
> ** *measurement*        - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
99
> ** *quantity*  (Optional) 
100
> ** *totalExcludingTax*
101 11 Soh Keong
> ** *unitPrice*
102
> ** *subtotal*
103
> ** *classificationList* 
104 6 Soh Keong
> *** *code*              - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/)
105
> *** *group*             - CommonConstant.CLASSIFICATION_GROUP_* 
106
> ** *taxTotalBean*
107 12 Soh Keong
> *** *totalTaxAmount*
108 8 Soh Keong
> *** *taxSubTotalList*
109 1 Soh Keong
> **** *taxType*          - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/)
110
> **** *percent*          (Optional)
111 8 Soh Keong
> **** *perUnitAmount*    (Optional)
112 14 Soh Keong
> **** *measurement*      (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
113
> **** *quantity*
114 3 Soh Keong
> **** *netAmount*        (Optional)
115
> **** *tax*
116 6 Soh Keong
117
> * *taxTotalBean*
118
> ** *totalTaxAmount*
119 1 Soh Keong
> ** *taxSubTotalList*
120
> *** *taxType*
121 6 Soh Keong
> *** *percent*
122
> *** *perUnitAmount*
123 14 Soh Keong
> *** *measurement*
124
> *** *quantity*
125 1 Soh Keong
> *** *netAmount*
126
> *** *tax*
127
128
  3. *responseBean*
129
130
> * *submissionUid*
131
> * *acceptedDocumentList*
132
> ** *orderId*
133
> ** *uuid*
134
> * *rejectedDocumentList*
135
> ** *orderId*
136
> ** *errorList*
137 4 Soh Keong
> *** *code*
138 8 Soh Keong
> *** *message*
139
140
141 10 Soh Keong
h3. queryEInvoice
142 8 Soh Keong
143
<pre>
144 10 Soh Keong
InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean);
145 8 Soh Keong
</pre>
146
147
# *conn*           - Database connection.
148 9 Soh Keong
# *bean*           - Object.
149
> * *documentNum*
150
> * *submissionUid*
151
> * *invoiceUuid*
152
> * *invoiceTypeCode*
153
> * *buyerTin*
154
> * *buyerName*
155 15 Soh Keong
> * *supplierTin*
156
> * *supplierName*
157 9 Soh Keong
> * *totalAmountFrom*
158
> * *totalAmountTo*
159
> * *invoiceStatus*
160
> * *confirmStatusCode*
161
> * *issuedDateFrom*
162
> * *issuedDateTo*
163
> * *pageIndex* (Mandatory)
164
> * *pageSize* (Mandatory)
165
166
  3. *responseBean*
167
168
> * *page*
169
> ** *pageCount*
170
> ** *pageNo*
171
> ** *pageSize*
172
> ** *totalSize*
173
174
> * *recordList*
175
> ** *buyerTin*
176
> ** *confirmStatusCode*
177
> ** *currency*
178 1 Soh Keong
> ** *description*
179
> ** *documentNum*
180
> ** *excludingTaxAmount*
181
> ** *includingTaxAmount*
182
> ** *invoiceId*
183
> ** *invoiceStatus*
184
> ** *invoiceTypeCode*
185
> ** *invoiceUuid*
186
> ** *issuedDate*
187
> ** *nowTime*
188
> ** *operationDate*
189
> ** *operator*
190
> ** *pageIndex*
191
> ** *pageNo*
192
> ** *pageSize*
193 15 Soh Keong
> ** *supplierTin*
194
> ** *supplierName*
195 1 Soh Keong
> ** *submissionUid*
196 9 Soh Keong
> ** *transactionId*
197 10 Soh Keong
198
h3. cancelEInvoice
199
200
<pre>
201
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
202
</pre>
203
204
# *conn*           - Database connection.
205
# *bean*           - Object.
206 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
207
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
208 10 Soh Keong
> * *invoiceIds* - List of Integer
209
210
  3. *responseBean*
211
212
> * *success* - true / false