Merged in bugfix/HIMA-828-bod-change-empty (pull request #917)

HIMA-828 BoD change in cart has no option (e.g. 9781426729621) adjustment
This commit is contained in:
Aleksandras Mikuta
2020-01-28 15:32:46 +00:00
committed by Adrian Toczydłowski

View File

@@ -29,6 +29,7 @@ import { BranchService } from '../../../../core/services/branch.service';
import { CheckoutService } from 'apps/sales/src/app/core/services/checkout.service';
import { SearchDropdownComponent } from '@libs/ui/lib/search-dropdown';
import { ItemDTO } from 'swagger';
import { allowedAvailabilityStatusCodes } from '../../../../core/utils/product.util';
export interface ProcessAvailibilityMapper {
branchId: number;
@@ -94,7 +95,8 @@ export class ChangeOrderTypeComponent implements OnInit, OnDestroy {
get storeAvailable() {
if (
this.availability.filter(
t => t.type === CheckoutType.store && (t.status === 1024 || (t.av && t.av.ssc === '830' && t.av.supplier === 'G'))
t => t.type === CheckoutType.store &&
(allowedAvailabilityStatusCodes(t.status) || (t.av && t.av.ssc === '830' && t.av.supplier === 'G'))
).length > 0
) {
return of(true);