Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2684,17 +2684,18 @@ export const useOrderEntryStore = defineStore('orderentry', {
|
||||
// 🧪 PRE-VALIDATE — prItemVariant ön kontrol
|
||||
// - invalid varsa CREATE/UPDATE ÇALIŞMAZ
|
||||
// =======================================================
|
||||
const linesToValidate =
|
||||
isNew
|
||||
? lines
|
||||
: lines.filter(l => l._deleteSignal === true || l._dirty === true || !l.OrderLineID)
|
||||
if (!isNew) {
|
||||
const linesToValidate = lines.filter(
|
||||
l => l._deleteSignal === true || l._dirty === true || !l.OrderLineID
|
||||
)
|
||||
|
||||
const v = await api.post('/order/validate', { header, lines: linesToValidate })
|
||||
const invalid = v?.data?.invalid || []
|
||||
const v = await api.post('/order/validate', { header, lines: linesToValidate })
|
||||
const invalid = v?.data?.invalid || []
|
||||
|
||||
if (invalid.length > 0) {
|
||||
await this.showInvalidVariantDialog?.($q, invalid)
|
||||
return // ❌ create / update ÇALIŞMAZ
|
||||
if (invalid.length > 0) {
|
||||
await this.showInvalidVariantDialog?.($q, invalid)
|
||||
return // ❌ update ÇALIŞMAZ
|
||||
}
|
||||
}
|
||||
|
||||
console.log('📤 submitAllReal payload', {
|
||||
|
||||
Reference in New Issue
Block a user