Project

General

Profile

Specification » History » Version 65

Soh Keong, 07/25/2024 03:10 PM

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
> * *submissionUid*
150 58 Soh Keong
> * *httpResponseCode*
151
> * *returnCode*
152
> * *returnMsg*
153
154 1 Soh Keong
> * *acceptedDocumentList*
155
> ** *orderId*
156
> ** *uuid*
157
> * *rejectedDocumentList*
158
> ** *orderId*
159 4 Soh Keong
> ** *errorList*
160 8 Soh Keong
> *** *code*
161
> *** *message*
162
163 10 Soh Keong
h3. queryEInvoice
164 8 Soh Keong
165
<pre>
166 10 Soh Keong
InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean);
167 8 Soh Keong
</pre>
168
169
# *conn*           - Database connection.
170 9 Soh Keong
# *bean*           - Object.
171
> * *documentNum*
172
> * *submissionUid*
173
> * *invoiceUuid*
174
> * *invoiceTypeCode*
175
> * *buyerTin*
176
> * *buyerName*
177 15 Soh Keong
> * *supplierTin*
178
> * *supplierName*
179 9 Soh Keong
> * *totalAmountFrom*
180
> * *totalAmountTo*
181
> * *invoiceStatus*
182
> * *confirmStatusCode*
183
> * *issuedDateFrom*
184
> * *issuedDateTo*
185 49 Soh Keong
> * *pageNo* (Mandatory)
186 9 Soh Keong
> * *pageSize* (Mandatory)
187
188
  3. *responseBean*
189
190
> * *page*
191
> ** *pageCount*
192
> ** *pageNo*
193
> ** *pageSize*
194
> ** *totalSize*
195
196
> * *recordList*
197
> ** *buyerTin*
198 59 Soh Keong
> ** *buyerName*
199 9 Soh Keong
> ** *confirmStatusCode*
200
> ** *currency*
201 1 Soh Keong
> ** *description*
202
> ** *documentNum*
203
> ** *excludingTaxAmount*
204
> ** *includingTaxAmount*
205
> ** *invoiceId*
206
> ** *invoiceStatus*
207
> ** *invoiceTypeCode*
208
> ** *invoiceUuid*
209
> ** *issuedDate*
210
> ** *nowTime*
211
> ** *operationDate*
212
> ** *operator*
213
> ** *pageIndex*
214
> ** *pageNo*
215
> ** *pageSize*
216 15 Soh Keong
> ** *supplierTin*
217
> ** *supplierName*
218 1 Soh Keong
> ** *submissionUid*
219 9 Soh Keong
> ** *transactionId*
220 10 Soh Keong
221
h3. cancelEInvoice
222
223
<pre>
224
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
225
</pre>
226
227
# *conn*           - Database connection.
228
# *bean*           - Object.
229 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
230
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
231 10 Soh Keong
> * *invoiceIds* - List of Integer
232
233
  3. *responseBean*
234
235
> * *success* - true / false
236 34 Soh Keong
237
h2. CommonConstant
238
239 36 Soh Keong
|_. Name                 |_. values                                                                                                     |
240
| INTERFACE_             | LOGIN, INVOICE_ISSUANCE, INVOICE_INQUIRY, INVOICE_CANCEL, INVOICE_PURCHASE_INQUIRY, INVOICE_PURCHASE_REJECT  |
241
| RETURN_CODE_           | SUCCESS, ABNORMAL                                                                                            |
242
| INVOICE_STATUS_        | VALID, INVALID, CANCELLED, SUBMITTED                                                                         |
243
| CONFIRM_STATUS_CODE_   | AWAITING, ACCEPTED, REJECTED                                                                                 |
244
| CANCEL_CODE_           | WRONG_BUYER, WRONG_INVOICE, OTHERS                                                                           |
245
| 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  |
246
| TAX_DOC_STATUS_        | PENDING, VERIFIED, SUCCESS, FAIL, REJECT, DELETED                                                            |
247
| CURRENCY_CODE_         | MALAYSIA_RINGGIT                                                                                             |
248
| COUNTRY_               | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN                                          |
249
| COUNTRY_CODE_          | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN                                          |
250
| 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                    |
251
| MEASUREMENT_           | METRE, CENTIMETRE, KILOMETRE, LITRE, KILOGRAM, GRAM                                                          |
252
| CLASSIFICATION_REF_NO_ | CONSOLIDATED, OTHERS, VOUCHER_GIFT_CARD                                                                      |
253
| 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                                       |
254
| CLASSIFICATION_GROUP_  | CLASS, PRODUCT_TARIFF_CODE                                                                                   |
255
| TAX_TYPE_              | SALES, SERVICE, TOURISM, HIGH_VALUE_GOODS, LOW_VALUE_GOODS, NOT_APPLICABLE, TAX_EXEMPTION                    |
256
| ID_TYPE_               | BRN, NRIC, PASSPORT, ARMY                                                                                    |
257
| TIN_                   | GENERAL_PUBLIC, FOREIGN_BUYER, FOREIGN_SUPPLIER, BUYER                                                       |
258
| ENTITY_                | COSWAY, ECOSWAY, RANK_DISTRIBUTOR, KIMIA_SUCHI, KIMIA_SUCHI_MARKETING, VITAL_DEGREE                          |
259
|                        | EINVOICE_REQUEST_IND, EXCLUDING_POSTING                                                                      |
260
| BUSINESS_SYSTEM_       | SALES, BONUS, HFEE                                                                                           |
261 39 Soh Keong
| ISSUE_MODE_EINVOICE_   | YES, NO                                                                                                      |
262 36 Soh Keong
| _DEFAULT               | BUYER_NAME_DEFAULT, MANDATORY_VALUES_DEFAULT                                                                 |