add order number
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
guwandyk committed 2026-09-29 19:29:07 +05:00
1 parent e47e8c24d0
commit 0058411cdd
7 files changed
+77 -16

No files matched your search

@@ -30,7 +30,7 @@ JOIN visa_master_payment_orders o ON o.id = p.order_id
LEFT JOIN branches b ON b.id = o.branch_id
LEFT JOIN users u ON u.id = p.created_by`
const historySelectColumns = `p.id, p.order_id, COALESCE(o.unique_id, ''), COALESCE(o.type, ''),
const historySelectColumns = `p.id, p.order_id, COALESCE(p.order_number, ''), COALESCE(o.unique_id, ''), COALESCE(o.type, ''),
o.branch_id, b.name, COALESCE(o.passport_name, ''), COALESCE(o.passport_surname, ''), p.user_id,
p.amount_tmt, p.bank_fee_tmt, p.gbus_fee_tmt, p.tveb_fee_usd, p.tveb_fee_tmt, p.total_amount_tmt,
p.exchange_rate_usd, p.exchange_rate_rub, p.payment_period,
@@ -146,7 +146,7 @@ func buildListQuery(filter paymenthistory.ListFilter) (whereClause string, args
args = append(args, shared.LikePattern(filter.Search))
n := len(args)
conditions = append(conditions, fmt.Sprintf(`(
o.passport_name ILIKE $%[1]d OR o.passport_surname ILIKE $%[1]d OR o.unique_id ILIKE $%[1]d
o.passport_name ILIKE $%[1]d OR o.passport_surname ILIKE $%[1]d OR o.unique_id ILIKE $%[1]d OR p.order_number ILIKE $%[1]d
)`, n))
}
@@ -159,7 +159,7 @@ func (r *repository) scanHistoryItem(row pgx.Row) (paymenthistory.PaymentHistory
var branchNameJSON []byte
var gatewayResponse []byte
if err := row.Scan(
&item.Id, &item.OrderId, &item.OrderUniqueId, &item.Type,
&item.Id, &item.OrderId, &item.OrderNumber, &item.OrderUniqueId, &item.Type,
&item.BranchId, &branchNameJSON, &item.PassportName, &item.PassportSurname, &item.UserId,
&item.AmountTmt, &item.BankFeeTmt, &item.GbusFeeTmt, &item.TvebFeeUsd, &item.TvebFeeTmt, &item.TotalAmountTmt,
&item.ExchangeRateUsd, &item.ExchangeRateRub, &item.PaymentPeriod,