fix test for purchase order
This commit is contained in:
parent
525ab0a925
commit
f37d4337a4
@ -16,6 +16,8 @@ month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
|
||||
def create_recurring_documents():
|
||||
manage_recurring_documents("Sales Order")
|
||||
manage_recurring_documents("Sales Invoice")
|
||||
manage_recurring_documents("Purchase Order")
|
||||
manage_recurring_documents("Purchase Invoice")
|
||||
|
||||
def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
"""
|
||||
@ -28,6 +30,10 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
date_field = "transaction_date"
|
||||
elif doctype == "Sales Invoice":
|
||||
date_field = "posting_date"
|
||||
elif doctype == "Purchase Order":
|
||||
date_field = "transaction_date"
|
||||
elif doctype == "Purchase Invoice":
|
||||
date_field = "posting_date"
|
||||
|
||||
recurring_documents = frappe.db.sql("""select name, recurring_id
|
||||
from `tab{}` where ifnull(is_recurring, 0)=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user