From 3618dd6651fdec1ab5af47a84fb52bf740561952 Mon Sep 17 00:00:00 2001 From: seb Date: Wed, 16 Sep 2026 15:06:06 +0200 Subject: [PATCH] u --- src/pages/lieferung/neu.jsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/pages/lieferung/neu.jsx b/src/pages/lieferung/neu.jsx index 119b78b..2f43705 100644 --- a/src/pages/lieferung/neu.jsx +++ b/src/pages/lieferung/neu.jsx @@ -1,5 +1,5 @@ import { PureComponent } from 'react'; -import { connect } from 'react-redux'; +import { legacy_connect as connect } from 'react-redux'; import Alert from '@mui/material/Alert'; import Box from '@mui/material/Box'; import CircularProgress from '@mui/material/CircularProgress'; @@ -269,16 +269,16 @@ class LieferungNeuPage extends PureComponent { : null; const newLines = Array.isArray(rawItems) ? rawItems.map((l) => ({ - name: l.name ?? l.articleName ?? null, - sku: l.sku ?? l.liefArtNr ?? '', - amount: (l.amount ?? l.count) != null ? String(l.amount ?? l.count) : '', - pu: (l.pu ?? l.vpe) != null ? String(l.pu ?? l.vpe) : '', - unit: l.unit ?? '', - taxrate: (l.taxrate ?? l.tax ?? l.mwst) != null ? String(l.taxrate ?? l.tax ?? l.mwst) : '', - netprice: (l.netprice ?? l.net ?? (l.eknetto != null ? (l.eknetto / 100).toFixed(2) : null)) != null - ? String(l.netprice ?? l.net ?? (l.eknetto != null ? (l.eknetto / 100).toFixed(2) : '')) - : '', - })) + name: l.name ?? l.articleName ?? null, + sku: l.sku ?? l.liefArtNr ?? '', + amount: (l.amount ?? l.count) != null ? String(l.amount ?? l.count) : '', + pu: (l.pu ?? l.vpe) != null ? String(l.pu ?? l.vpe) : '', + unit: l.unit ?? '', + taxrate: (l.taxrate ?? l.tax ?? l.mwst) != null ? String(l.taxrate ?? l.tax ?? l.mwst) : '', + netprice: (l.netprice ?? l.net ?? (l.eknetto != null ? (l.eknetto / 100).toFixed(2) : null)) != null + ? String(l.netprice ?? l.net ?? (l.eknetto != null ? (l.eknetto / 100).toFixed(2) : '')) + : '', + })) : null; this.setState((prev) => ({ @@ -405,13 +405,13 @@ class LieferungNeuPage extends PureComponent { const doc = data[cfg.docField]; const apiLines = requireArray(doc.lines, `${cfg.docField}.lines`); const lines = apiLines.length > 0 ? apiLines.map(lineFromApi) : [emptyLine()]; - + this.props.setDate(dateInputValue(doc.date)); if (doc[cfg.partyField] != null) this.props.setDeliveryEntity(doc[cfg.partyField]); if (doc.number != null) this.props.setNumber(doc.number); if (doc.externalNumber != null) this.props.setExternalNumber(String(doc.externalNumber)); this.props.setLineitems(lines); - + enqueueSnackbar(cfg.savedMsg, { variant: 'success' }); this.setState({ saving: false }); }