Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -10,4 +10,5 @@ type CustomerList struct {
|
||||
Musteri_Temsilcisi string `json:"Musteri_Temsilcisi"`
|
||||
Ulke string `json:"Ulke"`
|
||||
Doviz_cinsi string `json:"Doviz_Cinsi"`
|
||||
PostalAddressID string `json:"PostalAddressID"`
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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:])
|
||||
}
|
||||
|
||||
@@ -3140,11 +3140,15 @@ async function onCariChange(kod) {
|
||||
cari.DocCurrencyCode ||
|
||||
'USD'
|
||||
|
||||
const postalAddressId = String(cari.PostalAddressID || '').trim()
|
||||
|
||||
// 🔹 FORM sync (UI için)
|
||||
form.CurrAccTypeCode = cari.CurrAccTypeCode || 1
|
||||
form.CurrAccCode = kod
|
||||
form.DocCurrencyCode = pb
|
||||
form.pb = pb
|
||||
form.ShippingPostalAddressID = postalAddressId
|
||||
form.BillingPostalAddressID = postalAddressId
|
||||
aktifPB.value = pb
|
||||
|
||||
/* =====================================================
|
||||
@@ -3155,7 +3159,9 @@ async function onCariChange(kod) {
|
||||
CurrAccTypeCode: form.CurrAccTypeCode,
|
||||
CurrAccCode: kod,
|
||||
DocCurrencyCode: pb,
|
||||
PriceCurrencyCode: pb
|
||||
PriceCurrencyCode: pb,
|
||||
ShippingPostalAddressID: postalAddressId,
|
||||
BillingPostalAddressID: postalAddressId
|
||||
},
|
||||
{
|
||||
applyCurrencyToLines: true,
|
||||
|
||||
@@ -2673,6 +2673,8 @@ export const useOrderEntryStore = defineStore('orderentry', {
|
||||
'InternalDescription',
|
||||
'CurrAccTypeCode',
|
||||
'CurrAccCode',
|
||||
'ShippingPostalAddressID',
|
||||
'BillingPostalAddressID',
|
||||
'CurrAccDescription',
|
||||
'DocCurrencyCode',
|
||||
'LocalCurrencyCode',
|
||||
|
||||
Reference in New Issue
Block a user