diff --git a/models/doctype/Payment/Payment.js b/models/doctype/Payment/Payment.js
index c326c66d..3e0b472a 100644
--- a/models/doctype/Payment/Payment.js
+++ b/models/doctype/Payment/Payment.js
@@ -74,6 +74,7 @@ export default {
placeholder: 'Payment Method',
fieldtype: 'Select',
options: ['', 'Cash', 'Cheque', 'Transfer'],
+ default: 'Cash',
required: 1,
},
{
diff --git a/models/doctype/Transaction/Transaction.js b/models/doctype/Transaction/Transaction.js
index f6d43c06..239fe2bf 100644
--- a/models/doctype/Transaction/Transaction.js
+++ b/models/doctype/Transaction/Transaction.js
@@ -1,6 +1,6 @@
import frappe from 'frappejs';
import utils from '../../../accounting/utils';
-import { openQuickEdit, getStatusAndColor } from '@/utils';
+import { openQuickEdit, getInvoiceStatus, statusColor } from '@/utils';
import Badge from '@/components/Badge';
export function getStatusColumn() {
@@ -9,7 +9,8 @@ export function getStatusColumn() {
fieldname: 'status',
fieldtype: 'Select',
render(doc) {
- const { status, color } = getStatusAndColor(doc);
+ const status = getInvoiceStatus(doc);
+ const color = statusColor[status];
return {
template: `${status}`,
components: { Badge },
diff --git a/src/components/StatusBadge.vue b/src/components/StatusBadge.vue
new file mode 100644
index 00000000..df0077ba
--- /dev/null
+++ b/src/components/StatusBadge.vue
@@ -0,0 +1,23 @@
+
+ {{
+ status
+ }}
+
+
diff --git a/src/pages/InvoiceForm.vue b/src/pages/InvoiceForm.vue
index 3f8b6796..ad145434 100644
--- a/src/pages/InvoiceForm.vue
+++ b/src/pages/InvoiceForm.vue
@@ -3,9 +3,7 @@
- {{
- status
- }}
+