Skip to content

Comments

update Task.py in Library Management #3

Open
zeref02 wants to merge 3 commits intofrappe:masterfrom
zeref02:master
Open

update Task.py in Library Management #3
zeref02 wants to merge 3 commits intofrappe:masterfrom
zeref02:master

Conversation

@zeref02
Copy link

@zeref02 zeref02 commented Nov 17, 2015

for d in frappe.db.sql("""select name, article, article_name, library_member, member_name
    from `tabLibrary Transaction` order by transaction_date desc, modified desc""", as_dict=1):

    if d.article in articles_transacted:
        continue

    if d.transaction_type=="Issue" and date_diff(today, d.transaction_date) > loan_period:
        overdue_by_member.setdefault(d.library_member, [])
        overdue_by_member[d.library_member].append(d)

    articles_transacted.append(d.article)

Here, there is no "transaction_date" and "transaction_type" in the query, but it was used in the following section of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants