Release 1.0.0
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from pprint import pprint
|
||||
import csv
|
||||
from localconfig import BUYERS_REPAIRED
|
||||
|
||||
class RepairedBuyers():
|
||||
def __init__(self):
|
||||
'''
|
||||
Get the repaired buyers detail from disk
|
||||
|
||||
'''
|
||||
self.buyers = {}
|
||||
with open(BUYERS_REPAIRED, newline="", encoding="utf-8") as f_in:
|
||||
reader = csv.DictReader(f_in)
|
||||
for row in reader:
|
||||
self.buyers[row['Invoice']] = row
|
||||
|
||||
def get_buyer_for(self, invoiceid):
|
||||
if invoiceid in self.buyers.keys():
|
||||
return self.buyers[invoiceid]
|
||||
Reference in New Issue
Block a user