Project

General

Profile

Specification » History » Version 64

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