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