- VAT Zero goods: https://share.itc.gov.mn/share/developer/vat%20zero.xlsx
- VAT Free goods: https://share.itc.gov.mn/share/developer/vat%20free%20good.xlsx
- Classification Codes: https://share.itc.gov.mn/share/developer/gs1_gs1.xlsx
- District Codes: https://api.ebarimt.mn/api/info/check/getBranchInfo
- Api Doc: https://share.itc.gov.mn/share/developer/POS%20API%203.0.1.pdf
- https://share.itc.gov.mn/share/developer/combine.pdf
sudo apt install unzip ar tar xz-utils
Staging:
curl -s https://raw.githubusercontent.com/hurelhuyag/ebarimt/master/install.sh | bash
Prod:
curl -s https://raw.githubusercontent.com/hurelhuyag/ebarimt/master/install.sh | bash -s -- --prod
- Open http://127.0.0.1:7080 on web browser. I expect you should click some buttons.
- Copy POS's number. It is 8 digits number located in second text input field.
- Open https://st-operator.ebarimt.mn -> find by POS's number -> Double Click table's first cell
- Click button named "Мерчант нэмэх"
- Find by 37900846788. It is demo merchant. Click "Хадгалах"
- Open https://stg-invoice.ebarimt.mn/ -> "Хүсэлт" -> "Хүсэлт" -> "Pos Api хүсэлт" -> "Операторын холболт" -> "+"
- Repeat 3rd step. You should see "Баталгаажсан" instead "Хүлээгдэж буй"
- Repeat 1st step. Hit F5, Click "Мэдээлэл илгээх". You should notice "Мерчантын жагсаалт" table has entry.
<project>
<properties>
<spring-cloud.version>2022.0.3</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>io.github.hurelhuyag</groupId>
<artifactId>ebarimt</artifactId>
<version>3.0.1+2</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
spring.cloud.openfeign.client.config.EbarimtApi.url=http://127.0.0.1:7080
@SpringBootApplication
@EnableFeignClients({
"io.github.hurelhuyag.ebarimt",
})
class App {
}
@Service
@RequiredArgsConstructor
class SimpleOrderService implements OrderService {
private final EbarimtApi ebarimtApi;
@Override
public void createEbarimt(Long id) {
var ebarimt = ebarimtApi.createReceipt(new CreateReceipt(
new BigDecimal("112.00"),
new BigDecimal("10.00"),
new BigDecimal("2.00"),
"3502",
37900846788L,
"123",
"5678",
null,
null,
CreateReceipt.Type.B2C_RECEIPT,
null,
null,
List.of(
new CreateReceipt.Receipt(
new BigDecimal("112.00"),
new BigDecimal("10.00"),
new BigDecimal("2.00"),
CreateReceipt.VatType.VAT_ABLE,
37900846788L,
null,
List.of(
new CreateReceipt.ReceiptItem(
"Хатуу чихэр",
"UNDEFINED",
CreateReceipt.BarCodeType.UNDEFINED,
2352010L,
null,
"p",
new BigDecimal("1.000"),
new BigDecimal("112.00"),
null,
new BigDecimal("10.00"),
new BigDecimal("2.00"),
new BigDecimal("112.00"),
null
)
)
)
),
List.of(
new CreateReceipt.Payment(
CreateReceipt.PaymentCode.CASH,
CreateReceipt.PaymentStatus.PAID,
new BigDecimal("112.00"),
null
)
)
));
}
}
It is Apache 2.0 Licensed open source project. If you anything in you mind to improve this project. Feel free to file an issue or open pull request.