generated from PenaSide/GolangTemplate
--
This commit is contained in:
parent
72788f8369
commit
418b8608a1
@ -770,6 +770,11 @@ func (api *API2) SendReport(ctx echo.Context) error {
|
|||||||
)
|
)
|
||||||
return api.error(ctx, http.StatusBadRequest, "verification not accepted")
|
return api.error(ctx, http.StatusBadRequest, "verification not accepted")
|
||||||
}
|
}
|
||||||
|
account, err := api.account.FindByUserID(ctx.Request().Context(), tariffs.UserID)
|
||||||
|
if err != nil {
|
||||||
|
return api.errorOld(ctx, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
authuser, err := api.clients.auth.GetUser(ctx.Request().Context(), tariffs.UserID)
|
authuser, err := api.clients.auth.GetUser(ctx.Request().Context(), tariffs.UserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -794,7 +799,7 @@ func (api *API2) SendReport(ctx echo.Context) error {
|
|||||||
DocNumber: fmt.Sprint(historyMap[req.Id] + 1),
|
DocNumber: fmt.Sprint(historyMap[req.Id] + 1),
|
||||||
Date: time.Now().Format("2006-01-02"),
|
Date: time.Now().Format("2006-01-02"),
|
||||||
OrgTaxNum: verifuser.TaxNumber,
|
OrgTaxNum: verifuser.TaxNumber,
|
||||||
OrgName: models.Name{Orgname: "Orgname"},
|
OrgName: account.Name.Orgname,
|
||||||
Name: tariff.Name,
|
Name: tariff.Name,
|
||||||
Amount: totalAmount,
|
Amount: totalAmount,
|
||||||
Price: tariffs.RawDetails.Price,
|
Price: tariffs.RawDetails.Price,
|
||||||
|
@ -4,7 +4,7 @@ type RespGeneratorService struct {
|
|||||||
DocNumber string `json:"docnumber"`
|
DocNumber string `json:"docnumber"`
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
OrgTaxNum string `json:"orgtaxnum"`
|
OrgTaxNum string `json:"orgtaxnum"`
|
||||||
OrgName Name `json:"orgname"`
|
OrgName string `json:"orgname"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Amount uint64 `json:"amount"`
|
Amount uint64 `json:"amount"`
|
||||||
Price int64 `json:"price"`
|
Price int64 `json:"price"`
|
||||||
|
Loading…
Reference in New Issue
Block a user