
91
total_sum = map(lambda x: int(re.sub(r'[^\d]', '', x)), amount)
total_sum = list(str(sum(list(total_sum))))
total_sum.insert(-2, '.')
total_sum = converter(''.join(total_sum), numberFormat)
else:
total_sum = False
try:
result = FBL1NPutin(balance_unit2, clear_doc, vendor, po, total_sum, amount)
for res in result[1] or []:
not_charged_yet.append([vendor, po, res])
except(ValueError):
vendor_po_erorrs.append([vendor, po])
continue
DISCONNECT_SAP_CONNECTION()
temp_list=[]
if not result[0]:
session_of_fbl = CREATE_SAP_CONNECTION()
temp_list = GetDataFbl1n(session_of_fbl,amount, total_sum,temp_list)
if len(clear_doc)>0:
try:
result = FBL1NPutin(balance_unit2, clear_doc, vendor, po, total_sum, amount)
for res in result[1] or []:
not_charged_yet.append([vendor, po, res])
except(ValueError):
vendor_po_erorrs.append([vendor, po])
continue
clear_doc = []
session_of_fbl = CREATE_SAP_CONNECTION()
sap_table =
session_of_fbl.FindById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell")