Fix: Rate contract update.
This commit is contained in:
@ -108,6 +108,7 @@ def update_items(rate_contract: RateContract, items: list[RateContractItemSchema
|
|||||||
else:
|
else:
|
||||||
db.delete(item)
|
db.delete(item)
|
||||||
rate_contract.items.remove(item)
|
rate_contract.items.remove(item)
|
||||||
|
db.flush()
|
||||||
add_items(rate_contract, items, db)
|
add_items(rate_contract, items, db)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
[displayWith]="displayFn"
|
[displayWith]="displayFn"
|
||||||
(optionSelected)="productSelected($event)"
|
(optionSelected)="productSelected($event)"
|
||||||
>
|
>
|
||||||
@for (product of products | async; track product) {
|
@for (product of products | async; track product.id) {
|
||||||
<mat-option [value]="product">{{ product.name }}</mat-option>
|
<mat-option [value]="product">{{ product.name }}</mat-option>
|
||||||
}
|
}
|
||||||
</mat-autocomplete>
|
</mat-autocomplete>
|
||||||
|
|||||||
@ -137,6 +137,7 @@ export class RateContractDetailComponent implements OnInit, AfterViewInit {
|
|||||||
},
|
},
|
||||||
narration: this.item.narration,
|
narration: this.item.narration,
|
||||||
});
|
});
|
||||||
|
this.account = this.item.vendor || null;
|
||||||
this.dataSource = new RateContractDetailDatasource(this.itemsObservable);
|
this.dataSource = new RateContractDetailDatasource(this.itemsObservable);
|
||||||
this.updateView();
|
this.updateView();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user