mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
[script report] purchase register in new style
This commit is contained in:
43
accounts/report/purchase_register/purchase_register.js
Normal file
43
accounts/report/purchase_register/purchase_register.js
Normal file
@@ -0,0 +1,43 @@
|
||||
wn.query_reports["Purchase Register"] = {
|
||||
"add_total_row": true,
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": "From Date",
|
||||
"fieldtype": "Date",
|
||||
"default": wn.defaults.get_user_default("year_start_date"),
|
||||
"width": "80"
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": "To Date",
|
||||
"fieldtype": "Date",
|
||||
"default": get_today()
|
||||
},
|
||||
{
|
||||
"fieldname":"account",
|
||||
"label": "Account",
|
||||
"fieldtype": "Link",
|
||||
"options": "Account",
|
||||
"get_query": function() {
|
||||
var company = wn.query_report.filters_by_name.company.get_value();
|
||||
return {
|
||||
"query": "accounts.utils.get_account_list",
|
||||
"filters": {
|
||||
"is_pl_account": "No",
|
||||
"debit_or_credit": "Credit",
|
||||
"company": company,
|
||||
"master_type": "Supplier"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"fieldname":"company",
|
||||
"label": "Company",
|
||||
"fieldtype": "Link",
|
||||
"options": "Company",
|
||||
"default": sys_defaults.company
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user