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