Esempio n. 1
0
def customerDetails(df):
    for i in range(len(df['Customer Id'])):
        newName = df['Customer Id'][i] + Util.get_unique_number(10)
        df_customer['Customer Id'][i] = newName
        df_customer['Reference number'] = df['Reference number'][
            i] + Util.get_unique_number(6)
    return df
Esempio n. 2
0
def singlecustomerDetails(df):
    newName = df['Customer Id'] + Util.get_unique_number(10)
    df['Customer Id'] = newName
    df['Name'] = df['Name'] + newName
    df['Preferred name'] = df['Preferred name'] + newName
    df['Reference number'] = df['Reference number'] + Util.get_unique_number(6)
    return df
    def generateCAMT053(self, realAccount, transactionAccount, camtinput):
        iBANFlag = ""
        CAMT053FileProcessing.outputFileName = "AutoCAMT053" + Util.get_unique_number(
            5)

        CAMT053InputData.Random = CAMT053FileProcessing.random + "-" + Util.get_unique_number(
            5)
        CAMT053InputData.date = datetime.today().isoformat()
        CAMT053InputData.Dt = date.today().isoformat()
        # CAMT053FileProcessing.path = str(Path.home())

        # CAMT053FileProcessing.path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
        CAMT053FileProcessing.path = os.environ.get(
            'myHome')  # str(Path.home())

        CAMT053FileProcessing.paramFilePath = CAMT053FileProcessing.path + "inputCAMT&PAIN\\"

        if not os.path.exists('inputCAMT&PAIN'):
            os.makedirs(CAMT053FileProcessing.paramFilePath)

        self.createParam(CAMT053FileProcessing.outputFileName)
        self.takeInputsForCAMT053FileProcessing(realAccount,
                                                transactionAccount, camtinput)

        # Root = self.initiateXML()
        rootElement = Element("Document")
        tree = etree.ElementTree(rootElement)
        rootElement.set("xmlns",
                        "urn:iso:std:iso:20022:tech:xsd:camt.053.001.02")
        rootElement.set("xmlns:xsd", "http://www.w3.org/2001/XMLSchema")
        rootElement.set("xmlns:xsi",
                        "http://www.w3.org/2001/XMLSchema-instance")

        BkToCstmrStmt = Element(CAMT053Tags.BkToCstmrStmtTag)
        rootElement.append(BkToCstmrStmt)

        self.createGrpHdr(BkToCstmrStmt)
        self.createStmt(BkToCstmrStmt)

        CAMT053FileProcessing.camtFilepath = CAMT053FileProcessing.path + "\\inputCAMT&PAIN\\" + \
                                             CAMT053FileProcessing.outputFileName + ".att"

        tempFileName = CAMT053FileProcessing.path + "\\inputCAMT&PAIN\\TempCAMTFile" + ".att"

        tree.write(open(tempFileName, 'wb'),
                   xml_declaration=True,
                   encoding='utf-8')
        vkb.xml(tempFileName, CAMT053FileProcessing.camtFilepath)
Esempio n. 4
0
def accountsDetails(df):
    for name in range(len(df['Name of the account'])):
        newName = df['Name of the account'][name] + Util.get_unique_number(10)
        for parent in range(len(df['Parent'])):
            if df['Parent'][parent] == df['Name of the account'][name]:
                df['Parent'][parent] = newName
        df['Name of the account'][name] = newName
    return df
Esempio n. 5
0
 def enterAccountNumber(self, AccountNumber):
     try:
         AccountNumber = AccountNumber + Util.get_unique_number(14)
         self.sendKeys(AccountNumber,
                       self.txtAccountNumber,
                       locatorType="xpath")
     except Exception as e:
         self.log.error("Error occurred while filling address details. :: ")
     return AccountNumber
Esempio n. 6
0
def set_details_for_customer_edit(df_duplicate):
    df_Singlecustomer['Name'] = df_duplicate['Name']
    df_Singlecustomer['Preferred name'] = df_duplicate['Preferred name']
    df_Singlecustomer['Line 1'] = df_duplicate['Line 1']
    df_Singlecustomer['Line 2'] = df_duplicate['Line 2']
    df_Singlecustomer['Line 3'] = df_duplicate['Line 3']
    df_Singlecustomer['Line 4'] = df_duplicate['Line 4']
    df_Singlecustomer['Value'] = df_duplicate['Value']
    df_Singlecustomer['Reference number'] = df_duplicate[
        'Reference number'] + Util.get_unique_number(6)
    df_Singlecustomer['Description'] = df_duplicate['Description']
    return df_Singlecustomer
Esempio n. 7
0
    def fill_template_details(self, templateinfo, i):
        try:
            ReportType = templateinfo.loc[i].get(
                self.labelsOnUI.get('lbl_templateReportType'))

            flag = self.iselementSelected(self.templateType.format(ReportType),
                                          locatorType="xpath")
            if flag == False:
                self.elementClick(self.templateType.format(ReportType),
                                  locatorType="xpath")

            templateinfo[self.labelsOnUI['lbl_templateName']][i] = templateinfo[self.labelsOnUI['lbl_templateName']][i] \
                                                                   + Util.get_unique_number(14)
            self.sendKeys(
                templateinfo[self.labelsOnUI.get('lbl_templateName')][i],
                self.templateName,
                locatorType="xpath")

            access = templateinfo.loc[i].get(
                self.labelsOnUI.get('lbl_templateAccess'))
            self.elementClick(self.templateAccess.format(access),
                              locatorType="xpath")

            self.selectCurrency(templateinfo, i)

            if ReportType == 'Balance':
                self.selectvaluefromDropdown(
                    templateinfo[self.labelsOnUI['lbl_templateView']][i],
                    self.ddlView,
                    locatorType="xpath")
                self.elementClick(self.chkBoxIncludeCurrencyAccounts,
                                  locatorType="xpath")
            else:
                self.setFromAndToAmount(templateinfo, i)
                self.selectvaluefromDropdown(templateinfo[
                    self.labelsOnUI['lbl_templateAccountType']][i],
                                             self.templateAccountType,
                                             locatorType="xpath")
                self.selectvaluefromDropdown(templateinfo[
                    self.labelsOnUI['lbl_templateTransactionType']][i],
                                             self.templateTranscationType,
                                             locatorType="xpath")

            self.elementClick(self.templatePeriod.format(
                templateinfo[self.labelsOnUI['lbl_templatePeriod']][i]),
                              locatorType="xpath")
            self.log.info("Successfully filled template details::")
        except:
            self.log.info("Error occured while filling template details::")
Esempio n. 8
0
def createDuplicate(row):
    df = df_accounts[df_accounts['Parent'] == row]
    df = df.reset_index()
    del df['index']
    df.loc[0]['Name of the account'] = 'VTA' + Util.get_unique_number(10)
    return df
Esempio n. 9
0
def generateUniqueUserId(df):
    newName = df['User ID'] + Util.get_unique_number(7)
    df['User ID'] = newName
    return df