mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1644: #4364 Check if Order is Kulturpass Order if no customer is available
#4364 Check if Order is Kulturpass Order if no customer is available
This commit is contained in:
committed by
Lorenz Hilpert
parent
1d25fec9ff
commit
4fd10bc8a4
@@ -469,9 +469,11 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
|
||||
}
|
||||
|
||||
const customer = res.result[0];
|
||||
const isKulturpass = this.order?.features?.orderSource === 'KulturPass';
|
||||
|
||||
// check if the customer is the same as the order's buyer
|
||||
if (customer.customerNumber !== this.order.buyer.buyerNumber) {
|
||||
// also check if the order is a KulturPass order, then there may be no customer
|
||||
if (!isKulturpass && customer?.customerNumber !== this.order.buyer.buyerNumber) {
|
||||
this._modal.error('Fehler beim Laden des Kunden', new Error('Der Kunde ist nicht der Bestellung zugeordnet.'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user