radboy 0.0.709__py3-none-any.whl → 0.0.710__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of radboy might be problematic. Click here for more details.
- radboy/DB/Prompt.py +401 -398
- radboy/DB/__pycache__/Prompt.cpython-313.pyc +0 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.709.dist-info → radboy-0.0.710.dist-info}/METADATA +1 -1
- {radboy-0.0.709.dist-info → radboy-0.0.710.dist-info}/RECORD +8 -8
- {radboy-0.0.709.dist-info → radboy-0.0.710.dist-info}/WHEEL +0 -0
- {radboy-0.0.709.dist-info → radboy-0.0.710.dist-info}/top_level.txt +0 -0
radboy/DB/Prompt.py
CHANGED
|
@@ -26,7 +26,7 @@ import lzma,base64
|
|
|
26
26
|
from Crypto.Cipher import AES
|
|
27
27
|
#from Cryptodome.Cipher import AES
|
|
28
28
|
from Crypto.Util.Padding import pad, unpad
|
|
29
|
-
from decimal import Decimal
|
|
29
|
+
from decimal import Decimal,localcontext
|
|
30
30
|
import biip
|
|
31
31
|
import itertools
|
|
32
32
|
from inputimeout import inputimeout, TimeoutOccurred
|
|
@@ -965,429 +965,432 @@ class Prompt(object):
|
|
|
965
965
|
esblb- bldls(bldlse=True,sbld=True,minus=True)
|
|
966
966
|
'''
|
|
967
967
|
def bldls(bldlse=False,sbld=False,minus=False,justCount=False,justTotal=False,mode=None):
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
mode
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
968
|
+
with localcontext() as ctx:
|
|
969
|
+
ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",4,setValue=False,literal=True))
|
|
970
|
+
ctx.prec=ROUNDTO
|
|
971
|
+
ct=len(db.BooleanAnswers.setFieldInList_MODES)
|
|
972
|
+
if (mode == None) or (not isinstance(mode,int)):
|
|
973
|
+
modes=[]
|
|
974
|
+
for num,i in enumerate(db.BooleanAnswers.setFieldInList_MODES):
|
|
975
|
+
modes.append(std_colorize(i,num,ct))
|
|
976
|
+
modes='\n'.join(modes)
|
|
977
|
+
print(modes)
|
|
978
|
+
mode=Control(func=FormBuilderMkText,ptext="Which Mode do you wish to use?",helpText=modes,data="integer")
|
|
979
|
+
if mode is None:
|
|
980
|
+
return
|
|
981
|
+
elif mode in ['d',]:
|
|
982
|
+
mode=0
|
|
983
|
+
if not ((mode <= (ct-1)) and (mode >= 0)):
|
|
984
|
+
print(f"{Fore.orange_red_1}invalid mode:\n{mode}\ndefaulting to {Fore.light_green}SHOWALL!{Style.reset}")
|
|
985
|
+
mode=0
|
|
986
|
+
else:
|
|
987
|
+
if not ((mode <= (ct-1)) and (mode >= 0)):
|
|
988
|
+
print(f"{Fore.orange_red_1}invalid mode:\n{mode}\ndefaulting to {Fore.light_green}SHOWALL!{Style.reset}")
|
|
989
|
+
mode=0
|
|
987
990
|
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
return
|
|
1001
|
-
helpText=[]
|
|
1002
|
-
for num,i in enumerate(results):
|
|
1003
|
-
msg=f"{Fore.cyan}{num}/{Fore.light_yellow}{num+1} of {Fore.light_red}{ct} -> {Fore.orange_red_1}{i.seeShort()}{Style.reset}"
|
|
1004
|
-
helpText.append(msg)
|
|
1005
|
-
helpText='\n'.join(helpText)
|
|
1006
|
-
print(helpText)
|
|
1007
|
-
selected=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Which index(es):",helpText=helpText,data="list")
|
|
1008
|
-
try:
|
|
1009
|
-
if selected in [None,'d',[]]:
|
|
991
|
+
simple=Control(func=FormBuilderMkText,ptext="plain and simple y/n:",helpText="yes or no to absolute minimal output",data="boolean")
|
|
992
|
+
if simple is None:
|
|
993
|
+
return
|
|
994
|
+
elif simple in ['d',]:
|
|
995
|
+
simple=False
|
|
996
|
+
def cse(code):
|
|
997
|
+
with Session(db.ENGINE) as session:
|
|
998
|
+
query=session.query(db.Entry).filter(db.Entry.InList==True,or_(db.Entry.Code.icontains(code),db.Entry.Barcode.icontains(code),db.Entry.Name.icontains(code)))
|
|
999
|
+
results=query.all()
|
|
1000
|
+
ct=len(results)
|
|
1001
|
+
if ct < 1:
|
|
1002
|
+
print("No Results to Clear!")
|
|
1010
1003
|
return
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1004
|
+
helpText=[]
|
|
1005
|
+
for num,i in enumerate(results):
|
|
1006
|
+
msg=f"{Fore.cyan}{num}/{Fore.light_yellow}{num+1} of {Fore.light_red}{ct} -> {Fore.orange_red_1}{i.seeShort()}{Style.reset}"
|
|
1007
|
+
helpText.append(msg)
|
|
1008
|
+
helpText='\n'.join(helpText)
|
|
1009
|
+
print(helpText)
|
|
1010
|
+
selected=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Which index(es):",helpText=helpText,data="list")
|
|
1011
|
+
try:
|
|
1012
|
+
if selected in [None,'d',[]]:
|
|
1013
|
+
return
|
|
1014
|
+
for i in selected:
|
|
1015
|
+
try:
|
|
1016
|
+
index=int(i)
|
|
1017
|
+
obj=results[index]
|
|
1018
|
+
update={
|
|
1019
|
+
'InList':False,
|
|
1020
|
+
'ListQty':0,
|
|
1021
|
+
'Shelf':0,
|
|
1022
|
+
'Note':'',
|
|
1023
|
+
'BackRoom':0,
|
|
1024
|
+
'Distress':0,
|
|
1025
|
+
'Display_1':0,
|
|
1026
|
+
'Display_2':0,
|
|
1027
|
+
'Display_3':0,
|
|
1028
|
+
'Display_4':0,
|
|
1029
|
+
'Display_5':0,
|
|
1030
|
+
'Display_6':0,
|
|
1031
|
+
'Stock_Total':0,
|
|
1032
|
+
'CaseID_BR':'',
|
|
1033
|
+
'CaseID_LD':'',
|
|
1034
|
+
'CaseID_6W':'',
|
|
1035
|
+
'SBX_WTR_DSPLY':0,
|
|
1036
|
+
'SBX_CHP_DSPLY':0,
|
|
1037
|
+
'SBX_WTR_KLR':0,
|
|
1038
|
+
'FLRL_CHP_DSPLY':0,
|
|
1039
|
+
'FLRL_WTR_DSPLY':0,
|
|
1040
|
+
'WD_DSPLY':0,
|
|
1041
|
+
'CHKSTND_SPLY':0,
|
|
1042
|
+
}
|
|
1043
|
+
for i in update:
|
|
1044
|
+
setattr(obj,i,update[i])
|
|
1045
|
+
session.commit()
|
|
1046
|
+
except Exception as ee:
|
|
1047
|
+
print(ee)
|
|
1048
|
+
except Exception as e:
|
|
1049
|
+
print(e)
|
|
1050
|
+
try:
|
|
1051
|
+
TotalCRVItems=0
|
|
1052
|
+
TotalItems=0
|
|
1053
|
+
TTLQtyCrvItem=0
|
|
1054
|
+
TotalLines=0
|
|
1055
|
+
if (not justCount and not justTotal):
|
|
1056
|
+
if not simple:
|
|
1057
|
+
page=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Page Results?",helpText="wait for user input before displaying next item in list;yes or no",data="boolean")
|
|
1058
|
+
if page is None:
|
|
1059
|
+
return
|
|
1060
|
+
elif page in ['d',False]:
|
|
1061
|
+
page=False
|
|
1062
|
+
extras=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Show Extras?",helpText="extra data attached to each entry yes or no",data="boolean")
|
|
1063
|
+
if extras is None:
|
|
1064
|
+
return
|
|
1065
|
+
elif extras in ['d',False]:
|
|
1066
|
+
extras=False
|
|
1067
|
+
|
|
1068
|
+
else:
|
|
1058
1069
|
page=False
|
|
1059
|
-
extras=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Show Extras?",helpText="extra data attached to each entry yes or no",data="boolean")
|
|
1060
|
-
if extras is None:
|
|
1061
|
-
return
|
|
1062
|
-
elif extras in ['d',False]:
|
|
1063
1070
|
extras=False
|
|
1064
|
-
|
|
1065
1071
|
else:
|
|
1066
1072
|
page=False
|
|
1067
1073
|
extras=False
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1074
|
+
msg=''
|
|
1075
|
+
if bldlse:
|
|
1076
|
+
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file,clear_only=True)
|
|
1077
|
+
with db.Session(db.ENGINE) as session:
|
|
1078
|
+
results_query=session.query(db.Entry).filter(db.Entry.InList==True)
|
|
1079
|
+
if sbld:
|
|
1080
|
+
def mkT(text,data):
|
|
1081
|
+
return text
|
|
1082
|
+
code=Prompt.__init2__(None,func=mkT,ptext="Code|Barcode|Name: ",helpText="find by code,barcode,name",data='')
|
|
1083
|
+
if code in [None,'d']:
|
|
1084
|
+
return
|
|
1085
|
+
results_query=results_query.filter(
|
|
1086
|
+
db.or_(
|
|
1087
|
+
db.Entry.Code==code,
|
|
1088
|
+
db.Entry.Barcode==code,
|
|
1089
|
+
db.Entry.Barcode.icontains(code),
|
|
1090
|
+
db.Entry.Code.icontains(code),
|
|
1091
|
+
db.Entry.Name.icontains(code)
|
|
1092
|
+
)
|
|
1093
|
+
)
|
|
1094
|
+
if db.BooleanAnswers.setFieldInList_MODES[mode] == 'ONLY_SHOW_CRV':
|
|
1095
|
+
results_query=results_query.filter(and_(db.Entry.CRV!=None,db.Entry.CRV!=0))
|
|
1096
|
+
elif db.BooleanAnswers.setFieldInList_MODES[mode] == 'ONLY_SHOW_TAXED':
|
|
1097
|
+
results_query=results_query.filter(and_(db.Entry.Tax!=None,db.Entry.Tax!=0))
|
|
1098
|
+
elif db.BooleanAnswers.setFieldInList_MODES[mode] == 'NO_CRV_NO_TAX':
|
|
1099
|
+
results_query=results_query.filter(
|
|
1100
|
+
and_(
|
|
1101
|
+
or_(db.Entry.Tax==None,db.Entry.Tax==0),
|
|
1102
|
+
or_(db.Entry.CRV==None,db.Entry.CRV==0),
|
|
1103
|
+
)
|
|
1104
|
+
)
|
|
1105
|
+
elif db.BooleanAnswers.setFieldInList_MODES[mode] =='CRV_UNTAXED':
|
|
1106
|
+
results_query=results_query.filter(
|
|
1107
|
+
and_(
|
|
1108
|
+
or_(db.Entry.Tax==None,db.Entry.Tax==0),
|
|
1109
|
+
not_(or_(db.Entry.CRV==None,db.Entry.CRV==0)),
|
|
1110
|
+
)
|
|
1111
|
+
)
|
|
1112
|
+
elif db.BooleanAnswers.setFieldInList_MODES[mode] =='NO_CRV_TAXED':
|
|
1113
|
+
results_query=results_query.filter(
|
|
1114
|
+
and_(
|
|
1115
|
+
not_(or_(db.Entry.Tax==None,db.Entry.Tax==0)),
|
|
1116
|
+
or_(db.Entry.CRV==None,db.Entry.CRV==0),
|
|
1089
1117
|
)
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
)
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
results_query=results_query.filter(
|
|
1111
|
-
and_(
|
|
1112
|
-
not_(or_(db.Entry.Tax==None,db.Entry.Tax==0)),
|
|
1113
|
-
or_(db.Entry.CRV==None,db.Entry.CRV==0),
|
|
1114
|
-
)
|
|
1115
|
-
)
|
|
1116
|
-
|
|
1117
|
-
location_fields=["Shelf","BackRoom","Display_1","Display_2","Display_3","Display_4","Display_5","Display_6","ListQty","SBX_WTR_DSPLY","SBX_CHP_DSPLY","SBX_WTR_KLR","FLRL_CHP_DSPLY","FLRL_WTR_DSPLY","WD_DSPLY","CHKSTND_SPLY","Distress"]
|
|
1118
|
-
z=Prompt.mkfield_list(None,location_fields)
|
|
1119
|
-
if z in [[],None]:
|
|
1120
|
-
z=location_fields
|
|
1121
|
-
location_fields=z
|
|
1122
|
-
tmp=[]
|
|
1123
|
-
for f in location_fields:
|
|
1124
|
-
if not minus:
|
|
1125
|
-
tmp.append(or_(getattr(db.Entry,f)>=0.0001))
|
|
1118
|
+
)
|
|
1119
|
+
|
|
1120
|
+
location_fields=["Shelf","BackRoom","Display_1","Display_2","Display_3","Display_4","Display_5","Display_6","ListQty","SBX_WTR_DSPLY","SBX_CHP_DSPLY","SBX_WTR_KLR","FLRL_CHP_DSPLY","FLRL_WTR_DSPLY","WD_DSPLY","CHKSTND_SPLY","Distress"]
|
|
1121
|
+
z=Prompt.mkfield_list(None,location_fields)
|
|
1122
|
+
if z in [[],None]:
|
|
1123
|
+
z=location_fields
|
|
1124
|
+
location_fields=z
|
|
1125
|
+
tmp=[]
|
|
1126
|
+
for f in location_fields:
|
|
1127
|
+
if not minus:
|
|
1128
|
+
tmp.append(or_(getattr(db.Entry,f)>=0.0001))
|
|
1129
|
+
else:
|
|
1130
|
+
tmp.append(or_(getattr(db.Entry,f)!=0,getattr(db.Entry,f)!=None))
|
|
1131
|
+
|
|
1132
|
+
results_query=results_query.filter(or_(*tmp))
|
|
1133
|
+
LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=False,literal=False)
|
|
1134
|
+
if not isinstance(LookUpState,bool):
|
|
1135
|
+
LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=True,literal=False)
|
|
1136
|
+
if LookUpState == True:
|
|
1137
|
+
results=results_query.order_by(db.Entry.Timestamp.asc()).all()
|
|
1126
1138
|
else:
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
results=results_query.order_by(db.Entry.Timestamp.desc()).all()
|
|
1137
|
-
ct=len(results)
|
|
1138
|
-
if ct < 1:
|
|
1139
|
-
msg=f"{Fore.light_steel_blue}Nothing in {Fore.slate_blue_1}Bld{Fore.light_red}LS!{Style.reset}"
|
|
1140
|
-
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1141
|
-
print(msg)
|
|
1142
|
-
return
|
|
1143
|
-
#start
|
|
1144
|
-
ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",3,setValue=False,literal=True))
|
|
1139
|
+
results=results_query.order_by(db.Entry.Timestamp.desc()).all()
|
|
1140
|
+
ct=len(results)
|
|
1141
|
+
if ct < 1:
|
|
1142
|
+
msg=f"{Fore.light_steel_blue}Nothing in {Fore.slate_blue_1}Bld{Fore.light_red}LS!{Style.reset}"
|
|
1143
|
+
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1144
|
+
print(msg)
|
|
1145
|
+
return
|
|
1146
|
+
#start
|
|
1147
|
+
|
|
1145
1148
|
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1149
|
+
master_total=decc("0.0000",cf=ROUNDTO)
|
|
1150
|
+
master_total_crv=decc("0.00",cf=ROUNDTO)
|
|
1151
|
+
master_total_tax=decc("0.0000",cf=ROUNDTO)
|
|
1152
|
+
master_total_tax_crv=decc("0.0000",cf=ROUNDTO)
|
|
1150
1153
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
else:
|
|
1157
|
-
chart=''
|
|
1158
|
-
if not simple:
|
|
1159
|
-
msg=f'{f"{chart}"*os.get_terminal_size().columns}\n{Fore.light_green}{num}{Fore.light_magenta}/{Fore.orange_3}{num+1} of {Fore.light_red}{ct}[{Fore.dark_slate_gray_1}EID{Fore.orange_3}]{Fore.dark_violet_1b}{i.EntryId}{Style.reset} |-| {Fore.light_yellow}{i.Name}|{Fore.light_salmon_1}[{Fore.light_red}BCD]{i.rebar()}{Fore.medium_violet_red}|[{Fore.light_red}CD{Fore.medium_violet_red}]{i.cfmt(i.Code)} {Style.reset}|-| '
|
|
1160
|
-
else:
|
|
1161
|
-
msg=f'{num+1}/{ct} [Name] "{i.Name}" [Product Barcode] "{'-'.join(db.stre(i.Barcode)/6)}" [Product Barcode Processed] "{i.rebar()}" [Order Code] "{'-'.join(db.stre(i.Code)/4)}" '
|
|
1162
|
-
colormapped=[
|
|
1163
|
-
Fore.deep_sky_blue_4c,
|
|
1164
|
-
Fore.spring_green_4,
|
|
1165
|
-
Fore.turquoise_4,
|
|
1166
|
-
Fore.dark_cyan,
|
|
1167
|
-
Fore.deep_sky_blue_2,
|
|
1168
|
-
Fore.spring_green_2a,
|
|
1169
|
-
Fore.medium_spring_green,
|
|
1170
|
-
Fore.steel_blue,
|
|
1171
|
-
Fore.cadet_blue_1,
|
|
1172
|
-
Fore.aquamarine_3,
|
|
1173
|
-
Fore.purple_1a,
|
|
1174
|
-
Fore.medium_purple_3a,
|
|
1175
|
-
Fore.slate_blue_1,
|
|
1176
|
-
Fore.light_slate_grey,
|
|
1177
|
-
Fore.dark_olive_green_3a,
|
|
1178
|
-
Fore.deep_pink_4c,
|
|
1179
|
-
Fore.orange_3,
|
|
1180
|
-
]
|
|
1181
|
-
#print("#0")
|
|
1182
|
-
total=decc("0.0000",cf=ROUNDTO)
|
|
1183
|
-
crv=decc("0.0000",cf=ROUNDTO)
|
|
1184
|
-
tax=decc("0.0000",cf=ROUNDTO)
|
|
1185
|
-
tax_crv=decc("0.0000",cf=ROUNDTO)
|
|
1186
|
-
i.Tax=decc(i.Tax,cf=ROUNDTO)
|
|
1187
|
-
i.CRV=decc(i.CRV,cf=ROUNDTO)
|
|
1188
|
-
i.Price=decc(i.Price,cf=ROUNDTO)
|
|
1189
|
-
try:
|
|
1190
|
-
if (i.Price+i.CRV) > 0:
|
|
1191
|
-
taxRate=decc(i.Tax/(i.Price+i.CRV),cf=ROUNDTO)
|
|
1154
|
+
reRunRequired=False
|
|
1155
|
+
for num,i in enumerate(results):
|
|
1156
|
+
getExtras(i.EntryId,extras)
|
|
1157
|
+
if not simple:
|
|
1158
|
+
chart="*"
|
|
1192
1159
|
else:
|
|
1193
|
-
|
|
1160
|
+
chart=''
|
|
1161
|
+
if not simple:
|
|
1162
|
+
msg=f'{f"{chart}"*os.get_terminal_size().columns}\n{Fore.light_green}{num}{Fore.light_magenta}/{Fore.orange_3}{num+1} of {Fore.light_red}{ct}[{Fore.dark_slate_gray_1}EID{Fore.orange_3}]{Fore.dark_violet_1b}{i.EntryId}{Style.reset} |-| {Fore.light_yellow}{i.Name}|{Fore.light_salmon_1}[{Fore.light_red}BCD]{i.rebar()}{Fore.medium_violet_red}|[{Fore.light_red}CD{Fore.medium_violet_red}]{i.cfmt(i.Code)} {Style.reset}|-| '
|
|
1163
|
+
else:
|
|
1164
|
+
msg=f'{num+1}/{ct} [Name] "{i.Name}" [Product Barcode] "{'-'.join(db.stre(i.Barcode)/6)}" [Product Barcode Processed] "{i.rebar()}" [Order Code] "{'-'.join(db.stre(i.Code)/4)}" '
|
|
1165
|
+
colormapped=[
|
|
1166
|
+
Fore.deep_sky_blue_4c,
|
|
1167
|
+
Fore.spring_green_4,
|
|
1168
|
+
Fore.turquoise_4,
|
|
1169
|
+
Fore.dark_cyan,
|
|
1170
|
+
Fore.deep_sky_blue_2,
|
|
1171
|
+
Fore.spring_green_2a,
|
|
1172
|
+
Fore.medium_spring_green,
|
|
1173
|
+
Fore.steel_blue,
|
|
1174
|
+
Fore.cadet_blue_1,
|
|
1175
|
+
Fore.aquamarine_3,
|
|
1176
|
+
Fore.purple_1a,
|
|
1177
|
+
Fore.medium_purple_3a,
|
|
1178
|
+
Fore.slate_blue_1,
|
|
1179
|
+
Fore.light_slate_grey,
|
|
1180
|
+
Fore.dark_olive_green_3a,
|
|
1181
|
+
Fore.deep_pink_4c,
|
|
1182
|
+
Fore.orange_3,
|
|
1183
|
+
]
|
|
1184
|
+
#print("#0")
|
|
1185
|
+
total=decc("0.0000",cf=ROUNDTO)
|
|
1186
|
+
crv=decc("0.0000",cf=ROUNDTO)
|
|
1187
|
+
tax=decc("0.0000",cf=ROUNDTO)
|
|
1188
|
+
tax_crv=decc("0.0000",cf=ROUNDTO)
|
|
1189
|
+
i.Tax=decc(i.Tax,cf=ROUNDTO)
|
|
1190
|
+
i.CRV=decc(i.CRV,cf=ROUNDTO)
|
|
1191
|
+
i.Price=decc(i.Price,cf=ROUNDTO)
|
|
1192
|
+
try:
|
|
1193
|
+
if (i.Price+i.CRV) > 0:
|
|
1194
|
+
taxRate=decc(i.Tax/(i.Price+i.CRV),cf=ROUNDTO)
|
|
1195
|
+
else:
|
|
1196
|
+
taxRate=decc('0.00000',cf=ROUNDTO)
|
|
1194
1197
|
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1198
|
+
except Exception as e:
|
|
1199
|
+
taxRate=decc('0.00000',cf=ROUNDTO)
|
|
1200
|
+
i.Tax=decc('0.0000',cf=ROUNDTO)
|
|
1201
|
+
i.Price=decc('0.0000',cf=ROUNDTO)
|
|
1202
|
+
i.CRV=decc('0.0000',cf=ROUNDTO)
|
|
1203
|
+
session.commit()
|
|
1204
|
+
session.refresh(i)
|
|
1202
1205
|
|
|
1203
|
-
|
|
1206
|
+
#print("#1")
|
|
1204
1207
|
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
+
if not minus:
|
|
1209
|
+
for n2,f in enumerate(location_fields):
|
|
1210
|
+
try:
|
|
1211
|
+
if getattr(i,f) > 0:
|
|
1212
|
+
total+=decc(getattr(i,f),cf=ROUNDTO)
|
|
1213
|
+
except Exception as e:
|
|
1214
|
+
print(e)
|
|
1215
|
+
for n2,f in enumerate(location_fields):
|
|
1208
1216
|
if getattr(i,f) > 0:
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
if getattr(i,f) > 0:
|
|
1214
|
-
msg2=f'{colormapped[n2]}{f} = {decc(getattr(i,f),cf=ROUNDTO)}{Style.reset}'
|
|
1215
|
-
if n2 < len(location_fields):
|
|
1216
|
-
msg2+=","
|
|
1217
|
-
msg+=msg2
|
|
1218
|
-
else:
|
|
1219
|
-
for n2,f in enumerate(location_fields):
|
|
1220
|
-
try:
|
|
1221
|
-
if getattr(i,f) != 0:
|
|
1222
|
-
total+=decc(getattr(i,f),cf=ROUNDTO)
|
|
1223
|
-
except Exception as e:
|
|
1224
|
-
print(e)
|
|
1225
|
-
for n2,f in enumerate(location_fields):
|
|
1226
|
-
if getattr(i,f) != 0:
|
|
1227
|
-
msg2=f'{colormapped[n2]}{f} = {decc(str(getattr(i,f)),cf=ROUNDTO)}{Style.reset}'
|
|
1228
|
-
if n2 < len(location_fields):
|
|
1229
|
-
msg2+=","
|
|
1230
|
-
msg+=msg2
|
|
1231
|
-
|
|
1232
|
-
master_total+=total*decc(i.Price,cf=ROUNDTO)
|
|
1233
|
-
|
|
1234
|
-
crv+=(decc(i.CRV,cf=ROUNDTO)*total)
|
|
1235
|
-
tax+=(decc(i.Tax,cf=ROUNDTO)*total)
|
|
1236
|
-
|
|
1237
|
-
tax_crv=(crv+tax)
|
|
1238
|
-
master_total_tax+=tax
|
|
1239
|
-
master_total_crv+=crv
|
|
1240
|
-
master_total_tax_crv+=tax_crv
|
|
1241
|
-
#print("#exegen",type(total),type(tax_crv))
|
|
1242
|
-
try:
|
|
1243
|
-
#print((total*decc(i.Price)+tax_crv),"s1")
|
|
1244
|
-
#print(decc(getSuperTotal(results,location_fields,colormapped)['final total']).quantize(decc("00.00")),"s2")
|
|
1245
|
-
#print(tax_crv,"s3")
|
|
1246
|
-
#super_total=(round(round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO)/getSuperTotal(results,location_fields,colormapped)['final total'],ROUNDTO))*100
|
|
1247
|
-
if (total*decc(i.Price,cf=ROUNDTO)+tax+crv) > 0:
|
|
1248
|
-
super_total=(total*decc(i.Price)+tax+crv)/decc(getSuperTotal(results,location_fields,colormapped)['final total'],cf=ROUNDTO)
|
|
1249
|
-
super_total=super_total*100
|
|
1217
|
+
msg2=f'{colormapped[n2]}{f} = {decc(getattr(i,f),cf=ROUNDTO)}{Style.reset}'
|
|
1218
|
+
if n2 < len(location_fields):
|
|
1219
|
+
msg2+=","
|
|
1220
|
+
msg+=msg2
|
|
1250
1221
|
else:
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
if simple:
|
|
1264
|
-
msg+=f""" Total = {total}"""
|
|
1265
|
-
print(db.strip_colors(msg))
|
|
1266
|
-
else:
|
|
1267
|
-
msg+=f"""{Fore.light_magenta} |-|{Fore.light_green} Total = {Fore.light_sea_green}{total}
|
|
1268
|
-
{Fore.light_magenta}Price({decc(i.Price):.{getcontext().prec}f}){Fore.medium_violet_red}*{Fore.light_slate_blue}Total({total}):{decc(i.Price)*total:.{getcontext().prec}f}
|
|
1269
|
-
{Fore.grey_70}+CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1270
|
-
{Fore.medium_spring_green}= {Fore.slate_blue_1}TotalCRV({crv:.{getcontext().prec}f})+TotalPrice({total*decc(i.Price):.{getcontext().prec}f})
|
|
1271
|
-
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+crv:.{getcontext().prec}f}){Style.reset}
|
|
1272
|
-
{Fore.grey_70}+Tax({decc(i.Tax):.{getcontext().prec}f}) w/o CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1273
|
-
{Fore.medium_spring_green}= {Fore.slate_blue_1}TaxNoCRVTotal({tax:.{getcontext().prec}f})+TotalPrice({total*i.Price:.{getcontext().prec}f})
|
|
1274
|
-
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+tax:.{getcontext().prec}f}){Style.reset}
|
|
1275
|
-
{Fore.grey_70}+Tax({decc(i.Tax):.{getcontext().prec}f}) w/ CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1276
|
-
{Fore.medium_spring_green}= {Fore.slate_blue_1}TaxCRVTotal({tax_crv:.{getcontext().prec}f})+TotalPrice({total*i.Price:.{getcontext().prec}f})
|
|
1277
|
-
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+tax+crv:.{getcontext().prec}f}){Style.reset}
|
|
1278
|
-
{Fore.medium_violet_red}PercentOfTotal({super_total:.{getcontext().prec}f}%) of FinalTotal({getSuperTotal(results,location_fields,colormapped)['final total']})
|
|
1279
|
-
{Fore.orange_red_1}TaxRate({taxRate:.{getcontext().prec}f})={decc(taxRate*100):.{getcontext().prec}f}%{Style.reset}
|
|
1280
|
-
{'*'*os.get_terminal_size().columns}{Style.reset}"""
|
|
1281
|
-
if bldlse:
|
|
1282
|
-
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1283
|
-
if not justCount and not justTotal:
|
|
1284
|
-
if not simple:
|
|
1285
|
-
print(msg)
|
|
1286
|
-
|
|
1287
|
-
if i.CRV is not None:
|
|
1288
|
-
if i.CRV != 0:
|
|
1289
|
-
TotalCRVItems+=1
|
|
1290
|
-
TTLQtyCrvItem+=(total)
|
|
1291
|
-
TotalItems+=total
|
|
1292
|
-
TotalLines+=1
|
|
1293
|
-
if page:
|
|
1294
|
-
nxt=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{Fore.orange_red_1}You MUST re-run cmd if using ed/ee{Fore.light_yellow}\nSee next item in list [Enter],stop paging [sp], backout to previous prompt[b],edit item [ee],clear entry [ce]?",helpText=f"{Fore.orange_red_1}You MUST re-run cmd if using ed/ee{Fore.light_yellow}\nSee next item in list [Enter],stop paging [sp], backout to previous prompt[b],edit item [ee],clear entry [ce]?",data="string")
|
|
1295
|
-
if nxt is None:
|
|
1296
|
-
return
|
|
1297
|
-
elif nxt in ['d',]:
|
|
1298
|
-
continue
|
|
1299
|
-
elif nxt in ['sp',]:
|
|
1300
|
-
page=False
|
|
1301
|
-
continue
|
|
1302
|
-
elif nxt in ['ee',]:
|
|
1303
|
-
reRunRequired=True
|
|
1304
|
-
TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).NewEntryMenu(code=i.Barcode)
|
|
1305
|
-
continue
|
|
1306
|
-
elif nxt in ['ce']:
|
|
1307
|
-
reRunRequired=True
|
|
1308
|
-
cse(i.Barcode)
|
|
1309
|
-
continue
|
|
1222
|
+
for n2,f in enumerate(location_fields):
|
|
1223
|
+
try:
|
|
1224
|
+
if getattr(i,f) != 0:
|
|
1225
|
+
total+=decc(getattr(i,f),cf=ROUNDTO)
|
|
1226
|
+
except Exception as e:
|
|
1227
|
+
print(e)
|
|
1228
|
+
for n2,f in enumerate(location_fields):
|
|
1229
|
+
if getattr(i,f) != 0:
|
|
1230
|
+
msg2=f'{colormapped[n2]}{f} = {decc(str(getattr(i,f)),cf=ROUNDTO)}{Style.reset}'
|
|
1231
|
+
if n2 < len(location_fields):
|
|
1232
|
+
msg2+=","
|
|
1233
|
+
msg+=msg2
|
|
1310
1234
|
|
|
1311
|
-
|
|
1312
|
-
master_total=decc(str(master_total),cf=ROUNDTO)
|
|
1313
|
-
master_total_crv=decc(str(master_total_crv),cf=ROUNDTO)
|
|
1314
|
-
master_total_tax=decc(str(master_total_tax),cf=ROUNDTO)
|
|
1315
|
-
master_total_tax_crv=decc(str(master_total_tax_crv),cf=ROUNDTO)
|
|
1235
|
+
master_total+=total*decc(i.Price,cf=ROUNDTO)
|
|
1316
1236
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1237
|
+
crv+=(decc(i.CRV,cf=ROUNDTO)*total)
|
|
1238
|
+
tax+=(decc(i.Tax,cf=ROUNDTO)*total)
|
|
1319
1239
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1240
|
+
tax_crv=(crv+tax)
|
|
1241
|
+
master_total_tax+=tax
|
|
1242
|
+
master_total_crv+=crv
|
|
1243
|
+
master_total_tax_crv+=tax_crv
|
|
1244
|
+
#print("#exegen",type(total),type(tax_crv))
|
|
1245
|
+
try:
|
|
1246
|
+
#print((total*decc(i.Price)+tax_crv),"s1")
|
|
1247
|
+
#print(decc(getSuperTotal(results,location_fields,colormapped)['final total']).quantize(decc("00.00")),"s2")
|
|
1248
|
+
#print(tax_crv,"s3")
|
|
1249
|
+
#super_total=(round(round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO)/getSuperTotal(results,location_fields,colormapped)['final total'],ROUNDTO))*100
|
|
1250
|
+
if (total*decc(i.Price,cf=ROUNDTO)+tax+crv) > 0:
|
|
1251
|
+
super_total=(total*decc(i.Price)+tax+crv)/decc(getSuperTotal(results,location_fields,colormapped)['final total'],cf=ROUNDTO)
|
|
1252
|
+
super_total=super_total*100
|
|
1253
|
+
else:
|
|
1254
|
+
super_total=0
|
|
1255
|
+
except Exception as e:
|
|
1256
|
+
p1=total*decc(i.Price,cf=ROUNDTO)+tax_crv
|
|
1257
|
+
p2=decc(getSuperTotal(results,location_fields,colormapped)['final total'],cf=ROUNDTO)
|
|
1258
|
+
print(e)
|
|
1259
|
+
print(p1,"p1")
|
|
1260
|
+
print(p2,"p2")
|
|
1261
|
+
super_total=0
|
|
1262
|
+
#print("#exegen2")
|
|
1263
|
+
super_total=decc(super_total,cf=ROUNDTO)
|
|
1264
|
+
#print(super_total)
|
|
1326
1265
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1266
|
+
if simple:
|
|
1267
|
+
msg+=f""" Total = {total}"""
|
|
1268
|
+
print(db.strip_colors(msg))
|
|
1269
|
+
else:
|
|
1270
|
+
msg+=f"""{Fore.light_magenta} |-|{Fore.light_green} Total = {Fore.light_sea_green}{total}
|
|
1271
|
+
{Fore.light_magenta}Price({decc(i.Price):.{getcontext().prec}f}){Fore.medium_violet_red}*{Fore.light_slate_blue}Total({total}):{decc(i.Price)*total:.{getcontext().prec}f}
|
|
1272
|
+
{Fore.grey_70}+CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1273
|
+
{Fore.medium_spring_green}= {Fore.slate_blue_1}TotalCRV({crv:.{getcontext().prec}f})+TotalPrice({total*decc(i.Price):.{getcontext().prec}f})
|
|
1274
|
+
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+crv:.{getcontext().prec}f}){Style.reset}
|
|
1275
|
+
{Fore.grey_70}+Tax({decc(i.Tax):.{getcontext().prec}f}) w/o CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1276
|
+
{Fore.medium_spring_green}= {Fore.slate_blue_1}TaxNoCRVTotal({tax:.{getcontext().prec}f})+TotalPrice({total*i.Price:.{getcontext().prec}f})
|
|
1277
|
+
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+tax:.{getcontext().prec}f}){Style.reset}
|
|
1278
|
+
{Fore.grey_70}+Tax({decc(i.Tax):.{getcontext().prec}f}) w/ CRV({decc(i.CRV):.{getcontext().prec}f})*Total({total}){Fore.slate_blue_1}
|
|
1279
|
+
{Fore.medium_spring_green}= {Fore.slate_blue_1}TaxCRVTotal({tax_crv:.{getcontext().prec}f})+TotalPrice({total*i.Price:.{getcontext().prec}f})
|
|
1280
|
+
{Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+tax+crv:.{getcontext().prec}f}){Style.reset}
|
|
1281
|
+
{Fore.medium_violet_red}PercentOfTotal({super_total:.{getcontext().prec}f}%) of FinalTotal({getSuperTotal(results,location_fields,colormapped)['final total']})
|
|
1282
|
+
{Fore.orange_red_1}TaxRate({taxRate:.{getcontext().prec}f})={decc(taxRate*100):.{getcontext().prec}f}%{Style.reset}
|
|
1283
|
+
{'*'*os.get_terminal_size().columns}{Style.reset}"""
|
|
1284
|
+
if bldlse:
|
|
1285
|
+
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1286
|
+
if not justCount and not justTotal:
|
|
1287
|
+
if not simple:
|
|
1288
|
+
print(msg)
|
|
1289
|
+
|
|
1290
|
+
if i.CRV is not None:
|
|
1291
|
+
if i.CRV != 0:
|
|
1292
|
+
TotalCRVItems+=1
|
|
1293
|
+
TTLQtyCrvItem+=(total)
|
|
1294
|
+
TotalItems+=total
|
|
1295
|
+
TotalLines+=1
|
|
1296
|
+
if page:
|
|
1297
|
+
nxt=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{Fore.orange_red_1}You MUST re-run cmd if using ed/ee{Fore.light_yellow}\nSee next item in list [Enter],stop paging [sp], backout to previous prompt[b],edit item [ee],clear entry [ce]?",helpText=f"{Fore.orange_red_1}You MUST re-run cmd if using ed/ee{Fore.light_yellow}\nSee next item in list [Enter],stop paging [sp], backout to previous prompt[b],edit item [ee],clear entry [ce]?",data="string")
|
|
1298
|
+
if nxt is None:
|
|
1299
|
+
return
|
|
1300
|
+
elif nxt in ['d',]:
|
|
1301
|
+
continue
|
|
1302
|
+
elif nxt in ['sp',]:
|
|
1303
|
+
page=False
|
|
1304
|
+
continue
|
|
1305
|
+
elif nxt in ['ee',]:
|
|
1306
|
+
reRunRequired=True
|
|
1307
|
+
TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).NewEntryMenu(code=i.Barcode)
|
|
1308
|
+
continue
|
|
1309
|
+
elif nxt in ['ce']:
|
|
1310
|
+
reRunRequired=True
|
|
1311
|
+
cse(i.Barcode)
|
|
1312
|
+
continue
|
|
1329
1313
|
|
|
1330
|
-
{
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
{Fore.
|
|
1343
|
-
|
|
1344
|
-
{Fore.
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1314
|
+
#exit(f"here {master_total} {master_total_crv} {master_total_tax} {master_total_tax_crv}")
|
|
1315
|
+
master_total=decc(str(master_total),cf=ROUNDTO)
|
|
1316
|
+
master_total_crv=decc(str(master_total_crv),cf=ROUNDTO)
|
|
1317
|
+
master_total_tax=decc(str(master_total_tax),cf=ROUNDTO)
|
|
1318
|
+
master_total_tax_crv=decc(str(master_total_tax_crv),cf=ROUNDTO)
|
|
1319
|
+
|
|
1320
|
+
actual=(master_total_crv+master_total)+master_total_tax
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
if not reRunRequired:
|
|
1324
|
+
if justCount:
|
|
1325
|
+
msg=f"""
|
|
1326
|
+
{Fore.spring_green_3a}'Total Items'={Style.bold}{Fore.light_cyan}{TotalItems}{Style.reset}
|
|
1327
|
+
{Fore.spring_green_3a}Total 'CRV Items' (each crv adds an xtra 1)={Fore.light_cyan}{TotalCRVItems}{Style.reset}
|
|
1328
|
+
{Fore.spring_green_3a}Total 'CRV Items QTY Purchased' (each crv adds an xtra for total qty)={Fore.light_cyan}{TTLQtyCrvItem}{Style.reset}
|
|
1329
|
+
|
|
1330
|
+
{Fore.light_sea_green}'Total Items' + 'CRV Items' ={Fore.light_magenta}{TotalCRVItems+TotalItems}{Style.reset}
|
|
1331
|
+
{Fore.light_sea_green}'Total Items' + 'CRV Items QTY Purchased' ={Fore.light_magenta}{TTLQtyCrvItem+TotalItems}{Style.reset}
|
|
1332
|
+
|
|
1333
|
+
{Fore.light_blue}'Total Lines'={Style.bold}{Fore.grey_70}{TotalLines}{Style.reset}
|
|
1334
|
+
{Fore.light_blue}'Total Lines' + 'CRV Items'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1335
|
+
{Fore.light_blue}'Total Lines' + 'CRV Items QTY Purchased'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1336
|
+
{Style.reset}"""
|
|
1337
|
+
if not simple:
|
|
1338
|
+
print(msg)
|
|
1339
|
+
return
|
|
1340
|
+
if justTotal:
|
|
1341
|
+
msg=f"""{Fore.light_green}Total Product Value
|
|
1342
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total}{Style.reset}
|
|
1343
|
+
{Fore.light_green}Total Product Value w/CRV({master_total_crv})
|
|
1344
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total_crv+master_total}{Style.reset}
|
|
1345
|
+
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/o CRV({master_total_crv})
|
|
1346
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total_tax+master_total}{Style.reset}
|
|
1347
|
+
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/ CRV({master_total_crv})
|
|
1348
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{actual}{Style.reset}
|
|
1349
|
+
"""
|
|
1350
|
+
if not simple:
|
|
1351
|
+
print(msg)
|
|
1352
|
+
return
|
|
1350
1353
|
|
|
1351
1354
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
{Fore.light_green}Total Product Value w/CRV({master_total_crv})
|
|
1355
|
-
|
|
1356
|
-
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/o CRV({master_total_crv})
|
|
1357
|
-
|
|
1358
|
-
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/ CRV({master_total_crv})
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1355
|
+
msg=f"""{Fore.light_green}Total Product Value
|
|
1356
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total}{Style.reset}
|
|
1357
|
+
{Fore.light_green}Total Product Value w/CRV({master_total_crv})
|
|
1358
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total_crv+master_total}{Style.reset}
|
|
1359
|
+
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/o CRV({master_total_crv})
|
|
1360
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{master_total_tax+master_total}{Style.reset}
|
|
1361
|
+
{Fore.light_green}Total Product Value Taxed({master_total_tax}) w/ CRV({master_total_crv})
|
|
1362
|
+
{Fore.orange_red_1}= {Style.bold}{Fore.slate_blue_1}{actual}{Style.reset}
|
|
1363
|
+
"""
|
|
1364
|
+
if page:
|
|
1365
|
+
reviewRecieptLines=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Review Reciept Lines[y/N]",helpText="review line details for reciept to double check values",data="boolean")
|
|
1366
|
+
else:
|
|
1367
|
+
reviewRecieptLines=False
|
|
1365
1368
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1369
|
+
if reviewRecieptLines is None:
|
|
1370
|
+
return
|
|
1371
|
+
elif reviewRecieptLines in ['d',False]:
|
|
1372
|
+
pass
|
|
1373
|
+
else:
|
|
1374
|
+
msg+=f"""
|
|
1375
|
+
{Fore.spring_green_3a}'Total Items'={Style.bold}{Fore.light_cyan}{TotalItems}{Style.reset}
|
|
1376
|
+
{Fore.spring_green_3a}Total 'CRV Items' (each crv adds an xtra 1)={Fore.light_cyan}{TotalCRVItems}{Style.reset}
|
|
1377
|
+
{Fore.spring_green_3a}Total 'CRV Items QTY Purchased' (each crv adds an xtra for total qty)={Fore.light_cyan}{TTLQtyCrvItem}{Style.reset}
|
|
1378
|
+
|
|
1379
|
+
{Fore.light_sea_green}'Total Items' + 'CRV Items' ={Fore.light_magenta}{TotalCRVItems+TotalItems}{Style.reset}
|
|
1380
|
+
{Fore.light_sea_green}'Total Items' + 'CRV Items QTY Purchased' ={Fore.light_magenta}{TTLQtyCrvItem+TotalItems}{Style.reset}
|
|
1381
|
+
|
|
1382
|
+
{Fore.light_blue}'Total Lines'={Style.bold}{Fore.grey_70}{TotalLines}{Style.reset}
|
|
1383
|
+
{Fore.light_blue}'Total Lines' + 'CRV Items'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1384
|
+
{Fore.light_blue}'Total Lines' + 'CRV Items QTY Purchased'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1385
|
+
{Style.reset}"""
|
|
1370
1386
|
else:
|
|
1371
|
-
msg
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
{Fore.light_blue}'Total Lines'={Style.bold}{Fore.grey_70}{TotalLines}{Style.reset}
|
|
1380
|
-
{Fore.light_blue}'Total Lines' + 'CRV Items'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1381
|
-
{Fore.light_blue}'Total Lines' + 'CRV Items QTY Purchased'={Style.bold}{Fore.grey_70}{TotalLines+TotalCRVItems}{Style.reset}
|
|
1382
|
-
{Style.reset}"""
|
|
1383
|
-
else:
|
|
1384
|
-
msg=f"{Fore.orange_red_1}You need to re-run lsbld to recalculate properly!{Style.reset}"
|
|
1385
|
-
if bldlse:
|
|
1386
|
-
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1387
|
-
if not simple:
|
|
1388
|
-
print(msg)
|
|
1389
|
-
except Exception as e:
|
|
1390
|
-
print(e,"you might try and re-run the cmd")
|
|
1387
|
+
msg=f"{Fore.orange_red_1}You need to re-run lsbld to recalculate properly!{Style.reset}"
|
|
1388
|
+
if bldlse:
|
|
1389
|
+
db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
|
|
1390
|
+
if not simple:
|
|
1391
|
+
print(msg)
|
|
1392
|
+
except Exception as e:
|
|
1393
|
+
print(e,"you might try and re-run the cmd")
|
|
1391
1394
|
|
|
1392
1395
|
while True:
|
|
1393
1396
|
try:
|
|
Binary file
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.710'
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
|
|
|
5
5
|
radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
|
|
6
6
|
radboy/RecordMyCodes.py,sha256=KI7Jmf3MX0Zng_YUvcjVKN2siyUOhaMAHQGzpPuX8KQ,41373
|
|
7
7
|
radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
|
|
8
|
-
radboy/__init__.py,sha256=
|
|
8
|
+
radboy/__init__.py,sha256=vzZ1O8povLvitk06bDOzrScWVvi3A6zhoxFCW_a6ZBI,17
|
|
9
9
|
radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
|
|
11
11
|
radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
|
|
@@ -88,7 +88,7 @@ radboy/DB/OrderedAndRxd.py,sha256=PZ_Rbm0H3DFhHuN1SZEnd1RhEnKOU_L0X0MHXwYN3-s,23
|
|
|
88
88
|
radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
|
|
89
89
|
radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
|
|
90
90
|
radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
|
-
radboy/DB/Prompt.py,sha256=
|
|
91
|
+
radboy/DB/Prompt.py,sha256=njWInNcNMOfJbnaIP1Nn_vo8kZhf3rh5kl4yU0ux8bI,176452
|
|
92
92
|
radboy/DB/RandomStringUtil.py,sha256=eZCpR907WStgfbk4Evcghjv9hOkUDXH-iMXIq0-kXq8,24386
|
|
93
93
|
radboy/DB/ResetTools.py,sha256=RbI-Ua7UlsN0S9qLqtEkTWvzyTZ6R-hHR3CW4NHlUPE,6660
|
|
94
94
|
radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,4013
|
|
@@ -117,7 +117,7 @@ radboy/DB/__pycache__/FormBuilder.cpython-312.pyc,sha256=p1o-5SMRL8OXP_XQ5liUpf-
|
|
|
117
117
|
radboy/DB/__pycache__/PrintLogging.cpython-312.pyc,sha256=pIAFqTi6OiQQORSc-oMH1zAbsdH7sY1TifxrN_QOvnU,148
|
|
118
118
|
radboy/DB/__pycache__/Prompt.cpython-311.pyc,sha256=P2uPRpeqfLFtxieZ0JHBG3X_HZzWUCsFSLb_fpRqky0,6407
|
|
119
119
|
radboy/DB/__pycache__/Prompt.cpython-312.pyc,sha256=6CcQ1gE2hcz3cKPjo4f6d7xNM2PTDnl8NzQG0Pme5BE,142886
|
|
120
|
-
radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=
|
|
120
|
+
radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=SYF8wbzygZI76W567go8OhN4EAElQ8PbpwRMld9Zowk,260481
|
|
121
121
|
radboy/DB/__pycache__/RandomStringUtil.cpython-312.pyc,sha256=TrbEY89MuLmNlvoo5d8vOE6Dyshh5_EMlTZvk8MDVN4,48597
|
|
122
122
|
radboy/DB/__pycache__/RandomStringUtil.cpython-313.pyc,sha256=MCcgVwV2Y-9rAY2FVaJZCKcou3HDX70EZudoiCigT0o,49217
|
|
123
123
|
radboy/DB/__pycache__/ResetTools.cpython-311.pyc,sha256=4Vyc57iAAF0yRPjjglnVKovnTn8OoFIi6Zok3Wpj_YM,9292
|
|
@@ -406,7 +406,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
406
406
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
407
407
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
408
408
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
409
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
409
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=1kdNRoqkQ729ei-HCAXZqhjI_fh21u0ASA8aG4b8TYQ,165
|
|
410
410
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
411
411
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
412
412
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -434,7 +434,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
434
434
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
435
435
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
436
436
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
437
|
-
radboy-0.0.
|
|
438
|
-
radboy-0.0.
|
|
439
|
-
radboy-0.0.
|
|
440
|
-
radboy-0.0.
|
|
437
|
+
radboy-0.0.710.dist-info/METADATA,sha256=KEHxhKJOSI-q-BkbfyU3uNPUXSzTJWHnFDM3K_1U1dU,1891
|
|
438
|
+
radboy-0.0.710.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
439
|
+
radboy-0.0.710.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
440
|
+
radboy-0.0.710.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|