Specification » History » Version 48
Soh Keong, 07/04/2024 04:08 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 | 48 | Soh Keong | "Jar":/redmine/attachments/797 |
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 | 42 | Soh Keong | > ** *totalDiscountAmount* - (Optional) |
110 | 11 | Soh Keong | > ** *classificationList* |
111 | 19 | Soh Keong | > *** *code* - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/) |
112 | > *** *group* - CommonConstant.CLASSIFICATION_GROUP_* |
||
113 | 6 | Soh Keong | > ** *taxTotalBean* |
114 | 12 | Soh Keong | > *** *totalTaxAmount* |
115 | 8 | Soh Keong | > *** *taxSubTotalList* |
116 | 1 | Soh Keong | > **** *taxType* - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/) |
117 | > **** *percent* (Optional) |
||
118 | 8 | Soh Keong | > **** *perUnitAmount* (Optional) |
119 | 14 | Soh Keong | > **** *measurement* (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/) |
120 | 16 | Soh Keong | > **** *quantity* (Optional) |
121 | 3 | Soh Keong | > **** *netAmount* (Optional) |
122 | > **** *tax* |
||
123 | 6 | Soh Keong | |
124 | > * *taxTotalBean* |
||
125 | > ** *totalTaxAmount* |
||
126 | 1 | Soh Keong | > ** *taxSubTotalList* |
127 | 33 | Soh Keong | > *** *taxType* - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/) |
128 | > *** *percent* - Optional |
||
129 | > *** *perUnitAmount* - Optional |
||
130 | > *** *measurement* - Optional |
||
131 | > *** *quantity* - Optional |
||
132 | > *** *netAmount* - Optional |
||
133 | > *** *tax* - |
||
134 | 1 | Soh Keong | |
135 | 3. *responseBean* |
||
136 | |||
137 | > * *submissionUid* |
||
138 | > * *acceptedDocumentList* |
||
139 | > ** *orderId* |
||
140 | > ** *uuid* |
||
141 | > * *rejectedDocumentList* |
||
142 | > ** *orderId* |
||
143 | > ** *errorList* |
||
144 | 4 | Soh Keong | > *** *code* |
145 | 8 | Soh Keong | > *** *message* |
146 | |||
147 | |||
148 | 10 | Soh Keong | h3. queryEInvoice |
149 | 8 | Soh Keong | |
150 | <pre> |
||
151 | 10 | Soh Keong | InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean); |
152 | 8 | Soh Keong | </pre> |
153 | |||
154 | # *conn* - Database connection. |
||
155 | 9 | Soh Keong | # *bean* - Object. |
156 | > * *documentNum* |
||
157 | > * *submissionUid* |
||
158 | > * *invoiceUuid* |
||
159 | > * *invoiceTypeCode* |
||
160 | > * *buyerTin* |
||
161 | > * *buyerName* |
||
162 | 15 | Soh Keong | > * *supplierTin* |
163 | > * *supplierName* |
||
164 | 9 | Soh Keong | > * *totalAmountFrom* |
165 | > * *totalAmountTo* |
||
166 | > * *invoiceStatus* |
||
167 | > * *confirmStatusCode* |
||
168 | > * *issuedDateFrom* |
||
169 | > * *issuedDateTo* |
||
170 | > * *pageIndex* (Mandatory) |
||
171 | > * *pageSize* (Mandatory) |
||
172 | |||
173 | 3. *responseBean* |
||
174 | |||
175 | > * *page* |
||
176 | > ** *pageCount* |
||
177 | > ** *pageNo* |
||
178 | > ** *pageSize* |
||
179 | > ** *totalSize* |
||
180 | |||
181 | > * *recordList* |
||
182 | > ** *buyerTin* |
||
183 | > ** *confirmStatusCode* |
||
184 | > ** *currency* |
||
185 | 1 | Soh Keong | > ** *description* |
186 | > ** *documentNum* |
||
187 | > ** *excludingTaxAmount* |
||
188 | > ** *includingTaxAmount* |
||
189 | > ** *invoiceId* |
||
190 | > ** *invoiceStatus* |
||
191 | > ** *invoiceTypeCode* |
||
192 | > ** *invoiceUuid* |
||
193 | > ** *issuedDate* |
||
194 | > ** *nowTime* |
||
195 | > ** *operationDate* |
||
196 | > ** *operator* |
||
197 | > ** *pageIndex* |
||
198 | > ** *pageNo* |
||
199 | > ** *pageSize* |
||
200 | 15 | Soh Keong | > ** *supplierTin* |
201 | > ** *supplierName* |
||
202 | 1 | Soh Keong | > ** *submissionUid* |
203 | 9 | Soh Keong | > ** *transactionId* |
204 | 10 | Soh Keong | |
205 | h3. cancelEInvoice |
||
206 | |||
207 | <pre> |
||
208 | InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean); |
||
209 | </pre> |
||
210 | |||
211 | # *conn* - Database connection. |
||
212 | # *bean* - Object. |
||
213 | 12 | Soh Keong | > * *cancelCode* - CommonConstant.CANCEL_CODE_* |
214 | > * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) |
||
215 | 10 | Soh Keong | > * *invoiceIds* - List of Integer |
216 | |||
217 | 3. *responseBean* |
||
218 | |||
219 | > * *success* - true / false |
||
220 | 34 | Soh Keong | |
221 | h2. CommonConstant |
||
222 | |||
223 | 36 | Soh Keong | |_. Name |_. values | |
224 | | INTERFACE_ | LOGIN, INVOICE_ISSUANCE, INVOICE_INQUIRY, INVOICE_CANCEL, INVOICE_PURCHASE_INQUIRY, INVOICE_PURCHASE_REJECT | |
||
225 | | RETURN_CODE_ | SUCCESS, ABNORMAL | |
||
226 | | INVOICE_STATUS_ | VALID, INVALID, CANCELLED, SUBMITTED | |
||
227 | | CONFIRM_STATUS_CODE_ | AWAITING, ACCEPTED, REJECTED | |
||
228 | | CANCEL_CODE_ | WRONG_BUYER, WRONG_INVOICE, OTHERS | |
||
229 | | 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 | |
||
230 | | TAX_DOC_STATUS_ | PENDING, VERIFIED, SUCCESS, FAIL, REJECT, DELETED | |
||
231 | | CURRENCY_CODE_ | MALAYSIA_RINGGIT | |
||
232 | | COUNTRY_ | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN | |
||
233 | | COUNTRY_CODE_ | MALAYSIA, SINGAPORE, BRUNEI_DARUSSALAM, THAILAND, INDONESIA, TAIWAN | |
||
234 | | 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 | |
||
235 | | MEASUREMENT_ | METRE, CENTIMETRE, KILOMETRE, LITRE, KILOGRAM, GRAM | |
||
236 | | CLASSIFICATION_REF_NO_ | CONSOLIDATED, OTHERS, VOUCHER_GIFT_CARD | |
||
237 | | 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 | |
||
238 | | CLASSIFICATION_GROUP_ | CLASS, PRODUCT_TARIFF_CODE | |
||
239 | | TAX_TYPE_ | SALES, SERVICE, TOURISM, HIGH_VALUE_GOODS, LOW_VALUE_GOODS, NOT_APPLICABLE, TAX_EXEMPTION | |
||
240 | | ID_TYPE_ | BRN, NRIC, PASSPORT, ARMY | |
||
241 | | TIN_ | GENERAL_PUBLIC, FOREIGN_BUYER, FOREIGN_SUPPLIER, BUYER | |
||
242 | | ENTITY_ | COSWAY, ECOSWAY, RANK_DISTRIBUTOR, KIMIA_SUCHI, KIMIA_SUCHI_MARKETING, VITAL_DEGREE | |
||
243 | | | EINVOICE_REQUEST_IND, EXCLUDING_POSTING | |
||
244 | | BUSINESS_SYSTEM_ | SALES, BONUS, HFEE | |
||
245 | 39 | Soh Keong | | ISSUE_MODE_EINVOICE_ | YES, NO | |
246 | 36 | Soh Keong | | _DEFAULT | BUYER_NAME_DEFAULT, MANDATORY_VALUES_DEFAULT | |