removed isFarmer property

This commit is contained in:
Alex Moreno 2022-04-12 14:27:06 +02:00
parent 3d8f851de8
commit 73ee790f8d
3 changed files with 1 additions and 19 deletions

View File

@ -100,12 +100,7 @@ module.exports = Self => {
},
]
};
let supplier = await Self.app.models.Supplier.findOne(filter);
const farmerCode = 2;
if (supplier.sageWithholdingFk == farmerCode)
supplier.isFarmer = true;
return supplier;
return Self.app.models.Supplier.findOne(filter);
};
};

View File

@ -25,12 +25,4 @@ describe('Supplier getSummary()', () => {
expect(payMethod.name).toEqual('PayMethod one');
});
it(`should get if supplier is farmer by sageWithholdingFk`, async() => {
const supplier = await app.models.Supplier.findById(2);
const supplierSummary = await app.models.Supplier.getSummary(2);
expect(supplier.isFarmer).toBeUndefined();
expect(supplierSummary.isFarmer).toEqual(true);
});
});

View File

@ -83,11 +83,6 @@
label="Account"
value="{{::$ctrl.summary.account}}">
</vn-label-value>
<vn-check
label="Is Farmer"
ng-model="$ctrl.summary.isFarmer"
disabled="true">
</vn-check>
</vn-one>
</vn-horizontal>
<vn-horizontal>