2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

refactor: minor cleanups

This commit is contained in:
18alantom 2021-10-19 14:35:47 +05:30
parent f0bdc4e669
commit 7ad7bf7b2f
4 changed files with 5 additions and 10 deletions

View File

@ -99,7 +99,6 @@ module.exports = {
}
},
{
//insert at 3rd position
fieldname: 'gstin',
label: 'GSTIN No.',
fieldtype: 'Data',

View File

@ -68,10 +68,7 @@ module.exports = {
label: 'Tax',
fieldtype: 'Link',
target: 'Tax',
formula: (row, doc) => {
// if (row.tax) return row.tax;
return doc.getFrom('Item', row.item, 'tax');
},
formula: (row, doc) => doc.getFrom('Item', row.item, 'tax'),
formulaDependsOn: ['item']
},
{

View File

@ -200,10 +200,10 @@ export default {
toValue(date) {
// toISOString is buggy and reduces the day by one
// this is because it considers the UTC timestmap
// in order to curcumvent that we need to use luxon/moment
// but that refactor could take some time, so fixing the time differnece
// ass suggested in this answer.
// this is because it considers the UTC timestamp
// in order to circumvent that we need to use luxon/moment
// but that refactor could take some time, so fixing the time difference
// as suggested in this answer.
// https://stackoverflow.com/a/16084846/3541205
date.setHours(0, -date.getTimezoneOffset(), 0, 0);
return date.toISOString().slice(0, 10);

View File

@ -97,7 +97,6 @@ export default {
};
let { filePath } = await remote.dialog.showSaveDialog(options);
console.log(filePath);
if (filePath) {
if (!filePath.endsWith('.pdf')) {
filePath = filePath + '.pdf';