Feature: Now a tax can be broken up into multiple components while bill printing.

This is especially for GST. The format for the tax name is
"Display name 1 (Ratio eg. 1/2) ; Display name 1 (Ratio eg. 1/2)"
eg.
"SGST on Food @ 2.5% (1/2) ; CGST on Food @ 2.5% (1/2)"
or
"UTGST on Food @ 2.5% (1/2) ; CGST on Food @ 2.5% (1/2)"

Feature:
All report printing now uses local aware number formatting for Indian locale.
This commit is contained in:
2020-12-13 13:14:19 +05:30
parent 27aa4d12a6
commit 3ad73dff1c
35 changed files with 130 additions and 60 deletions

View File

@ -25,7 +25,7 @@ export class AuthGuard implements CanActivate {
return false;
}
if (permission !== undefined && !this.authService.allowed(permission)) {
this.toaster.show('Danger', 'You do not have the permission to access this area.');
this.toaster.show('Error', 'You do not have the permission to access this area.');
return false;
}
// logged in so return true

View File

@ -69,7 +69,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
this.showOtp = true;
this.clientId = this.cs.getCookie('client_id');
}
this.toaster.show('Danger', error.error.details);
this.toaster.show('Error', error.error.details);
},
);
}

View File

@ -77,7 +77,7 @@ export class CashierReportComponent implements OnInit {
this.toaster.show('', 'Successfully Printed');
},
(error) => {
this.toaster.show('Error', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -40,7 +40,7 @@ export class ErrorInterceptor implements HttpInterceptor {
}
// auto logout if 401 response returned from api
this.authService.logout();
this.toaster.show('Danger', 'User has been logged out');
this.toaster.show('Error', 'User has been logged out');
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
width: '250px',
data: {

View File

@ -68,7 +68,7 @@ export class DeviceDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/devices');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -80,7 +80,7 @@ export class DeviceDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/devices');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -75,7 +75,7 @@ export class DiscountReportComponent implements OnInit {
this.toaster.show('', 'Successfully Printed');
},
(error) => {
this.toaster.show('Error', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -64,7 +64,7 @@ export class GuestBookDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/guest-book');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -67,7 +67,7 @@ export class GuestBookListComponent implements OnInit {
this.router.navigateByUrl('/guest-book');
},
(error) => {
this.toaster.show('Danger', error);
this.toaster.show('Error', error);
},
);
}

View File

@ -62,7 +62,7 @@ export class HeaderFooterComponent implements OnInit {
this.showItem(result);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -65,7 +65,7 @@ export class MenuCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/menu-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -77,7 +77,7 @@ export class MenuCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/menu-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -51,7 +51,7 @@ export class MenuCategoryListComponent implements OnInit {
this.toaster.show('Success', '');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -107,7 +107,7 @@ export class ModifierCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/modifier-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -119,7 +119,7 @@ export class ModifierCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/modifier-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -72,7 +72,7 @@ export class ModifierDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/modifiers');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -84,7 +84,7 @@ export class ModifierDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/modifiers');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -65,7 +65,7 @@ export class PrinterDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/printers');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -77,7 +77,7 @@ export class PrinterDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/printers');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -87,7 +87,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/products');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -99,7 +99,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/products');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -73,7 +73,7 @@ export class ProductListComponent implements OnInit {
this.loadData(result, this.menuCategories);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -66,7 +66,7 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/roles');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -78,7 +78,7 @@ export class RoleDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/roles');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -66,7 +66,7 @@ export class SaleCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/sale-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -78,7 +78,7 @@ export class SaleCategoryDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/sale-categories');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -75,7 +75,7 @@ export class SaleReportComponent implements OnInit {
this.toaster.show('', 'Successfully Printed');
},
(error) => {
this.toaster.show('Error', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -84,7 +84,7 @@ export class SectionPrinterComponent implements OnInit {
this.showItem(result);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -95,7 +95,7 @@ export class SectionPrinterComponent implements OnInit {
this.toaster.show('Success', '');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -61,7 +61,7 @@ export class SectionDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/sections');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -73,7 +73,7 @@ export class SectionDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/sections');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -77,7 +77,7 @@ export class SettleOptionDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/settle-options');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -89,7 +89,7 @@ export class SettleOptionDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/settle-options');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -70,7 +70,7 @@ export class TableDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/tables');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -82,7 +82,7 @@ export class TableDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/tables');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -49,7 +49,7 @@ export class TableListComponent implements OnInit {
this.toaster.show('Success', '');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -63,7 +63,7 @@ export class TaxDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/taxes');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -75,7 +75,7 @@ export class TaxDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/taxes');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -129,7 +129,7 @@ export class UpdateProductPricesComponent implements OnInit {
this.loadData(result);
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}

View File

@ -78,7 +78,7 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/users');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}
@ -90,7 +90,7 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
this.router.navigateByUrl('/users');
},
(error) => {
this.toaster.show('Danger', error.error);
this.toaster.show('Error', error);
},
);
}