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:
2023-08-04 21:00:26 +05:30
parent af27bf74ef
commit ac868257b7
194 changed files with 513 additions and 1580 deletions
+2 -8
View File
@@ -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() {