mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Compare commits
1 Commits
feature/49
...
fix/4534-P
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16b047f2da |
@@ -152,10 +152,7 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
name: fb.control(item.product?.name),
|
||||
ean: fb.control(item.product?.ean, [Validators.required]),
|
||||
quantity: fb.control({ value: item.quantity + ' x', disabled: true }),
|
||||
price: fb.control(item.price ? String(item.price).replace('.', ',') : '', [
|
||||
Validators.required,
|
||||
Validators.pattern(/^\d+([\,]\d{1,2})?$/),
|
||||
]),
|
||||
price: fb.control(this.formatPrice(item?.price), [Validators.required, Validators.pattern(/^\d+([\,]\d{1,2})?$/)]),
|
||||
currency: fb.control(item.currency),
|
||||
targetBranch: fb.control({ value: item.targetBranch, disabled: true }),
|
||||
supplier: fb.control({ value: item.supplier, disabled: true }),
|
||||
@@ -208,6 +205,15 @@ export class SharedGoodsInOutOrderEditComponent implements OnChanges, OnDestroy
|
||||
return this.omsService.getOrderSource(+orderId).toPromise();
|
||||
}
|
||||
|
||||
formatPrice(price: number) {
|
||||
if (!price) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const priceWithTwoDecimalPlaces = price.toFixed(2);
|
||||
return String(priceWithTwoDecimalPlaces).replace('.', ',');
|
||||
}
|
||||
|
||||
changeEstimatedDeliveryDate(date: Date, item: OrderItemListItemDTO) {
|
||||
if (!date) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user