-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: daywise customer details report
- Loading branch information
1 parent
18a16ec
commit 8dc8171
Showing
4 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
56 changes: 56 additions & 0 deletions
56
ury_pulse/ury_pulse/report/daywise_customer_details/daywise_customer_details.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"add_total_row": 0, | ||
"columns": [], | ||
"creation": "2024-08-23 15:24:43.592459", | ||
"disabled": 0, | ||
"docstatus": 0, | ||
"doctype": "Report", | ||
"filters": [ | ||
{ | ||
"fieldname": "start_date", | ||
"fieldtype": "Date", | ||
"label": "From Date", | ||
"mandatory": 1, | ||
"wildcard_filter": 0 | ||
}, | ||
{ | ||
"fieldname": "end_date", | ||
"fieldtype": "Date", | ||
"label": "To Date", | ||
"mandatory": 1, | ||
"wildcard_filter": 0 | ||
}, | ||
{ | ||
"fieldname": "branch", | ||
"fieldtype": "Link", | ||
"label": "Branch", | ||
"mandatory": 1, | ||
"options": "Branch", | ||
"wildcard_filter": 0 | ||
} | ||
], | ||
"idx": 0, | ||
"is_standard": "Yes", | ||
"letterhead": null, | ||
"modified": "2024-08-23 18:42:46.860954", | ||
"modified_by": "Administrator", | ||
"module": "URY Pulse", | ||
"name": "Daywise Customer Details", | ||
"owner": "Administrator", | ||
"prepared_report": 0, | ||
"query": "SELECT\n b.customer AS \"Customer ID\",\n b.customer_name AS \"Customer Name\",\n b.mobile_number AS \"Mobile Number\"\nFROM \n (\n SELECT %(start_date)s AS `date`\n UNION\n SELECT DATE_ADD(%(start_date)s, INTERVAL n DAY) AS `date`\n FROM (\n SELECT a.N + b.N * 10 + c.N * 100 + 1 AS n\n FROM (\n SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9\n ) AS a\n CROSS JOIN (\n SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9\n ) AS b\n CROSS JOIN (\n SELECT 0 AS N UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9\n ) AS c\n ORDER BY n\n ) AS nums\n WHERE DATE_ADD(%(start_date)s, INTERVAL n DAY) < %(end_date)s\n UNION\n SELECT %(end_date)s AS `date`\n ) AS date_list\nLEFT JOIN `tabPOS Invoice` b ON (\n b.`branch` = %(branch)s\n AND b.`status` IN (\"Consolidated\", \"Paid\")\n AND b.`docstatus` = 1\n)\nLEFT JOIN `tabURY Report Settings` rs ON (\n rs.`branch` = %(branch)s\n)\nWHERE\n(\n ((rs.`hours` IS NULL OR rs.`hours` = 0) AND b.`posting_date` = date_list.`date`)\n OR (rs.`hours` > 0 AND TIMESTAMP(b.`posting_date`, b.`posting_time`) <= TIMESTAMP(DATE_ADD(date_list.`date`, INTERVAL 1 DAY), CONCAT(LPAD(rs.`hours`, 2, '0'), ':00:00')) AND TIMESTAMP(b.`posting_date`, b.`posting_time`) >= TIMESTAMP(date_list.`date`, CONCAT(LPAD(rs.`hours`, 2, '0'), ':00:00')))\n OR (rs.`branch` IS NULL AND b.`posting_date` = date_list.`date`)\n)\nGROUP BY\n b.customer\nORDER BY\n b.customer_name;", | ||
"ref_doctype": "POS Invoice", | ||
"report_name": "Daywise Customer Details", | ||
"report_type": "Query Report", | ||
"roles": [ | ||
{ | ||
"role": "URY Manager" | ||
}, | ||
{ | ||
"role": "Accounts Manager" | ||
}, | ||
{ | ||
"role": "Academics User" | ||
} | ||
] | ||
} |