diff --git a/models/baseModels/Item/Item.ts b/models/baseModels/Item/Item.ts
index f35cc3f3..b3339570 100644
--- a/models/baseModels/Item/Item.ts
+++ b/models/baseModels/Item/Item.ts
@@ -78,7 +78,8 @@ export class Item extends Doc {
static getActions(fyo: Fyo): Action[] {
return [
{
- label: fyo.t`New Sale`,
+ group: fyo.t`Create`,
+ label: fyo.t`Sales Invoice`,
condition: (doc) => !doc.notInserted && doc.for !== 'Purchases',
action: async (doc, router) => {
const invoice = await fyo.doc.getNewDoc('SalesInvoice');
@@ -91,7 +92,8 @@ export class Item extends Doc {
},
},
{
- label: fyo.t`New Purchase`,
+ group: fyo.t`Create`,
+ label: fyo.t`Purchase Invoice`,
condition: (doc) => !doc.notInserted && doc.for !== 'Sales',
action: async (doc, router) => {
const invoice = await fyo.doc.getNewDoc('PurchaseInvoice');
diff --git a/src/components/Controls/Color.vue b/src/components/Controls/Color.vue
index dd4d8a77..bf01e335 100644
--- a/src/components/Controls/Color.vue
+++ b/src/components/Controls/Color.vue
@@ -40,7 +40,7 @@
{
- let index = this.highlightedIndex;
- if (index !== 0) {
- index -= 1;
- }
this.scrollToHighlighted();
});
},
diff --git a/src/components/Report/ListReport.vue b/src/components/Report/ListReport.vue
index 30c05af9..ecba6955 100644
--- a/src/components/Report/ListReport.vue
+++ b/src/components/Report/ListReport.vue
@@ -16,7 +16,7 @@
:key="c + '-col'"
:style="getCellStyle(col, c)"
class="
- text-gray-600 text-base
+ text-base
px-3
flex-shrink-0
overflow-x-auto
@@ -54,13 +54,14 @@
:key="`${c}-${r}-cell`"
:style="getCellStyle(cell, c)"
class="
- text-gray-900 text-base
+ text-base
px-3
flex-shrink-0
overflow-x-auto
whitespace-nowrap
no-scrollbar
"
+ :class="[getCellColorClass(cell)]"
>
{{ cell.value }}
@@ -174,13 +175,33 @@ export default defineComponent({
styles['padding-left'] = `${cell.indent * 2}rem`;
}
+ return styles;
+ },
+ getCellColorClass(cell) {
if (cell.color === 'red') {
- styles['color'] = '#e53e3e';
+ return 'text-red-600';
} else if (cell.color === 'green') {
- styles['color'] = '#38a169';
+ return 'text-green-600';
}
- return styles;
+ if (!cell.rawValue) {
+ return 'text-gray-600';
+ }
+
+ if (typeof cell.rawValue !== 'number') {
+ return 'text-gray-900';
+ }
+
+ if (cell.rawValue === 0) {
+ return 'text-gray-600';
+ }
+
+ const prec = this.fyo?.singles?.displayPrecision ?? 2;
+ if (Number(cell.rawValue.toFixed(prec)) === 0) {
+ return 'text-gray-600';
+ }
+
+ return 'text-gray-900';
},
},
components: { Paginator, WithScroll },