mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#1788 keine Rücklage Filialentnahme ohne Bestand
This commit is contained in:
@@ -62,11 +62,12 @@ export class DomainAvailabilityService {
|
||||
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
|
||||
map(([response, supplier, branch]) => {
|
||||
const stockInfo = response.result.find((si) => si.branchId === branch.id);
|
||||
const inStock = stockInfo?.inStock ?? 0;
|
||||
const availability: AvailabilityDTO = {
|
||||
availabilityType: quantity > stockInfo?.inStock ? 1 : 1024, // 1024 (=Available)
|
||||
inStock: stockInfo?.inStock,
|
||||
ssc: quantity > stockInfo?.inStock ? '' : '999',
|
||||
sscText: quantity > stockInfo?.inStock ? '' : 'Filialentnahme',
|
||||
availabilityType: quantity <= inStock ? 1024 : 1, // 1024 (=Available)
|
||||
inStock: inStock,
|
||||
ssc: quantity <= inStock ? '999' : '',
|
||||
sscText: quantity <= inStock ? 'Filialentnahme' : '',
|
||||
price: item?.price,
|
||||
supplier: { id: supplier?.id },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user