Project

General

Profile

Specification » History » Version 56

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