inr_value:GWM
This commit is contained in:
parent
5bf6f37330
commit
c639c62abe
@ -25,6 +25,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
is_active: { type: DataTypes.INTEGER },
|
is_active: { type: DataTypes.INTEGER },
|
||||||
value: { type: DataTypes.INTEGER },
|
value: { type: DataTypes.INTEGER },
|
||||||
sub_value: { type: DataTypes.STRING },
|
sub_value: { type: DataTypes.STRING },
|
||||||
|
inr_value: { type: DataTypes.INTEGER },
|
||||||
createdby: { type: DataTypes.INTEGER },
|
createdby: { type: DataTypes.INTEGER },
|
||||||
updatedby: { type: DataTypes.INTEGER },
|
updatedby: { type: DataTypes.INTEGER },
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,10 @@ const { logMsg } = require('../services/logger.js');
|
|||||||
update_array_data.forEach((value,index) => {
|
update_array_data.forEach((value,index) => {
|
||||||
if(value.value != null)
|
if(value.value != null)
|
||||||
{
|
{
|
||||||
Financials.update( { value: value.value , is_editable : 0 } , { where: { entity_id: value.entityid , itemid: value.itemid , fy:value.year} })
|
// Replace this with the INR value you want to convert
|
||||||
|
lakhsValue = convertINRtoLakhs(value.value);
|
||||||
|
|
||||||
|
Financials.update( { inr_value:value.value,value: lakhsValue , is_editable : 0 } , { where: { entity_id: value.entityid , itemid: value.itemid , fy:value.year} })
|
||||||
.then(data => { logMsg.info("update success : "+ data); })
|
.then(data => { logMsg.info("update success : "+ data); })
|
||||||
.catch(err => { logMsg.info("update failed : " + err); });
|
.catch(err => { logMsg.info("update failed : " + err); });
|
||||||
}
|
}
|
||||||
@ -133,6 +136,12 @@ const { logMsg } = require('../services/logger.js');
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function convertINRtoLakhs(inrValue) {
|
||||||
|
return inrValue / 100000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
lineItemFetching : lineItemFetching ,
|
lineItemFetching : lineItemFetching ,
|
||||||
lineItemMapping : lineItemMapping ,
|
lineItemMapping : lineItemMapping ,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user