diff --git a/models/doctype/PurchaseInvoice/PurchaseInvoiceList.js b/models/doctype/PurchaseInvoice/PurchaseInvoiceList.js
index 8fde9d54..d6ba799d 100644
--- a/models/doctype/PurchaseInvoice/PurchaseInvoiceList.js
+++ b/models/doctype/PurchaseInvoice/PurchaseInvoiceList.js
@@ -1,5 +1,5 @@
import { _ } from 'frappejs/utils';
-import indicators from 'frappejs/ui/constants/indicators';
+import Badge from '@/components/Badge';
export default {
doctype: 'PurchaseInvoice',
@@ -13,17 +13,17 @@ export default {
fieldtype: 'Select',
size: 'small',
options: ['Status...', 'Paid', 'Pending'],
- getValue(doc) {
+ render(doc) {
+ let status = 'Pending';
+ let color = 'orange';
if (doc.submitted === 1 && doc.outstandingAmount === 0.0) {
- return 'Paid';
+ status = 'Paid';
+ color = 'green';
}
- return 'Pending';
- },
- getIndicator(doc) {
- if (doc.submitted === 1 && doc.outstandingAmount === 0.0) {
- return indicators.GREEN;
- }
- return indicators.ORANGE;
+ return {
+ template: `