Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-23 15:25:08 +03:00
parent cd9aa8a6e0
commit 81ca636452
5 changed files with 25 additions and 5 deletions

View File

@@ -66,7 +66,16 @@ func GetCustomerList(ctx context.Context) ([]models.CustomerList, error) {
), SPACE(0))
),
ISNULL(c.CurrencyCode, '')
ISNULL(c.CurrencyCode, ''),
ISNULL((
SELECT TOP 1 CAST(pa.PostalAddressID AS varchar(36))
FROM prCurrAccPostalAddress pa WITH(NOLOCK)
WHERE pa.CurrAccTypeCode = c.CurrAccTypeCode
AND pa.CurrAccCode = c.CurrAccCode
AND pa.AddressTypeCode = 2
AND ISNULL(pa.IsBlocked, 0) = 0
ORDER BY pa.LastUpdatedDate DESC, pa.CreatedDate DESC
), '')
FROM cdCurrAcc c
LEFT JOIN cdCurrAccDesc d
@@ -103,6 +112,7 @@ func GetCustomerList(ctx context.Context) ([]models.CustomerList, error) {
&c.Musteri_Temsilcisi,
&c.Ulke,
&c.Doviz_cinsi,
&c.PostalAddressID,
); err != nil {
return nil, err
}

View File

@@ -290,10 +290,11 @@ func normalizeMasterAccountCode(code string) string {
}
noSpace := strings.ReplaceAll(code, " ", "")
if len(noSpace) < 7 {
r := []rune(noSpace)
if len(r) < 7 {
return code
}
main := noSpace[:7]
return main[:3] + " " + main[3:]
main := r[:7]
return string(main[:3]) + " " + string(main[3:])
}