radboy 0.0.408__py3-none-any.whl → 0.0.410__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 CHANGED
@@ -67,44 +67,41 @@ def getExtras(entryId,extras):
67
67
  def getSuperTotal(results,location_fields,colormapped):
68
68
  with db.Session(db.ENGINE) as session:
69
69
  ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",3,setValue=False,literal=True))
70
- master_total=0
71
- master_total_crv=0
72
- master_total_tax=0
73
- master_total_tax_crv=0
70
+ master_total=Decimal("0.00")
71
+ master_total_crv=Decimal("0.00")
72
+ master_total_tax=Decimal("0.00")
73
+ master_total_tax_crv=Decimal("0.00")
74
74
  for num,i in enumerate(results):
75
- total=0
76
- crv=0
77
- tax=0
78
- tax_crv=0
79
- i.Tax=round(i.Tax,ROUNDTO)
80
- i.CRV=round(i.CRV,ROUNDTO)
81
- i.Price=round(i.Price,ROUNDTO)
75
+ total=Decimal("0.00")
76
+ crv=Decimal("0.00")
77
+ tax=Decimal("0.00")
78
+ tax_crv=Decimal("0.00")
79
+ i.Tax=Decimal(i.Tax).quantize(Decimal("0.00"))
80
+ i.CRV=Decimal(i.CRV).quantize(Decimal("0.00"))
81
+ i.Price=Decimal(i.Price).quantize(Decimal("0.00"))
82
82
  session.commit()
83
83
  for n2,f in enumerate(location_fields):
84
84
  try:
85
85
  if getattr(i,f) > 0:
86
- total+=getattr(i,f)
86
+ total+=Decimal(getattr(i,f)).quantize(Decimal("0.00"))
87
87
  except Exception as e:
88
88
  print(e)
89
89
 
90
- master_total+=total*round(i.Price,ROUNDTO)
91
-
92
- crv+=(round(i.CRV,ROUNDTO)*total)
93
- tax+=(round(i.Tax,ROUNDTO)*total)
90
+ master_total+=(total*i.Price)
91
+ #print("exegen 01")
92
+ crv+=(i.CRV*total)
93
+ tax+=(i.Tax*total)
94
94
  if tax == 0 and crv > 0:
95
- tax_crv=(round(i.CRV,ROUNDTO)*total)
95
+ tax_crv=(i.CRV*total)
96
96
  else:
97
- tax_crv+=((round(i.Tax,ROUNDTO)*total)+(round(i.CRV,ROUNDTO)*total))
97
+ #print("exegen 011")
98
+ tax_crv+=((i.Tax*total)+(i.CRV*total))
98
99
  master_total_tax+=tax
99
100
  master_total_crv+=crv
100
101
  master_total_tax_crv+=tax_crv
101
- tax_crv=round(tax_crv,ROUNDTO)
102
+ tax_crv=tax_crv
102
103
 
103
- master_total=round(master_total,ROUNDTO)
104
- master_total_crv=round(master_total_crv,ROUNDTO)
105
- master_total_tax=round(master_total_tax,ROUNDTO)
106
- master_total_tax_crv=round(master_total_tax_crv,ROUNDTO)
107
- return {'final total':round(master_total_tax_crv+master_total,ROUNDTO),'master_total_tax_crv':master_total_tax_crv,'master_total_tax':master_total_tax,'master_total_crv':master_total_crv,'sub_total':master_total}
104
+ return {'final total':master_total_tax_crv+master_total,'master_total_tax_crv':master_total_tax_crv,'master_total_tax':master_total_tax,'master_total_crv':master_total_crv,'sub_total':master_total}
108
105
 
109
106
 
110
107
  class Obfuscate:
@@ -888,10 +885,10 @@ class Prompt(object):
888
885
  return
889
886
  #start
890
887
  ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",3,setValue=False,literal=True))
891
- master_total=0
892
- master_total_crv=0
893
- master_total_tax=0
894
- master_total_tax_crv=0
888
+ master_total=Decimal("0.00")
889
+ master_total_crv=Decimal("0.00")
890
+ master_total_tax=Decimal("0.00")
891
+ master_total_tax_crv=Decimal("0.00")
895
892
 
896
893
  for num,i in enumerate(results):
897
894
  getExtras(i.EntryId,extras)
@@ -915,24 +912,25 @@ class Prompt(object):
915
912
  Fore.deep_pink_4c,
916
913
  Fore.orange_3,
917
914
  ]
918
- total=0
919
- crv=0
920
- tax=0
921
- tax_crv=0
922
- i.Tax=round(i.Tax,ROUNDTO)
923
- i.CRV=round(i.CRV,ROUNDTO)
924
- i.Price=round(i.Price,ROUNDTO)
925
- session.commit()
915
+ #print("#0")
916
+ total=Decimal("0.00")
917
+ crv=Decimal("0.00")
918
+ tax=Decimal("0.0000")
919
+ tax_crv=Decimal("0.00")
920
+ i.Tax=Decimal(i.Tax).quantize(Decimal("0.00"))
921
+ i.CRV=Decimal(i.CRV).quantize(Decimal("0.00"))
922
+ i.Price=Decimal(i.Price).quantize(Decimal("0.00"))
923
+ #print("#1")
926
924
  if not minus:
927
925
  for n2,f in enumerate(location_fields):
928
926
  try:
929
927
  if getattr(i,f) > 0:
930
- total+=getattr(i,f)
928
+ total+=Decimal(getattr(i,f)).quantize(Decimal("0.00"))
931
929
  except Exception as e:
932
930
  print(e)
933
931
  for n2,f in enumerate(location_fields):
934
932
  if getattr(i,f) > 0:
935
- msg2=f'{colormapped[n2]}{f} = {round(getattr(i,f),ROUNDTO)}{Style.reset}'
933
+ msg2=f'{colormapped[n2]}{f} = {Decimal(getattr(i,f)).quantize(Decimal("0.00"))}{Style.reset}'
936
934
  if n2 < len(location_fields):
937
935
  msg2+=","
938
936
  msg+=msg2
@@ -945,52 +943,54 @@ class Prompt(object):
945
943
  print(e)
946
944
  for n2,f in enumerate(location_fields):
947
945
  if getattr(i,f) != 0:
948
- msg2=f'{colormapped[n2]}{f} = {round(getattr(i,f),3)}{Style.reset}'
946
+ msg2=f'{colormapped[n2]}{f} = {Decimal(str(getattr(i,f))).quantize(Decimal("0.00"))}{Style.reset}'
949
947
  if n2 < len(location_fields):
950
948
  msg2+=","
951
949
  msg+=msg2
952
- master_total+=total*round(i.Price,ROUNDTO)
950
+ master_total+=total*Decimal(i.Price).quantize(Decimal("0.00"))
953
951
 
954
- crv+=(round(i.CRV,ROUNDTO)*total)
955
- tax+=(round(i.Tax,ROUNDTO)*total)
952
+ crv+=(Decimal(i.CRV).quantize(Decimal("0.00"))*total)
953
+ tax+=(Decimal(i.Tax).quantize(Decimal("0.00"))*total)
956
954
  if tax == 0 and crv > 0:
957
- tax_crv=(round(i.CRV,ROUNDTO)*total)
955
+ tax_crv=(Decimal(i.CRV).quantize(Decimal("0.00"))*total)
958
956
  else:
959
- tax_crv+=((round(i.Tax,ROUNDTO)*total)+(round(i.CRV,ROUNDTO)*total))
957
+ tax_crv+=(Decimal(i.Tax).quantize(Decimal("0.00"))*total)+(Decimal(i.CRV).quantize(Decimal("0.00")*total))
960
958
  master_total_tax+=tax
961
959
  master_total_crv+=crv
962
960
  master_total_tax_crv+=tax_crv
963
- tax_crv=round(tax_crv,ROUNDTO)
961
+ #print("#exegen",type(total),type(tax_crv))
964
962
  try:
965
- super_total=(round(round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO)/getSuperTotal(results,location_fields,colormapped)['final total'],ROUNDTO))*100
963
+ #super_total=(round(round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO)/getSuperTotal(results,location_fields,colormapped)['final total'],ROUNDTO))*100
964
+ super_total=(total*Decimal(i.Price).quantize(Decimal("0.00"))+tax_crv)/Decimal(getSuperTotal(results,location_fields,colormapped)['final total']*100).quantize(Decimal("100.1500"))
966
965
  except Exception as e:
967
- p1=round(round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO))
968
- p2=getSuperTotal(results,location_fields,colormapped)['final total']
966
+ p1=total*Decimal(i.Price).quantize(Decimal("0.00"))+tax_crv
967
+ p2=Decimal(getSuperTotal(results,location_fields,colormapped)['final total']).quantize(Decimal("0.00"))
969
968
  print(e)
970
969
  print(p1,"p1")
971
970
  print(p2,"p2")
972
971
  super_total=0
973
- msg+=f"""{Fore.light_magenta} |-|{Fore.light_green} Total = {Fore.light_sea_green}{round(total,ROUNDTO)}
974
- {Fore.light_magenta}Price({i.Price}){Fore.medium_violet_red}*{Fore.light_slate_blue}Total({round(total,ROUNDTO)}):{round(i.Price*total,ROUNDTO)}
975
- {Fore.grey_70}+CRV({i.CRV})*Total({round(total,ROUNDTO)}){Fore.slate_blue_1}\n=TotalCRV({crv})+TotalPrice({round(total*i.Price,ROUNDTO)})=NetPrice({round(total*i.Price,ROUNDTO)+crv})
976
- {Fore.grey_70}+Tax({i.Tax}) w/o CRV({i.CRV})*Total({round(total,ROUNDTO)}){Fore.slate_blue_1}\n=TaxNoCRVTotal({tax})+TotalPrice({round(total*i.Price,ROUNDTO)})=NetPrice({round(round(total*i.Price,ROUNDTO)+tax,ROUNDTO)})
977
- {Fore.grey_70}+Tax({i.Tax}) w/ CRV({i.CRV})*Total({round(total,ROUNDTO)}){Fore.slate_blue_1}\n=TaxCRVTotal({tax_crv})+TotalPrice({round(total*i.Price,ROUNDTO)})=NetPrice({round(round(total*i.Price,ROUNDTO)+tax_crv,ROUNDTO)})
978
- {Fore.medium_violet_red}PercentOfTotal({round(super_total,ROUNDTO)}) of Total({getSuperTotal(results,location_fields,colormapped)['final total']})
972
+ #print("#exegen2")
973
+ msg+=f"""{Fore.light_magenta} |-|{Fore.light_green} Total = {Fore.light_sea_green}{total}
974
+ {Fore.light_magenta}Price({Decimal(i.Price).quantize(Decimal("0.00"))}){Fore.medium_violet_red}*{Fore.light_slate_blue}Total({total}):{Decimal(i.Price).quantize(Decimal("0.00"))*total}
975
+ {Fore.grey_70}+CRV({Decimal(i.CRV).quantize(Decimal("0.00"))})*Total({round(total,ROUNDTO)}){Fore.slate_blue_1}\n=TotalCRV({crv})+TotalPrice({total*Decimal(i.Price).quantize(Decimal("0.00"))})=NetPrice({total*Decimal(i.Price).quantize(Decimal("0.00"))+crv})
976
+ {Fore.grey_70}+Tax({Decimal(i.Tax).quantize(Decimal("0.00"))}) w/o CRV({Decimal(i.CRV).quantize(Decimal("0.00"))})*Total({total}){Fore.slate_blue_1}\n=TaxNoCRVTotal({tax})+TotalPrice({round(total*i.Price,ROUNDTO)})=NetPrice({total*Decimal(i.Price).quantize(Decimal("0.00"))+tax})
977
+ {Fore.grey_70}+Tax({Decimal(i.Tax).quantize(Decimal("0.00"))}) w/ CRV({Decimal(i.CRV).quantize(Decimal("0.00"))})*Total({total}){Fore.slate_blue_1}\n=TaxCRVTotal({tax_crv})+TotalPrice({round(total*i.Price,ROUNDTO)})=NetPrice({total*Decimal(i.Price).quantize(Decimal("0.00"))+tax_crv})
978
+ {Fore.medium_violet_red}PercentOfTotal({super_total}) of Total({getSuperTotal(results,location_fields,colormapped)['final total']})
979
979
  {'*'*os.get_terminal_size().columns}{Style.reset}"""
980
980
  if bldlse:
981
981
  db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
982
982
  print(msg)
983
- master_total=round(master_total,ROUNDTO)
984
- master_total_crv=round(master_total_crv,ROUNDTO)
985
- master_total_tax=round(master_total_tax,ROUNDTO)
986
- master_total_tax_crv=round(master_total_tax_crv,ROUNDTO)
983
+ master_total=Decimal(str(master_total)).quantize(Decimal("0.00"))
984
+ master_total_crv=Decimal(str(master_total_crv)).quantize(Decimal("0.00"))
985
+ master_total_tax=Decimal(str(master_total_tax)).quantize(Decimal("0.00"))
986
+ master_total_tax_crv=Decimal(str(master_total_tax_crv)).quantize(Decimal("0.00"))
987
987
 
988
- actual=master_total_crv+master_total+master_total_tax
988
+ actual=(master_total_crv+master_total)+master_total_tax
989
989
 
990
- msg=f"""{Fore.light_green}Total Product Value:{Fore.slate_blue_1}{round(master_total,ROUNDTO)}
991
- {Fore.light_green}Total Product Value w/CRV({master_total_crv}):{Fore.slate_blue_1}{round(master_total_crv+master_total,ROUNDTO)}
992
- {Fore.light_green}Total Product Value Taxed w/o CRV({master_total_tax}):{Fore.slate_blue_1}{round(master_total_tax+master_total,ROUNDTO)}
993
- {Fore.light_green}Total Product Value Taxed w/ CRV({master_total_tax_crv}):{Fore.slate_blue_1}{Decimal(str(actual)).quantize(Decimal("0.00"))}
990
+ msg=f"""{Fore.light_green}Total Product Value:{Fore.slate_blue_1}{master_total}
991
+ {Fore.light_green}Total Product Value w/CRV({master_total_crv}):{Fore.slate_blue_1}{master_total_crv+master_total}
992
+ {Fore.light_green}Total Product Value Taxed w/o CRV({master_total_tax}):{Fore.slate_blue_1}{master_total_tax+master_total}
993
+ {Fore.light_green}Total Product Value Taxed w/ CRV({master_total_tax_crv}):{Fore.slate_blue_1}{actual}
994
994
  {Style.reset}"""
995
995
  if bldlse:
996
996
  db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.408'
1
+ VERSION='0.0.410'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.408
3
+ Version: 0.0.410
4
4
  Summary: A small example package
5
5
  Author: Carl Joseph Hirner III
6
6
  Author-email: Carl Hirner III <k.j.hirner.wisdom@gmail.com>
@@ -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=XXy-o5Z_yOgrgHNju4iqM3h7xhRBkNIoHG1qePtBnGY,41316
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=2g-PeYKHvWT5KkVRigZSL7MCxr-21F2KoqbriyCKABc,17
8
+ radboy/__init__.py,sha256=moQCG2LTPOhCfaaFLS8jngdyMIyCbM_bJu-JWhZ_xd0,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
@@ -83,7 +83,7 @@ radboy/DB/ExerciseTracker.py,sha256=CZ8jdKJiAE_QTAiJTRXi8ZOnS1NUiSvWVSKLHLpYVGk,
83
83
  radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
84
84
  radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
85
85
  radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
- radboy/DB/Prompt.py,sha256=v0jj8NSvUpFcnfwxSd4CIzx6ZBuq4XTrq3rbFJt9m-M,127549
86
+ radboy/DB/Prompt.py,sha256=p0mp93cvH-lBPB5pJSSn3Mep-5rOrM5_Gua35BmnfnI,128397
87
87
  radboy/DB/RandomStringUtil.py,sha256=eZCpR907WStgfbk4Evcghjv9hOkUDXH-iMXIq0-kXq8,24386
88
88
  radboy/DB/ResetTools.py,sha256=RbI-Ua7UlsN0S9qLqtEkTWvzyTZ6R-hHR3CW4NHlUPE,6660
89
89
  radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,4013
@@ -107,7 +107,7 @@ radboy/DB/__pycache__/FormBuilder.cpython-312.pyc,sha256=p1o-5SMRL8OXP_XQ5liUpf-
107
107
  radboy/DB/__pycache__/PrintLogging.cpython-312.pyc,sha256=pIAFqTi6OiQQORSc-oMH1zAbsdH7sY1TifxrN_QOvnU,148
108
108
  radboy/DB/__pycache__/Prompt.cpython-311.pyc,sha256=P2uPRpeqfLFtxieZ0JHBG3X_HZzWUCsFSLb_fpRqky0,6407
109
109
  radboy/DB/__pycache__/Prompt.cpython-312.pyc,sha256=6CcQ1gE2hcz3cKPjo4f6d7xNM2PTDnl8NzQG0Pme5BE,142886
110
- radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=MH4zNn9mwETj0OuVTGiCd47bfeMoZr4uR09_T5xeVSI,197775
110
+ radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=wtEG2bk5GgLKPbQ_mfKsvWCC_uBj1alAaX6Ulw1Org4,199925
111
111
  radboy/DB/__pycache__/RandomStringUtil.cpython-312.pyc,sha256=TrbEY89MuLmNlvoo5d8vOE6Dyshh5_EMlTZvk8MDVN4,48597
112
112
  radboy/DB/__pycache__/RandomStringUtil.cpython-313.pyc,sha256=MCcgVwV2Y-9rAY2FVaJZCKcou3HDX70EZudoiCigT0o,49217
113
113
  radboy/DB/__pycache__/ResetTools.cpython-311.pyc,sha256=4Vyc57iAAF0yRPjjglnVKovnTn8OoFIi6Zok3Wpj_YM,9292
@@ -388,7 +388,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
388
388
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
389
389
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
390
390
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
391
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=dJtaOhmdITIBFn8SkucZlfDGzLT0GpNO4AcEUSzM79E,165
391
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=UQ0TUlJabuEjzwccKLmqFkotF3Iyf00qNQZelUI1FO8,165
392
392
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
393
393
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
394
394
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -413,7 +413,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
413
413
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
414
414
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
415
415
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
416
- radboy-0.0.408.dist-info/METADATA,sha256=RpD4VADdftm5QuzIo2dSKaycFhkIgeaibtlODaHb_Xc,794
417
- radboy-0.0.408.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
418
- radboy-0.0.408.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
419
- radboy-0.0.408.dist-info/RECORD,,
416
+ radboy-0.0.410.dist-info/METADATA,sha256=MwjMjE5YZudIbLn5EYcG_kNN8EHb8NNt-Uu5gciD2Vc,794
417
+ radboy-0.0.410.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
418
+ radboy-0.0.410.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
419
+ radboy-0.0.410.dist-info/RECORD,,