mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
feat: segregate payment by type in sidebar
This commit is contained in:
parent
fd73c643b5
commit
fbb1c4db66
@ -2,6 +2,11 @@ import frappe, { t } from 'frappe';
|
|||||||
import utils from '../../../accounting/utils';
|
import utils from '../../../accounting/utils';
|
||||||
import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts';
|
import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts';
|
||||||
|
|
||||||
|
const paymentTypeMap = {
|
||||||
|
Receive: t`Receive`,
|
||||||
|
Pay: t`Pay`,
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Payment',
|
name: 'Payment',
|
||||||
label: t`Payment`,
|
label: t`Payment`,
|
||||||
@ -57,7 +62,8 @@ export default {
|
|||||||
label: t`Payment Type`,
|
label: t`Payment Type`,
|
||||||
fieldtype: 'Select',
|
fieldtype: 'Select',
|
||||||
placeholder: 'Payment Type',
|
placeholder: 'Payment Type',
|
||||||
options: ['Receive', 'Pay'],
|
options: Object.keys(paymentTypeMap),
|
||||||
|
map: paymentTypeMap,
|
||||||
required: 1,
|
required: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,11 @@ const config = {
|
|||||||
route: '/list/SalesInvoice',
|
route: '/list/SalesInvoice',
|
||||||
doctype: 'SalesInvoice',
|
doctype: 'SalesInvoice',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t`Payments`,
|
||||||
|
route: '/list/Payment/paymentType/Receive',
|
||||||
|
doctype: 'Payment',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t`Customers`,
|
label: t`Customers`,
|
||||||
route: '/list/Customer',
|
route: '/list/Customer',
|
||||||
@ -50,6 +55,11 @@ const config = {
|
|||||||
route: '/list/PurchaseInvoice',
|
route: '/list/PurchaseInvoice',
|
||||||
doctype: 'PurchaseInvoice',
|
doctype: 'PurchaseInvoice',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t`Payments`,
|
||||||
|
route: '/list/Payment/paymentType/Pay',
|
||||||
|
doctype: 'Payment',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t`Suppliers`,
|
label: t`Suppliers`,
|
||||||
route: '/list/Supplier',
|
route: '/list/Supplier',
|
||||||
@ -65,13 +75,8 @@ const config = {
|
|||||||
{
|
{
|
||||||
icon: 'common-entries',
|
icon: 'common-entries',
|
||||||
title: t`Common`,
|
title: t`Common`,
|
||||||
route: '/list/Payment',
|
route: '/list/JournalEntry',
|
||||||
items: [
|
items: [
|
||||||
{
|
|
||||||
label: t`Payments`,
|
|
||||||
route: '/list/Payment',
|
|
||||||
doctype: 'Payment',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: t`Journal Entry`,
|
label: t`Journal Entry`,
|
||||||
route: '/list/JournalEntry',
|
route: '/list/JournalEntry',
|
||||||
|
Loading…
Reference in New Issue
Block a user