Chore: Upgraded to angular 15
Chore: Moved from angular/flex-layout to Tailwind Chore: Upgrade completed
This commit is contained in:
1 parent
4a85a9133e
commit
129664e564
84 files changed
+1011
-982
No files matched your search
@@ -33,7 +33,7 @@ def report_blank(
|
||||
startDate=get_start_date(request.session),
|
||||
finishDate=get_finish_date(request.session),
|
||||
body=[],
|
||||
footer=None,
|
||||
footer=schemas.ProfitLossItem(group="", total=0, order=0),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ def report_blank(
|
||||
startDate=get_start_date(request.session),
|
||||
finishDate=get_finish_date(request.session),
|
||||
body=[],
|
||||
footer=None,
|
||||
footer=schemas.PurchasesItem(name="Total", quantity=0, rate=0, url=[], amount=0),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class ProfitLoss(BaseModel):
|
||||
start_date: date
|
||||
finish_date: date
|
||||
body: List[ProfitLossItem]
|
||||
footer: Optional[ProfitLossItem]
|
||||
footer: ProfitLossItem
|
||||
|
||||
class Config:
|
||||
anystr_strip_whitespace = True
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from datetime import date, datetime
|
||||
from decimal import Decimal
|
||||
from typing import List, Optional, Union
|
||||
from typing import List, Union
|
||||
|
||||
from pydantic import validator
|
||||
from pydantic.main import BaseModel
|
||||
@@ -24,7 +24,7 @@ class Purchases(BaseModel):
|
||||
start_date: date
|
||||
finish_date: date
|
||||
body: List[PurchasesItem]
|
||||
footer: Optional[PurchasesItem]
|
||||
footer: PurchasesItem
|
||||
|
||||
class Config:
|
||||
anystr_strip_whitespace = True
|
||||
|
||||
@@ -32,6 +32,18 @@ class RateContractBlank(BaseModel):
|
||||
return value
|
||||
return datetime.strptime(value, "%d-%b-%Y").date()
|
||||
|
||||
@validator("valid_from", pre=True)
|
||||
def parse_valid_from(cls, value: Union[date, str]) -> date:
|
||||
if isinstance(value, date):
|
||||
return value
|
||||
return datetime.strptime(value, "%d-%b-%Y").date()
|
||||
|
||||
@validator("valid_till", pre=True)
|
||||
def parse_valid_till(cls, value: Union[date, str]) -> date:
|
||||
if isinstance(value, date):
|
||||
return value
|
||||
return datetime.strptime(value, "%d-%b-%Y").date()
|
||||
|
||||
|
||||
class RateContractIn(RateContractBlank):
|
||||
vendor: AccountLink
|
||||
|
||||
@@ -43,7 +43,7 @@ class Voucher(VoucherIn):
|
||||
last_edit_date: Optional[datetime]
|
||||
user: Optional[UserLink]
|
||||
posted: Optional[bool]
|
||||
poster_id: Optional[uuid.UUID]
|
||||
poster: Optional[str]
|
||||
journals: List[Journal]
|
||||
inventories: List[Inventory]
|
||||
vendor: Optional[AccountLink]
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
||||
@@ -121,5 +121,13 @@
|
||||
"@angular-eslint/schematics"
|
||||
],
|
||||
"analytics": "0309c8d2-99a2-4dd3-b63e-9a0a43611460"
|
||||
},
|
||||
"schematics": {
|
||||
"@angular-eslint/schematics:application": {
|
||||
"setParserOptionsProject": true
|
||||
},
|
||||
"@angular-eslint/schematics:library": {
|
||||
"setParserOptionsProject": true
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
-28
@@ -14,44 +14,44 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^14.2.10",
|
||||
"@angular/cdk": "^14.2.7",
|
||||
"@angular/common": "^14.2.10",
|
||||
"@angular/compiler": "^14.2.10",
|
||||
"@angular/core": "^14.2.10",
|
||||
"@angular/forms": "^14.2.10",
|
||||
"@angular/material": "^14.2.7",
|
||||
"@angular/material-moment-adapter": "^14.2.7",
|
||||
"@angular/platform-browser": "^14.2.10",
|
||||
"@angular/platform-browser-dynamic": "^14.2.10",
|
||||
"@angular/router": "^14.2.10",
|
||||
"@angular/animations": "^15.0.3",
|
||||
"@angular/cdk": "^15.0.2",
|
||||
"@angular/common": "^15.0.3",
|
||||
"@angular/compiler": "^15.0.3",
|
||||
"@angular/core": "^15.0.3",
|
||||
"@angular/forms": "^15.0.3",
|
||||
"@angular/material": "^15.0.2",
|
||||
"@angular/material-moment-adapter": "^15.0.2",
|
||||
"@angular/platform-browser": "^15.0.3",
|
||||
"@angular/platform-browser-dynamic": "^15.0.3",
|
||||
"@angular/router": "^15.0.3",
|
||||
"@ngx-loading-bar/core": "^6.0.2",
|
||||
"@ngx-loading-bar/http-client": "^6.0.2",
|
||||
"@ngx-loading-bar/router": "^6.0.2",
|
||||
"@types/mousetrap": "1.6.11",
|
||||
"angular2-hotkeys": "^13.1.0",
|
||||
"mathjs": "^11.3.3",
|
||||
"mathjs": "^11.5.0",
|
||||
"moment": "^2.29.4",
|
||||
"rxjs": "^6.6.7",
|
||||
"tslib": "^2.1.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^14.2.9",
|
||||
"@angular-eslint/builder": "^14.2.0",
|
||||
"@angular-eslint/eslint-plugin": "^14.2.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^14.2.0",
|
||||
"@angular-eslint/schematics": "^14.2.0",
|
||||
"@angular-eslint/template-parser": "^14.2.0",
|
||||
"@angular/cli": "^14.2.9",
|
||||
"@angular/compiler-cli": "^14.2.10",
|
||||
"@angular/language-service": "^14.2.10",
|
||||
"@angular-devkit/build-angular": "^15.0.3",
|
||||
"@angular-eslint/builder": "^15.1.0",
|
||||
"@angular-eslint/eslint-plugin": "^15.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^15.1.0",
|
||||
"@angular-eslint/schematics": "^15.1.0",
|
||||
"@angular-eslint/template-parser": "^15.1.0",
|
||||
"@angular/cli": "^15.0.3",
|
||||
"@angular/compiler-cli": "^15.0.3",
|
||||
"@angular/language-service": "^15.0.3",
|
||||
"@types/jasmine": "~4.3.0",
|
||||
"@types/node": "^18.11.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.43.0",
|
||||
"@types/node": "^18.11.13",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
||||
"@typescript-eslint/parser": "^5.46.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"husky": "^8.0.2",
|
||||
@@ -62,13 +62,13 @@
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"lint-staged": "^13.1.0",
|
||||
"postcss": "^8.4.19",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.1",
|
||||
"standard-version": "^9.5.0",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "~4.6.4"
|
||||
"typescript": "~4.8.4"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Account</mat-card-title>
|
||||
<mat-icon
|
||||
@@ -11,53 +11,53 @@
|
||||
{{ item.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Code</mat-label>
|
||||
<input matInput placeholder="Code" formControlName="code" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Account Type</mat-label>
|
||||
<mat-select placeholder="Account Type" formControlName="type">
|
||||
<mat-option *ngFor="let at of accountTypes" [value]="at.id">
|
||||
{{ at.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-checkbox formControlName="isActive" class="flex-auto mr-5">Is Active?</mat-checkbox>
|
||||
<mat-checkbox formControlName="isReconcilable" class="flex-auto"
|
||||
>Is Reconcilable?</mat-checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Cost Centre</mat-label>
|
||||
<mat-select placeholder="Cost Centre" formControlName="costCentre">
|
||||
<mat-option *ngFor="let cs of costCentres" [value]="cs.id">
|
||||
{{ cs.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">
|
||||
Delete
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Code</mat-label>
|
||||
<input matInput placeholder="Code" formControlName="code" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Account Type</mat-label>
|
||||
<mat-select placeholder="Account Type" formControlName="type">
|
||||
<mat-option *ngFor="let at of accountTypes" [value]="at.id">
|
||||
{{ at.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-checkbox formControlName="isActive" class="flex-auto mr-5">Is Active?</mat-checkbox>
|
||||
<mat-checkbox formControlName="isReconcilable" class="flex-auto"
|
||||
>Is Reconcilable?</mat-checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Cost Centre</mat-label>
|
||||
<mat-select placeholder="Cost Centre" formControlName="costCentre">
|
||||
<mat-option *ngFor="let cs of costCentres" [value]="cs.id">
|
||||
{{ cs.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">
|
||||
Delete
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Accounts</mat-card-title>
|
||||
<a mat-button [routerLink]="['/accounts', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Accounts</mat-card-title>
|
||||
<a mat-button [routerLink]="['/accounts', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
|
||||
@@ -204,7 +204,6 @@ const appRoutes: Routes = [
|
||||
CommonModule,
|
||||
RouterModule.forRoot(appRoutes, {
|
||||
onSameUrlNavigation: 'reload',
|
||||
relativeLinkResolution: 'legacy',
|
||||
}),
|
||||
],
|
||||
exports: [RouterModule],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Attendance</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -64,19 +64,21 @@
|
||||
<mat-cell *matCellDef="let row; let i = index" class="no-bg">
|
||||
{{ row.prints }}
|
||||
<mat-icon
|
||||
class="no-bg"
|
||||
*ngIf="!form.controls.attendances.controls[i].controls.attendanceType.pristine"
|
||||
>new_releases</mat-icon
|
||||
>
|
||||
<mat-chip-list class="no-bg">
|
||||
<mat-chip
|
||||
<mat-chip-set class="no-bg">
|
||||
<mat-chip-option
|
||||
*ngIf="row.hoursWorked.length"
|
||||
class="no-bg"
|
||||
[selected]="true"
|
||||
selected
|
||||
selectable="false"
|
||||
[color]="row.fullDay === true ? 'primary' : 'warn'"
|
||||
>
|
||||
{{ row.hoursWorked }}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</mat-chip-option>
|
||||
</mat-chip-set>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Login</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Balance Sheet</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -39,10 +39,10 @@
|
||||
<ng-container matColumnDef="subAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.subAmount | currency: 'INR' | clear
|
||||
row.subAmount | currency : 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right"
|
||||
>{{ info.footer?.subAmount | currency: 'INR' | clear }}
|
||||
>{{ info.footer?.subAmount | currency : 'INR' | clear }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
<ng-container matColumnDef="total">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency: 'INR' | clear
|
||||
row.amount | currency : 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right"
|
||||
>{{ info.footer?.amount | currency: 'INR' | clear }}
|
||||
>{{ info.footer?.amount | currency : 'INR' | clear }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>BatchReport</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Batch Integrity</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Batch Column -->
|
||||
<ng-container matColumnDef="batch">
|
||||
<mat-header-cell *matHeaderCellDef>Batch</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">
|
||||
{{ row.product }} dated {{ row.date }} @ {{ row.price | currency: 'INR' }} is showing
|
||||
{{ row.product }} dated {{ row.date }} @ {{ row.price | currency : 'INR' }} is showing
|
||||
{{ row.showing }} instead of {{ row.actual }}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
@@ -21,7 +21,7 @@
|
||||
<li *ngFor="let detail of row.details">
|
||||
<a [routerLink]="detail.url">{{ detail.type }}</a> on {{ detail.date }} of
|
||||
{{ detail.quantity }} @
|
||||
{{ detail.price | currency: 'INR' }}
|
||||
{{ detail.price | currency : 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Cash Flow</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -51,7 +51,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency: 'INR' | clear
|
||||
row.amount | currency : 'INR' | clear
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card appearance="outlined" class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Client</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Clients</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Closing Stock</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Closing Stock</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -57,7 +59,7 @@
|
||||
>Closing Stock</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right middle">{{
|
||||
row.quantity | number: '0.2-2'
|
||||
row.quantity | number : '0.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -65,7 +67,7 @@
|
||||
<ng-container matColumnDef="physical">
|
||||
<mat-header-cell *matHeaderCellDef class="middle">Physical Stock</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" class="middle">
|
||||
<mat-form-field class="flex-auto max-w-[100%]">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Physical</mat-label>
|
||||
<input
|
||||
matInput
|
||||
@@ -82,7 +84,7 @@
|
||||
<ng-container matColumnDef="variance" class="middle">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Variance</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right middle">{{
|
||||
row.quantity - row.physical | number: '0.2-2'
|
||||
row.quantity - row.physical | number : '0.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -90,7 +92,7 @@
|
||||
<ng-container matColumnDef="department">
|
||||
<mat-header-cell *matHeaderCellDef class="middle">Department</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index" [formGroupName]="i" class="middle">
|
||||
<mat-form-field class="flex-auto max-w-[100%]">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Department</mat-label>
|
||||
<mat-select
|
||||
formControlName="costCentre"
|
||||
@@ -111,7 +113,7 @@
|
||||
>Amount</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.amount | currency: 'INR'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<mat-toolbar class="fixed-to-top">
|
||||
<span><a routerLink="/">HnG / TGB</a></span>
|
||||
<span class="mr-5"><a routerLink="/">HnG / TGB</a></span>
|
||||
<mat-menu #voucherMenu="matMenu">
|
||||
<a mat-menu-item routerLink="/journal">Journal</a>
|
||||
<a mat-menu-item routerLink="/purchase">Purchase</a>
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Cost Center</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
(keyup.enter)="save()"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="save()" color="primary">Save</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Cost Center</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
(keyup.enter)="save()"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="save()" color="primary">Save</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Cost Centers</mat-card-title>
|
||||
<a mat-button [routerLink]="['/cost-centres', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Cost Centers</mat-card-title>
|
||||
<a mat-button [routerLink]="['/cost-centres', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Name Column -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Daybook</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
<ng-container matColumnDef="debitAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debitAmount | currency: 'INR'
|
||||
row.debitAmount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<ng-container matColumnDef="creditAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.creditAmount | currency: 'INR'
|
||||
row.creditAmount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Employee Attendance</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -52,7 +52,7 @@
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -81,19 +81,21 @@
|
||||
<mat-cell *matCellDef="let row; let i = index" class="no-bg">
|
||||
{{ row.prints }}
|
||||
<mat-icon
|
||||
class="no-bg"
|
||||
*ngIf="!form.controls.attendances.controls[i].controls.attendanceType.pristine"
|
||||
>new_releases</mat-icon
|
||||
>
|
||||
<mat-chip-list class="no-bg">
|
||||
<mat-chip
|
||||
<mat-chip-set class="no-bg">
|
||||
<mat-chip-option
|
||||
*ngIf="row.hoursWorked.length"
|
||||
class="no-bg"
|
||||
[selected]="true"
|
||||
selected
|
||||
selectable="false"
|
||||
[color]="row.fullDay === true ? 'primary' : 'warn'"
|
||||
>
|
||||
{{ row.hoursWorked }}
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</mat-chip-option>
|
||||
</mat-chip-set>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Employee Benefits</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -91,7 +91,7 @@
|
||||
<ng-container matColumnDef="grossSalary">
|
||||
<mat-header-cell *matHeaderCellDef class="right">GrossSalary</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.grossSalary | currency: 'INR'
|
||||
row.grossSalary | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<ng-container matColumnDef="daysWorked">
|
||||
<mat-header-cell *matHeaderCellDef class="right">DaysWorked</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.daysWorked | number: '1.2-2'
|
||||
row.daysWorked | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<ng-container matColumnDef="esiEmployee">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Esi EE</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.esiEmployee | currency: 'INR'
|
||||
row.esiEmployee | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<ng-container matColumnDef="pfEmployee">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Pf EE</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.pfEmployee | currency: 'INR'
|
||||
row.pfEmployee | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<ng-container matColumnDef="esiEmployer">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Esi ER</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.esiEmployer | currency: 'INR'
|
||||
row.esiEmployer | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<ng-container matColumnDef="pfEmployer">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Pf ER</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.pfEmployer | currency: 'INR'
|
||||
row.pfEmployer | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Credit Salary">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<form [formGroup]="creditSalaryForm" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -36,7 +36,7 @@
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Download Attendance Record">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<form
|
||||
[formGroup]="attendanceRecordForm"
|
||||
@@ -86,7 +86,7 @@
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Upload Fingerprints">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<form
|
||||
[formGroup]="fingerprintForm"
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Employee</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="item.isStarred = !item.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="item.isStarred"
|
||||
>
|
||||
{{ item.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Employee</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="item.isStarred = !item.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="item.isStarred"
|
||||
>
|
||||
{{ item.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Employees</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/employees', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Employees</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/employees', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -51,13 +53,13 @@
|
||||
<!-- Salary Column -->
|
||||
<ng-container matColumnDef="salary">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Salary</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.salary | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.salary | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Points Column -->
|
||||
<ng-container matColumnDef="points">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Points</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.points | number: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.points | number : '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Department Column -->
|
||||
|
||||
@@ -6,12 +6,8 @@ import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import {
|
||||
DateAdapter,
|
||||
MAT_DATE_FORMATS,
|
||||
MAT_DATE_LOCALE,
|
||||
MatOptionModule,
|
||||
} from '@angular/material/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
import { MatOptionModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Entries</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="startDate"
|
||||
placeholder="Create / Last Edit Date From"
|
||||
formControlName="startDate"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="startDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="finishDate"
|
||||
placeholder="Create / Last Edit Date Till"
|
||||
formControlName="finishDate"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button (click)="refresh()" class="flex-auto basis-1/5">
|
||||
<mat-icon>refresh</mat-icon>Refresh
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-radio-group
|
||||
class="flex-auto basis-2/5 mr-5"
|
||||
formControlName="posted"
|
||||
(change)="togglePosted($event)"
|
||||
>
|
||||
<mat-radio-button class="my-margin" [value]="true"> Posted </mat-radio-button>
|
||||
<mat-radio-button class="my-margin" [value]="false"> Not Posted </mat-radio-button>
|
||||
<mat-radio-button class="my-margin" [value]="null"> All </mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<mat-checkbox
|
||||
class="flex-auto basis-2/5"
|
||||
formControlName="issue"
|
||||
class="my-margin"
|
||||
[checked]="issue"
|
||||
(change)="toggleIssue()"
|
||||
>
|
||||
Include Issue Entries
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="startDate"
|
||||
placeholder="Create / Last Edit Date From"
|
||||
formControlName="startDate"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="startDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="finishDate"
|
||||
placeholder="Create / Last Edit Date Till"
|
||||
formControlName="finishDate"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button (click)="refresh()" class="flex-auto basis-1/5">
|
||||
<mat-icon>refresh</mat-icon>Refresh
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-radio-group
|
||||
class="flex-auto basis-2/5 mr-5"
|
||||
formControlName="posted"
|
||||
(change)="togglePosted($event)"
|
||||
>
|
||||
<mat-radio-button class="my-margin" [value]="true"> Posted </mat-radio-button>
|
||||
<mat-radio-button class="my-margin" [value]="false"> Not Posted </mat-radio-button>
|
||||
<mat-radio-button class="my-margin" [value]="null"> All </mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<mat-checkbox
|
||||
class="flex-auto basis-2/5"
|
||||
formControlName="issue"
|
||||
class="my-margin"
|
||||
[checked]="issue"
|
||||
(change)="toggleIssue()"
|
||||
>
|
||||
Include Issue Entries
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</form>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Date Column -->
|
||||
<ng-container matColumnDef="date">
|
||||
@@ -96,7 +96,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>
|
||||
|
||||
<!-- User Column -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Incentives</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -19,9 +19,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
Total Incentive: <strong>{{ voucher.incentive | number: '1.2-2' }}</strong> Total Points:
|
||||
<strong>{{ totalPoints() | number: '1.2-2' }}</strong> Point Value:
|
||||
<strong>{{ pointValue() | number: '1.2-2' }}</strong>
|
||||
Total Incentive: <strong>{{ voucher.incentive | number : '1.2-2' }}</strong> Total Points:
|
||||
<strong>{{ totalPoints() | number : '1.2-2' }}</strong> Point Value:
|
||||
<strong>{{ pointValue() | number : '1.2-2' }}</strong>
|
||||
</div>
|
||||
<mat-table #table [dataSource]="dataSource" formArrayName="incentives">
|
||||
<!-- Name Column -->
|
||||
@@ -46,7 +46,7 @@
|
||||
<ng-container matColumnDef="daysWorked">
|
||||
<mat-header-cell *matHeaderCellDef class="right">DaysWorked</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.daysWorked | number: '1.2-2'
|
||||
row.daysWorked | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -54,14 +54,8 @@
|
||||
<ng-container matColumnDef="points">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Service Points</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row; let i = index" class="center" [formGroupName]="i">
|
||||
<mat-form-field class="flex-auto max-w-[80%]">
|
||||
<button
|
||||
mat-stroked-button
|
||||
mat-icon-button
|
||||
color="warn"
|
||||
matPrefix
|
||||
(click)="less(row, i)"
|
||||
>
|
||||
<mat-form-field class="flex-auto">
|
||||
<button mat-icon-button color="warn" matPrefix (click)="less(row, i)">
|
||||
<mat-icon>remove</mat-icon>
|
||||
</button>
|
||||
<input
|
||||
@@ -69,15 +63,9 @@
|
||||
formControlName="points"
|
||||
autocomplete="off"
|
||||
(change)="change(row, i)"
|
||||
class="flex-auto max-w-[80%]"
|
||||
class="flex-auto"
|
||||
/>
|
||||
<button
|
||||
mat-stroked-button
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
matSuffix
|
||||
(click)="more(row, i)"
|
||||
>
|
||||
<button mat-icon-button color="primary" matSuffix (click)="more(row, i)">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
</mat-form-field>
|
||||
@@ -88,7 +76,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
amount(row) | currency: 'INR'
|
||||
amount(row) | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,6 +31,8 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Issue</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -75,12 +75,7 @@
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="addRow()"
|
||||
class="flex-auto basis-2/5 mr-5"
|
||||
>
|
||||
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-2/5">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
@@ -101,21 +96,21 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- 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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -147,10 +142,10 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button mat-raised-button color="warn" (click)="newVoucher()" *ngIf="voucher.id">
|
||||
<button mat-raised-button color="warn" (click)="newVoucher()" *ngIf="voucher.id" class="mr-5">
|
||||
New Entry
|
||||
</button>
|
||||
<button
|
||||
@@ -162,13 +157,14 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
<mat-card-title>Other issues for the day</mat-card-title>
|
||||
<mat-card-footer>
|
||||
<mat-table #table [dataSource]="gridDataSource" matSort aria-label="Elements">
|
||||
@@ -187,7 +183,7 @@
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="gridAmount">
|
||||
<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>
|
||||
|
||||
<!-- Load Column -->
|
||||
|
||||
@@ -19,8 +19,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
|
||||
@@ -48,6 +48,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,10 +31,6 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: gold;
|
||||
}
|
||||
@@ -42,3 +38,8 @@ mat-form-field.mat-form-field {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Journal</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Journal</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -48,8 +50,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
|
||||
@@ -95,7 +97,7 @@
|
||||
<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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -154,7 +156,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button
|
||||
@@ -162,6 +164,7 @@
|
||||
(click)="post()"
|
||||
*ngIf="voucher.id"
|
||||
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
|
||||
class="mr-5"
|
||||
>
|
||||
{{ voucher.posted ? 'Posted' : 'Post' }}
|
||||
</button>
|
||||
@@ -174,11 +177,12 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
</mat-card>
|
||||
@@ -1,10 +1,12 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Ledger</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Ledger</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -55,7 +57,7 @@
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -95,10 +97,10 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency: 'INR' | clear
|
||||
row.debit | currency : 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debit | currency: 'INR'
|
||||
debit | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -106,10 +108,10 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency: 'INR' | clear
|
||||
row.credit | currency : 'INR' | clear
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
credit | currency: 'INR'
|
||||
credit | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -117,10 +119,10 @@
|
||||
<ng-container matColumnDef="running">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.running | currency: 'INR' | accounting
|
||||
row.running | currency : 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
running | currency: 'INR' | accounting
|
||||
running | currency : 'INR' | accounting
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Net Transactions</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency: 'INR' | accounting
|
||||
row.debit | currency : 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency: 'INR' | accounting
|
||||
row.credit | currency : 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Non Contract Purchases</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Date Column -->
|
||||
@@ -28,7 +28,7 @@
|
||||
<ng-container matColumnDef="contractPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Contract</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.contractPrice | currency: 'INR'
|
||||
row.contractPrice | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<ng-container matColumnDef="purchasePrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Purchase</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.purchasePrice | currency: 'INR'
|
||||
row.purchasePrice | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -13,8 +13,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
|
||||
@@ -42,6 +42,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,10 +31,6 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: gold;
|
||||
}
|
||||
@@ -42,3 +38,8 @@ mat-form-field.mat-form-field {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Payment</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Payment</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -55,8 +57,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
|
||||
@@ -96,7 +98,7 @@
|
||||
<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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -155,7 +157,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button
|
||||
@@ -163,6 +165,7 @@
|
||||
(click)="post()"
|
||||
*ngIf="voucher.id"
|
||||
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
|
||||
class="mr-5"
|
||||
>
|
||||
{{ voucher.posted ? 'Posted' : 'Post' }}
|
||||
</button>
|
||||
@@ -175,11 +178,12 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
</mat-card>
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Period</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -33,7 +33,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">
|
||||
Delete
|
||||
</button>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Periods</mat-card-title>
|
||||
<a mat-button [routerLink]="['/periods', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Periods</mat-card-title>
|
||||
<a mat-button [routerLink]="['/periods', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Valid From Column -->
|
||||
|
||||
@@ -6,12 +6,8 @@ import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import {
|
||||
DateAdapter,
|
||||
MAT_DATE_FORMATS,
|
||||
MAT_DATE_LOCALE,
|
||||
MatOptionModule,
|
||||
} from '@angular/material/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
import { MatOptionModule } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
+24
-26
@@ -1,26 +1,24 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Group</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
(keyup.enter)="save()"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="save()" color="primary">Save</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Group</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#nameElement
|
||||
placeholder="Name"
|
||||
formControlName="name"
|
||||
(keyup.enter)="save()"
|
||||
/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="save()" color="primary">Save</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Groups</mat-card-title>
|
||||
<a mat-button [routerLink]="['/product-groups', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Groups</mat-card-title>
|
||||
<a mat-button [routerLink]="['/product-groups', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Name Column -->
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Ledger</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product Ledger</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -55,7 +57,7 @@
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -97,10 +99,10 @@
|
||||
>Debit Quantity</mat-header-cell
|
||||
>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.debitQuantity | number: '1.2-2' }} {{ row.debitUnit }}</mat-cell
|
||||
>{{ row.debitQuantity | number : '1.2-2' }} {{ row.debitUnit }}</mat-cell
|
||||
>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debitQuantity | number: '1.2-2'
|
||||
debitQuantity | number : '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -108,10 +110,10 @@
|
||||
<ng-container matColumnDef="debitAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debitAmount | currency: 'INR'
|
||||
row.debitAmount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
debitAmount | currency: 'INR'
|
||||
debitAmount | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -119,10 +121,10 @@
|
||||
<ng-container matColumnDef="creditQuantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.creditQuantity | number: '1.2-2' }} {{ row.creditUnit }}</mat-cell
|
||||
>{{ row.creditQuantity | number : '1.2-2' }} {{ row.creditUnit }}</mat-cell
|
||||
>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
creditQuantity | number: '1.2-2'
|
||||
creditQuantity | number : '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -130,10 +132,10 @@
|
||||
<ng-container matColumnDef="creditAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.creditAmount | currency: 'INR'
|
||||
row.creditAmount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
creditAmount | currency: 'INR'
|
||||
creditAmount | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -141,10 +143,10 @@
|
||||
<ng-container matColumnDef="runningQuantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.runningQuantity | number: '1.2-2'
|
||||
row.runningQuantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
runningQuantity | number: '1.2-2'
|
||||
runningQuantity | number : '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -152,10 +154,10 @@
|
||||
<ng-container matColumnDef="runningAmount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Running</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.runningAmount | currency: 'INR'
|
||||
row.runningAmount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
runningAmount | currency: 'INR'
|
||||
runningAmount | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1 mat-dialog-title>Edit Journal Entry</h1>
|
||||
<h1 mat-dialog-title>Edit Product SKU</h1>
|
||||
<div mat-dialog-content>
|
||||
<form [formGroup]="form">
|
||||
<div
|
||||
@@ -33,6 +33,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -1,135 +1,131 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Product</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Code</mat-label>
|
||||
<input matInput placeholder="Code" formControlName="code" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto basis-4/5 mr-5">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-1/5">
|
||||
<mat-label>Fraction Units</mat-label>
|
||||
<input matInput placeholder="Fraction Units" formControlName="fractionUnits" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-checkbox formControlName="isPurchased" class="flex-auto mr-5"
|
||||
>Is Purchased?</mat-checkbox
|
||||
>
|
||||
<mat-checkbox formControlName="isSold" class="flex-auto mr-5">Is Sold?</mat-checkbox>
|
||||
<mat-checkbox formControlName="isActive" class="flex-auto">Is Active?</mat-checkbox>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Product Type</mat-label>
|
||||
<mat-select placeholder="Product Group" formControlName="productGroup">
|
||||
<mat-option *ngFor="let pg of productGroups" [value]="pg.id">
|
||||
{{ pg.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<h2>Stock Keeping Units</h2>
|
||||
<div
|
||||
formGroupName="addRow"
|
||||
class="flex flex-row flex-wrap justify-around content-start items-start sm:max-lg:flex-col"
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Product</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Code</mat-label>
|
||||
<input matInput placeholder="Code" formControlName="code" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto basis-4/5 mr-5">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #nameElement placeholder="Name" formControlName="name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-1/5">
|
||||
<mat-label>Fraction Units</mat-label>
|
||||
<input matInput placeholder="Fraction Units" formControlName="fractionUnits" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-checkbox formControlName="isPurchased" class="flex-auto mr-5"
|
||||
>Is Purchased?</mat-checkbox
|
||||
>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Units</mat-label>
|
||||
<input matInput placeholder="Units" formControlName="units" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Fraction</mat-label>
|
||||
<input matInput type="number" placeholder="Fraction" formControlName="fraction" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Yield</mat-label>
|
||||
<input matInput type="number" placeholder="Yield" formControlName="productYield" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="number"
|
||||
placeholder="{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}"
|
||||
formControlName="costPrice"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Sale Price</mat-label>
|
||||
<input matInput type="number" placeholder="Sale Price" formControlName="salePrice" />
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto">
|
||||
Add
|
||||
<mat-checkbox formControlName="isSold" class="flex-auto mr-5">Is Sold?</mat-checkbox>
|
||||
<mat-checkbox formControlName="isActive" class="flex-auto">Is Active?</mat-checkbox>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Product Type</mat-label>
|
||||
<mat-select placeholder="Product Group" formControlName="productGroup">
|
||||
<mat-option *ngFor="let pg of productGroups" [value]="pg.id">
|
||||
{{ pg.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<h2>Stock Keeping Units</h2>
|
||||
<div
|
||||
formGroupName="addRow"
|
||||
class="flex flex-row flex-wrap justify-around content-start items-start sm:max-lg:flex-col"
|
||||
>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Units</mat-label>
|
||||
<input matInput placeholder="Units" formControlName="units" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Fraction</mat-label>
|
||||
<input matInput type="number" placeholder="Fraction" formControlName="fraction" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Yield</mat-label>
|
||||
<input matInput type="number" placeholder="Yield" formControlName="productYield" />
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
type="number"
|
||||
placeholder="{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}"
|
||||
formControlName="costPrice"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<mat-label>Sale Price</mat-label>
|
||||
<input matInput type="number" placeholder="Sale Price" formControlName="salePrice" />
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
<mat-table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Units Column -->
|
||||
<ng-container matColumnDef="units">
|
||||
<mat-header-cell *matHeaderCellDef>Units</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.units }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Fraction Column -->
|
||||
<ng-container matColumnDef="fraction">
|
||||
<mat-header-cell *matHeaderCellDef>Fraction</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.fraction }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Yield Column -->
|
||||
<ng-container matColumnDef="yield">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Yield</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.productYield }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Cost Price Column -->
|
||||
<ng-container matColumnDef="costPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Cost Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.costPrice | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale Price Column -->
|
||||
<ng-container matColumnDef="salePrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Sale Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.salePrice | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="center">
|
||||
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<mat-table [dataSource]="dataSource" aria-label="Elements">
|
||||
<!-- Units Column -->
|
||||
<ng-container matColumnDef="units">
|
||||
<mat-header-cell *matHeaderCellDef>Units</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.units }}</mat-cell>
|
||||
</ng-container>
|
||||
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Fraction Column -->
|
||||
<ng-container matColumnDef="fraction">
|
||||
<mat-header-cell *matHeaderCellDef>Fraction</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.fraction }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Yield Column -->
|
||||
<ng-container matColumnDef="yield">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Yield</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.productYield }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Cost Price Column -->
|
||||
<ng-container matColumnDef="costPrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Cost Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.costPrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale Price Column -->
|
||||
<ng-container matColumnDef="salePrice">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Sale Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.salePrice | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="center">
|
||||
<button mat-icon-button tabindex="-1" (click)="editRow(row)">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">
|
||||
Delete
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="!!item.id">
|
||||
Delete
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@@ -1,14 +1,16 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Products</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/products', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Products</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<a mat-button [routerLink]="['/products', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -47,7 +49,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let sku of row.skus">
|
||||
{{ sku.costPrice | currency: 'INR' }}
|
||||
{{ sku.costPrice | currency : 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
@@ -59,7 +61,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let sku of row.skus">
|
||||
{{ sku.productYield | percent: '1.2-2' }}
|
||||
{{ sku.productYield | percent : '1.2-2' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Profit & Loss</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -52,18 +52,18 @@
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header 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>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.amount | currency: 'INR' }}
|
||||
{{ info.footer.amount | currency : 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Total Column -->
|
||||
<ng-container matColumnDef="total">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.total | currency: 'INR' }}
|
||||
{{ info.footer.total | currency : 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Purchase Entries</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -59,34 +59,34 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent: '1.2-2'
|
||||
row.discount | percent : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1 mat-dialog-title>Edit PurchaseReturn Entry</h1>
|
||||
<h1 mat-dialog-title>Edit Purchase Return Entry</h1>
|
||||
<div mat-dialog-content>
|
||||
<form [formGroup]="form">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -37,6 +37,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,10 +31,6 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: gold;
|
||||
}
|
||||
@@ -42,3 +38,8 @@ mat-form-field.mat-form-field {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Purchase Return</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Purchase Return</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -37,8 +39,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-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
@@ -109,27 +111,27 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent: '1.2-2'
|
||||
row.discount | percent : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -137,7 +139,7 @@
|
||||
<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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -196,7 +198,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button
|
||||
@@ -204,6 +206,7 @@
|
||||
(click)="post()"
|
||||
*ngIf="voucher.id"
|
||||
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
|
||||
class="mr-5"
|
||||
>
|
||||
{{ voucher.posted ? 'Posted' : 'Post' }}
|
||||
</button>
|
||||
@@ -216,11 +219,12 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
</mat-card>
|
||||
@@ -61,6 +61,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,10 +31,6 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: gold;
|
||||
}
|
||||
@@ -42,3 +38,9 @@ mat-form-field.mat-form-field {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Purchase</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Purchase</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -37,8 +39,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-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
@@ -133,27 +135,27 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Tax Column -->
|
||||
<ng-container matColumnDef="tax">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.tax | percent : '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Discount Column -->
|
||||
<ng-container matColumnDef="discount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.discount | percent: '1.2-2'
|
||||
row.discount | percent : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -161,7 +163,7 @@
|
||||
<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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -220,7 +222,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button
|
||||
@@ -228,6 +230,7 @@
|
||||
(click)="post()"
|
||||
*ngIf="voucher.id"
|
||||
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
|
||||
class="mr-5"
|
||||
>
|
||||
{{ voucher.posted ? 'Posted' : 'Post' }}
|
||||
</button>
|
||||
@@ -240,11 +243,12 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
</mat-card>
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Purchases</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -54,28 +54,28 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.quantity | number: '1.2-2' }}
|
||||
{{ info.footer.quantity | number : '1.2-2' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.rate | currency: 'INR' }}
|
||||
{{ info.footer.rate | currency : 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header 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>
|
||||
<mat-footer-cell *matFooterCellDef class="right">
|
||||
{{ info.footer.amount | currency: 'INR' }}
|
||||
{{ info.footer.amount | currency : 'INR' }}
|
||||
</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+146
-148
@@ -1,150 +1,148 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Rate Contract</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="date"
|
||||
placeholder="Date"
|
||||
formControlName="date"
|
||||
autocomplete="off"
|
||||
#dateElement
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
||||
<mat-datepicker #date></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-3/5">
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Account"
|
||||
#accountElement
|
||||
[matAutocomplete]="autoA"
|
||||
formControlName="account"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
autoActiveFirstOption
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="accountSelected($event)"
|
||||
>
|
||||
<mat-option *ngFor="let account of accounts | async" [value]="account">{{
|
||||
account.name
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="validFrom"
|
||||
placeholder="Valid From"
|
||||
formControlName="validFrom"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="validFrom"></mat-datepicker-toggle>
|
||||
<mat-datepicker #validFrom></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="validTill"
|
||||
placeholder="Valid Till"
|
||||
formControlName="validTill"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="validTill"></mat-datepicker-toggle>
|
||||
<mat-datepicker #validTill></mat-datepicker>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
formGroupName="addRow"
|
||||
class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col"
|
||||
>
|
||||
<mat-form-field class="flex-auto basis-3/5 mr-5">
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Product"
|
||||
#productElement
|
||||
[matAutocomplete]="autoP"
|
||||
formControlName="product"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-autocomplete
|
||||
#autoP="matAutocomplete"
|
||||
autoActiveFirstOption
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="productSelected($event)"
|
||||
>
|
||||
<mat-option *ngFor="let product of products | async" [value]="product">{{
|
||||
product.name
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-1/5 mr-5">
|
||||
<mat-label>Price</mat-label>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Price"
|
||||
formControlName="price"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-1/5">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Product Column -->
|
||||
<ng-container matColumnDef="product">
|
||||
<mat-header-cell *matHeaderCellDef>Product</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.sku.name }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Price Column -->
|
||||
<ng-container matColumnDef="price">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.price | currency: 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="center">
|
||||
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
||||
<mat-form-field>
|
||||
<mat-label>Narration</mat-label>
|
||||
<textarea
|
||||
<mat-card class="lg:max-w-[50%]">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Rate Contract</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto basis-2/5 mr-5">
|
||||
<input
|
||||
matInput
|
||||
matAutosizeMinRows="5"
|
||||
placeholder="Narration"
|
||||
formControlName="narration"
|
||||
></textarea>
|
||||
[matDatepicker]="date"
|
||||
placeholder="Date"
|
||||
formControlName="date"
|
||||
autocomplete="off"
|
||||
#dateElement
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
||||
<mat-datepicker #date></mat-datepicker>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
<mat-form-field class="flex-auto basis-3/5">
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Account"
|
||||
#accountElement
|
||||
[matAutocomplete]="autoA"
|
||||
formControlName="account"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-autocomplete
|
||||
#autoA="matAutocomplete"
|
||||
autoActiveFirstOption
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="accountSelected($event)"
|
||||
>
|
||||
<mat-option *ngFor="let account of accounts | async" [value]="account">{{
|
||||
account.name
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
<mat-form-field class="flex-auto mr-5">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="validFrom"
|
||||
placeholder="Valid From"
|
||||
formControlName="validFrom"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="validFrom"></mat-datepicker-toggle>
|
||||
<mat-datepicker #validFrom></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="validTill"
|
||||
placeholder="Valid Till"
|
||||
formControlName="validTill"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="validTill"></mat-datepicker-toggle>
|
||||
<mat-datepicker #validTill></mat-datepicker>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div
|
||||
formGroupName="addRow"
|
||||
class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col"
|
||||
>
|
||||
<mat-form-field class="flex-auto basis-3/5 mr-5">
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Product"
|
||||
#productElement
|
||||
[matAutocomplete]="autoP"
|
||||
formControlName="product"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<mat-autocomplete
|
||||
#autoP="matAutocomplete"
|
||||
autoActiveFirstOption
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="productSelected($event)"
|
||||
>
|
||||
<mat-option *ngFor="let product of products | async" [value]="product">{{
|
||||
product.name
|
||||
}}</mat-option>
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-auto basis-1/5 mr-5">
|
||||
<mat-label>Price</mat-label>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="Price"
|
||||
formControlName="price"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto basis-1/5">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Product Column -->
|
||||
<ng-container matColumnDef="product">
|
||||
<mat-header-cell *matHeaderCellDef>Product</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.sku.name }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Price Column -->
|
||||
<ng-container matColumnDef="price">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.price | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Action Column -->
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="center">
|
||||
<button mat-icon-button tabindex="-1" color="warn" (click)="deleteRow(row)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
||||
<mat-form-field>
|
||||
<mat-label>Narration</mat-label>
|
||||
<textarea
|
||||
matInput
|
||||
matAutosizeMinRows="5"
|
||||
placeholder="Narration"
|
||||
formControlName="narration"
|
||||
></textarea>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" class="mr-5">Save</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
+1
-1
@@ -100,7 +100,7 @@ export class RateContractDetailComponent implements OnInit, AfterViewInit {
|
||||
date: moment(this.item.date, 'DD-MMM-YYYY').toDate(),
|
||||
validFrom: moment(this.item.validFrom, 'DD-MMM-YYYY').toDate(),
|
||||
validTill: moment(this.item.validTill, 'DD-MMM-YYYY').toDate(),
|
||||
account: this.item.vendor.name,
|
||||
account: this.item.vendor?.name ?? '',
|
||||
addRow: {
|
||||
product: '',
|
||||
price: '',
|
||||
|
||||
@@ -65,7 +65,7 @@ export class RateContractListDatasource extends DataSource<RateContract> {
|
||||
const isAsc = sort.direction === 'asc';
|
||||
switch (sort.active) {
|
||||
case 'vendor':
|
||||
return compare(a.vendor.name, b.vendor.name, isAsc);
|
||||
return compare(a.vendor?.name ?? '', b.vendor?.name ?? '', isAsc);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+10
-8
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Rate Contracts</mat-card-title>
|
||||
<a mat-button [routerLink]="['/rate-contracts', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Rate Contracts</mat-card-title>
|
||||
<a mat-button [routerLink]="['/rate-contracts', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
||||
<!-- Vendor Column -->
|
||||
@@ -30,7 +32,7 @@
|
||||
<mat-cell *matCellDef="let row">
|
||||
<ul>
|
||||
<li *ngFor="let item of row.items">
|
||||
{{ item.sku.name }} @ {{ item.price | currency: 'INR' }}
|
||||
{{ item.sku.name }} @ {{ item.price | currency : 'INR' }}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-cell>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RateContractItem } from './rate-contract-item';
|
||||
export class RateContract {
|
||||
id: string | undefined;
|
||||
date: string;
|
||||
vendor: Account;
|
||||
vendor: Account | undefined;
|
||||
validFrom: string;
|
||||
validTill: string;
|
||||
narration: string;
|
||||
@@ -17,7 +17,6 @@ export class RateContract {
|
||||
|
||||
public constructor(init?: Partial<RateContract>) {
|
||||
this.date = '';
|
||||
this.vendor = new Account();
|
||||
this.validFrom = '';
|
||||
this.validTill = '';
|
||||
this.narration = '';
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Raw Material Cost</mat-card-title>
|
||||
<button mat-button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Raw Material Cost</mat-card-title>
|
||||
<button mat-icon-button *ngIf="dataSource.data.length" (click)="exportCsv()">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -32,7 +34,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -57,27 +59,27 @@
|
||||
<!-- Issue Column -->
|
||||
<ng-container matColumnDef="issue">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Issue</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.issue | currency: 'INR'
|
||||
info.footer?.issue | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale Column -->
|
||||
<ng-container matColumnDef="sale">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Sale</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.sale | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.sale | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.sale | currency: 'INR'
|
||||
info.footer?.sale | currency : 'INR'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rmc Column -->
|
||||
<ng-container matColumnDef="rmc">
|
||||
<mat-header-cell *matHeaderCellDef class="right">RMC</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rmc | percent: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.rmc | percent : '1.2-2' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef class="right">{{
|
||||
info.footer?.rmc | percent: '1.2-2'
|
||||
info.footer?.rmc | percent : '1.2-2'
|
||||
}}</mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -92,7 +94,7 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity | number: '1.2-2'
|
||||
row.quantity | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
@@ -100,14 +102,14 @@
|
||||
<!-- Net Column -->
|
||||
<ng-container matColumnDef="net">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Net</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.net | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.net | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Gross Column -->
|
||||
<ng-container matColumnDef="gross">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Gross</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.gross | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.gross | currency : 'INR' }}</mat-cell>
|
||||
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -13,8 +13,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
|
||||
@@ -42,6 +42,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button (click)="accept()" color="primary">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="accept()">Ok</button>
|
||||
</div>
|
||||
@@ -31,10 +31,6 @@
|
||||
top: 0;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.gold {
|
||||
color: gold;
|
||||
}
|
||||
@@ -42,3 +38,8 @@ mat-form-field.mat-form-field {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fill-remaining-space {
|
||||
/* This fills the remaining space, by using flexbox.
|
||||
Every toolbar row uses a flexbox row layout. */
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -1,15 +1,17 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Receipt</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Receipt</mat-card-title>
|
||||
<mat-icon
|
||||
matSuffix
|
||||
(click)="voucher.isStarred = !voucher.isStarred"
|
||||
class="pointer"
|
||||
[class.gold]="voucher.isStarred"
|
||||
>
|
||||
{{ voucher.isStarred ? 'star' : 'star_border' }}
|
||||
</mat-icon>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -55,8 +57,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
|
||||
@@ -96,7 +98,7 @@
|
||||
<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'
|
||||
row.amount | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -155,7 +157,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()">
|
||||
<button mat-raised-button color="primary" (click)="save()" [disabled]="!canSave()" class="mr-5">
|
||||
{{ voucher.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button
|
||||
@@ -163,6 +165,7 @@
|
||||
(click)="post()"
|
||||
*ngIf="voucher.id"
|
||||
[disabled]="voucher.posted || !auth.allowed('post-vouchers')"
|
||||
class="mr-5"
|
||||
>
|
||||
{{ voucher.posted ? 'Posted' : 'Post' }}
|
||||
</button>
|
||||
@@ -175,11 +178,12 @@
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<span *ngIf="voucher.id" class="flex">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ voucher.lastEditDate | localTime }}</strong
|
||||
> by <strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</span>
|
||||
</mat-card-actions>
|
||||
<mat-card-subtitle *ngIf="voucher.id">
|
||||
Created on <strong>{{ voucher.creationDate | localTime }}</strong> and Last Edited on
|
||||
<strong>{{ voucher.lastEditDate | localTime }}</strong> by
|
||||
<strong>{{ voucher.user.name }}</strong
|
||||
>. {{ voucher.poster ? 'Posted by ' + voucher.poster : '' }}
|
||||
</mat-card-subtitle>
|
||||
</mat-card>
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Recipe Detail</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
@@ -141,21 +141,23 @@
|
||||
<ng-container matColumnDef="quantity">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right"
|
||||
>{{ row.quantity | number: '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
|
||||
>{{ row.quantity | number : '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
|
||||
>
|
||||
</ng-container>
|
||||
|
||||
<!-- Rate Column -->
|
||||
<ng-container matColumnDef="rate">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.price | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Amount Column -->
|
||||
<ng-container matColumnDef="amount">
|
||||
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.quantity * row.price | currency: 'INR'
|
||||
row.quantity * row.price | currency : 'INR'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -175,7 +177,7 @@
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-raised-button (click)="save()" color="primary">
|
||||
<button mat-raised-button (click)="save()" color="primary" class="mr-5">
|
||||
{{ item.id ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button mat-raised-button color="warn" (click)="confirmDelete()" *ngIf="item.id">Delete</button>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Recipes</mat-card-title>
|
||||
<a mat-button [routerLink]="['/recipes', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Recipes</mat-card-title>
|
||||
<a mat-button [routerLink]="['/recipes', 'new']">
|
||||
<mat-icon>add_box</mat-icon>
|
||||
Add
|
||||
</a>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -43,20 +45,20 @@
|
||||
<!-- Sale Price Column -->
|
||||
<ng-container matColumnDef="salePrice">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Sale Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.salePrice | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.salePrice | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Cost Price Column -->
|
||||
<ng-container matColumnDef="costPrice">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Cost Price</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.costPrice | currency: 'INR' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row">{{ row.costPrice | currency : 'INR' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Cost Percentage Column -->
|
||||
<ng-container matColumnDef="costPercentage">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Cost %age</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{
|
||||
row.costPrice / row.salePrice | percent: '1.2-2'
|
||||
row.costPrice / row.salePrice | percent : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card appearance="outlined" class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Role</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Roles</mat-card-title>
|
||||
<a mat-button [routerLink]="['/roles', 'new']">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Lock Dates">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<form [formGroup]="lockInfoForm" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -190,7 +190,7 @@
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Rebase Data">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<form [formGroup]="rebaseDataForm" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -221,7 +221,7 @@
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
<mat-tab label="Maintenance Mode">
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<mat-card-subtitle *ngIf="maintenance.enabled">
|
||||
Maintenance mode is <strong>ENABLED</strong> by user
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
{{ data.content }}
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
||||
<button mat-button [mat-dialog-close]="true" color="warn">Ok</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial class="mr-5">
|
||||
Cancel
|
||||
</button>
|
||||
<button mat-raised-button color="primary" [mat-dialog-close]="true">Ok</button>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Stock Movement</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -29,7 +29,7 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
||||
<mat-datepicker #finishDate></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<button class="flex-auto basis-1/5" mat-raised-button color="primary" (click)="show()">
|
||||
<button mat-raised-button class="flex-auto basis-1/5" color="primary" (click)="show()">
|
||||
Show
|
||||
</button>
|
||||
</div>
|
||||
@@ -57,27 +57,31 @@
|
||||
<!-- Opening Column -->
|
||||
<ng-container matColumnDef="opening">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Opening</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.opening | number: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.opening | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Purchaase Column -->
|
||||
<ng-container matColumnDef="purchase">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Purchase</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.purchase | number: '1.2-2'
|
||||
row.purchase | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Issue Column -->
|
||||
<ng-container matColumnDef="issue">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Issue</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | number: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.issue | number : '1.2-2' }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- Closing Column -->
|
||||
<ng-container matColumnDef="closing">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Closing</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{ row.closing | number: '1.2-2' }}</mat-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.closing | number : '1.2-2'
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mat-card>
|
||||
<mat-card-title-group>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Trial Balance</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form" class="flex flex-col">
|
||||
<div class="flex flex-row justify-around content-start items-start sm:max-lg:flex-col">
|
||||
@@ -37,7 +37,7 @@
|
||||
<ng-container matColumnDef="debit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Debit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.debit | currency: 'INR' | accounting
|
||||
row.debit | currency : 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<ng-container matColumnDef="credit">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Credit</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="right">{{
|
||||
row.credit | currency: 'INR' | accounting
|
||||
row.credit | currency : 'INR' | accounting
|
||||
}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
||||
<mat-card class="flex-auto">
|
||||
<mat-card appearance="outlined" class="flex-auto">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>User</mat-card-title>
|
||||
</mat-card-title-group>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>Users</mat-card-title>
|
||||
<a mat-button [routerLink]="['/users', 'new']">
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Roboto, 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
a {
|
||||
color: rgb(0, 0, 238);
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -7,22 +7,7 @@ import {
|
||||
platformBrowserDynamicTesting,
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(
|
||||
path: string,
|
||||
deep?: boolean,
|
||||
filter?: RegExp,
|
||||
): {
|
||||
keys(): string[];
|
||||
<T>(id: string): T;
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
});
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
@@ -14,12 +14,13 @@
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2020",
|
||||
"target": "ES2022",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
],
|
||||
"useDefineForClassFields": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
|
||||
Reference in new issue
Block a user