Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
65 changes: 65 additions & 0 deletions ram_custom/ram_custom/report/dcr_report/dcr_report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright (c) 2026, ramees and contributors
// For license information, please see license.txt

//Filters for DCR Report

frappe.query_reports["DCR Report"] = {
"filters": [
{
"fieldname": "date",
"label": "Date",
"fieldtype": "Date",
"default": frappe.datetime.get_today(),
"reqd": 0
},
{
"fieldname": "type",
"label": "Type",
"fieldtype": "Select",
"options": "\nCash Sales\nCard Sales\nCredit Sales\nCash Purchases\nCard Purchases\nCredit Purchases\nSales Return\nPurchase Return\nCustomer Receipts\nSupplier Payments\nBank Receipts\nBank Payments\nCash Receipts\nCash Payments\nJournal Entry\nInternal Transfer",
"reqd": 0
},
{
"fieldname": "company",
"label": "Company",
"fieldtype": "Link",
"options": "Company",
"reqd": 0
},
{
"fieldname": "cost_center",
"label": "Cost Center",
"fieldtype": "Link",
"options": "Cost Center",
"get_query": function() {
var company = frappe.query_report.get_filter_value("company");
if (company) {
return {
"filters": {
"company": company
}
};
} else {
return {};
}
}
}
],

// Types into a clickable link

"formatter": function(value, row, column, data, default_formatter) {

value = default_formatter(value, row, column, data);

if (column.fieldname === "type" && data && data.voucher_type && data.voucher_no) {

return `<a href="/app/${frappe.router.slug(data.voucher_type)}/${data.voucher_no}"
style="color:#000000; text-decoration:underline;">
${value}
</a>`;
}

return value;
}
};
34 changes: 34 additions & 0 deletions ram_custom/ram_custom/report/dcr_report/dcr_report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"add_total_row": 0,
"add_translate_data": 0,
"columns": [],
"creation": "2026-05-14 12:58:52.995088",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"filters": [],
"idx": 0,
"is_standard": "Yes",
"letter_head": null,
"modified": "2026-05-14 12:58:52.995088",
"modified_by": "Administrator",
"module": "Ram Custom",
"name": "DCR Report",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "GL Entry",
"report_name": "DCR Report",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
],
"timeout": 0
}
Loading
Loading