Specification » History » Version 34
Soh Keong, 06/27/2024 09:43 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 | |||
12 | h2. Jar File Download |
||
13 | |||
14 | 30 | Soh Keong | "Jar":/redmine/attachments/790 |
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 | 1 | Soh Keong | </pre> |
42 | |||
43 | 10 | Soh Keong | <pre> |
44 | CommonConstant = my.aisino.einvoice.constant.CommonConstant |
||
45 | </pre> |
||
46 | |||
47 | 1 | Soh Keong | # *conn* - Database connection. |
48 | 13 | Soh Keong | # *beanList* - InvoiceSubmissionRequestBean List. |
49 | 31 | Soh Keong | |
50 | 32 | Soh Keong | > * *docCode* - From Keys (TAX_DOC_SUMMARY) |
51 | 1 | Soh Keong | > * *orderId* |
52 | 26 | Soh Keong | > * *orderDate* - Format(yyyy-MM-dd) |
53 | > * *orderTime* - Format(HH:mm:ssZ) |
||
54 | > * *originalOrderId* - For Credit Note/ Debit Note/ Refund Note |
||
55 | > * *orderTypeCode* - CommonConstant.INVOICE_TYPE_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/) |
||
56 | > * *currencyCode* - CommonConstant.CURRENCY_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/currencies/) |
||
57 | 10 | Soh Keong | > * *totalExcludingTax* |
58 | 1 | Soh Keong | > * *totalIncludingTax* |
59 | > * *totalPayableAmount* |
||
60 | 26 | Soh Keong | > * *businessSystem* - CommonConstant.BUSINESS_SYSTEM_* |
61 | 1 | Soh Keong | |
62 | 14 | Soh Keong | > * *supplierBean* |
63 | > ** *addressBean* |
||
64 | > *** *country* - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/) |
||
65 | > *** *state* - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/) |
||
66 | > *** *city* - Max length : 50 |
||
67 | > *** *postal* - Max length : 50 |
||
68 | > *** *address1* - Max length : 150 |
||
69 | > *** *address2* - Max length : 150 |
||
70 | > *** *address3* - Max length : 150 |
||
71 | > ** *contactNumber* - Max length : 20 |
||
72 | > ** *name* - Max length : 300 |
||
73 | > ** *registrationBean* |
||
74 | 17 | Soh Keong | > *** *tin* |
75 | 29 | Soh Keong | > *** *regSchemeId* - CommonConstant.ID_TYPE_* |
76 | > *** *regNo* |
||
77 | 14 | Soh Keong | > *** *sst* (Optional) |
78 | 24 | Soh Keong | > *** *msic* - https://sdk.myinvois.hasil.gov.my/codes/msic-codes/ |
79 | 14 | Soh Keong | |
80 | 1 | Soh Keong | > * *buyerBean* |
81 | 31 | Soh Keong | > ** *buyerCode* - From keys (TAX_DOC_BUYER) |
82 | 14 | Soh Keong | > ** *addressBean* |
83 | 11 | Soh Keong | > *** *country* - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/) |
84 | 10 | Soh Keong | > *** *state* - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/) |
85 | > *** *city* - Max length : 50 |
||
86 | > *** *address1* - Max length : 150 |
||
87 | > *** *address2* - Max length : 150 |
||
88 | > *** *address3* - Max length : 150 |
||
89 | 1 | Soh Keong | > ** *contactNumber* - Max length : 20 |
90 | > ** *name* - Max length : 300 |
||
91 | > ** *email* |
||
92 | 28 | Soh Keong | > ** *registrationBean* |
93 | > *** *tin* |
||
94 | 29 | Soh Keong | > *** *regSchemeId* - CommonConstant.ID_TYPE_* |
95 | > *** *regNo* |
||
96 | 2 | Soh Keong | > *** *sst* (Optional) |
97 | 6 | Soh Keong | |
98 | 11 | Soh Keong | > * *productList* |
99 | 31 | Soh Keong | > ** *docLineCode* - From Keys (TAX_DOC_DETAIL) |
100 | 19 | Soh Keong | > ** *productName* - Max length : 300 |
101 | > ** *productCode* - Max length : 18 |
||
102 | > ** *measurement* (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/) |
||
103 | > ** *quantity* (Optional) |
||
104 | 6 | Soh Keong | > ** *totalExcludingTax* |
105 | 11 | Soh Keong | > ** *unitPrice* |
106 | > ** *subtotal* |
||
107 | > ** *classificationList* |
||
108 | 19 | Soh Keong | > *** *code* - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/) |
109 | > *** *group* - CommonConstant.CLASSIFICATION_GROUP_* |
||
110 | 6 | Soh Keong | > ** *taxTotalBean* |
111 | 12 | Soh Keong | > *** *totalTaxAmount* |
112 | 8 | Soh Keong | > *** *taxSubTotalList* |
113 | 1 | Soh Keong | > **** *taxType* - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/) |
114 | > **** *percent* (Optional) |
||
115 | 8 | Soh Keong | > **** *perUnitAmount* (Optional) |
116 | 14 | Soh Keong | > **** *measurement* (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/) |
117 | 16 | Soh Keong | > **** *quantity* (Optional) |
118 | 3 | Soh Keong | > **** *netAmount* (Optional) |
119 | > **** *tax* |
||
120 | 6 | Soh Keong | |
121 | > * *taxTotalBean* |
||
122 | > ** *totalTaxAmount* |
||
123 | 1 | Soh Keong | > ** *taxSubTotalList* |
124 | 33 | Soh Keong | > *** *taxType* - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/) |
125 | > *** *percent* - Optional |
||
126 | > *** *perUnitAmount* - Optional |
||
127 | > *** *measurement* - Optional |
||
128 | > *** *quantity* - Optional |
||
129 | > *** *netAmount* - Optional |
||
130 | > *** *tax* - |
||
131 | 1 | Soh Keong | |
132 | 3. *responseBean* |
||
133 | |||
134 | > * *submissionUid* |
||
135 | > * *acceptedDocumentList* |
||
136 | > ** *orderId* |
||
137 | > ** *uuid* |
||
138 | > * *rejectedDocumentList* |
||
139 | > ** *orderId* |
||
140 | > ** *errorList* |
||
141 | 4 | Soh Keong | > *** *code* |
142 | 8 | Soh Keong | > *** *message* |
143 | |||
144 | |||
145 | 10 | Soh Keong | h3. queryEInvoice |
146 | 8 | Soh Keong | |
147 | <pre> |
||
148 | 10 | Soh Keong | InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean); |
149 | 8 | Soh Keong | </pre> |
150 | |||
151 | # *conn* - Database connection. |
||
152 | 9 | Soh Keong | # *bean* - Object. |
153 | > * *documentNum* |
||
154 | > * *submissionUid* |
||
155 | > * *invoiceUuid* |
||
156 | > * *invoiceTypeCode* |
||
157 | > * *buyerTin* |
||
158 | > * *buyerName* |
||
159 | 15 | Soh Keong | > * *supplierTin* |
160 | > * *supplierName* |
||
161 | 9 | Soh Keong | > * *totalAmountFrom* |
162 | > * *totalAmountTo* |
||
163 | > * *invoiceStatus* |
||
164 | > * *confirmStatusCode* |
||
165 | > * *issuedDateFrom* |
||
166 | > * *issuedDateTo* |
||
167 | > * *pageIndex* (Mandatory) |
||
168 | > * *pageSize* (Mandatory) |
||
169 | |||
170 | 3. *responseBean* |
||
171 | |||
172 | > * *page* |
||
173 | > ** *pageCount* |
||
174 | > ** *pageNo* |
||
175 | > ** *pageSize* |
||
176 | > ** *totalSize* |
||
177 | |||
178 | > * *recordList* |
||
179 | > ** *buyerTin* |
||
180 | > ** *confirmStatusCode* |
||
181 | > ** *currency* |
||
182 | 1 | Soh Keong | > ** *description* |
183 | > ** *documentNum* |
||
184 | > ** *excludingTaxAmount* |
||
185 | > ** *includingTaxAmount* |
||
186 | > ** *invoiceId* |
||
187 | > ** *invoiceStatus* |
||
188 | > ** *invoiceTypeCode* |
||
189 | > ** *invoiceUuid* |
||
190 | > ** *issuedDate* |
||
191 | > ** *nowTime* |
||
192 | > ** *operationDate* |
||
193 | > ** *operator* |
||
194 | > ** *pageIndex* |
||
195 | > ** *pageNo* |
||
196 | > ** *pageSize* |
||
197 | 15 | Soh Keong | > ** *supplierTin* |
198 | > ** *supplierName* |
||
199 | 1 | Soh Keong | > ** *submissionUid* |
200 | 9 | Soh Keong | > ** *transactionId* |
201 | 10 | Soh Keong | |
202 | h3. cancelEInvoice |
||
203 | |||
204 | <pre> |
||
205 | InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean); |
||
206 | </pre> |
||
207 | |||
208 | # *conn* - Database connection. |
||
209 | # *bean* - Object. |
||
210 | 12 | Soh Keong | > * *cancelCode* - CommonConstant.CANCEL_CODE_* |
211 | > * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) |
||
212 | 10 | Soh Keong | > * *invoiceIds* - List of Integer |
213 | |||
214 | 3. *responseBean* |
||
215 | |||
216 | > * *success* - true / false |
||
217 | 34 | Soh Keong | |
218 | h2. CommonConstant |
||
219 | |||
220 | |_. Name |_. values | |
||
221 | | INTERFACE_ | LOGIN, INVOICE_ISSUANCE, INVOICE_INQUIRY, INVOICE_CANCEL, INVOICE_PURCHASE_INQUIRY, INVOICE_PURCHASE_REJECT | |