Project

General

Profile

Specification » History » Version 67

Soh Keong, 07/26/2024 10:53 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 65 Soh Keong
| 1.1       | Response Object --> Object List              |
12 1 Soh Keong
13
h2. Jar File Download
14
15 65 Soh Keong
"Jar":/redmine/attachments/809
16 56 Soh Keong
"Lib":/redmine/attachments/803
17 1 Soh Keong
"Properties":
18
19
h3. Classes
20
21
* *my.aisino.einvoice.bean* 
22
* *my.aisino.einvoice.bean.transaction* 
23
* *my.aisino.einvoice.constant* 
24
* *my.aisino.einvoice.service* 
25
* *my.aisino.einvoice.util* 
26
27
h3. properties file
28
29
* *service.properties*
30
31
# *merchant.id*       -
32
33
h2. Aisino Service
34
35
<pre>
36
my.aisino.einvoice.service.TransactionService service = new my.aisino.einvoice.service.TransactionService();
37
</pre>
38
39 8 Soh Keong
h3. submitEInvoice
40 1 Soh Keong
41
<pre>
42 13 Soh Keong
InvoiceSubmissionResponseBean responseBean = service.submitEInvoice(Connection conn, List<InvoiceSubmissionRequestBean> beanList);
43 37 Soh Keong
InvoiceSubmissionResponseBean responseBean = service.submitEInvoice(Connection conn, List<InvoiceSubmissionRequestBean> beanList, boolean insertTable);
44 1 Soh Keong
</pre>
45
46 10 Soh Keong
<pre>
47
CommonConstant = my.aisino.einvoice.constant.CommonConstant
48
</pre>
49
50 1 Soh Keong
# *conn*           - Database connection.
51 13 Soh Keong
# *beanList*       - InvoiceSubmissionRequestBean List.
52 31 Soh Keong
53 32 Soh Keong
> * *docCode*         - From Keys (TAX_DOC_SUMMARY)
54 39 Soh Keong
> * *issueMode*       - CommonConstant.ISSUE_MODE_EINVOICE_* (YES=e-invoice; NO=consolidate)
55 1 Soh Keong
> * *orderId*
56 26 Soh Keong
> * *orderDate*       - Format(yyyy-MM-dd)
57
> * *orderTime*       - Format(HH:mm:ssZ)
58
> * *originalOrderId* - For Credit Note/ Debit Note/ Refund Note
59
> * *orderTypeCode*   - CommonConstant.INVOICE_TYPE_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/)
60
> * *currencyCode*    - CommonConstant.CURRENCY_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/currencies/)
61 10 Soh Keong
> * *totalExcludingTax* 
62 1 Soh Keong
> * *totalIncludingTax* 
63
> * *totalPayableAmount* 
64 26 Soh Keong
> * *businessSystem*  - CommonConstant.BUSINESS_SYSTEM_*
65 64 Soh Keong
> * *exchangeRate*    - (Optional)
66
> * *k1*              - (Optional)
67
> * *incoterms*       - (Optional)
68
> * *ftaInformation*  - (Optional)
69
> * *k2*              - (Optional)
70 60 Soh Keong
71
NON-POSTING
72 1 Soh Keong
> * *storeCode*
73 64 Soh Keong
-> * *shopperId*- (Moved to BuyerBean)
74 60 Soh Keong
75 52 Soh Keong
> * *supplierBean* : For Full Bean [new TaxDocDao().getSupplierBySupplierCode(Connection, PropBean.getCoswaySupplierCode())]
76 14 Soh Keong
> ** *addressBean* 
77
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
78
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
79
> *** *city*     - Max length : 50
80
> *** *postal*   - Max length : 50
81
> *** *address1* - Max length : 150
82
> *** *address2* - Max length : 150
83
> *** *address3* - Max length : 150
84
> ** *contactNumber* - Max length : 20
85
> ** *name*          - Max length : 300
86 41 Soh Keong
> ** *msic*    - https://sdk.myinvois.hasil.gov.my/codes/msic-codes/ 
87 14 Soh Keong
> ** *registrationBean*
88 17 Soh Keong
> *** *tin*      
89 29 Soh Keong
> *** *regSchemeId*  - CommonConstant.ID_TYPE_*
90
> *** *regNo* 
91 24 Soh Keong
> *** *sst*      (Optional)
92 14 Soh Keong
93 1 Soh Keong
> * *buyerBean* 
94
> ** *buyerCode* - From keys (TAX_DOC_BUYER)
95 64 Soh Keong
> ** *shopperId*
96 14 Soh Keong
> ** *addressBean* 
97 11 Soh Keong
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
98 10 Soh Keong
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
99
> *** *city*     - Max length : 50
100
> *** *address1* - Max length : 150
101
> *** *address2* - Max length : 150
102
> *** *address3* - Max length : 150
103 1 Soh Keong
> ** *contactNumber* - Max length : 20
104
> ** *name*          - Max length : 300
105
> ** *email*         
106 28 Soh Keong
> ** *registrationBean*
107
> *** *tin*      
108 29 Soh Keong
> *** *regSchemeId*  - CommonConstant.ID_TYPE_*
109
> *** *regNo* 
110 2 Soh Keong
> *** *sst*      (Optional)
111 6 Soh Keong
112 11 Soh Keong
> * *productList*
113 31 Soh Keong
> ** *docLineCode*            - From Keys (TAX_DOC_DETAIL)
114 19 Soh Keong
> ** *productName*            - Max length : 300
115
> ** *productCode*            - Max length :  18
116
> ** *measurement* (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
117
> ** *quantity*    (Optional) 
118 6 Soh Keong
> ** *totalExcludingTax*
119 11 Soh Keong
> ** *unitPrice*
120
> ** *subtotal*
121 42 Soh Keong
> ** *totalDiscountAmount*   - (Optional)
122 11 Soh Keong
> ** *classificationList* 
123 19 Soh Keong
> *** *code*                 - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/)
124
> *** *group*                - CommonConstant.CLASSIFICATION_GROUP_* 
125 6 Soh Keong
> ** *taxTotalBean*
126 12 Soh Keong
> *** *totalTaxAmount*
127 8 Soh Keong
> *** *taxSubTotalList*
128 1 Soh Keong
> **** *taxType*          - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/)
129
> **** *percent*          (Optional)
130 8 Soh Keong
> **** *perUnitAmount*    (Optional)
131 14 Soh Keong
> **** *measurement*      (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
132 16 Soh Keong
> **** *quantity*         (Optional)
133 3 Soh Keong
> **** *netAmount*        (Optional)
134
> **** *tax*
135 6 Soh Keong
136
> * *taxTotalBean*
137
> ** *totalTaxAmount*
138 1 Soh Keong
> ** *taxSubTotalList*
139 33 Soh Keong
> *** *taxType*       - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/)
140
> *** *percent*       - Optional
141
> *** *perUnitAmount* - Optional
142
> *** *measurement*   - Optional
143
> *** *quantity*      - Optional
144
> *** *netAmount*     - Optional
145
> *** *tax*           - 
146 1 Soh Keong
147
  3. *responseBean*
148
149 58 Soh Keong
> * *httpResponseCode*
150
> * *returnCode*
151
> * *returnMsg*
152 1 Soh Keong
153 66 Soh Keong
> * *responseBeanList*
154
> ** *submissionUid*
155
> ** *acceptedDocumentList*
156
> *** *orderId*
157
> *** *uuid*
158
> ** *rejectedDocumentList*
159
> *** *orderId*
160
> *** *errorList*
161
> **** *code*
162
> **** *message*
163 8 Soh Keong
164 10 Soh Keong
h3. queryEInvoice
165 8 Soh Keong
166
<pre>
167 67 Soh Keong
InvoiceInquiryResponseBean responseBean = service.queryEInvoice(InvoiceInquiryRequestBean bean);
168 8 Soh Keong
</pre>
169
170
# *conn*           - Database connection.
171 9 Soh Keong
# *bean*           - Object.
172
> * *documentNum*
173
> * *submissionUid*
174
> * *invoiceUuid*
175
> * *invoiceTypeCode*
176
> * *buyerTin*
177
> * *buyerName*
178 15 Soh Keong
> * *supplierTin*
179
> * *supplierName*
180 9 Soh Keong
> * *totalAmountFrom*
181
> * *totalAmountTo*
182
> * *invoiceStatus*
183
> * *confirmStatusCode*
184
> * *issuedDateFrom*
185
> * *issuedDateTo*
186 49 Soh Keong
> * *pageNo* (Mandatory)
187 9 Soh Keong
> * *pageSize* (Mandatory)
188
189
  3. *responseBean*
190
191
> * *page*
192
> ** *pageCount*
193
> ** *pageNo*
194
> ** *pageSize*
195
> ** *totalSize*
196
197
> * *recordList*
198
> ** *buyerTin*
199 59 Soh Keong
> ** *buyerName*
200 9 Soh Keong
> ** *confirmStatusCode*
201
> ** *currency*
202 1 Soh Keong
> ** *description*
203
> ** *documentNum*
204
> ** *excludingTaxAmount*
205
> ** *includingTaxAmount*
206
> ** *invoiceId*
207
> ** *invoiceStatus*
208
> ** *invoiceTypeCode*
209
> ** *invoiceUuid*
210
> ** *issuedDate*
211
> ** *nowTime*
212
> ** *operationDate*
213
> ** *operator*
214
> ** *pageIndex*
215
> ** *pageNo*
216
> ** *pageSize*
217 15 Soh Keong
> ** *supplierTin*
218
> ** *supplierName*
219 1 Soh Keong
> ** *submissionUid*
220 9 Soh Keong
> ** *transactionId*
221 10 Soh Keong
222
h3. cancelEInvoice
223
224
<pre>
225
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
226
</pre>
227
228
# *conn*           - Database connection.
229
# *bean*           - Object.
230 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
231
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
232 10 Soh Keong
> * *invoiceIds* - List of Integer
233
234
  3. *responseBean*
235
236 1 Soh Keong
> * *success* - true / false
237 67 Soh Keong
238
239
h3. queryTransaction
240
241
<pre>
242
InvoiceInquiryResponseBean responseBean = service.queryTransaction(TransactionInquiryRequestBean bean);
243
</pre>
244
245
# *conn*           - Database connection.
246
# *bean*           - Object.
247
> * *invoiceTypeCode*
248
> * *documentNum*
249
> * *supplierTin*
250
> * *businessSystem*
251
> * *buyerTin*
252
> * *buyerName*
253
> * *dateFrom*
254
> * *dateTo*
255
> * *issuedFlag*
256
> * *invoiceUuid*
257
> * *invoiceStatus*
258
> * *confirmStatusCode*
259
> * *pageNo* (Mandatory)
260
> * *pageSize* (Mandatory)
261
262
  3. *responseBean*
263
264
> * *page*
265
> ** *pageCount*
266
> ** *pageNo*
267
> ** *pageSize*
268
> ** *totalSize*
269
270
> * *recordList*
271
> ** *businessSystem*
272
> ** *storeCode*
273
> ** *buyerName*
274
> ** *buyerTin*
275
> ** *confirmStatusCode*
276
> ** *createDate*
277
> ** *currency*
278
> ** *documentNum*
279
> ** *invoiceTypeCode*
280
> ** *id*
281
> ** *invoiceUuid*
282
> ** *issuedDate*
283
> ** *issuedFlag*
284
> ** *invoiceStatus*
285
> ** *issuedDate*
286
> ** *issuedFlag*
287
> ** *nowTime*
288
> ** *operationDate*
289
> ** *operator*
290
> ** *pageIndex*
291
> ** *pageNo*
292
> ** *pageSize*
293
> ** *payableAmount*
294
> ** *submissionUid*
295
> ** *subtotal*
296
> ** *supplierId*
297
> ** *supplierName*
298
> ** *supplierTin*
299
> ** *tax*
300
> ** *total*
301
> ** *transactionDate*
302
> ** *invalidReasons*
303
304 34 Soh Keong
305
h2. CommonConstant
306
307 36 Soh Keong
|_. Name                 |_. values                                                                                                     |
308
| INTERFACE_             | LOGIN, INVOICE_ISSUANCE, INVOICE_INQUIRY, INVOICE_CANCEL, INVOICE_PURCHASE_INQUIRY, INVOICE_PURCHASE_REJECT  |
309
| RETURN_CODE_           | SUCCESS, ABNORMAL                                                                                            |
310
| INVOICE_STATUS_        | VALID, INVALID, CANCELLED, SUBMITTED                                                                         |
311
| CONFIRM_STATUS_CODE_   | AWAITING, ACCEPTED, REJECTED                                                                                 |
312
| CANCEL_CODE_           | WRONG_BUYER, WRONG_INVOICE, OTHERS                                                                           |
313
| INVOICE_TYPE_CODE_     | INVOICE, CREDIT_NOTE, DEBIT_NOTE, REFUND_NOTE, SELF_BILLED_INVOICE, SELF_BILLED_CREDIT_NOTE, SELF_BILLED_DEBIT_NOTE, SELF_BILLED_REFUND_NOTE  |
314
| TAX_DOC_STATUS_        | PENDING, VERIFIED, SUCCESS, FAIL, REJECT, DELETED                                                            |
315
| CURRENCY_CODE_         | MALAYSIA_RINGGIT                                                                                             |
316
| COUNTRY_               | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN                                          |
317
| COUNTRY_CODE_          | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN                                          |
318
| STATE_                 | ALL, JOHOR, KEDAH, KELANTAN, MELAKA, NEGERI_SEMBILAN, PAHANG, PULAU_PENANG, PERAK, PERLIS, SELANGOR, TERRENGANU, SABAH, SARAWAK, WILAYAH_PERSEKUTUAN_KUALA_LUMPUR, WILAYAH_PERSEKUTUAN_LABUAN, WILAYAH_PERSEKUTUAN_PUTRAJAYA, NOT_APPLICABLE                    |
319
| MEASUREMENT_           | METRE, CENTIMETRE, KILOMETRE, LITRE, KILOGRAM, GRAM                                                          |
320
| CLASSIFICATION_REF_NO_ | CONSOLIDATED, OTHERS, VOUCHER_GIFT_CARD                                                                      |
321
| CLASSIFICATION_CODE_   | CONSOLIDATED, ECOMMERCE_TO_BUYER, ECOMMERCE_SELF_BILLED_TO_SELLER, OTHERS, CLASSIFICATION_CODE_SELF_BILLED_OTHERS, CLASSIFICATION_CODE_SELF_BILLED_MONETARY_PAYMENT_TO_AGENTS, CLASSIFICATION_CODE_VOUCHER_GIFT_CARD                                       |
322
| CLASSIFICATION_GROUP_  | CLASS, PRODUCT_TARIFF_CODE                                                                                   |
323
| TAX_TYPE_              | SALES, SERVICE, TOURISM, HIGH_VALUE_GOODS, LOW_VALUE_GOODS, NOT_APPLICABLE, TAX_EXEMPTION                    |
324
| ID_TYPE_               | BRN, NRIC, PASSPORT, ARMY                                                                                    |
325
| TIN_                   | GENERAL_PUBLIC, FOREIGN_BUYER, FOREIGN_SUPPLIER, BUYER                                                       |
326
| ENTITY_                | COSWAY, ECOSWAY, RANK_DISTRIBUTOR, KIMIA_SUCHI, KIMIA_SUCHI_MARKETING, VITAL_DEGREE                          |
327
|                        | EINVOICE_REQUEST_IND, EXCLUDING_POSTING                                                                      |
328
| BUSINESS_SYSTEM_       | SALES, BONUS, HFEE                                                                                           |
329 39 Soh Keong
| ISSUE_MODE_EINVOICE_   | YES, NO                                                                                                      |
330 36 Soh Keong
| _DEFAULT               | BUYER_NAME_DEFAULT, MANDATORY_VALUES_DEFAULT                                                                 |