Where can i retrieve the mode of payment wise details (table name for Query) in erpnext 14 (awesome pos sales invoices)
in this query need to get mode of payment wise
SELECT
tabSales Invoice Item
.item_group
,
tabSales Invoice
.company
,
SUM(tabSales Invoice Item
.qty
) AS total_quantity,
SUM(tabSales Invoice Item
.amount
) AS total_amount
FROM
tabSales Invoice
JOIN
tabSales Invoice Item
ON tabSales Invoice
.name
= tabSales Invoice Item
.parent
WHERE
tabSales Invoice
.docstatus
= 1
AND tabSales Invoice
.posting_date
BETWEEN %(from_date)s AND %(to_date)s
GROUP BY
tabSales Invoice Item
.item_group
,
tabSales Invoice
.company
ORDER BY
tabSales Invoice
.company
ASC,
tabSales Invoice Item
.item_group
ASC;
Your logic doesn’t understand what you want
Mode of payment is available in the Payment entry reference so you have to make a Join query for that.