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:
@@ -38,9 +38,7 @@ export class IssueDialogComponent implements OnInit {
|
||||
this.batches = this.form.controls.batch.valueChanges.pipe(
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
switchMap((x) =>
|
||||
x === null ? observableOf([]) : this.batchSer.autocomplete(this.data.date, x),
|
||||
),
|
||||
switchMap((x) => (x === null ? observableOf([]) : this.batchSer.autocomplete(this.data.date, x))),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,8 +66,7 @@ export class IssueDialogComponent implements OnInit {
|
||||
this.data.inventory.rate = this.batch.rate;
|
||||
this.data.inventory.tax = this.batch.tax;
|
||||
this.data.inventory.discount = this.batch.discount;
|
||||
this.data.inventory.amount =
|
||||
quantity * this.batch.rate * (1 + this.batch.tax) * (1 - this.batch.discount);
|
||||
this.data.inventory.amount = quantity * this.batch.rate * (1 + this.batch.tax) * (1 - this.batch.discount);
|
||||
this.dialogRef.close(this.data.inventory);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user