コード例 #1
0
     print("End of register for date range", strStartDate, "to", strEndDate)
     print(
         "--------------------------------------------------------------------------------------------------"
     )
 elif Triage.lower() == "r":
     if Revisions.ReviseTx(
             LstTrans
     ) == True:  #This means the cleared status of a transaction was changed, so cleared
         #balance must be recalculated
         ClearedBal = EnterTxs.CalculateClearedBalance(LstTrans)
         print("Cleared balance after revision: ", ClearedBal)
         ClearedBalLst.append((ClearedBal, datetime.date.today()))
         StoreData.StoreClearedBalance(ClearedBalLst)
     StoreData.StoreAllTxs(LstTrans, intUniqueId)
 elif Triage.lower() == "s":
     Searches.SearchByText(LstTrans)
     # objFile = open("Transactions1.dat", "rb")
     # LstTrans = pickle.load(objFile) #LstTrans is the list of all recorded transactions
     # objFile.close()
 elif Triage.lower() == "a":
     Searches.SearchByAmount(LstTrans)
 elif Triage.lower() == "b":
     #To mark transactions as "cleared" and get the cleared balance
     EnterTxs.DesignateClearedTxs(LstTrans)
     NewClearedBal = EnterTxs.CalculateClearedBalance(LstTrans)
     print("New cleared balance equals: ", NewClearedBal)
     RecordCB = input("Do you wish to record the cleared balance (y/n) ?")
     if RecordCB.lower() == "y":
         ClearedBal = NewClearedBal
         ClearedBalLst.append((ClearedBal, datetime.date.today()))
         StoreData.StoreClearedBalance(ClearedBalLst)