2 Commits

Author SHA1 Message Date
8006fd0935 added debug json req logging 2025-10-14 11:30:31 +03:00
4f9ca56157 fixed comment 2025-10-13 16:16:06 +03:00
2 changed files with 12 additions and 5 deletions

View File

@@ -95,6 +95,12 @@ func (c *Client) Sell(ctx context.Context, params SellParams) (*SellResponse, er
request.Userinfo = *params.Userinfo
}
reqJson, err := json.Marshal(request)
if err != nil {
return nil, err
}
fmt.Println(string(reqJson))
var response SellResponse
if err := c.executeRequest(ctx, request, &response); err != nil {
return nil, err

View File

@@ -247,11 +247,12 @@ func (c *Client) Sell(ctx context.Context, params SellParams) (*api.SellResponse
}
return c.api.Sell(ctx, api.SellParams{
Cashier: c.cashier,
Source: c.source,
Rows: []api.ReceiptRow{row},
Pays: []api.ReceiptPay{pay},
Userinfo: params.Userinfo,
Cashier: c.cashier,
Source: c.source,
Rows: []api.ReceiptRow{row},
Pays: []api.ReceiptPay{pay},
Userinfo: params.Userinfo,
CommentUP: params.CommentUP,
})
}