This commit is contained in:
Xuan Loi
2026-01-04 10:38:09 +07:00
parent 960ab65fa1
commit 476ecf5f9f
6 changed files with 2 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ def account_entry_api(code, amount, content, type, category, userid, ref=None, p
user = User.objects.get(id=userid)
entry_type = Entry_Type.objects.get(code=type)
entry_category = Entry_Category.objects.get(id=category)
system_date = date if date else datetime.now.strftime("%Y-%m-%d")
system_date = date if date else datetime.now().strftime("%Y-%m-%d")
with transaction.atomic():
account = Internal_Account.objects.select_for_update().get(code=code)
@@ -79,6 +79,7 @@ def account_entry_api(code, amount, content, type, category, userid, ref=None, p
#==========================================================================================
@api_view(['POST'])
def account_entry(request):
print(request.data.get('date'))
ref = request.data.get('ref')
data = account_entry_api(
code=request.data['code'],