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

@@ -10,4 +10,5 @@ type CustomerList struct {
Musteri_Temsilcisi string `json:"Musteri_Temsilcisi"` Musteri_Temsilcisi string `json:"Musteri_Temsilcisi"`
Ulke string `json:"Ulke"` Ulke string `json:"Ulke"`
Doviz_cinsi string `json:"Doviz_Cinsi"` Doviz_cinsi string `json:"Doviz_Cinsi"`
PostalAddressID string `json:"PostalAddressID"`
} }

View File

@@ -66,7 +66,16 @@ func GetCustomerList(ctx context.Context) ([]models.CustomerList, error) {
), SPACE(0)) ), 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 FROM cdCurrAcc c
LEFT JOIN cdCurrAccDesc d LEFT JOIN cdCurrAccDesc d
@@ -103,6 +112,7 @@ func GetCustomerList(ctx context.Context) ([]models.CustomerList, error) {
&c.Musteri_Temsilcisi, &c.Musteri_Temsilcisi,
&c.Ulke, &c.Ulke,
&c.Doviz_cinsi, &c.Doviz_cinsi,
&c.PostalAddressID,
); err != nil { ); err != nil {
return nil, err return nil, err
} }

View File

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

View File

@@ -3140,11 +3140,15 @@ async function onCariChange(kod) {
cari.DocCurrencyCode || cari.DocCurrencyCode ||
'USD' 'USD'
const postalAddressId = String(cari.PostalAddressID || '').trim()
// 🔹 FORM sync (UI için) // 🔹 FORM sync (UI için)
form.CurrAccTypeCode = cari.CurrAccTypeCode || 1 form.CurrAccTypeCode = cari.CurrAccTypeCode || 1
form.CurrAccCode = kod form.CurrAccCode = kod
form.DocCurrencyCode = pb form.DocCurrencyCode = pb
form.pb = pb form.pb = pb
form.ShippingPostalAddressID = postalAddressId
form.BillingPostalAddressID = postalAddressId
aktifPB.value = pb aktifPB.value = pb
/* ===================================================== /* =====================================================
@@ -3155,7 +3159,9 @@ async function onCariChange(kod) {
CurrAccTypeCode: form.CurrAccTypeCode, CurrAccTypeCode: form.CurrAccTypeCode,
CurrAccCode: kod, CurrAccCode: kod,
DocCurrencyCode: pb, DocCurrencyCode: pb,
PriceCurrencyCode: pb PriceCurrencyCode: pb,
ShippingPostalAddressID: postalAddressId,
BillingPostalAddressID: postalAddressId
}, },
{ {
applyCurrencyToLines: true, applyCurrencyToLines: true,

View File

@@ -2673,6 +2673,8 @@ export const useOrderEntryStore = defineStore('orderentry', {
'InternalDescription', 'InternalDescription',
'CurrAccTypeCode', 'CurrAccTypeCode',
'CurrAccCode', 'CurrAccCode',
'ShippingPostalAddressID',
'BillingPostalAddressID',
'CurrAccDescription', 'CurrAccDescription',
'DocCurrencyCode', 'DocCurrencyCode',
'LocalCurrencyCode', 'LocalCurrencyCode',