u
This commit is contained in:
@@ -102,7 +102,7 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
const articles = res?.articles || res?.supplier?.articles || [];
|
||||
const map = buildSupplierArticlesMap(articles);
|
||||
this.setState({ supplierArticlesMap: map });
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
this.unsubArticle = artikelAutomat.subscribe(() => {
|
||||
this.forceUpdate();
|
||||
});
|
||||
void warehouseAutomat.actions.load().catch(() => {});
|
||||
void warehouseAutomat.actions.load().catch(() => { });
|
||||
this.loadSupplierArticlesIfNeeded();
|
||||
|
||||
if (this.props.open) {
|
||||
@@ -225,7 +225,7 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
supplierArticlesMap: currentSupplierMap,
|
||||
},
|
||||
() => {
|
||||
void warehouseAutomat.actions.load().catch(() => {});
|
||||
void warehouseAutomat.actions.load().catch(() => { });
|
||||
this.loadSupplierArticlesIfNeeded();
|
||||
if (this.props.summary) {
|
||||
this.initAmountsFromSummary(this.props.summary, this.props.prefillLineId);
|
||||
@@ -535,15 +535,15 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
(line.sku ? String(line.sku).trim() : null);
|
||||
|
||||
if (targetSku && !cachedArticle) {
|
||||
void artikelAutomat.actions.loadArticle(targetSku).catch(() => {});
|
||||
void artikelAutomat.actions.loadArticle(targetSku).catch(() => { });
|
||||
}
|
||||
|
||||
const isTracked =
|
||||
Boolean(line.trackStock) ||
|
||||
(cachedArticle?.track_stock !== undefined
|
||||
? cachedArticle.track_stock !== false &&
|
||||
cachedArticle.track_stock !== 0 &&
|
||||
cachedArticle.track_stock !== '0'
|
||||
cachedArticle.track_stock !== 0 &&
|
||||
cachedArticle.track_stock !== '0'
|
||||
: false);
|
||||
|
||||
const isEnablingThis = targetSku ? Boolean(enablingTrackStockBySku?.[targetSku]) : false;
|
||||
@@ -565,8 +565,8 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
const warehouseBreakdown =
|
||||
Array.isArray(cachedArticle?.warehouses) && cachedArticle.warehouses.length > 0
|
||||
? cachedArticle.warehouses
|
||||
.map((w) => `${w.name || 'Lager'}: ${formatStock(w.stock ?? 0)}`)
|
||||
.join(' • ')
|
||||
.map((w) => `${w.name || 'Lager'}: ${formatStock(w.stock ?? 0)}`)
|
||||
.join(' • ')
|
||||
: null;
|
||||
|
||||
const eans = line.ean
|
||||
@@ -791,11 +791,7 @@ export default class BookDeliveryDialog extends PureComponent {
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
{isFullyBooked ? (
|
||||
<Alert severity="success" icon={<CheckCircleOutlineOutlinedIcon />}>
|
||||
Alle Positionen dieser Lieferung sind bereits vollständig im Ledger verbucht.
|
||||
</Alert>
|
||||
) : isWarehouseMissing ? (
|
||||
{isFullyBooked ? null : isWarehouseMissing ? (
|
||||
<Alert severity="warning">
|
||||
Bitte wählen Sie ein <strong>Ziellager</strong> aus, um die lagergeführten Artikel zu buchen.
|
||||
</Alert>
|
||||
|
||||
Reference in New Issue
Block a user