def show_please_change_transfer(change_transfer_monthly_number, transfer_monthly_number): message = "העברה מספר {0} בוטלה.\nנא שנה את מספר העברה {1} למספר {0}".format( transfer_monthly_number, change_transfer_monthly_number ) Messages.show_message( title="Cancellation", message=message )
def show_transfer_already_exists(reference_number, message="כבר קיים במערכת"): is_to_print_agent_form = True warning_message = "מס סימוכין {0} {1}".format(reference_number, message) ask_message="האם להדפיס עותק סוכן?".decode("utf-8") title = "Already Exists" Messages.show_message(warning_message, title, type="WARNING") result = Messages.ask_question(ask_message,title) if not result: is_to_print_agent_form = False return is_to_print_agent_form
def cancel(self): is_to_print_cancel_forms = Messages.ask_question(title="Cancel", message="האם להדפיס ביטול?".decode("utf-8")) transfer_monthly_number = -1 workbook = self.open_workbook() worksheet = self.create_new_day(workbook) cancelled_transfer_row = 0 delete_status = False for row in range(self.first_row, self.last_row): cell_reference_number = self.cell_value_as_string(row, "C", worksheet) if cell_reference_number == "None": break if cell_reference_number == self.transfer.reference_number: transfer_monthly_number = self.cell_value_as_string(row, "B", worksheet) cancelled_transfer_row = row self.clean_transfer(cancelled_transfer_row, worksheet) result = Messages.ask_question(title="Refund", message="האם הלקוח מעוניין לשלוח העברה במקום?".decode("utf-8")) delete_status = True if result: self.exit_code = True break elif transfer_monthly_number != -1: if not worksheet.Range("B" + str(row + 1)).Value2: change_reference_number = self.cell_value_as_string(row, "C", worksheet) change_transfer_monthly_number = self.cell_value_as_string(row, "B", worksheet) change_amount = worksheet.Range("D" + str(row)).Value2 change_fee = worksheet.Range("E" + str(row)).Value2 change_transfer_path = worksheet.Range("C" + str(row)).Hyperlinks.Item(1).Address self.insert_sent_transfer( cancelled_transfer_row, change_transfer_monthly_number, worksheet, change_reference_number, change_amount, change_fee, change_transfer_path ) self.clean_transfer(row, worksheet) self.show_please_change_transfer(change_transfer_monthly_number, transfer_monthly_number) delete_status = True self.exit_code = True if not delete_status: Messages.show_message(title="Cancellation", message="העברה {0} לא נמצאה.".decode("utf-8").format(self.transfer.reference_number)) return self.save_and_return(workbook, transfer_monthly_number, is_to_print_cancel_forms)
def get_refund_type(self): result = Messages.ask_question(title="Refund", message="האם הלקוח מעוניין לשלוח העברה במקום?".decode("utf-8")) if result: refund_status = "RES" else: refund_status = "REF" return refund_status
def show_excel_is_already_open_warning(): Messages.show_message(title="Already Exists", message="נראה שהקובץ אקסל החדש פתוח, נא סגור את הקובץ במחשב בו הוא פתוח כדי להמשיך", type="WARNING" )
def show_terror_message(name): message = "{0} was found in terror list!".format(name) title = "Terror Check" Messages.show_message(message, title, type="WARNING")