Merge branch 'development' of ssh://git.eigen.co.id:2222/eigen/pos-be into development

pull/174/head 1.7.1-alpha.2
shancheas 2025-07-10 17:39:39 +07:00
commit a86cd8880f
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
import { EncryptionHelper } from 'src/modules/transaction/sales-price-formula/domain/helpers/encryption.helper';
export function encryptionTotal(total: number): string {
return btoa(total.toString());
return EncryptionHelper.encrypt(btoa(total.toString()));
}
export function decryptionTotal(total: string): number {
return Number(atob(total));
return Number(atob(EncryptionHelper.decrypt(total)));
}