mirror of
https://github.com/frappe/books.git
synced 2025-02-10 07:59:03 +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 eventDate = DateTime.fromISO(doc.date);
|
||||
const diff = eventDate.diff(today);
|
||||
|
||||
return Math.floor(diff.as('day'));
|
||||
let daydiff = Math.floor(diff.as('day'));
|
||||
return daydiff+1;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ module.exports = {
|
||||
label: 'Account',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
formula : (doc) => doc.getFrom('Party', doc.customer , 'default_account'),
|
||||
fetch: (doc) => doc.getFrom('Party', doc.customer , 'default_account'),
|
||||
getFilters: (query, control) => {
|
||||
return {
|
||||
keywords: ['like', query],
|
||||
|
Loading…
x
Reference in New Issue
Block a user