* feat: pos register report * feat: group by fields in pos register * chore: add paid amount column * fix: (minor) remove redundant group by label
77 lines
1.7 KiB
JavaScript
77 lines
1.7 KiB
JavaScript
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
|
// For license information, please see license.txt
|
|
/* eslint-disable */
|
|
|
|
frappe.query_reports["POS Register"] = {
|
|
"filters": [
|
|
{
|
|
"fieldname":"company",
|
|
"label": __("Company"),
|
|
"fieldtype": "Link",
|
|
"options": "Company",
|
|
"default": frappe.defaults.get_user_default("Company"),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"from_date",
|
|
"label": __("From Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldname":"to_date",
|
|
"label": __("To Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.get_today(),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldname":"pos_profile",
|
|
"label": __("POS Profile"),
|
|
"fieldtype": "Link",
|
|
"options": "POS Profile"
|
|
},
|
|
{
|
|
"fieldname":"cashier",
|
|
"label": __("Cashier"),
|
|
"fieldtype": "Link",
|
|
"options": "User"
|
|
},
|
|
{
|
|
"fieldname":"customer",
|
|
"label": __("Customer"),
|
|
"fieldtype": "Link",
|
|
"options": "Customer"
|
|
},
|
|
{
|
|
"fieldname":"mode_of_payment",
|
|
"label": __("Payment Method"),
|
|
"fieldtype": "Link",
|
|
"options": "Mode of Payment"
|
|
},
|
|
{
|
|
"fieldname":"group_by",
|
|
"label": __("Group by"),
|
|
"fieldtype": "Select",
|
|
"options": ["", "POS Profile", "Cashier", "Payment Method", "Customer"],
|
|
"default": "POS Profile"
|
|
},
|
|
{
|
|
"fieldname":"is_return",
|
|
"label": __("Is Return"),
|
|
"fieldtype": "Check"
|
|
},
|
|
],
|
|
"formatter": function(value, row, column, data, default_formatter) {
|
|
value = default_formatter(value, row, column, data);
|
|
if (data && data.bold) {
|
|
value = value.bold();
|
|
|
|
}
|
|
return value;
|
|
}
|
|
};
|