Project

General

Profile

Specification » History » Version 60

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