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:
@ -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
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ export class HeaderFooterComponent implements OnInit {
|
||||
this.showItem(result);
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
this.toaster.show('Error', error);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ export class UpdateProductPricesComponent implements OnInit {
|
||||
this.loadData(result);
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Danger', error.error);
|
||||
this.toaster.show('Error', error);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user