diff --git a/.gitignore b/.gitignore index 6284626..a0ea4b7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ build *.pickle *.camel *.sqlite +*.sqlite-journal tmp *.json *.pyc @@ -15,4 +16,5 @@ __pycache__ *.DS_Store uploads *.txt -*.db \ No newline at end of file +*.db +*.db-journal diff --git a/setup.py b/setup.py index 7b9bab1..6277710 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ description='A Python Library for Islamic Financial Management.', author='Abdelaziz Elrashed Elshaikh Mohamed', author_email='aeemh.sdn@gmail.com', - classifiers = [ + classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', @@ -26,4 +26,4 @@ 'camelx', 'pony', ], -) \ No newline at end of file +) diff --git a/zakat/zakat_tracker.py b/zakat/zakat_tracker.py index 5333c42..7ed40bc 100644 --- a/zakat/zakat_tracker.py +++ b/zakat/zakat_tracker.py @@ -3223,8 +3223,8 @@ def _transfer(self, unscaled_amount: float | int | Decimal, from_account: int, t ''') y = self._log(value=target_amount, desc=f'TRANSFER {from_account} -> {to_account}', account_id=to_account, - created=new_age, ref=None, debug=debug) - times.append((new_age, y)) + created=None, ref=None, debug=debug) + times.append((age, y)) continue else: box = Box.get(account=to_account, record_date=age) @@ -3239,8 +3239,8 @@ def _transfer(self, unscaled_amount: float | int | Decimal, from_account: int, t box.rest += target_amount y = self._log(value=target_amount, desc=f'TRANSFER {from_account} -> {to_account}', account_id=to_account, - created=new_age, ref=None, debug=debug) - times.append((new_age, y)) + created=None, ref=None, debug=debug) + times.append((age, y)) continue if debug: print( @@ -3544,7 +3544,7 @@ def _zakat( if not parts_exist: db.execute(f''' UPDATE box - SET rest = rest - {box['rest']} + SET rest = rest - {box['box_rest']} WHERE id = {box['ref']}; ''') self.log(-float(amount), desc='zakat-زكاة', account_id=x, created=None, ref=box['box_time'], debug=debug) @@ -3643,7 +3643,7 @@ def vault(self, section: Vault = Vault.ALL) -> dict: } def snapshot(self) -> bool: - pass + return True def ext(self) -> str | None: return 'sqlite' if self._file_exists else None