2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +00:00

feat: segregate payment by type in sidebar

This commit is contained in:
18alantom 2022-03-10 12:12:02 +05:30
parent fd73c643b5
commit fbb1c4db66
2 changed files with 18 additions and 7 deletions

View File

@ -2,6 +2,11 @@ import frappe, { t } from 'frappe';
import utils from '../../../accounting/utils';
import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts';
const paymentTypeMap = {
Receive: t`Receive`,
Pay: t`Pay`,
};
export default {
name: 'Payment',
label: t`Payment`,
@ -57,7 +62,8 @@ export default {
label: t`Payment Type`,
fieldtype: 'Select',
placeholder: 'Payment Type',
options: ['Receive', 'Pay'],
options: Object.keys(paymentTypeMap),
map: paymentTypeMap,
required: 1,
},
{

View File

@ -28,6 +28,11 @@ const config = {
route: '/list/SalesInvoice',
doctype: 'SalesInvoice',
},
{
label: t`Payments`,
route: '/list/Payment/paymentType/Receive',
doctype: 'Payment',
},
{
label: t`Customers`,
route: '/list/Customer',
@ -50,6 +55,11 @@ const config = {
route: '/list/PurchaseInvoice',
doctype: 'PurchaseInvoice',
},
{
label: t`Payments`,
route: '/list/Payment/paymentType/Pay',
doctype: 'Payment',
},
{
label: t`Suppliers`,
route: '/list/Supplier',
@ -65,13 +75,8 @@ const config = {
{
icon: 'common-entries',
title: t`Common`,
route: '/list/Payment',
route: '/list/JournalEntry',
items: [
{
label: t`Payments`,
route: '/list/Payment',
doctype: 'Payment',
},
{
label: t`Journal Entry`,
route: '/list/JournalEntry',