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