Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.46 KB | None | 0 0
  1. from datetime import datetime
  2. from datetime import timedelta
  3. import string
  4.  
  5. def check_files():
  6. try:
  7. stockID = open('stock.txt', 'r') #searches for / opens the file
  8. except FileNotFoundError: #if the file is not found:
  9. print("Creating stock file...")
  10. stockID = open('stock.txt', 'w') #make the file
  11. print ("Stock file created")
  12. try:
  13. ordersID = open('orders.txt', 'r')
  14. except FileNotFoundError:
  15. print("Creating orders file...")
  16.  
  17. ordersID = open('orders.txt', 'w')
  18. print ("Orders file created")
  19. try:
  20. customerID = open('customers.txt', 'r')
  21. except FileNotFoundError:
  22. customerID = open('customers.txt', 'w')
  23. print ("Customers file created")
  24. try:
  25. pay = open('paid.txt', 'r')
  26. except FileNotFoundError:
  27. pay = open('paid.txt', 'w')
  28. print ("Unpaid orders file created")
  29. def mainMenu():
  30. print("""
  31. ###############################################################################
  32. # #
  33. # Urdd y Clefyddydau Cerameg #
  34. # Please Login Below! #
  35. # #
  36. ###############################################################################
  37. """)
  38. validateUser()
  39.  
  40.  
  41.  
  42. def adminMenu():
  43. while True:
  44. print("""
  45. ###############################################################################
  46. # #
  47. # Urdd y Clefyddydau Cerameg #
  48. # Admin Menu #
  49. # #
  50. # 1 - New Customer #
  51. # 2 - Add to the stock #
  52. # 3 - Remove item from stock #
  53. # 4 - Make an order #
  54. # 5 - Print an invoice #
  55. # 6 - Cancel an order #
  56. # 7 - Delete cutsomer #
  57. # 8 - Unpaid orders #
  58. # 9 - Pay for an order #
  59. # #
  60. # #
  61. # 10 - Exit #
  62. # #
  63. # #
  64. ###############################################################################
  65. """)
  66.  
  67. adminMenu = input("Which option would you like to choose?:\n ")
  68. if adminMenu == "1":
  69. newCustomer() #create a customer function
  70. break
  71. elif adminMenu == "2":
  72. addStock() #adding stock function
  73. break
  74. elif adminMenu == "3":
  75. delStock()#removing stock function
  76. break
  77. elif adminMenu == "4":
  78. orderMenu()#making an order function
  79. break
  80. elif adminMenu == "5":
  81. createInvoice()#producing an invoice function
  82. break
  83. elif adminMenu == "6":
  84. delOrder()#canceling an order function
  85. break
  86. elif adminMenu == "7":
  87. delCustomer()#deleting a customer function
  88. break
  89. elif adminMenu == "8":
  90. check_unpaid_orders()#check for unpaid orders function
  91. break
  92. elif adminMenu =="9":
  93. payOrder()#pay for order function
  94. break
  95. elif adminMenu == "10":
  96. exit() #exit the program
  97.  
  98.  
  99.  
  100.  
  101. def validateUser():
  102. validateUserName = ""
  103. validatePassword = ""
  104.  
  105. UserName = str(input("\nPlease enter your UserName: \n"))
  106. password = str(input("\nPlease enter your password: \n"))
  107. while True:
  108. try:
  109. readUsers = open("users.txt","r")#opens the file
  110. validateCounter = 0 #to match both username and password
  111.  
  112. while True:
  113. location = readUsers.readline() #reads the file
  114.  
  115. validateUserName = location [0:10] #where the string is located in the file
  116. validateUserName = validateUserName.strip()#removes any spaces
  117. validateUserName = validateUserName.lower()
  118. UserName = UserName.lower() #lowercase
  119.  
  120. validatePassword = location[10:20]
  121. validatePassword = validatePassword.strip()
  122. validatePassword = validatePassword.lower()
  123. password = password.lower()
  124.  
  125.  
  126. if location == "":
  127. readUsers.close()#closes the file
  128. break
  129. if validateUserName == UserName and validatePassword == password: #if everything matches up:
  130. validateCounter = validateCounter + 1
  131. adminMenu() #sends user through to the admin menu
  132. break
  133. if validateUserName == UserName and validatePassword == password:
  134. validateCounter = validateCounter + 1
  135. userMenu()
  136. break
  137.  
  138. if validateCounter ==0: #if one of the things didn't match up:
  139. print("\nNo user in the file with those login details. \n")
  140. create_user_q = input ("Would you like to create a new user? (Y/N)\n ")
  141. if create_user_q == ("Y"):
  142. newUser() #sends you to the create a user function
  143. if create_user_q == ("N"):
  144. mainMenu()#sends the user back to the main menu
  145.  
  146.  
  147. except FileNotFoundError: #if there is no file to be found:
  148. print("There is no Users file for you to search! How about making your first account?")
  149. newUser()#sends user to the create a user function
  150.  
  151.  
  152.  
  153.  
  154. def newUser():
  155. UserName, password1, password2 = "", "", ""
  156.  
  157. while True:
  158. UserName = input("\nPlease enter the UserName of the new user:\n ")
  159. if len(UserName) >10: #if the length of the username is more than 10:
  160. print("\nUserName must be less than 11 characters.\n")
  161. elif UserName.isalpha() == False: #if the username contains any numbers:
  162. print("\nThe UserName must only contain alpha.\n")
  163. else:
  164. break
  165. while True:
  166. password1 = input("\nPlease enter the password for the user:\n ")
  167. if len(password1) > 10:#if the length of the password is more than 10:
  168. print("\nPassword must be less than 11 characters.\n")
  169. password2 = input("\nPlease enter the password again:n\n ")
  170. if len(password2) > 10:#if the length of the second password is more than 10:
  171. print("\nPassword must be less than 11 characters.\n")
  172. if password1 != password2: #if the first password doesn't match the second:
  173. print("\nPasswords do not match.\n")
  174. else:
  175. break #breaks the loop
  176.  
  177. UserName=UserName.lower() #lowercase
  178. password1=password1.lower()#lowercase
  179. UserNameStore=UserName.ljust(10)#makes the username 10 digits long in the text file
  180. password1Store=password1.ljust(10)#makes the password 10 digits long in the text file
  181. store=open("users.txt","a") #opens the file
  182. iStore=UserNameStore+password1Store+"\n" #what's being stored in the text file
  183. store.write(iStore) #writes it into the text file
  184. store.close()#closes the file
  185. print("\nCreated a New User")
  186. print("UserName :",UserName)
  187. print("Password : ********** ")
  188. mainMenu() #goes back to the login menu
  189.  
  190.  
  191.  
  192.  
  193. def orderMenu():
  194. while True:
  195. print("""
  196. ################################################################################
  197. # #
  198. # Urdd y Clefyddydau Cerameg #
  199. # #
  200. # Create a new order: #
  201. # 1 - New Customer #
  202. # 2 - Existing Customer #
  203. # #
  204. # 3 - Exit #
  205. # #
  206. ################################################################################
  207. """)
  208. orderMenu=input("What would like to do? Option '1', '2' or '3':\n ")
  209. if orderMenu =="1":
  210. newCustomer() #create a customer function
  211. break
  212. if orderMenu =="2":
  213. createOrder()#the create an order function
  214. break
  215. elif orderMenu =="3":
  216. exit()#exits the program
  217. else:
  218. print("\nThat is not a valid entry, you must select '1', '2' or '3'")
  219.  
  220.  
  221.  
  222. def newCustomer():
  223. customerID=""
  224. customerForename=""
  225. customerSurname=""
  226. customerTown=""
  227. customerHouseNumber=""
  228. customerPostcode=""
  229. customerPhone=""
  230.  
  231.  
  232.  
  233.  
  234. while True:
  235. customerForename=input("\nInput the Customer Forename:\n ")
  236. if len(customerForename)>20: #if the length of the customer forename is more than 20:
  237. print("\nCustomer Forename has to be between 1 and 20 characters")
  238. elif customerForename.isalpha()==False:#if the customer forename contains any numbers:
  239. print("\nYou can only use letters for a Customer Forename")
  240. else:
  241. break
  242.  
  243.  
  244.  
  245.  
  246. while True:
  247. customerSurname=input("\nInput the Customer Surname:\n ")
  248. if len(customerSurname)>20:
  249. print("\nCustomer Surname has to be between 1 and 20 characters")
  250. elif customerSurname.isalpha()==False:
  251. print("\nYou can only use letters for a Customer Surname")
  252. else:
  253. break
  254.  
  255.  
  256.  
  257. while True:
  258. customerTown=input("\nInput the Customer Town:\n ")
  259. if len(customerTown)>20:
  260. print("\nCustomer Town has to be between 1 and 20 characters")
  261. elif customerTown.isalpha()==False:
  262. print("\nYou can only use letters for a Customer Town")
  263. else:
  264. break
  265.  
  266.  
  267.  
  268. while True:
  269. customerHouseNumber=input("\nInput the Customer House Number:\n ")
  270. if len(customerHouseNumber)>5:
  271. print("\nCustomer House Number cannot be >5 characters")
  272. else:
  273. break
  274.  
  275.  
  276.  
  277. while True:
  278. customerPostcode=input("\nInput the Customer Postcode:\n ")
  279. if len(customerPostcode)>8:
  280. print("\nCustomer Postcode cannot be >8 characters i.e. XX99 9XX")
  281. else:
  282. break
  283.  
  284.  
  285.  
  286. while True:
  287. customerPhone=input("\nInput the Customer Phone Number:\n ")
  288. if len(customerPhone)>11:
  289. print("\nCustomer Phone Number can not be more than 11 numbers")
  290. elif customerPhone.isdigit()!=True:
  291. print("\nYou can only use numbers for a Customer Phone Number")
  292. else:
  293. break
  294.  
  295.  
  296.  
  297.  
  298. customerHouseNumber=customerHouseNumber.strip() #gets rid of spaces
  299. customerPostcode=customerPostcode.replace(" ", "")#removes the spaces in between
  300. customerID=(customerHouseNumber)+(customerPostcode) #creates the customer ID
  301. customerID=customerID.strip()#gets rid of spaces
  302. customerID=customerID.lower()#makes it lowercase
  303. customerIDStore=customerID.ljust(12)#makes it 12 digits long in the text file when storing it
  304. customerForenameStore=customerForename.ljust(12)
  305. customerSurnameStore=customerSurname.ljust(12)
  306. customerTownStore=customerTown.ljust(20)
  307. customerHouseNumberStore=customerHouseNumber.ljust(12)
  308. customerPostcodeStore=customerPostcode.ljust(12)
  309. customerPhoneStore=customerPhone.ljust(12)
  310. store=open("customers.txt","a") #opens the file
  311. iStore=customerIDStore+customerForenameStore+customerSurnameStore+customerTownStore+customerHouseNumberStore+customerPostcodeStore+customerPhoneStore+"\n" #everything that's being stored
  312. store.write(iStore) #writes it into the file
  313. store.close()#closes the file
  314.  
  315.  
  316.  
  317. print("\nFinished creating a new customer")
  318. print("Customer ID: ",customerIDStore)
  319. print("Customer Forename: ",customerForenameStore)
  320. print("Customer Surname: ",customerSurnameStore)
  321. print("Customer Town: ",customerTownStore)
  322. print("Customer House Number: ",customerHouseNumberStore)
  323. print("Customer Posecode: ",customerPostcodeStore)
  324. print("Customer Phone: ",customerPhoneStore)
  325.  
  326. def addStock():
  327. StockID = ""
  328. StockName = ""
  329. StockPrice = ""
  330.  
  331.  
  332. while True:
  333. StockName=input("\nInput the name of the item you are adding to the stock:\n ")
  334. if len(StockName)>20: #if the length is more than 20:
  335. print("\nStockName has to be between 1 and 20 characters")
  336. elif StockName.isalpha()==False: #if it contains any numbers:
  337. print("\nYou can only use letters for a product name")
  338. else:
  339. break
  340.  
  341.  
  342.  
  343. while True:
  344. StockPrice=float(input("\nInput the price of your product:\n "))
  345. if StockPrice>150: #if the price is more than £150:
  346. print("\nPrice must be under £150!")
  347. elif str(StockPrice).isdigit()!=False: #if it contains any letters:
  348. print("\nYou can only use numbers for a price")
  349. else:
  350. break
  351.  
  352.  
  353.  
  354. StockID=input("Please enter 5 random letters so we can give you a unique ID:\n ")
  355. if StockID.isalpha()==False: #if it contains numbers
  356. print("\nYou can only use letters for your unique ID")
  357. elif len(StockID) != 5: #if it is more or less than 5 digits
  358. print("\nYou must use exaclty 5 digits ")
  359. StockID = ("QF")+ StockID
  360. StockID=StockID.strip()#removes spaces
  361. StockID=StockID.lower()#lowercase
  362. StockPrice = str(StockPrice) #makes it writable
  363. StockIDStore=StockID.ljust(12) #makes it 12 digits long in the text file
  364. StockNameStore=StockName.ljust(12)
  365. StockPriceStore=StockPrice.ljust(12)
  366.  
  367.  
  368.  
  369. store=open("stock.txt","a") #opens the file
  370. iStore=StockIDStore+StockNameStore+StockPriceStore+"\n" #everything that's being stored in the file
  371. store.write(iStore) #writes it into the file
  372. store.close() #closes the file
  373.  
  374.  
  375.  
  376. print("\nFinished adding to stock")
  377. print("Stock ID: ",StockIDStore)
  378. print("Stock Name: ",StockNameStore)
  379. print("Stock Item Price: ",StockPriceStore)
  380.  
  381. while True:
  382. print("""
  383. ################################################################################
  384. # #
  385. # Urdd yr Clefyddydau Cerameg #
  386. # #
  387. # Would you like to add another item to stock?: #
  388. # 1 - Add another item #
  389. # #
  390. # 2 - Exit to Menu #
  391. # #
  392. ################################################################################
  393. """)
  394. StockMenu=input("What would like to do? Option '1' or '2':\n ")
  395. if StockMenu =="1":
  396. addStock() #repeates th entire process
  397. break
  398. elif StockMenu =="2":
  399. adminMenu() #returns to admin menu
  400. break
  401. else:
  402. print("\nThat is not a valid entry, you must select '1' or '2'")
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410. def delStock():
  411.  
  412.  
  413.  
  414. while True:
  415. del_item = input("Please enter the name of the item you would like to remove from the stock\n ")
  416.  
  417. with open("stock.txt","r+") as f:
  418. new_f = f.readlines() #reads the file
  419. f.seek(0)
  420. for line in new_f: #for every line in the file:
  421. if del_item not in line: #if the item isn't in the line:
  422. f.write(line)#writes the entire file bcak without the deleted line
  423. f.truncate()
  424.  
  425. a = input("Would you like to remove another item? (Y/N)\n ")
  426. if a == ("n"):
  427. break
  428.  
  429. elif a == ("y"):
  430. print("Thank you")
  431.  
  432.  
  433. def createOrder():
  434.  
  435.  
  436. while True:
  437. customerID = input("Please enter your customer ID (House number + Postcode - Example - 6ab123cd)\n ")
  438. with open('customers.txt') as f: #opens the file
  439. if customerID in f.read(): #if the customer ID is in the file:
  440. print("Thank you")
  441. break
  442. else:
  443. print("Customer ID was not found. Please try again")
  444. while True:
  445. orderID = input("Please enter a unique ID for your order (5 random numbers)\n ") #to make the order ID
  446. if orderID.isdigit()==False: #if it contains letters:
  447. print("\nYou can only use numbers for your unique ID")
  448. elif len(orderID) != 5: #if it's more or less than 5 digits long:
  449. print("\nYou must use exaclty 5 digits ")
  450. else:
  451. print("Your unique ID is PQ" + orderID)
  452. break
  453. orderID = ("PQ")+ orderID
  454. orderID=orderID.strip()#removes any spaces
  455. orderID=orderID.lower()#lowercase
  456. orderIDStore=orderID.ljust(12) #makes it 12 digits long in the text file
  457.  
  458.  
  459.  
  460.  
  461. while True:
  462. item_name = input("Please enter the name of the item you wish to purchase\n ")
  463. with open('stock.txt') as f: #opens the file
  464. if item_name in f.read(): #if it's in the file:
  465. print("Thank you")
  466. break
  467. elif item_name not in f.read(): #if it isn't:
  468. print("Item was not found. Please try again")
  469.  
  470. while True:
  471. readStock = open('stock.txt','r') #opens the file
  472. location = readStock.readline()#reads the file
  473. price = location[24:36]#location of where the string is in the line
  474. price = float(price)#makes the price a float (can have decimals)
  475. quantity = int(input("What quantity of this product would you like to purchase?\n "))
  476. if quantity >100: #if the quantity is more than 100:
  477. print("You can only have up to 100 items")
  478. elif quantity <1: #if it's less than 1:
  479. ("You must give a quantity of 1 or more")
  480. overallPrice = (price*quantity) #gives the price of each item combined
  481.  
  482. readStock.close() #closes the file
  483.  
  484. break
  485.  
  486.  
  487. quantityID=str(quantity) #makes the quantity a string
  488.  
  489. quantityID=quantityID.ljust(12) #makes it 12 digits long in the text file
  490. customerID=customerID.strip()#strips any spaces
  491. customerID=customerID.lower()#lowercase
  492. customerIDStore=customerID.ljust(12)
  493. overallPrice=str(overallPrice)#makes the price a string
  494. overallPrice=overallPrice.ljust(12)
  495. today = datetime.now() #the date
  496. today = str(today)#makes the date a string (so it can be stored in the file)
  497. today = today.ljust(30) #makes it 12 digits long
  498.  
  499.  
  500. order_file = open('orders.txt', 'a') #opens the order file in append mode
  501. stock_file = open('stock.txt', 'r') #opens the stock file in read mode
  502. for line in stock_file: #for each line in the stock file
  503. if item_name in line: #for each line:
  504. line = line.ljust(12) #makes sure that there's a gap at the end of the line
  505. order_store = quantityID + orderIDStore + overallPrice + today + customerIDStore + line + "\n" #everything that's being stored
  506. order_file.write(order_store) #writes it into the file
  507. print("Thank you, your item has been added to your order")
  508.  
  509.  
  510. while True:
  511. a = input("Would you like to add another item to the order? (y/n)\n ")
  512. if a == ("n"):
  513. break
  514. elif a == ("y"):
  515. print("Thank you ")
  516. createOrder() #makes another order
  517. else:
  518. print("Invalid input, returning to menu ")
  519. break
  520.  
  521. while True:
  522. a = input("Would you like to pay for your order now? (y/n)\n ")
  523. if a == ("y"):
  524. pay_file = open("paid.txt","a") #opens the paid file
  525. stock_file = open('stock.txt', 'r')#opens the stock file
  526. for line in stock_file: #for every line in the stock file:
  527. if item_name in line: #if the item name is in the line:
  528. line = line.ljust(12)
  529. order_store = quantityID + orderIDStore + overallPrice + today + customerIDStore + line + "\n"
  530. pay_file.write(order_store) #writes the line into the pay file
  531. print("Paid")
  532.  
  533. break
  534. elif a == ("n"):
  535. print("Thank you ")
  536. break
  537. else:
  538. print("Invalid input, returning to menu ")
  539. break
  540.  
  541.  
  542.  
  543. def delOrder():
  544. while True:
  545. z = input("Are you sure you want to cancel an order? (You must pay 20% of the order)")
  546. if z == "y":
  547. break
  548. if z == "n":
  549. adminMenu()
  550. break
  551. else:
  552. print("Invalid input, returning to menu")
  553. adminMenu()
  554.  
  555. while True:
  556. order_ID = input("Please enter your order ID\n ")
  557. with open('orders.txt') as f: #opens the file
  558. if order_ID in f.read(): #if the order ID is in the file:
  559. print("Thank you")
  560. break
  561. else:
  562. print("Order ID was not found. Please try again")
  563. while True:
  564.  
  565. with open("orders.txt","r") as f: #opens the file
  566. f.seek(0) #reads the file
  567. total = 0
  568. for line in f: #for every line in the file:
  569. if order_ID in line: #if the order ID is in the line:
  570. total_price = line[24:36] #location of the total
  571. total += float(total_price) #produces the total
  572. if total>50: #if it's more than 50:
  573. total = float(total - (total*0.05)) #discount
  574. total = int(total) #changes it into an integer
  575.  
  576. print("You will be charged £",total*0.2) #20% of the total
  577.  
  578.  
  579. with open("orders.txt","r+") as f:
  580. new_f = f.readlines() #reads the file
  581. f.seek(0)
  582. for line in new_f: #for every line in the file:
  583. if order_ID not in line: #if the order ID isn't in the line:
  584. f.write(line) #writes the line back in
  585. print("Order deleted ")
  586. f.truncate()
  587.  
  588.  
  589. if total>50: #if the total is more than 50
  590. total = float(total - (total*0.05))
  591. total = str(total) #turns it into a string (so it can be stored)
  592.  
  593. a = input("Would you like to cancel another order? (Y/N)\n ")
  594. if a == ("n"):
  595. break
  596.  
  597. elif a == ("y"):
  598. delOrder()
  599.  
  600.  
  601. def delCustomer():
  602. while True:
  603. del_item = input("Please enter customer ID\n ")
  604.  
  605. with open("customers.txt","r+") as f:
  606. new_f = f.readlines() #reads the file
  607. f.seek(0)
  608. for line in new_f: #for every line in the file:
  609. if del_item not in line: #if it's not in the line
  610. f.write(line)#write the line back in
  611. print("Customer deleted")
  612. f.truncate()
  613.  
  614. a = input("Would you like to remove another customer? (Y/N)\n ")
  615. if a == ("n"):
  616. break
  617.  
  618. elif a == ("y"):
  619. print("Thank you")
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626. def createInvoice():
  627.  
  628. while True:
  629. order_ID = input("Please enter your order ID\n ")
  630. with open('orders.txt') as f: #opens the file
  631. if order_ID in f.read(): #if the orderID is in the file:
  632. print("Thank you")
  633. break
  634. else:
  635. print("Order ID was not found. Please try again")
  636.  
  637. with open("orders.txt","r+") as f: #opens the file so it can be read and appended to
  638. f.seek(0) #reads the file
  639. for line in f: #for every line in the file
  640. if order_ID in line: #if orderID is in the line:
  641. date = line[36:62]
  642. if (datetime.strptime(date, "%Y-%m-%d %H:%M:%S.%f") + timedelta(28)) > datetime.now():
  643. print ("The order has not been paid for over 28 days")
  644.  
  645. while True:
  646. with open("orders.txt","r") as f: #opens the file
  647. f.seek(0)#reads the file
  648. total = 0
  649. for line in f: #for every line in the file
  650. if order_ID in line: #if the order ID is in the line
  651. total_price = line[24:36] #location of the price
  652. total += float(total_price) #creates the actual total
  653.  
  654. if total>50: #if it's more than 50
  655. total = float(total-(total*0.05)) #takes away 5% discount
  656. total = str(total)#turns total into a string (so it can be stored)
  657. print("\nYour order total is: ",total + " (Including 5% discount)")
  658. break
  659. else:
  660. print("\nYour order total is: ",total)
  661. break
  662.  
  663. def check_unpaid_orders():
  664.  
  665. while True:
  666. order_ID = input("Please enter your order ID\n ")
  667. with open('orders.txt') as f: #opens the file
  668. if order_ID in f.read(): #if the orderID is in the file:
  669. print("Thank you")
  670. break
  671. while True:
  672. with open("paid.txt","r") as f:
  673. f.seek(0) #reads the file:
  674. for line in f: #for every line in the file:
  675. if order_ID in line: #if the order ID is in the line:
  676. print("Order has already been paid")
  677. else:
  678. with open ("orders.txt","r") as p: #opens the orders file
  679. date = line[36:52] #location of the string in the line
  680. if datetime.strptime(date,'%d/%m/%Y %H:%M:%S') + timedelta(28):
  681. print("Order has not been paid for more than 28 days")
  682.  
  683.  
  684.  
  685.  
  686. def payOrder():
  687. while True:
  688. order_ID = input("Please enter your order ID\n ")
  689. with open('orders.txt') as f: #opens the file
  690. if order_ID in f.read(): #if the order ID is in the text file:
  691. print("Thank you")
  692. break
  693. while True:
  694. pay_file = open("paid.txt","a") #opens the paid file in append mode
  695. orders_file = open('orders.txt', 'r') #opens the orders file in read mode
  696. for line in orders_file: #for each line in the orders file:
  697. if order_ID in line: #if the order ID is in the line:
  698. line = line.ljust(12) #gives room at the end of the line
  699. pay_file.write(line + "\n") #writes the line into the paid flie
  700. break
  701. print("Paid")
  702.  
  703.  
  704.  
  705.  
  706. def main():
  707. check_files()
  708. mainMenu()
  709.  
  710. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement