Skip to content

Commit

Permalink
add: daywise customer details report
Browse files Browse the repository at this point in the history
  • Loading branch information
jabir-tridz committed Sep 8, 2024
1 parent 18a16ec commit 6512592
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 7 deletions.
9 changes: 5 additions & 4 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
7. Item Wise Sales
8. Customer Data
9. Repeated Customers
10. Employee Sales
11. Employee Item Wise Sales
12. Service Wise Sales
13. Time Wise Sales
10. Daywise Customer Details
11. Employee Sales
12. Employee Item Wise Sales
13. Service Wise Sales
14. Time Wise Sales


### Customizable Branch Timings:
Expand Down
2 changes: 1 addition & 1 deletion SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Follow these steps to set up URY Pulse after completing basic ERPNext configurat

#### Step 1 :

- Complete all the steps outlined in the [URY Setup](https://github.com/ury-erp/ury/blob/main/SETUP.md)
- Complete all the steps outlined in the [URY Setup](https://github.com/ury-erp/ury/blob/develop/SETUP.md)

#### Step 2:

Expand Down
Empty file.
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": 6,
"is_standard": "Yes",
"letterhead": null,
"modified": "2024-09-08 13:42:35.264877",
"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": "Accounts User"
}
]
}
14 changes: 12 additions & 2 deletions ury_pulse/ury_pulse/workspace/pulse/pulse.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"hidden": 0,
"is_query_report": 0,
"label": "URY Reports",
"link_count": 13,
"link_count": 14,
"link_type": "DocType",
"onboard": 0,
"type": "Card Break"
Expand Down Expand Up @@ -140,6 +140,16 @@
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 1,
"label": "Daywise Customer Details",
"link_count": 0,
"link_to": "Daywise Customer Details",
"link_type": "Report",
"onboard": 0,
"type": "Link"
},
{
"hidden": 0,
"is_query_report": 1,
Expand Down Expand Up @@ -181,7 +191,7 @@
"type": "Link"
}
],
"modified": "2024-02-12 18:15:38.220508",
"modified": "2024-09-08 13:44:14.749910",
"modified_by": "Administrator",
"module": "URY Pulse",
"name": "Pulse",
Expand Down

0 comments on commit 6512592

Please sign in to comment.