Chore: Reformatted everthing
Fix: Product ledger was not totalling. This is because for some reason, pydantic was sending the data as string when the field was nullable
This commit is contained in:
@@ -217,10 +217,7 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
updateView() {
|
||||
this.inventoryObservable.next(this.voucher.inventories);
|
||||
const amount = round(
|
||||
Math.abs(this.voucher.inventories.map((x) => x.amount).reduce((p, c) => p + c, 0)),
|
||||
2,
|
||||
);
|
||||
const amount = round(Math.abs(this.voucher.inventories.map((x) => x.amount).reduce((p, c) => p + c, 0)), 2);
|
||||
this.form.controls.amount.setValue(amount);
|
||||
}
|
||||
|
||||
@@ -261,10 +258,7 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (this.voucher.posted && this.auth.allowed('edit-posted-vouchers')) {
|
||||
return true;
|
||||
}
|
||||
return (
|
||||
this.voucher.user.id === (this.auth.user as User).id ||
|
||||
this.auth.allowed("edit-other-user's-vouchers")
|
||||
);
|
||||
return this.voucher.user.id === (this.auth.user as User).id || this.auth.allowed("edit-other-user's-vouchers");
|
||||
}
|
||||
|
||||
save() {
|
||||
|
||||
Reference in New Issue
Block a user