mirror of
https://github.com/frappe/books.git
synced 2025-02-14 01:40:26 +00:00
created default party account and corrected date-remaining in Event (#67)
* creating a default party account * changed formula to fetch in invoices * proper naming convention for daydiff
This commit is contained in:
parent
91f6c693e0
commit
0b4cbfe35a
@ -26,8 +26,8 @@ module.exports = {
|
|||||||
const today = DateTime.local();
|
const today = DateTime.local();
|
||||||
const eventDate = DateTime.fromISO(doc.date);
|
const eventDate = DateTime.fromISO(doc.date);
|
||||||
const diff = eventDate.diff(today);
|
const diff = eventDate.diff(today);
|
||||||
|
let daydiff = Math.floor(diff.as('day'));
|
||||||
return Math.floor(diff.as('day'));
|
return daydiff+1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ module.exports = {
|
|||||||
label: 'Account',
|
label: 'Account',
|
||||||
fieldtype: 'Link',
|
fieldtype: 'Link',
|
||||||
target: 'Account',
|
target: 'Account',
|
||||||
formula : (doc) => doc.getFrom('Party', doc.customer , 'default_account'),
|
fetch: (doc) => doc.getFrom('Party', doc.customer , 'default_account'),
|
||||||
getFilters: (query, control) => {
|
getFilters: (query, control) => {
|
||||||
return {
|
return {
|
||||||
keywords: ['like', query],
|
keywords: ['like', query],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user