Project

General

Profile

Specification » History » Version 17

Soh Keong, 06/10/2024 09:58 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 17 Soh Keong
> *** *tin*      
71
> *** *idType*     
72
> *** *idValue* 
73 14 Soh Keong
> *** *sst*      (Optional)
74
75 1 Soh Keong
> * *buyerBean* 
76 14 Soh Keong
> ** *addressBean* 
77 11 Soh Keong
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
78 10 Soh Keong
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
79
> *** *city*     - Max length : 50
80
> *** *address1* - Max length : 150
81
> *** *address2* - Max length : 150
82
> *** *address3* - Max length : 150
83 1 Soh Keong
> ** *contactNumber* - Max length : 20
84 10 Soh Keong
> ** *name*          - Max length : 300
85 14 Soh Keong
> ** *registrationBean*
86 8 Soh Keong
> *** *brn*      (Optional)
87
> *** *tin*      (Optional)
88
> *** *nric*     (Optional)
89
> *** *passport* (Optional)
90 2 Soh Keong
> *** *army*     (Optional)
91
> *** *sst*      (Optional)
92 6 Soh Keong
93 11 Soh Keong
> * *productList*
94
> ** *productName*        - Max length : 300
95
> ** *productCode*        - Max length :  18
96 6 Soh Keong
> ** *measurement*        - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
97
> ** *quantity*  (Optional) 
98
> ** *totalExcludingTax*
99 11 Soh Keong
> ** *unitPrice*
100
> ** *subtotal*
101
> ** *classificationList* 
102 6 Soh Keong
> *** *code*              - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/)
103
> *** *group*             - CommonConstant.CLASSIFICATION_GROUP_* 
104
> ** *taxTotalBean*
105 12 Soh Keong
> *** *totalTaxAmount*
106 8 Soh Keong
> *** *taxSubTotalList*
107 1 Soh Keong
> **** *taxType*          - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/)
108
> **** *percent*          (Optional)
109 8 Soh Keong
> **** *perUnitAmount*    (Optional)
110 14 Soh Keong
> **** *measurement*      (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
111 16 Soh Keong
> **** *quantity*         (Optional)
112 3 Soh Keong
> **** *netAmount*        (Optional)
113
> **** *tax*
114 6 Soh Keong
115
> * *taxTotalBean*
116
> ** *totalTaxAmount*
117 1 Soh Keong
> ** *taxSubTotalList*
118
> *** *taxType*
119 6 Soh Keong
> *** *percent*
120
> *** *perUnitAmount*
121 14 Soh Keong
> *** *measurement*
122
> *** *quantity*
123 1 Soh Keong
> *** *netAmount*
124
> *** *tax*
125
126
  3. *responseBean*
127
128
> * *submissionUid*
129
> * *acceptedDocumentList*
130
> ** *orderId*
131
> ** *uuid*
132
> * *rejectedDocumentList*
133
> ** *orderId*
134
> ** *errorList*
135 4 Soh Keong
> *** *code*
136 8 Soh Keong
> *** *message*
137
138
139 10 Soh Keong
h3. queryEInvoice
140 8 Soh Keong
141
<pre>
142 10 Soh Keong
InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean);
143 8 Soh Keong
</pre>
144
145
# *conn*           - Database connection.
146 9 Soh Keong
# *bean*           - Object.
147
> * *documentNum*
148
> * *submissionUid*
149
> * *invoiceUuid*
150
> * *invoiceTypeCode*
151
> * *buyerTin*
152
> * *buyerName*
153 15 Soh Keong
> * *supplierTin*
154
> * *supplierName*
155 9 Soh Keong
> * *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 15 Soh Keong
> ** *supplierTin*
192
> ** *supplierName*
193 1 Soh Keong
> ** *submissionUid*
194 9 Soh Keong
> ** *transactionId*
195 10 Soh Keong
196
h3. cancelEInvoice
197
198
<pre>
199
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
200
</pre>
201
202
# *conn*           - Database connection.
203
# *bean*           - Object.
204 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
205
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
206 10 Soh Keong
> * *invoiceIds* - List of Integer
207
208
  3. *responseBean*
209
210
> * *success* - true / false