Project

General

Profile

Specification » History » Version 14

Soh Keong, 06/05/2024 11:48 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
> * *totalAmountFrom*
156
> * *totalAmountTo*
157
> * *invoiceStatus*
158
> * *confirmStatusCode*
159
> * *issuedDateFrom*
160
> * *issuedDateTo*
161
> * *pageIndex* (Mandatory)
162
> * *pageSize* (Mandatory)
163
164
  3. *responseBean*
165
166
> * *page*
167
> ** *pageCount*
168
> ** *pageNo*
169
> ** *pageSize*
170
> ** *totalSize*
171
172
> * *recordList*
173
> ** *buyerTin*
174
> ** *confirmStatusCode*
175
> ** *currency*
176 1 Soh Keong
> ** *description*
177
> ** *documentNum*
178
> ** *excludingTaxAmount*
179
> ** *includingTaxAmount*
180
> ** *invoiceId*
181
> ** *invoiceStatus*
182
> ** *invoiceTypeCode*
183
> ** *invoiceUuid*
184
> ** *issuedDate*
185
> ** *nowTime*
186
> ** *operationDate*
187
> ** *operator*
188
> ** *pageIndex*
189
> ** *pageNo*
190
> ** *pageSize*
191
> ** *submissionUid*
192 9 Soh Keong
> ** *transactionId*
193 10 Soh Keong
194
h3. cancelEInvoice
195
196
<pre>
197
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
198
</pre>
199
200
# *conn*           - Database connection.
201
# *bean*           - Object.
202 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
203
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
204 10 Soh Keong
> * *invoiceIds* - List of Integer
205
206
  3. *responseBean*
207
208
> * *success* - true / false