Fix: Rate contract update.
This commit is contained in:
@ -108,6 +108,7 @@ def update_items(rate_contract: RateContract, items: list[RateContractItemSchema
|
||||
else:
|
||||
db.delete(item)
|
||||
rate_contract.items.remove(item)
|
||||
db.flush()
|
||||
add_items(rate_contract, items, db)
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
[displayWith]="displayFn"
|
||||
(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-autocomplete>
|
||||
|
||||
@ -137,6 +137,7 @@ export class RateContractDetailComponent implements OnInit, AfterViewInit {
|
||||
},
|
||||
narration: this.item.narration,
|
||||
});
|
||||
this.account = this.item.vendor || null;
|
||||
this.dataSource = new RateContractDetailDatasource(this.itemsObservable);
|
||||
this.updateView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user