radboy 0.0.352__py3-none-any.whl → 0.0.353__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/TasksMode/Tasks.py CHANGED
@@ -35,7 +35,7 @@ from radboy.InListRestore.ILR import *
35
35
  from radboy.Compare.Compare import *
36
36
  from radboy.Unified.Unified2 import Unified2
37
37
  from copy import copy
38
- from decimal import Decimal
38
+ from decimal import Decimal,getcontext
39
39
  from radboy.GDOWN.GDOWN import *
40
40
  from radboy.Unified.clearalll import clear_all
41
41
 
@@ -289,20 +289,23 @@ class TasksMode:
289
289
  return text
290
290
 
291
291
  def pricing(self):
292
+ prec=int(detectGetOrSet("Price/Tax/CRV Calculator Precision",4,setValue=False,literal=True))
293
+ getcontext().prec=prec
292
294
  while True:
293
295
  try:
294
- default_taxrate=float(detectGetOrSet("Tax Rate",0.0925,setValue=False,literal=True))
295
- default_price=float(detectGetOrSet("pricing default price",1,setValue=False,literal=True))
296
- default_bottle_qty=float(detectGetOrSet("pricing default bottle_qty",1,setValue=False,literal=True))
297
- default_bottle_size=float(detectGetOrSet("pricing default bottle_size",16.9,setValue=False,literal=True))
298
- default_purchased_qty=float(detectGetOrSet("pricing default purchased_qty",1,setValue=False,literal=True))
296
+ default_taxrate=float(Decimal(detectGetOrSet("Tax Rate",0.0925,setValue=False,literal=True)))
297
+ default_price=float(Decimal(detectGetOrSet("pricing default price",1,setValue=False,literal=True)))
298
+ default_bottle_qty=float(Decimal(detectGetOrSet("pricing default bottle_qty",1,setValue=False,literal=True)))
299
+ default_bottle_size=float(Decimal(detectGetOrSet("pricing default bottle_size",16.9,setValue=False,literal=True)))
300
+ default_purchased_qty=float(Decimal(detectGetOrSet("pricing default purchased_qty",1,setValue=False,literal=True)))
299
301
  defaults_msg=f"""
300
302
  {Fore.orange_red_1}Default Settings [changeable under sysset]{Style.reset}
301
303
  {Fore.light_sea_green}default_taxrate=={Fore.turquoise_4}{default_taxrate},
302
304
  {Fore.grey_70}default_price=={Fore.light_yellow}{default_price},
303
305
  {Fore.light_sea_green}default_bottle_qty=={Fore.turquoise_4}{default_bottle_qty},
304
306
  {Fore.grey_70}default_bottle_size=={Fore.light_yellow}{default_bottle_size},
305
- {Fore.light_sea_green}default_purchased_qty=={Fore.turquoise_4}{default_purchased_qty}{Style.reset}"""
307
+ {Fore.light_sea_green}default_purchased_qty=={Fore.turquoise_4}{default_purchased_qty}
308
+ {Fore.grey_70}Price/Tax/CRV Calculator Precision=={Fore.light_yellow}{prec}{Style.reset}"""
306
309
 
307
310
  def beverage_PTCRV_base():
308
311
  result=None
@@ -334,9 +337,9 @@ class TasksMode:
334
337
  bottle_qty=default_bottle_qty
335
338
 
336
339
  if xxx.magnitude < 24:
337
- crv=0.05*bottle_qty
340
+ crv=float(Decimal(0.05)*Decimal(bottle_qty))
338
341
  else:
339
- crv=0.10*bottle_qty
342
+ crv=float(Decimal(0.10)*Decimal(bottle_qty))
340
343
 
341
344
  tax_rate=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"Tax Rate (0.01==1%(Default={default_taxrate})):",helpText="A float or integer",data="float")
342
345
  if tax_rate is None:
@@ -350,10 +353,11 @@ class TasksMode:
350
353
  elif purchased_qty in ['d',]:
351
354
  purchased_qty=default_purchased_qty
352
355
 
353
- price=(price*purchased_qty)+crv
354
- tax=price*tax_rate
356
+ price=(Decimal(price)*Decimal(purchased_qty))+Decimal(crv)
357
+ tax=price*Decimal(tax_rate)
355
358
 
356
- result=round(price+tax,3)
359
+
360
+ result=round(float(Decimal(price)+tax),prec)
357
361
  return result
358
362
 
359
363
  def tax_with_crv():
@@ -386,9 +390,9 @@ class TasksMode:
386
390
  bottle_qty=default_bottle_qty
387
391
 
388
392
  if xxx.magnitude < 24:
389
- crv=0.05*bottle_qty
393
+ crv=Decimal(0.05)*Decimal(bottle_qty)
390
394
  else:
391
- crv=0.10*bottle_qty
395
+ crv=Decimal(0.10)*Decimal(bottle_qty)
392
396
 
393
397
  tax_rate=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"Tax Rate (0.01==1%(Default={default_taxrate})):",helpText="A float or integer",data="float")
394
398
  if tax_rate is None:
@@ -402,10 +406,10 @@ class TasksMode:
402
406
  elif purchased_qty in ['d',]:
403
407
  purchased_qty=default_purchased_qty
404
408
 
405
- price=(price*purchased_qty)+crv
406
- tax=price*tax_rate
409
+ price=Decimal(Decimal(price)*Decimal(purchased_qty))+crv
410
+ tax=price*Decimal(tax_rate)
407
411
 
408
- result=round(tax,3)
412
+ result=round(float(tax),prec)
409
413
  return result
410
414
 
411
415
  def crv_total():
@@ -431,12 +435,12 @@ class TasksMode:
431
435
  bottle_qty=default_bottle_qty
432
436
 
433
437
  if xxx.magnitude < 24:
434
- crv=0.05*bottle_qty
438
+ crv=Decimal(0.05)*Decimal(bottle_qty)
435
439
  else:
436
- crv=0.10*bottle_qty
440
+ crv=Decimal(0.10)*Decimal(bottle_qty)
437
441
 
438
442
 
439
- result=round(crv,3)
443
+ result=round(float(crv),prec)
440
444
  return result
441
445
 
442
446
  def price_tax():
@@ -461,10 +465,10 @@ class TasksMode:
461
465
  elif tax_rate == 'd':
462
466
  tax_rate=default_taxrate
463
467
 
464
- price=price*bottle_qty
465
- tax=price*tax_rate
468
+ price=Decimal(price)*Decimal(bottle_qty)
469
+ tax=price*Decimal(tax_rate)
466
470
 
467
- result=round(price+tax,3)
471
+ result=round(float(price+tax),3)
468
472
  return result
469
473
 
470
474
  def tax_no_crv():
@@ -489,10 +493,10 @@ class TasksMode:
489
493
  elif tax_rate == 'd':
490
494
  tax_rate=default_taxrate
491
495
 
492
- price=price*bottle_qty
493
- tax=price*tax_rate
496
+ price=Decimal(price)*Decimal(bottle_qty)
497
+ tax=price*Decimal(tax_rate)
494
498
 
495
- result=round(tax,3)
499
+ result=round(float(tax),prec)
496
500
  return result
497
501
 
498
502
  def tax_rate_from_priceAndTax():
@@ -512,9 +516,9 @@ class TasksMode:
512
516
  taxed=0
513
517
 
514
518
 
515
- tax_rate=taxed/price
519
+ tax_rate=Decimal(taxed)/Decimal(price)
516
520
 
517
- result=round(tax_rate,3)
521
+ result=round(float(tax_rate),prec)
518
522
  return result
519
523
 
520
524
  def tax_rate_from_oldPriceAndNewPrice():
@@ -532,10 +536,11 @@ class TasksMode:
532
536
  elif new_price in ['','d']:
533
537
  new_price=default_price
534
538
 
535
- taxed=round(new_price-old_price,3)
536
- tax_rate=round(taxed/old_price,3)
539
+ taxed=Decimal(new_price)-Decimal(old_price)
540
+ tax_rate=taxed/Decimal(old_price)
541
+ tax_rate=round(float(tax_rate),prec)
537
542
 
538
- result=round(tax_rate,3)
543
+ result=tax_rate
539
544
  return result
540
545
 
541
546
  while True:
@@ -562,7 +567,7 @@ class TasksMode:
562
567
  },
563
568
  '4':{
564
569
  'cmds':['tax','tax no crv','tax 0 crv','4'],
565
- 'desc':f'{Fore.light_yellow}tax+crv{Fore.medium_violet_red} asking questions like price and qty to get total crv{Style.reset}',
570
+ 'desc':f'{Fore.light_yellow}tax w/o crv{Fore.medium_violet_red} asking questions like price and qty to get total tax without crv{Style.reset}',
566
571
  'exec':tax_no_crv
567
572
  },
568
573
  '5':{
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.352'
1
+ VERSION='0.0.353'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.352
3
+ Version: 0.0.353
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=_oBxnLh0Z3XVfFIPnmK_QBIMvDPa_I9ciceP1jg_iVM,17
8
+ radboy/__init__.py,sha256=LdCBGH3p2BCb5qYCX-X_2EsCoDDPLdyDmN7dczhG_nk,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
@@ -330,7 +330,7 @@ radboy/SystemSettings/__pycache__/__init__.cpython-312.pyc,sha256=aIzp4Po0t8EhSA
330
330
  radboy/SystemSettings/__pycache__/__init__.cpython-313.pyc,sha256=QFDuoidxMWsGVLsy5lN-rDs6TP8nKJ4yyCyiamNOhwo,156
331
331
  radboy/TasksMode/ReFormula.py,sha256=REDRJYub-OEOE6g14oRQOLOQwv8pHqVJy4NQk3CCM90,2255
332
332
  radboy/TasksMode/SetEntryNEU.py,sha256=3nUNDUNyxq4zeMtmUQ7aS1o23P7KhDIMdUPNqPnYbRk,17343
333
- radboy/TasksMode/Tasks.py,sha256=DNPPnCth3tmV8dsvAdJrAp2187DRT1gMjxs78HWyhHg,300766
333
+ radboy/TasksMode/Tasks.py,sha256=xk4l-8Kgc_sGmHLqxcAOATwB5wKAlnL9HzAho3c81gU,301434
334
334
  radboy/TasksMode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
335
335
  radboy/TasksMode/__pycache__/ReFormula.cpython-311.pyc,sha256=QEG3PwVw-8HTd_Mf9XbVcxU56F1fC9yBqWXYPLC39DU,4865
336
336
  radboy/TasksMode/__pycache__/ReFormula.cpython-312.pyc,sha256=aX7BWm2PPjCTnxsbGUitR-2h9hq4AjaBiHMrUXvIl0Y,3967
@@ -339,7 +339,7 @@ radboy/TasksMode/__pycache__/SetEntryNEU.cpython-312.pyc,sha256=pCdFj61aPKkHL6Sv
339
339
  radboy/TasksMode/__pycache__/SetEntryNEU.cpython-313.pyc,sha256=leIelDzPrZE_YgKs0B99osmhyENYtYgi3ErgS2XqSPs,20088
340
340
  radboy/TasksMode/__pycache__/Tasks.cpython-311.pyc,sha256=6QOTJnLiXSKdF81hkhy3vyrz49PPhS20s5_0X52g3Hw,131120
341
341
  radboy/TasksMode/__pycache__/Tasks.cpython-312.pyc,sha256=hyJwdaYaaRLdcrNxgg36diJ5iijX5_3I0UAORsj-6LU,310295
342
- radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=e2FO5tj68YvLyDMr7RHHzwBHOfHcq0Sm945tHHk1HcE,366197
342
+ radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=VWyCbr0kLi4SUdXbnKyEb3rjqAPIF1HnGynaP6lA_js,368151
343
343
  radboy/TasksMode/__pycache__/__init__.cpython-311.pyc,sha256=PKV1JbihEacm639b53bZozRQvcllSkjGP3q8STVMxF4,234
344
344
  radboy/TasksMode/__pycache__/__init__.cpython-312.pyc,sha256=ERgnEvRMiGSecWp1BpNzLdSq_SdKw7GvFWUvUM7bLVw,272
345
345
  radboy/TasksMode/__pycache__/__init__.cpython-313.pyc,sha256=lvsTxukyvGKB3C0rdF9dQi_bvVh6ceDVINfwcuIsd0s,151
@@ -386,7 +386,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
386
386
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
387
387
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
388
388
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
389
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=L4tNvdvdn9QV04q8ekxMKvnkDbqMlIyIDTnkQc8CR8s,165
389
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=5JsvuWJgAz8ewLdAFGFfUpIAKFGeYk10lRbL323TZ18,165
390
390
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
391
391
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
392
392
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -411,7 +411,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
411
411
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
412
412
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
413
413
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
414
- radboy-0.0.352.dist-info/METADATA,sha256=dM7TGRzF6CHGv1QPhkmxEH8rWYCK7nS5Uf_OONuM0rA,794
415
- radboy-0.0.352.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
416
- radboy-0.0.352.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
417
- radboy-0.0.352.dist-info/RECORD,,
414
+ radboy-0.0.353.dist-info/METADATA,sha256=0PwJMjTphoDVaGw0VrhMcGqVBne_siIcf9rBPMatjzA,794
415
+ radboy-0.0.353.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
416
+ radboy-0.0.353.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
417
+ radboy-0.0.353.dist-info/RECORD,,