radboy 0.0.624__py3-none-any.whl → 0.0.625__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.

@@ -286,7 +286,7 @@ except Exception as e:
286
286
  OrderedAndRecieved.metadata.create_all(ENGINE)
287
287
 
288
288
  class OrderAndRxdUi():
289
- def between_dates(self,paged=False,limit=False,short_display=False):
289
+ def between_dates(self,query):
290
290
  '''list everything between start and end
291
291
  paged=True -> page results and use menu to edit/delete/stop paging
292
292
  paged=False -> print all at once
@@ -294,9 +294,27 @@ class OrderAndRxdUi():
294
294
  limit=False -> everything is printed
295
295
  short_display=True -> display less information
296
296
  '''
297
- with Session(ENGINE) as session:
298
- start=None
299
- end=None
297
+ start=Control(func=FormBuilderMkText,ptext="Start DateTime: ",helpText="starting datetime",data="datetime")
298
+ if start is None:
299
+ return
300
+ elif not isinstance(start,datetime):
301
+ return
302
+
303
+ end=Control(func=FormBuilderMkText,ptext="End DateTime: ",helpText="ending datetime",data="datetime")
304
+ if end is None:
305
+ return
306
+ elif not isinstance(end,datetime):
307
+ return
308
+ print(f""""
309
+ {Fore.orange_red_1}Results are for dates between
310
+ {Fore.light_green}Start: {start}
311
+ {Fore.light_red}End: {end}
312
+ {'-'*(os.get_terminal_size().columns-len(Style.reset))}{Style.reset}
313
+ """)
314
+ return orderQuery(query.filter(and_(
315
+ OrderedAndRecieved.dtoe >= start,
316
+ OrderedAndRecieved.dtoe <= end))
317
+ ,OrderedAndRecieved.dtoe,inverse=True)
300
318
 
301
319
  def fixtable(self):
302
320
  OrderedAndRecieved.__table__.drop(ENGINE)
@@ -323,7 +341,7 @@ class OrderAndRxdUi():
323
341
  #uncomment these to troubleshoot
324
342
  #print('x3',and_(*filte))
325
343
  #print('x4')
326
- return and_(*filte)
344
+
327
345
 
328
346
  def OrderedAndRecieved_as(self,_exlcudes=[],as_=None,item=None):
329
347
  excludes=['oarid',]
@@ -417,33 +435,43 @@ class OrderAndRxdUi():
417
435
  continue
418
436
 
419
437
 
420
- if terms is not None:
421
- with Session(ENGINE) as session:
422
- query=session.query(OrderedAndRecieved).filter(terms)
423
- query=orderQuery(query,OrderedAndRecieved.dtoe)
424
- results=query.all()
425
- ct=len(results)
426
- plural=''
427
- if ct > 1:
428
- plural="s"
429
- print(f"{ct} result{plural}!")
430
- zebra=0
431
-
432
-
433
- if selector:
434
- #for returning a list of OrderedAndRecieved
435
- selectortext(resuls)
436
- zebra+=1
437
- pass
438
- if menu:
439
- #for paged edit/delete of OrderedAndRecieved and returns None
440
- selectortext(results,page=True)
441
- zebra+=1
442
- pass
443
-
444
- if not(zebra > 0):
445
- for num,i in enumerate(results):
446
- print(std_colorize(i,num,ct))
438
+
439
+ with Session(ENGINE) as session:
440
+ query=session.query(OrderedAndRecieved)
441
+ if terms is not None:
442
+ query=query.filter(terms)
443
+ query=orderQuery(query,OrderedAndRecieved.dtoe)
444
+ between_dates=Control(func=FormBuilderMkText,ptext="Between dates? y/n",helpText="values between two dates",data="boolean")
445
+ if between_dates is None:
446
+ return None
447
+ if between_dates in ['d',False]:
448
+ pass
449
+ else:
450
+ query=self.between_dates(query)
451
+
452
+ results=query.all()
453
+ ct=len(results)
454
+ plural=''
455
+ if ct > 1:
456
+ plural="s"
457
+ print(f"{ct} result{plural}!")
458
+ zebra=0
459
+
460
+
461
+ if selector:
462
+ #for returning a list of OrderedAndRecieved
463
+ selectortext(resuls)
464
+ zebra+=1
465
+ pass
466
+ if menu:
467
+ #for paged edit/delete of OrderedAndRecieved and returns None
468
+ selectortext(results,page=True)
469
+ zebra+=1
470
+ pass
471
+
472
+ if not(zebra > 0):
473
+ for num,i in enumerate(results):
474
+ print(std_colorize(i,num,ct))
447
475
 
448
476
 
449
477
  def __init__(self,*args,**kwargs):
@@ -504,7 +532,7 @@ class OrderAndRxdUi():
504
532
  elif i in self.registry:
505
533
  self.cmds[cmd]['cmds'].pop(self.cmds[cmd]['cmds'].index(i))
506
534
  htext.append(std_colorize(f"{self.cmds[cmd]['cmds']} - {self.cmds[cmd]['desc']}",xnum,ct))
507
- htext=''.join(htext)
535
+ htext='\n'.join(htext)
508
536
  print(htext)
509
537
  while True:
510
538
  doWhat=Control(func=FormBuilderMkText,ptext=f"{self.__class__.__name__}:Do What what",helpText=htext,data="string")
@@ -538,6 +566,6 @@ class OrderAndRxdUi():
538
566
  for k in fd:
539
567
  setattr(t,k,fd[k])
540
568
  session.commit()
541
- session.refresh(t)
542
-
543
- print(t)
569
+ session.refresh(t)
570
+
571
+ print(t)
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.624'
1
+ VERSION='0.0.625'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.624
3
+ Version: 0.0.625
4
4
  Summary: A Retail Calculator for Android/Linux
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=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=zsaFEMBLbBD9s1uLpdqx4u15pKazpCbSGLadHmQMhTA,17
8
+ radboy/__init__.py,sha256=kM9c_XEi4wIBSRbfAb3gaCSwns39NLVMpTKPwRCr7FI,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/DatePicker.py,sha256=B75mDtXQrkHRCpoU9TJsaBVvkK37ykMaJyaiqGOo4dM,18334
83
83
  radboy/DB/DisplayItemDb.py,sha256=uVvrNyFyBuKvrw-BEPXKYvfa-QWyFN5ahESi2l6vUUA,52046
84
84
  radboy/DB/EstimatedPayCalendarWorkSheet.txt,sha256=GOjRSmGxFoNTdAnpPe2kGv7CkXDrh0Mee01HslamGbo,17173
85
85
  radboy/DB/ExerciseTracker.py,sha256=OS9i8jGIZPj-6m1bB0-eKNHQ6vf2iv_AYPEc0s4bkBM,27809
86
- radboy/DB/OrderedAndRxd.py,sha256=cGkArh68IUezdjmIUW7SyyMmlqc9I0nUk5tO97sD4FQ,22021
86
+ radboy/DB/OrderedAndRxd.py,sha256=PZ_Rbm0H3DFhHuN1SZEnd1RhEnKOU_L0X0MHXwYN3-s,23004
87
87
  radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
88
88
  radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
89
89
  radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -401,7 +401,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
401
401
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
402
402
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
403
403
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
404
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=XjG6Qxfo2bHdj0vNthHIleAvFa_xcrEFqDO9aFUs-Oo,165
404
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=PwghP7D7Hp6F0l9WfJ7UFwhWxDfCE2OFMs8I41QaQcI,165
405
405
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
406
406
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
407
407
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -429,7 +429,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
429
429
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
430
430
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
431
431
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
432
- radboy-0.0.624.dist-info/METADATA,sha256=2qMfXoCVvw_dfSXrwBsTReyiJ9dlrCMO7Q3G2WIhg2w,1662
433
- radboy-0.0.624.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
434
- radboy-0.0.624.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
435
- radboy-0.0.624.dist-info/RECORD,,
432
+ radboy-0.0.625.dist-info/METADATA,sha256=uRMe1S_9LCWLpD_c1OZFyGJQfnrw_ANTLHcKBTrAAns,1662
433
+ radboy-0.0.625.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
434
+ radboy-0.0.625.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
435
+ radboy-0.0.625.dist-info/RECORD,,