Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henrybravos/micro_report_ecocont
microservice report for ecocont
https://github.com/henrybravos/micro_report_ecocont
connect excel golang golangci-lint grpc grpc-go microservice pdf protobuf
Last synced: 3 months ago
JSON representation
microservice report for ecocont
- Host: GitHub
- URL: https://github.com/henrybravos/micro_report_ecocont
- Owner: henrybravos
- Created: 2024-08-21T19:03:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T18:13:18.000Z (4 months ago)
- Last Synced: 2024-09-30T15:41:08.351Z (3 months ago)
- Topics: connect, excel, golang, golangci-lint, grpc, grpc-go, microservice, pdf, protobuf
- Language: JavaScript
- Homepage:
- Size: 170 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
Install micro-report with tidy
```bash
go mod tidy
create .env file
put the fonts in the root/fonts
root/fonts
- ARIAL.TTF //normal
- ARIALBD.TTF //BOLD
make directories
root/tmp
root/tmp/pdf
root/tmp/excel
go run cmd/server/main.go
```
## Connect GRPC
### Requeriments
- Install [buf](https://docs.buf.build/installation)### Generate pb
```bash
cd protos
buf lint
buf generate
```## API Reference
### Sales
#### Get pdf/excel sales report
```http
POST /v1.SalesService/RetrieveSalesResourceReport
```| Parameter | Type | Description |
|:-------------|:---------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `type` | `number` | **Required**. 1 PDF, 2 XLSX |**return:** `string` path of file, use: http://localhost:8080/tmp/pdf/2024000.pdf
available for 5 minutes#### Get sales report paginated
```http
POST /v1.SalesService/RetrieveSalesPaginatedReport
```| Parameter | Type | Description |
|:-------------|:---------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `page` | `int` | **Required**. Page number, eg: 1162 |
| `pageSize` | `int` | **Required**. Page size, eg: 30 |**return:** []SalesReport
### Journal "Libro de trabajo"
```http
POST /v1.JournalService/RetrieveJournalReport
```| Parameter | Type | Description |
|:-------------------------|:---------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `isConsolidated` | `bool` | is consolidated, DEFAULT: false |
| `includeCuBa` | `bool` | include accounts bank, DEFAULT: false |
| `includeClose` | `bool` | include close report, DEFAULT: false |**return:** proto []JournalEntries
### Balance Cash "Libro caja"
```http
POST /v1.CashBookService/RetrieveCashBook
```| Parameter | Type | Description |
|:-----------------------|:-----------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `accountIds` | `[]string` | **Required**. financial accounts list, eg ["ID"] |**return:** proto []CashBook and []AccountBalance
### Bank Book "Libro bancos"
```http
POST /v1.BankBookService/RetrieveBankBook
```| Parameter | Type | Description |
|:-----------------------|:-----------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `accountIds` | `[]string` | **Required**. financial accounts list, eg ["ID"] |**return:** proto []BalanceBank and []LBanks
### Balance Diario "Libro diario"
```http
POST /v1.JournalService/RetrieveGeneralJournal
```| Parameter | Type | Description |
|:-----------------------|:-----------|:---------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `isConsolidated` | `bool` | is consolidated, DEFAULT: false |
| `includeCuBa` | `bool` | include accounts bank, DEFAULT: false |
| `includeClose` | `bool` | include close report, DEFAULT: false |**return:** proto []GeneralJournal
### "Kardex Valorizado"
```http
POST /v1.KardexService/RetrieveKardexValued
```| Parameter | Type | Description |
|:---------------|:--------------|:----------------------------------------------------------------------------------|
| `localId` | `string` | **Required**. Local Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `includeNotes` | `bool` | **Required**. internal Notes, Default FALSE, |
| `period` | `string,null` | Retrieve per Period, eg: 2024-01 |
| `productId` | `string,null` | Product for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `startDate` | `string,null` | Date to search data. To retrieve data between dates, period must be NULL |
| `endDate` | `string,null` | Date to search data. To retrieve data between dates, period must be NULL |**return:** proto []KardexValued
### "Registro de compras"
```http
POST /v1.PurchaseService/RetrievePurchaseReport
```| Parameter | Type | Description |
|:-------------|:-------------|:---------------------------------------------------------------------------|
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `period` | `string` | **Required**. Retrieve per Period, eg: 2024-01 |**return:** proto []PurchaseReport
### "Libro Mayor"
```http
POST /v1.JournalService/RetrieveMajorBook
```
| Parameter | Type | Description |
|:-------------------|:-----------|:-------------------------------------------------------------------------------|
| `period` | `string` | **Required**. Period for retrieve, eg: 2024-01 |
| `businessId` | `string` | **Required**. Company for filter, eg: bf4336e4-b9b7-11ec-b4c3-00505605deef |
| `isConsolidated` | `bool` | is consolidated, DEFAULT: false |
| `includeCuBa` | `bool` | include accounts bank, DEFAULT: false |
| `includeClose` | `bool` | include close report, DEFAULT: false |
| `lfType` | `bool` | include close report, DEFAULT: '', eg: 060100 |**return:** proto []MajorBook