Project

General

Profile

Specification » History » Version 26

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