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