2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: minor fixes

- empty date import issue
- rename payment amount to allocated amount
- increase tooltip distance threshold
This commit is contained in:
18alantom 2022-03-02 11:28:07 +05:30
parent 2f6ecff36b
commit 37de2675cd
3 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export default {
},
{
fieldname: 'amount',
label: t`Amount`,
label: t`Allocated Amount`,
fieldtype: 'Currency',
formula: (row, doc) => {
return (

View File

@ -163,7 +163,7 @@ export default {
bottom: { type: Number, default: 0 },
left: { type: Number, default: 55 },
extendGridX: { type: Number, default: -20 },
tooltipDispDistThreshold: { type: Number, default: 20 },
tooltipDispDistThreshold: { type: Number, default: 40 },
},
computed: {
fontStyle() {

View File

@ -1,4 +1,4 @@
import { Doc, Map, Field, FieldType } from '@/types/model';
import { Doc, Field, FieldType, Map } from '@/types/model';
import frappe from 'frappe';
import { isNameAutoSet } from 'frappe/model/naming';
import { parseCSV } from './csvParser';
@ -50,6 +50,9 @@ interface TemplateField {
function formatValue(value: string, fieldtype: FieldType): unknown {
switch (fieldtype) {
case FieldType.Date:
if (value === '') {
return '';
}
return new Date(value);
case FieldType.Currency:
// @ts-ignore