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")
|
||||
}
|
||||
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)
|
||||
if err != nil {
|
||||
@ -794,7 +799,7 @@ func (api *API2) SendReport(ctx echo.Context) error {
|
||||
DocNumber: fmt.Sprint(historyMap[req.Id] + 1),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
OrgTaxNum: verifuser.TaxNumber,
|
||||
OrgName: models.Name{Orgname: "Orgname"},
|
||||
OrgName: account.Name.Orgname,
|
||||
Name: tariff.Name,
|
||||
Amount: totalAmount,
|
||||
Price: tariffs.RawDetails.Price,
|
||||
|
@ -4,7 +4,7 @@ type RespGeneratorService struct {
|
||||
DocNumber string `json:"docnumber"`
|
||||
Date string `json:"date"`
|
||||
OrgTaxNum string `json:"orgtaxnum"`
|
||||
OrgName Name `json:"orgname"`
|
||||
OrgName string `json:"orgname"`
|
||||
Name string `json:"name"`
|
||||
Amount uint64 `json:"amount"`
|
||||
Price int64 `json:"price"`
|
||||
|
Loading…
Reference in New Issue
Block a user