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
@@ -29,10 +29,7 @@
<mat-datepicker #date></mat-datepicker>
</mat-form-field>
</div>
<div
formGroupName="addRow"
class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col"
>
<div formGroupName="addRow" class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
<mat-form-field class="flex-auto mr-5 basis-1/6">
<mat-select formControlName="debit">
<mat-option [value]="1">Dr</mat-option>
@@ -50,8 +47,8 @@
autocomplete="off"
/>
<mat-hint *ngIf="accBal">
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> /
Final balance: <strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
Balance as on Date: <strong>{{ accBal.date | currency: 'INR' | accounting }}</strong> / Final balance:
<strong>{{ accBal.total | currency: 'INR' | accounting }}</strong>
</mat-hint>
</mat-form-field>
<mat-autocomplete
@@ -60,9 +57,7 @@
[displayWith]="displayFn"
(optionSelected)="accountSelected($event)"
>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{
account.name
}}</mat-option>
<mat-option *ngFor="let account of accounts | async" [value]="account">{{ account.name }}</mat-option>
</mat-autocomplete>
<mat-form-field class="flex-auto mr-5 basis-1/6">
<mat-label>Amount</mat-label>
@@ -70,9 +65,7 @@
<span matTextPrefix>&nbsp;</span>
</mat-form-field>
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-1/6">
Add
</button>
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-1/6">Add</button>
</div>
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
<!-- Debit Column -->
@@ -90,9 +83,7 @@
<!-- Amount Column -->
<ng-container matColumnDef="amount">
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{
row.amount | currency: 'INR'
}}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
</ng-container>
<!-- Action Column -->
@@ -116,11 +107,7 @@
<textarea matInput matAutosizeMinRows="5" formControlName="narration"></textarea>
</mat-form-field>
<div class="flex flex-row justify-center items-stretch">
<div
class="img-container"
class="flex-auto mr-5 basis-1/5"
*ngFor="let item of voucher.files"
>
<div class="img-container" class="flex-auto mr-5 basis-1/5" *ngFor="let item of voucher.files">
<img [src]="item.thumbnail" (click)="zoomImage(item)" />
<button mat-icon-button class="overlay" (click)="deleteImage(item)">
<mat-icon>delete</mat-icon>
@@ -157,13 +144,7 @@
>
{{ voucher.posted ? 'Posted' : 'Post' }}
</button>
<button
mat-raised-button
color="warn"
(click)="confirmDelete()"
*ngIf="voucher.id"
[disabled]="!canSave()"
>
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="voucher.id" [disabled]="!canSave()">
Delete
</button>
<span class="fill-remaining-space"></span>