Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-15 16:43:21 +03:00
parent 5be7315bdb
commit 1a80184cac

View File

@@ -541,6 +541,14 @@ export const useOrderEntryStore = defineStore('orderentry', {
const s = String(d).split('T')[0]
return s
}
const getLineDueDate = (ln) => (
formatDate(
ln?.DueDate ||
ln?.DeliveryDate ||
ln?.PlannedDateOfLading ||
''
)
)
const oldDate = formatDate(this.originalHeader?.AverageDueDate)
const newDate = formatDate(this.header?.AverageDueDate)
@@ -556,7 +564,7 @@ export const useOrderEntryStore = defineStore('orderentry', {
const seen = new Set()
normalized.forEach(ln => {
if (ln?._deleteSignal || !ln?.OrderLineID || ln?._dirty !== true) return
if (ln?._deleteSignal || !ln?.OrderLineID) return
const orig = origMap.get(String(ln.OrderLineID))
if (!orig) return
@@ -564,8 +572,8 @@ export const useOrderEntryStore = defineStore('orderentry', {
const itemCode = String(ln?.ItemCode || '').trim().toUpperCase()
const colorCode = String(ln?.ColorCode || '').trim().toUpperCase()
const itemDim2Code = String(ln?.ItemDim2Code || '').trim().toUpperCase()
const oldLnDate = formatDate(orig?.DueDate)
const newLnDate = formatDate(ln?.DueDate)
const oldLnDate = getLineDueDate(orig)
const newLnDate = getLineDueDate(ln)
if (!itemCode || !newLnDate || oldLnDate === newLnDate) return
const key = [itemCode, colorCode, itemDim2Code, oldLnDate, newLnDate].join('||')
@@ -613,8 +621,8 @@ export const useOrderEntryStore = defineStore('orderentry', {
let label = mapLabel(ln)
const orig = origMap.get(String(ln.OrderLineID))
if (orig) {
const oldLnDate = formatDate(orig.DueDate)
const newLnDate = formatDate(ln.DueDate)
const oldLnDate = getLineDueDate(orig)
const newLnDate = getLineDueDate(ln)
if (newLnDate && oldLnDate !== newLnDate) {
label += ` (Termin: ${oldLnDate} -> ${newLnDate})`
}