mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
fix(ux): rename Purchase Invoice to Bill & Sales Invoice to Invoice
This commit is contained in:
parent
bc17e72cda
commit
95867541df
@ -5,7 +5,7 @@ import PurchaseInvoice from './PurchaseInvoiceDocument';
|
||||
export default {
|
||||
name: 'PurchaseInvoice',
|
||||
doctype: 'DocType',
|
||||
label: 'Purchase Invoice',
|
||||
label: 'Bill',
|
||||
documentClass: PurchaseInvoice,
|
||||
printTemplate: InvoiceTemplate,
|
||||
isSingle: 0,
|
||||
@ -20,33 +20,33 @@ export default {
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
readOnly: 1
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
fieldtype: 'Date',
|
||||
default: () => new Date().toISOString().slice(0, 10)
|
||||
default: () => new Date().toISOString().slice(0, 10),
|
||||
},
|
||||
{
|
||||
fieldname: 'supplier',
|
||||
label: 'Supplier',
|
||||
fieldtype: 'Link',
|
||||
target: 'Supplier',
|
||||
required: 1
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
formula: doc => doc.getFrom('Party', doc.supplier, 'defaultAccount'),
|
||||
formula: (doc) => doc.getFrom('Party', doc.supplier, 'defaultAccount'),
|
||||
getFilters: () => {
|
||||
return {
|
||||
isGroup: 0,
|
||||
accountType: 'Payable'
|
||||
accountType: 'Payable',
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: 'currency',
|
||||
@ -54,83 +54,83 @@ export default {
|
||||
fieldtype: 'Link',
|
||||
target: 'Currency',
|
||||
hidden: 1,
|
||||
formula: doc => doc.getFrom('Party', doc.supplier, 'currency'),
|
||||
formulaDependsOn: ['supplier']
|
||||
formula: (doc) => doc.getFrom('Party', doc.supplier, 'currency'),
|
||||
formulaDependsOn: ['supplier'],
|
||||
},
|
||||
{
|
||||
fieldname: 'exchangeRate',
|
||||
label: 'Exchange Rate',
|
||||
fieldtype: 'Float',
|
||||
formula: doc => doc.getExchangeRate(),
|
||||
required: true
|
||||
formula: (doc) => doc.getExchangeRate(),
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'items',
|
||||
label: 'Items',
|
||||
fieldtype: 'Table',
|
||||
childtype: 'PurchaseInvoiceItem',
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'netTotal',
|
||||
label: 'Net Total',
|
||||
fieldtype: 'Currency',
|
||||
formula: doc => doc.getSum('items', 'amount'),
|
||||
formula: (doc) => doc.getSum('items', 'amount'),
|
||||
readOnly: 1,
|
||||
getCurrency: doc => doc.currency
|
||||
getCurrency: (doc) => doc.currency,
|
||||
},
|
||||
{
|
||||
fieldname: 'baseNetTotal',
|
||||
label: 'Net Total (Company Currency)',
|
||||
fieldtype: 'Currency',
|
||||
formula: doc => doc.netTotal * doc.exchangeRate,
|
||||
readOnly: 1
|
||||
formula: (doc) => doc.netTotal * doc.exchangeRate,
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'taxes',
|
||||
label: 'Taxes',
|
||||
fieldtype: 'Table',
|
||||
childtype: 'TaxSummary',
|
||||
formula: doc => doc.getTaxSummary(),
|
||||
readOnly: 1
|
||||
formula: (doc) => doc.getTaxSummary(),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'grandTotal',
|
||||
label: 'Grand Total',
|
||||
fieldtype: 'Currency',
|
||||
formula: doc => doc.getGrandTotal(),
|
||||
formula: (doc) => doc.getGrandTotal(),
|
||||
readOnly: 1,
|
||||
getCurrency: doc => doc.currency
|
||||
getCurrency: (doc) => doc.currency,
|
||||
},
|
||||
{
|
||||
fieldname: 'baseGrandTotal',
|
||||
label: 'Grand Total (Company Currency)',
|
||||
fieldtype: 'Currency',
|
||||
formula: doc => doc.grandTotal * doc.exchangeRate,
|
||||
readOnly: 1
|
||||
formula: (doc) => doc.grandTotal * doc.exchangeRate,
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'outstandingAmount',
|
||||
label: 'Outstanding Amount',
|
||||
fieldtype: 'Currency',
|
||||
formula: doc => {
|
||||
formula: (doc) => {
|
||||
if (doc.submitted) return;
|
||||
return doc.baseGrandTotal;
|
||||
},
|
||||
readOnly: 1
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'terms',
|
||||
label: 'Terms',
|
||||
fieldtype: 'Text'
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'cancelled',
|
||||
label: 'Cancelled',
|
||||
fieldtype: 'Check',
|
||||
default: 0
|
||||
}
|
||||
default: 0,
|
||||
},
|
||||
],
|
||||
|
||||
actions: getActions('PurchaseInvoice')
|
||||
actions: getActions('PurchaseInvoice'),
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default {
|
||||
name: 'PurchaseInvoiceSettings',
|
||||
label: 'Purchase Invoice Settings',
|
||||
label: 'Bills Settings',
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -12,7 +12,7 @@ export default {
|
||||
fieldtype: 'Link',
|
||||
target: 'NumberSeries',
|
||||
required: 1,
|
||||
default: 'PINV'
|
||||
}
|
||||
]
|
||||
default: 'PINV',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ import SalesInvoice from './SalesInvoiceDocument';
|
||||
|
||||
export default {
|
||||
name: 'SalesInvoice',
|
||||
label: 'Sales Invoice',
|
||||
label: 'Invoice',
|
||||
doctype: 'DocType',
|
||||
documentClass: SalesInvoice,
|
||||
printTemplate: InvoiceTemplate,
|
||||
|
@ -5,7 +5,8 @@ class GeneralLedger {
|
||||
const filters = {};
|
||||
if (params.account) filters.account = params.account;
|
||||
if (params.party) filters.party = params.party;
|
||||
if (params.referenceType) filters.referenceType = params.referenceType;
|
||||
if (params.referenceType !== 'All')
|
||||
filters.referenceType = params.referenceType;
|
||||
if (params.referenceName) filters.referenceName = params.referenceName;
|
||||
if (params.toDate || params.fromDate) {
|
||||
filters.date = [];
|
||||
|
@ -8,8 +8,9 @@ const viewConfig = {
|
||||
{
|
||||
fieldtype: 'Select',
|
||||
options: [
|
||||
{ label: 'Sales Invoice', value: 'SalesInvoice' },
|
||||
{ label: 'Purchase Invoice', value: 'PurchaseInvoice' },
|
||||
{ label: 'All References', value: 'All' },
|
||||
{ label: 'Invoices', value: 'SalesInvoice' },
|
||||
{ label: 'Bills', value: 'PurchaseInvoice' },
|
||||
{ label: 'Payment', value: 'Payment' },
|
||||
{ label: 'Journal Entry', value: 'JournalEntry' },
|
||||
],
|
||||
@ -17,6 +18,7 @@ const viewConfig = {
|
||||
label: 'Reference Type',
|
||||
fieldname: 'referenceType',
|
||||
placeholder: 'Reference Type',
|
||||
default: 'All',
|
||||
},
|
||||
{
|
||||
fieldtype: 'DynamicLink',
|
||||
|
@ -85,7 +85,7 @@ export default {
|
||||
data: () => ({
|
||||
invoices: [
|
||||
{
|
||||
title: 'Sales Invoices',
|
||||
title: 'Invoices',
|
||||
doctype: 'SalesInvoice',
|
||||
total: 0,
|
||||
unpaid: 0,
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
barWidth: 40
|
||||
},
|
||||
{
|
||||
title: 'Purchase Invoices',
|
||||
title: 'Bills',
|
||||
doctype: 'PurchaseInvoice',
|
||||
total: 0,
|
||||
unpaid: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user