This commit is contained in:
seb
2026-10-17 00:53:01 +02:00
parent b3a81efe46
commit 0b0ffb2203
3 changed files with 113 additions and 38 deletions

View File

@@ -511,7 +511,7 @@ class ManifestHeader extends PureComponent {
Wiederherstellen
</Button>
)}
{docId != null && kind === 'delivery' && onOpenBookDialog && ledgerSummary?.hasTrackStock && (
{docId != null && kind === 'delivery' && onOpenBookDialog && Boolean(ledgerSummary && (ledgerSummary.totalPositions > 0 || ledgerSummary.lines?.length > 0 || ledgerSummary.hasTrackStock)) && (
<Button
variant={ledgerSummary?.status === 'booked' ? 'outlined' : 'contained'}
color={
@@ -535,13 +535,17 @@ class ManifestHeader extends PureComponent {
fontWeight: 700,
fontSize: '0.8125rem',
whiteSpace: 'nowrap',
...(ledgerSummary?.status !== 'booked' && {
color: '#ffffff',
'& .MuiButton-startIcon': { color: '#ffffff' },
}),
}}
>
{ledgerSummary?.status === 'booked'
? 'Lager gebucht'
? 'Vollständig gebucht'
: ledgerSummary?.status === 'partial'
? 'Rest einbuchen'
: 'Ins Lager buchen'}
? 'Rest verbuchen'
: 'Lieferung verbuchen'}
</Button>
)}
{kind === 'quote' && docId != null && onCreateOrder && (