Project

General

Profile

Specification » History » Version 38

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