Feature: Added product Stock Keeping Units to prevent duplicate products. A lot of refactoring because of this.
Removed: Reset Stock as it was never used and don't think it is even needed with this new batch system. Fix: Incentive update was not working
This commit is contained in:
+2
-4
@@ -119,9 +119,7 @@ export class RateContractDetailComponent implements OnInit, AfterViewInit {
|
||||
if (this.product === null || price <= 0) {
|
||||
return;
|
||||
}
|
||||
const oldFiltered = this.item.items.filter(
|
||||
(x) => x.product.id === (this.product as Product).id,
|
||||
);
|
||||
const oldFiltered = this.item.items.filter((x) => x.sku.id === (this.product as Product).id);
|
||||
if (oldFiltered.length) {
|
||||
this.toaster.show('Danger', 'Product already added');
|
||||
return;
|
||||
@@ -129,7 +127,7 @@ export class RateContractDetailComponent implements OnInit, AfterViewInit {
|
||||
this.item.items.push(
|
||||
new RateContractItem({
|
||||
price,
|
||||
product: this.product,
|
||||
sku: this.product,
|
||||
}),
|
||||
);
|
||||
this.resetAddRow();
|
||||
|
||||
Reference in New Issue
Block a user