This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ const storage = getStorage();
|
||||
*
|
||||
* @param bankAccountNumber číslo účtu ve formátu BBAN (123456-0123456789/0100)
|
||||
*/
|
||||
function convertBbanToIban(bankAccountNumber: string): string {
|
||||
export function convertBbanToIban(bankAccountNumber: string): string {
|
||||
// TODO validovat číslo účtu stejně jako na klientovi, pro případ že sem někdo pošle nesmysl
|
||||
let prefix: string = '';
|
||||
let accountNumber: string = bankAccountNumber;
|
||||
@@ -58,7 +58,7 @@ function createStorageKey(customerName: string, id: string): string {
|
||||
export async function generateQr(customerName: string, bankAccountNumber: string, bankAccountHolder: string, amount: number, message: string, id: string): Promise<void> {
|
||||
// Zpráva pro příjemce nesmí dle standardu obsahovat '*' a být delší než 60 znaků
|
||||
if (message.indexOf('*') >= 0) {
|
||||
message = message.replace('*', '');
|
||||
message = message.replace(/\*/g, '');
|
||||
}
|
||||
if (message.length > 60) {
|
||||
message = message.substring(0, 60);
|
||||
|
||||
Reference in New Issue
Block a user